OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_IC_H_ | 5 #ifndef V8_IC_H_ |
6 #define V8_IC_H_ | 6 #define V8_IC_H_ |
7 | 7 |
8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 | 10 |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 | 554 |
555 MUST_USE_RESULT MaybeHandle<Object> Store( | 555 MUST_USE_RESULT MaybeHandle<Object> Store( |
556 Handle<Object> object, Handle<Name> name, Handle<Object> value, | 556 Handle<Object> object, Handle<Name> name, Handle<Object> value, |
557 JSReceiver::StoreFromKeyed store_mode = | 557 JSReceiver::StoreFromKeyed store_mode = |
558 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); | 558 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); |
559 | 559 |
560 bool LookupForWrite(LookupIterator* it, Handle<Object> value, | 560 bool LookupForWrite(LookupIterator* it, Handle<Object> value, |
561 JSReceiver::StoreFromKeyed store_mode); | 561 JSReceiver::StoreFromKeyed store_mode); |
562 | 562 |
563 protected: | 563 protected: |
| 564 // Stub accessors. |
564 Handle<Code> megamorphic_stub() OVERRIDE; | 565 Handle<Code> megamorphic_stub() OVERRIDE; |
565 | |
566 // Stub accessors. | |
567 Handle<Code> generic_stub() const; | |
568 | |
569 Handle<Code> slow_stub() const; | 566 Handle<Code> slow_stub() const; |
570 | 567 |
571 virtual Handle<Code> pre_monomorphic_stub() const { | 568 virtual Handle<Code> pre_monomorphic_stub() const { |
572 return pre_monomorphic_stub(isolate(), strict_mode()); | 569 return pre_monomorphic_stub(isolate(), strict_mode()); |
573 } | 570 } |
574 | 571 |
575 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 572 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
576 StrictMode strict_mode); | 573 StrictMode strict_mode); |
577 | 574 |
578 // Update the inline cache and the global stub cache based on the | 575 // Update the inline cache and the global stub cache based on the |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 Handle<Object> value); | 630 Handle<Object> value); |
634 | 631 |
635 // Code generators for stub routines. Only called once at startup. | 632 // Code generators for stub routines. Only called once at startup. |
636 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 633 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
637 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 634 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
638 GenerateMiss(masm); | 635 GenerateMiss(masm); |
639 } | 636 } |
640 static void GenerateMiss(MacroAssembler* masm); | 637 static void GenerateMiss(MacroAssembler* masm); |
641 static void GenerateSlow(MacroAssembler* masm); | 638 static void GenerateSlow(MacroAssembler* masm); |
642 static void GenerateMegamorphic(MacroAssembler* masm, StrictMode strict_mode); | 639 static void GenerateMegamorphic(MacroAssembler* masm, StrictMode strict_mode); |
643 static void GenerateGeneric(MacroAssembler* masm, StrictMode strict_mode); | |
644 static void GenerateSloppyArguments(MacroAssembler* masm); | 640 static void GenerateSloppyArguments(MacroAssembler* masm); |
645 | 641 |
646 protected: | 642 protected: |
647 virtual Handle<Code> pre_monomorphic_stub() const { | 643 virtual Handle<Code> pre_monomorphic_stub() const { |
648 return pre_monomorphic_stub(isolate(), strict_mode()); | 644 return pre_monomorphic_stub(isolate(), strict_mode()); |
649 } | 645 } |
650 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 646 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
651 StrictMode strict_mode) { | 647 StrictMode strict_mode) { |
652 if (strict_mode == STRICT) { | 648 if (strict_mode == STRICT) { |
653 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); | 649 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 | 764 |
769 // Support functions for interceptor handlers. | 765 // Support functions for interceptor handlers. |
770 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 766 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
771 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 767 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
772 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 768 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
773 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 769 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
774 } | 770 } |
775 } // namespace v8::internal | 771 } // namespace v8::internal |
776 | 772 |
777 #endif // V8_IC_H_ | 773 #endif // V8_IC_H_ |
OLD | NEW |