1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 #include "src/ic/ic-state.h"
9 #include "src/macro-assembler.h"
15 // IC_UTIL_LIST defines all utility functions called from generated
16 // inline caching code. The argument for the macro, ICU, is the function name.
17 #define IC_UTIL_LIST(ICU) \
19 ICU(KeyedLoadIC_Miss) \
21 ICU(CallIC_Customization_Miss) \
24 ICU(KeyedStoreIC_Miss) \
25 ICU(KeyedStoreIC_Slow) \
26 /* Utilities for IC stubs. */ \
27 ICU(StoreCallbackProperty) \
28 ICU(LoadPropertyWithInterceptorOnly) \
29 ICU(LoadPropertyWithInterceptor) \
30 ICU(LoadElementWithInterceptor) \
31 ICU(StorePropertyWithInterceptor) \
33 ICU(BinaryOpIC_Miss) \
34 ICU(CompareNilIC_Miss) \
38 // IC is the base class for LoadIC, StoreIC, KeyedLoadIC, and KeyedStoreIC.
42 // The ids for utility called from the generated code.
44 #define CONST_NAME(name) k##name,
45 IC_UTIL_LIST(CONST_NAME)
50 // Looks up the address of the named utility.
51 static Address AddressFromUtilityId(UtilityId id);
53 // Alias the inline cache state type to make the IC code more readable.
54 typedef InlineCacheState State;
56 // The IC code is either invoked with no extra frames on the stack
57 // or with a single extra frame for supporting calls.
58 enum FrameDepth { NO_EXTRA_FRAME = 0, EXTRA_CALL_FRAME = 1 };
60 // Construct the IC structure with the given number of extra
61 // JavaScript frames on the stack.
62 IC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL,
63 bool for_queries_only = false);
66 State state() const { return state_; }
67 inline Address address() const;
69 // Compute the current IC state based on the target stub, receiver and name.
70 void UpdateState(Handle<Object> receiver, Handle<Object> name);
72 bool IsNameCompatibleWithPrototypeFailure(Handle<Object> name);
73 void MarkPrototypeFailure(Handle<Object> name) {
74 DCHECK(IsNameCompatibleWithPrototypeFailure(name));
76 state_ = PROTOTYPE_FAILURE;
79 // Clear the inline cache to initial state.
80 static void Clear(Isolate* isolate, Address address,
81 ConstantPoolArray* constant_pool);
84 bool IsLoadStub() const {
85 return target()->is_load_stub() || target()->is_keyed_load_stub();
88 bool IsStoreStub() const {
89 return target()->is_store_stub() || target()->is_keyed_store_stub();
92 bool IsCallStub() const { return target()->is_call_stub(); }
95 static inline JSFunction* GetRootConstructor(Map* receiver_map,
96 Context* native_context);
97 static inline Handle<Map> GetHandlerCacheHolder(Handle<Map> receiver_map,
98 bool receiver_is_holder,
100 CacheHolderFlag* flag);
101 static inline Handle<Map> GetICCacheHolder(Handle<Map> receiver_map,
103 CacheHolderFlag* flag);
105 static bool IsCleared(Code* code) {
106 InlineCacheState state = code->ic_state();
107 return state == UNINITIALIZED || state == PREMONOMORPHIC;
110 static bool IsCleared(FeedbackNexus* nexus) {
111 InlineCacheState state = nexus->StateFromFeedback();
112 return state == UNINITIALIZED || state == PREMONOMORPHIC;
115 static bool ICUseVector(Code::Kind kind) {
116 return (FLAG_vector_ics &&
117 (kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC)) ||
118 kind == Code::CALL_IC;
122 // Get the call-site target; used for determining the state.
123 Handle<Code> target() const { return target_; }
125 Address fp() const { return fp_; }
126 Address pc() const { return *pc_address_; }
127 Isolate* isolate() const { return isolate_; }
129 // Get the shared function info of the caller.
130 SharedFunctionInfo* GetSharedFunctionInfo() const;
131 // Get the code object of the caller.
132 Code* GetCode() const;
133 // Get the original (non-breakpointed) code object of the caller.
134 Code* GetOriginalCode() const;
136 bool AddressIsOptimizedCode() const;
138 // Set the call-site target.
139 inline void set_target(Code* code);
140 bool is_target_set() { return target_set_; }
141 bool is_vector_set() { return vector_set_; }
143 bool UseVector() const {
144 bool use = ICUseVector(kind());
145 // If we are supposed to use the nexus, verify the nexus is non-null.
146 DCHECK(!use || nexus_ != NULL);
150 // Configure for most states.
151 void ConfigureVectorState(IC::State new_state);
152 // Configure the vector for MONOMORPHIC.
153 void ConfigureVectorState(Handle<Name> name, Handle<Map> map,
154 Handle<Code> handler);
155 // Configure the vector for POLYMORPHIC.
156 void ConfigureVectorState(Handle<Name> name, MapHandleList* maps,
157 CodeHandleList* handlers);
159 char TransitionMarkFromState(IC::State state);
160 void TraceIC(const char* type, Handle<Object> name);
161 void TraceIC(const char* type, Handle<Object> name, State old_state,
164 MaybeHandle<Object> TypeError(const char* type, Handle<Object> object,
166 MaybeHandle<Object> ReferenceError(const char* type, Handle<Name> name);
168 // Access the target code for the given IC address.
169 static inline Code* GetTargetAtAddress(Address address,
170 ConstantPoolArray* constant_pool);
171 static inline void SetTargetAtAddress(Address address, Code* target,
172 ConstantPoolArray* constant_pool);
173 static void OnTypeFeedbackChanged(Isolate* isolate, Address address,
174 State old_state, State new_state,
175 bool target_remains_ic_stub);
176 // As a vector-based IC, type feedback must be updated differently.
177 static void OnTypeFeedbackChanged(Isolate* isolate, Code* host,
178 TypeFeedbackVector* vector, State old_state,
180 static void PostPatching(Address address, Code* target, Code* old_target);
182 // Compute the handler either by compiling or by retrieving a cached version.
183 Handle<Code> ComputeHandler(LookupIterator* lookup,
184 Handle<Object> value = Handle<Code>::null());
185 virtual Handle<Code> CompileHandler(LookupIterator* lookup,
186 Handle<Object> value,
187 CacheHolderFlag cache_holder) {
189 return Handle<Code>::null();
192 void UpdateMonomorphicIC(Handle<Code> handler, Handle<Name> name);
193 bool UpdatePolymorphicIC(Handle<Name> name, Handle<Code> code);
194 void UpdateMegamorphicCache(Map* map, Name* name, Code* code);
196 void CopyICToMegamorphicCache(Handle<Name> name);
197 bool IsTransitionOfMonomorphicTarget(Map* source_map, Map* target_map);
198 void PatchCache(Handle<Name> name, Handle<Code> code);
199 Code::Kind kind() const { return kind_; }
200 Code::Kind handler_kind() const {
201 if (kind_ == Code::KEYED_LOAD_IC) return Code::LOAD_IC;
202 DCHECK(kind_ == Code::LOAD_IC || kind_ == Code::STORE_IC ||
203 kind_ == Code::KEYED_STORE_IC);
206 virtual Handle<Code> megamorphic_stub() {
208 return Handle<Code>::null();
211 bool TryRemoveInvalidPrototypeDependentStub(Handle<Object> receiver,
212 Handle<String> name);
214 ExtraICState extra_ic_state() const { return extra_ic_state_; }
215 void set_extra_ic_state(ExtraICState state) { extra_ic_state_ = state; }
217 Handle<Map> receiver_map() { return receiver_map_; }
218 void update_receiver_map(Handle<Object> receiver) {
219 if (receiver->IsSmi()) {
220 receiver_map_ = isolate_->factory()->heap_number_map();
222 receiver_map_ = handle(HeapObject::cast(*receiver)->map());
226 void TargetMaps(MapHandleList* list) {
228 for (int i = 0; i < target_maps_.length(); i++) {
229 list->Add(target_maps_.at(i));
233 Map* FirstTargetMap() {
235 return target_maps_.length() > 0 ? *target_maps_.at(0) : NULL;
238 inline void UpdateTarget();
240 Handle<TypeFeedbackVector> vector() const { return nexus()->vector_handle(); }
241 FeedbackVectorICSlot slot() const { return nexus()->slot(); }
242 State saved_state() const {
243 return state() == PROTOTYPE_FAILURE ? old_state_ : state();
246 template <class NexusClass>
247 NexusClass* casted_nexus() {
248 return static_cast<NexusClass*>(nexus_);
250 FeedbackNexus* nexus() const { return nexus_; }
252 inline Code* get_host();
255 inline Code* raw_target() const;
256 inline ConstantPoolArray* constant_pool() const;
257 inline ConstantPoolArray* raw_constant_pool() const;
259 void FindTargetMaps() {
260 if (target_maps_set_) return;
261 target_maps_set_ = true;
263 nexus()->ExtractMaps(&target_maps_);
265 if (state_ == MONOMORPHIC) {
266 Map* map = target_->FindFirstMap();
267 if (map != NULL) target_maps_.Add(handle(map));
268 } else if (state_ != UNINITIALIZED && state_ != PREMONOMORPHIC) {
269 target_->FindAllMaps(&target_maps_);
274 // Frame pointer for the frame that uses (calls) the IC.
277 // All access to the program counter of an IC structure is indirect
278 // to make the code GC safe. This feature is crucial since
279 // GetProperty and SetProperty are called and they in turn might
280 // invoke the garbage collector.
281 Address* pc_address_;
285 // The constant pool of the code which originally called the IC (which might
286 // be for the breakpointed copy of the original code).
287 Handle<ConstantPoolArray> raw_constant_pool_;
289 // The original code target that missed.
290 Handle<Code> target_;
293 State old_state_; // For saving if we marked as prototype failure.
296 Handle<Map> receiver_map_;
297 MaybeHandle<Code> maybe_handler_;
299 ExtraICState extra_ic_state_;
300 MapHandleList target_maps_;
301 bool target_maps_set_;
303 FeedbackNexus* nexus_;
305 DISALLOW_IMPLICIT_CONSTRUCTORS(IC);
309 // An IC_Utility encapsulates IC::UtilityId. It exists mainly because you
310 // cannot make forward declarations to an enum.
313 explicit IC_Utility(IC::UtilityId id)
314 : address_(IC::AddressFromUtilityId(id)), id_(id) {}
316 Address address() const { return address_; }
318 IC::UtilityId id() const { return id_; }
326 class CallIC : public IC {
328 CallIC(Isolate* isolate, CallICNexus* nexus)
329 : IC(EXTRA_CALL_FRAME, isolate, nexus) {
330 DCHECK(nexus != NULL);
333 void PatchMegamorphic(Handle<Object> function);
335 void HandleMiss(Handle<Object> function);
337 // Returns true if a custom handler was installed.
338 bool DoCustomHandler(Handle<Object> function,
339 const CallICState& callic_state);
341 // Code generator routines.
342 static Handle<Code> initialize_stub(Isolate* isolate, int argc,
343 CallICState::CallType call_type);
344 static Handle<Code> initialize_stub_in_optimized_code(
345 Isolate* isolate, int argc, CallICState::CallType call_type);
347 static void Clear(Isolate* isolate, Code* host, CallICNexus* nexus);
351 class LoadIC : public IC {
353 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) {
354 return LoadICState(contextual_mode).GetExtraICState();
357 ContextualMode contextual_mode() const {
358 return LoadICState::GetContextualMode(extra_ic_state());
361 LoadIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL)
362 : IC(depth, isolate, nexus) {
363 DCHECK(!FLAG_vector_ics || nexus != NULL);
364 DCHECK(IsLoadStub());
367 // TODO(mvstanton): The for_queries_only is because we have a case where we
368 // construct an IC only to gather the contextual mode, and we don't have
369 // vector/slot information. for_queries_only is a temporary hack to enable the
370 // strong DCHECK protection around vector/slot.
371 LoadIC(FrameDepth depth, Isolate* isolate, bool for_queries_only)
372 : IC(depth, isolate, NULL, for_queries_only) {
373 DCHECK(IsLoadStub());
376 // Returns if this IC is for contextual (no explicit receiver)
377 // access to properties.
378 bool IsUndeclaredGlobal(Handle<Object> receiver) {
379 if (receiver->IsGlobalObject()) {
380 return contextual_mode() == CONTEXTUAL;
382 DCHECK(contextual_mode() != CONTEXTUAL);
387 // Code generator routines.
388 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
389 static void GeneratePreMonomorphic(MacroAssembler* masm) {
392 static void GenerateMiss(MacroAssembler* masm);
393 static void GenerateNormal(MacroAssembler* masm);
394 static void GenerateRuntimeGetProperty(MacroAssembler* masm);
396 static Handle<Code> initialize_stub(Isolate* isolate,
397 ExtraICState extra_state);
398 static Handle<Code> initialize_stub_in_optimized_code(
399 Isolate* isolate, ExtraICState extra_state);
401 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object,
404 static void Clear(Isolate* isolate, Code* host, LoadICNexus* nexus);
407 inline void set_target(Code* code);
409 Handle<Code> slow_stub() const {
410 if (kind() == Code::LOAD_IC) {
411 return isolate()->builtins()->LoadIC_Slow();
413 DCHECK_EQ(Code::KEYED_LOAD_IC, kind());
414 return isolate()->builtins()->KeyedLoadIC_Slow();
418 Handle<Code> megamorphic_stub() OVERRIDE;
420 // Update the inline cache and the global stub cache based on the
422 void UpdateCaches(LookupIterator* lookup);
424 virtual Handle<Code> CompileHandler(LookupIterator* lookup,
425 Handle<Object> unused,
426 CacheHolderFlag cache_holder) OVERRIDE;
429 virtual Handle<Code> pre_monomorphic_stub() const;
430 static Handle<Code> pre_monomorphic_stub(Isolate* isolate,
431 ExtraICState extra_state);
433 Handle<Code> SimpleFieldLoad(FieldIndex index);
435 static void Clear(Isolate* isolate, Address address, Code* target,
436 ConstantPoolArray* constant_pool);
442 class KeyedLoadIC : public LoadIC {
444 // ExtraICState bits (building on IC)
445 class IcCheckTypeField : public BitField<IcCheckType, 1, 1> {};
447 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode,
448 IcCheckType key_type) {
449 return LoadICState(contextual_mode).GetExtraICState() |
450 IcCheckTypeField::encode(key_type);
453 static IcCheckType GetKeyType(ExtraICState extra_state) {
454 return IcCheckTypeField::decode(extra_state);
457 KeyedLoadIC(FrameDepth depth, Isolate* isolate,
458 KeyedLoadICNexus* nexus = NULL)
459 : LoadIC(depth, isolate, nexus) {
460 DCHECK(!FLAG_vector_ics || nexus != NULL);
461 DCHECK(target()->is_keyed_load_stub());
464 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object,
467 // Code generator routines.
468 static void GenerateMiss(MacroAssembler* masm);
469 static void GenerateRuntimeGetProperty(MacroAssembler* masm);
470 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
471 static void GeneratePreMonomorphic(MacroAssembler* masm) {
474 static void GenerateMegamorphic(MacroAssembler* masm);
476 // Bit mask to be tested against bit field for the cases when
477 // generic stub should go into slow case.
478 // Access check is necessary explicitly since generic stub does not perform
480 static const int kSlowCaseBitFieldMask =
481 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor);
483 static Handle<Code> initialize_stub(Isolate* isolate);
484 static Handle<Code> initialize_stub_in_optimized_code(Isolate* isolate);
485 static Handle<Code> ChooseMegamorphicStub(Isolate* isolate);
486 static Handle<Code> pre_monomorphic_stub(Isolate* isolate);
488 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus);
491 // receiver is HeapObject because it could be a String or a JSObject
492 Handle<Code> LoadElementStub(Handle<HeapObject> receiver);
493 virtual Handle<Code> pre_monomorphic_stub() const {
494 return pre_monomorphic_stub(isolate());
498 static void Clear(Isolate* isolate, Address address, Code* target,
499 ConstantPoolArray* constant_pool);
505 class StoreIC : public IC {
507 STATIC_ASSERT(i::LANGUAGE_END == 3);
508 class LanguageModeState : public BitField<LanguageMode, 1, 2> {};
509 static ExtraICState ComputeExtraICState(LanguageMode flag) {
510 return LanguageModeState::encode(flag);
512 static LanguageMode GetLanguageMode(ExtraICState state) {
513 return LanguageModeState::decode(state);
516 // For convenience, a statically declared encoding of strict mode extra
518 static const ExtraICState kStrictModeState = STRICT
519 << LanguageModeState::kShift;
521 StoreIC(FrameDepth depth, Isolate* isolate) : IC(depth, isolate) {
522 DCHECK(IsStoreStub());
525 LanguageMode language_mode() const {
526 return LanguageModeState::decode(extra_ic_state());
529 // Code generators for stub routines. Only called once at startup.
530 static void GenerateSlow(MacroAssembler* masm);
531 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
532 static void GeneratePreMonomorphic(MacroAssembler* masm) {
535 static void GenerateMiss(MacroAssembler* masm);
536 static void GenerateMegamorphic(MacroAssembler* masm);
537 static void GenerateNormal(MacroAssembler* masm);
538 static void GenerateRuntimeSetProperty(MacroAssembler* masm,
539 LanguageMode language_mode);
541 static Handle<Code> initialize_stub(Isolate* isolate,
542 LanguageMode language_mode);
544 MUST_USE_RESULT MaybeHandle<Object> Store(
545 Handle<Object> object, Handle<Name> name, Handle<Object> value,
546 JSReceiver::StoreFromKeyed store_mode =
547 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED);
549 bool LookupForWrite(LookupIterator* it, Handle<Object> value,
550 JSReceiver::StoreFromKeyed store_mode);
554 Handle<Code> megamorphic_stub() OVERRIDE;
555 Handle<Code> slow_stub() const;
557 virtual Handle<Code> pre_monomorphic_stub() const {
558 return pre_monomorphic_stub(isolate(), language_mode());
561 static Handle<Code> pre_monomorphic_stub(Isolate* isolate,
562 LanguageMode language_mode);
564 // Update the inline cache and the global stub cache based on the
566 void UpdateCaches(LookupIterator* lookup, Handle<Object> value,
567 JSReceiver::StoreFromKeyed store_mode);
568 virtual Handle<Code> CompileHandler(LookupIterator* lookup,
569 Handle<Object> value,
570 CacheHolderFlag cache_holder) OVERRIDE;
573 inline void set_target(Code* code);
575 static void Clear(Isolate* isolate, Address address, Code* target,
576 ConstantPoolArray* constant_pool);
582 enum KeyedStoreCheckMap { kDontCheckMap, kCheckMap };
585 enum KeyedStoreIncrementLength { kDontIncrementLength, kIncrementLength };
588 class KeyedStoreIC : public StoreIC {
590 // ExtraICState bits (building on IC)
592 // When more language modes are added, these BitFields need to move too.
593 STATIC_ASSERT(i::LANGUAGE_END == 3);
594 class ExtraICStateKeyedAccessStoreMode
595 : public BitField<KeyedAccessStoreMode, 3, 4> {}; // NOLINT
597 class IcCheckTypeField : public BitField<IcCheckType, 7, 1> {};
599 static ExtraICState ComputeExtraICState(LanguageMode flag,
600 KeyedAccessStoreMode mode) {
601 return LanguageModeState::encode(flag) |
602 ExtraICStateKeyedAccessStoreMode::encode(mode) |
603 IcCheckTypeField::encode(ELEMENT);
606 static KeyedAccessStoreMode GetKeyedAccessStoreMode(
607 ExtraICState extra_state) {
608 return ExtraICStateKeyedAccessStoreMode::decode(extra_state);
611 static IcCheckType GetKeyType(ExtraICState extra_state) {
612 return IcCheckTypeField::decode(extra_state);
615 KeyedStoreIC(FrameDepth depth, Isolate* isolate) : StoreIC(depth, isolate) {
616 DCHECK(target()->is_keyed_store_stub());
619 MUST_USE_RESULT MaybeHandle<Object> Store(Handle<Object> object,
621 Handle<Object> value);
623 // Code generators for stub routines. Only called once at startup.
624 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
625 static void GeneratePreMonomorphic(MacroAssembler* masm) {
628 static void GenerateMiss(MacroAssembler* masm);
629 static void GenerateSlow(MacroAssembler* masm);
630 static void GenerateMegamorphic(MacroAssembler* masm,
631 LanguageMode language_mode);
632 static void GenerateSloppyArguments(MacroAssembler* masm);
635 virtual Handle<Code> pre_monomorphic_stub() const {
636 return pre_monomorphic_stub(isolate(), language_mode());
638 static Handle<Code> pre_monomorphic_stub(Isolate* isolate,
639 LanguageMode language_mode) {
640 if (is_strict(language_mode)) {
641 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict();
643 return isolate->builtins()->KeyedStoreIC_PreMonomorphic();
647 Handle<Code> StoreElementStub(Handle<JSObject> receiver,
648 KeyedAccessStoreMode store_mode);
651 inline void set_target(Code* code);
654 Handle<Code> sloppy_arguments_stub() {
655 return isolate()->builtins()->KeyedStoreIC_SloppyArguments();
658 static void Clear(Isolate* isolate, Address address, Code* target,
659 ConstantPoolArray* constant_pool);
661 KeyedAccessStoreMode GetStoreMode(Handle<JSObject> receiver,
662 Handle<Object> key, Handle<Object> value);
664 Handle<Map> ComputeTransitionedMap(Handle<Map> map,
665 KeyedAccessStoreMode store_mode);
671 // Type Recording BinaryOpIC, that records the types of the inputs and outputs.
672 class BinaryOpIC : public IC {
674 explicit BinaryOpIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {}
676 static Builtins::JavaScript TokenToJSBuiltin(Token::Value op);
678 MaybeHandle<Object> Transition(Handle<AllocationSite> allocation_site,
680 Handle<Object> right) WARN_UNUSED_RESULT;
684 class CompareIC : public IC {
686 CompareIC(Isolate* isolate, Token::Value op)
687 : IC(EXTRA_CALL_FRAME, isolate), op_(op) {}
689 // Update the inline cache for the given operands.
690 Code* UpdateCaches(Handle<Object> x, Handle<Object> y);
692 // Helper function for computing the condition for a compare operation.
693 static Condition ComputeCondition(Token::Value op);
695 // Factory method for getting an uninitialized compare stub.
696 static Handle<Code> GetUninitialized(Isolate* isolate, Token::Value op);
699 static bool HasInlinedSmiCode(Address address);
701 bool strict() const { return op_ == Token::EQ_STRICT; }
702 Condition GetCondition() const { return ComputeCondition(op_); }
704 static Code* GetRawUninitialized(Isolate* isolate, Token::Value op);
706 static void Clear(Isolate* isolate, Address address, Code* target,
707 ConstantPoolArray* constant_pool);
715 class CompareNilIC : public IC {
717 explicit CompareNilIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {}
719 Handle<Object> CompareNil(Handle<Object> object);
721 static Handle<Code> GetUninitialized();
723 static void Clear(Address address, Code* target,
724 ConstantPoolArray* constant_pool);
726 static Handle<Object> DoCompareNilSlow(Isolate* isolate, NilValue nil,
727 Handle<Object> object);
731 class ToBooleanIC : public IC {
733 explicit ToBooleanIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {}
735 Handle<Object> ToBoolean(Handle<Object> object);
739 // Helper for BinaryOpIC and CompareIC.
740 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
741 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check);
743 DECLARE_RUNTIME_FUNCTION(KeyedLoadIC_MissFromStubFailure);
744 DECLARE_RUNTIME_FUNCTION(KeyedStoreIC_MissFromStubFailure);
745 DECLARE_RUNTIME_FUNCTION(UnaryOpIC_Miss);
746 DECLARE_RUNTIME_FUNCTION(StoreIC_MissFromStubFailure);
747 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss);
748 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss);
749 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite);
750 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss);
751 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss);
752 DECLARE_RUNTIME_FUNCTION(LoadIC_MissFromStubFailure);
754 // Support functions for callbacks handlers.
755 DECLARE_RUNTIME_FUNCTION(StoreCallbackProperty);
757 // Support functions for interceptor handlers.
758 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly);
759 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor);
760 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor);
761 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor);
763 } // namespace v8::internal