17 #define IC_UTIL_LIST(ICU) \
19 ICU(KeyedLoadIC_Miss) \
21 ICU(CallIC_Customization_Miss) \
24 ICU(SharedStoreIC_ExtendStorage) \
25 ICU(KeyedStoreIC_Miss) \
26 ICU(KeyedStoreIC_Slow) \
28 ICU(StoreCallbackProperty) \
29 ICU(LoadPropertyWithInterceptorOnly) \
30 ICU(LoadPropertyWithInterceptor) \
31 ICU(LoadElementWithInterceptor) \
32 ICU(StorePropertyWithInterceptor) \
34 ICU(BinaryOpIC_Miss) \
35 ICU(CompareNilIC_Miss) \
45 #define CONST_NAME(name) k##name,
91 bool IsLoadStub()
const {
92 return target()->is_load_stub() ||
target()->is_keyed_load_stub();
95 bool IsStoreStub()
const {
96 return target()->is_store_stub() ||
target()->is_keyed_store_stub();
99 bool IsCallStub()
const {
return target()->is_call_stub(); }
102 template <
class TypeClass>
104 Context* native_context);
106 bool receiver_is_holder,
125 typename T::Region* region);
165 bool target_remains_ic_stub);
187 if (
kind_ == Code::KEYED_LOAD_IC)
return Code::LOAD_IC;
189 kind_ == Code::KEYED_STORE_IC);
307 const CallICState&
state);
311 CallICState::CallType call_type);
339 if (receiver->IsGlobalObject()) {
366 if (
kind() == Code::LOAD_IC) {
422 static const int kSlowCaseBitFieldMask =
451 return StrictModeState::encode(
flag);
454 return StrictModeState::decode(
state);
459 static const ExtraICState kStrictModeState = 1 << StrictModeState::kShift;
535 :
public BitField<KeyedAccessStoreMode, 2, 4> {};
539 return StrictModeState::encode(
flag) |
540 ExtraICStateKeyedAccessStoreMode::encode(
mode);
545 return ExtraICStateKeyedAccessStoreMode::decode(extra_state);
572 if (strict_mode ==
STRICT) {
633 bool strict()
const {
return op_ == Token::EQ_STRICT; }
BinaryOpIC(Isolate *isolate)
void PatchMegamorphic(Handle< Object > function, Handle< TypeFeedbackVector > vector, Handle< Smi > slot)
bool DoCustomHandler(Handle< Object > receiver, Handle< Object > function, Handle< TypeFeedbackVector > vector, Handle< Smi > slot, const CallICState &state)
static void Clear(Isolate *isolate, Address address, Code *target, ConstantPoolArray *constant_pool)
static Handle< Code > initialize_stub(Isolate *isolate, int argc, CallICState::CallType call_type)
IC::State FeedbackToState(Handle< TypeFeedbackVector > vector, Handle< Smi > slot) const
void HandleMiss(Handle< Object > receiver, Handle< Object > function, Handle< TypeFeedbackVector > vector, Handle< Smi > slot)
InlineCacheState ic_state()
static bool HasInlinedSmiCode(Address address)
CompareIC(Isolate *isolate, Token::Value op)
static Condition ComputeCondition(Token::Value op)
Condition GetCondition() const
CompareNilIC(Isolate *isolate)
static Handle< Code > GetUninitialized()
static Handle< T > null()
IC_Utility(IC::UtilityId id)
static void PostPatching(Address address, Code *target, Code *old_target)
MaybeHandle< Object > TypeError(const char *type, Handle< Object > object, Handle< Object > key)
MaybeHandle< Code > maybe_handler_
void update_receiver_type(Handle< Object > receiver)
Code * GetOriginalCode() const
static Address AddressFromUtilityId(UtilityId id)
static void SetTargetAtAddress(Address address, Code *target, ConstantPoolArray *constant_pool)
static Handle< Map > TypeToMap(HeapType *type, Isolate *isolate)
Handle< HeapType > receiver_type()
bool IsNameCompatibleWithPrototypeFailure(Handle< Object > name)
static Code * GetTargetAtAddress(Address address, ConstantPoolArray *constant_pool)
void UpdateState(Handle< Object > receiver, Handle< Object > name)
ConstantPoolArray * constant_pool() const
MaybeHandle< Object > ReferenceError(const char *type, Handle< Name > name)
Handle< ConstantPoolArray > raw_constant_pool_
void set_extra_ic_state(ExtraICState state)
void TargetTypes(TypeHandleList *list)
void MarkPrototypeFailure(Handle< Object > name)
static T::TypeHandle MapToType(Handle< Map > map, typename T::Region *region)
DISALLOW_IMPLICIT_CONSTRUCTORS(IC)
Isolate * isolate() const
ExtraICState extra_ic_state_
Code::Kind handler_kind() const
SharedFunctionInfo * GetSharedFunctionInfo() const
bool IsTransitionOfMonomorphicTarget(Map *source_map, Map *target_map)
IC(FrameDepth depth, Isolate *isolate)
MapHandleList target_maps_
void TargetMaps(MapHandleList *list)
static void Clear(Isolate *isolate, Address address, ConstantPoolArray *constant_pool)
virtual Handle< Code > CompileHandler(LookupIterator *lookup, Handle< Object > value, CacheHolderFlag cache_holder)
void UpdateMonomorphicIC(Handle< Code > handler, Handle< Name > name)
Code * raw_target() const
void PatchCache(Handle< Name > name, Handle< Code > code)
static JSFunction * GetRootConstructor(TypeClass *type, Context *native_context)
void CopyICToMegamorphicCache(Handle< Name > name)
ExtraICState extra_ic_state() const
char TransitionMarkFromState(IC::State state)
Handle< HeapType > receiver_type_
Handle< Code > target() const
void set_target(Code *code)
static void OnTypeFeedbackChanged(Isolate *isolate, Address address, State old_state, State new_state, bool target_remains_ic_stub)
bool UpdatePolymorphicIC(Handle< Name > name, Handle< Code > code)
static Handle< HeapType > CurrentTypeOf(Handle< Object > object, Isolate *isolate)
static bool IsCleared(Code *code)
ConstantPoolArray * raw_constant_pool() const
static Handle< Map > GetHandlerCacheHolder(HeapType *type, bool receiver_is_holder, Isolate *isolate, CacheHolderFlag *flag)
void UpdateMegamorphicCache(HeapType *type, Name *name, Code *code)
bool TryRemoveInvalidPrototypeDependentStub(Handle< Object > receiver, Handle< String > name)
static Handle< Map > GetICCacheHolder(HeapType *type, Isolate *isolate, CacheHolderFlag *flag)
static void RegisterWeakMapDependency(Handle< Code > stub)
virtual Handle< Code > megamorphic_stub()
void TraceIC(const char *type, Handle< Object > name)
static void InvalidateMaps(Code *stub)
Handle< Code > ComputeHandler(LookupIterator *lookup, Handle< Object > value=Handle< Code >::null())
static void GeneratePreMonomorphic(MacroAssembler *masm)
static void GenerateInitialize(MacroAssembler *masm)
Handle< Code > string_stub()
KeyedLoadIC(FrameDepth depth, Isolate *isolate)
Handle< Code > generic_stub() const
static void GenerateMiss(MacroAssembler *masm)
virtual Handle< Code > pre_monomorphic_stub() const
static void GenerateString(MacroAssembler *masm)
static void GenerateRuntimeGetProperty(MacroAssembler *masm)
static void GenerateGeneric(MacroAssembler *masm)
static ExtraICState ComputeExtraICState(StrictMode flag, KeyedAccessStoreMode mode)
static KeyedAccessStoreMode GetKeyedAccessStoreMode(ExtraICState extra_state)
static void GenerateMiss(MacroAssembler *masm)
static Handle< Code > pre_monomorphic_stub(Isolate *isolate, StrictMode strict_mode)
Handle< Code > sloppy_arguments_stub()
static void GeneratePreMonomorphic(MacroAssembler *masm)
static void GenerateSlow(MacroAssembler *masm)
static void GenerateSloppyArguments(MacroAssembler *masm)
KeyedStoreIC(FrameDepth depth, Isolate *isolate)
virtual Handle< Code > pre_monomorphic_stub() const
static void GenerateGeneric(MacroAssembler *masm, StrictMode strict_mode)
static void GenerateInitialize(MacroAssembler *masm)
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
static void GeneratePreMonomorphic(MacroAssembler *masm)
void UpdateCaches(LookupIterator *lookup)
static ExtraICState ComputeExtraICState(ContextualMode contextual_mode)
static void GenerateNormal(MacroAssembler *masm)
void set_target(Code *code)
static void GenerateRuntimeGetProperty(MacroAssembler *masm)
static Handle< Code > initialize_stub(Isolate *isolate, ExtraICState extra_state)
MUST_USE_RESULT MaybeHandle< Object > Load(Handle< Object > object, Handle< Name > name)
LoadIC(FrameDepth depth, Isolate *isolate)
Handle< Code > SimpleFieldLoad(FieldIndex index)
Handle< Code > slow_stub() const
virtual Handle< Code > megamorphic_stub() OVERRIDE
ContextualMode contextual_mode() const
virtual Handle< Code > CompileHandler(LookupIterator *lookup, Handle< Object > unused, CacheHolderFlag cache_holder)
static void Clear(Isolate *isolate, Address address, Code *target, ConstantPoolArray *constant_pool)
static void GenerateMiss(MacroAssembler *masm)
static void GenerateInitialize(MacroAssembler *masm)
virtual Handle< Code > pre_monomorphic_stub() const
bool IsUndeclaredGlobal(Handle< Object > receiver)
static const int kHasIndexedInterceptor
static const int kIsAccessCheckNeeded
@ CERTAINLY_NOT_STORE_FROM_KEYED
static void GeneratePreMonomorphic(MacroAssembler *masm)
static void GenerateMiss(MacroAssembler *masm)
StoreIC(FrameDepth depth, Isolate *isolate)
static void GenerateInitialize(MacroAssembler *masm)
static StrictMode GetStrictMode(ExtraICState state)
static void GenerateMegamorphic(MacroAssembler *masm)
StrictMode strict_mode() const
static ExtraICState ComputeExtraICState(StrictMode flag)
static void GenerateRuntimeSetProperty(MacroAssembler *masm, StrictMode strict_mode)
static void GenerateNormal(MacroAssembler *masm)
static void GenerateSlow(MacroAssembler *masm)
ToBooleanIC(Isolate *isolate)
#define WARN_UNUSED_RESULT
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define IC_UTIL_LIST(ICU)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
DECLARE_RUNTIME_FUNCTION(Debug_Break)
@ DISABLE_INLINED_SMI_CHECK
@ ENABLE_INLINED_SMI_CHECK
TypeImpl< HeapTypeConfig > HeapType
Handle< T > handle(T *t, Isolate *isolate)
void PatchInlinedSmiCode(Address address, InlinedSmiCheck check)
kFeedbackVectorOffset flag
KeyedStoreIncrementLength
Debugger support for the V8 JavaScript engine.