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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 friend class IC; | 532 friend class IC; |
533 }; | 533 }; |
534 | 534 |
535 | 535 |
536 enum KeyedStoreCheckMap { kDontCheckMap, kCheckMap }; | 536 enum KeyedStoreCheckMap { kDontCheckMap, kCheckMap }; |
537 | 537 |
538 | 538 |
539 enum KeyedStoreIncrementLength { kDontIncrementLength, kIncrementLength }; | 539 enum KeyedStoreIncrementLength { kDontIncrementLength, kIncrementLength }; |
540 | 540 |
541 | 541 |
542 enum KeyedStoreStubCacheRequirement { | |
543 kCallRuntimeOnMissingHandler, | |
544 kMissOnMissingHandler | |
545 }; | |
546 | |
547 | |
548 class KeyedStoreIC : public StoreIC { | 542 class KeyedStoreIC : public StoreIC { |
549 public: | 543 public: |
550 // ExtraICState bits (building on IC) | 544 // ExtraICState bits (building on IC) |
551 // ExtraICState bits | 545 // ExtraICState bits |
552 class ExtraICStateKeyedAccessStoreMode | 546 class ExtraICStateKeyedAccessStoreMode |
553 : public BitField<KeyedAccessStoreMode, 2, 4> {}; // NOLINT | 547 : public BitField<KeyedAccessStoreMode, 2, 4> {}; // NOLINT |
554 | 548 |
555 class IcCheckTypeField : public BitField<IcCheckType, 6, 1> {}; | 549 class IcCheckTypeField : public BitField<IcCheckType, 6, 1> {}; |
556 | 550 |
557 static ExtraICState ComputeExtraICState(StrictMode flag, | 551 static ExtraICState ComputeExtraICState(StrictMode flag, |
(...skipping 20 matching lines...) Expand all Loading... |
578 Handle<Object> name, | 572 Handle<Object> name, |
579 Handle<Object> value); | 573 Handle<Object> value); |
580 | 574 |
581 // Code generators for stub routines. Only called once at startup. | 575 // Code generators for stub routines. Only called once at startup. |
582 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 576 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
583 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 577 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
584 GenerateMiss(masm); | 578 GenerateMiss(masm); |
585 } | 579 } |
586 static void GenerateMiss(MacroAssembler* masm); | 580 static void GenerateMiss(MacroAssembler* masm); |
587 static void GenerateSlow(MacroAssembler* masm); | 581 static void GenerateSlow(MacroAssembler* masm); |
588 static void GenerateGeneric( | 582 static void GenerateMegamorphic(MacroAssembler* masm, StrictMode strict_mode); |
589 MacroAssembler* masm, StrictMode strict_mode, | 583 static void GenerateGeneric(MacroAssembler* masm, StrictMode strict_mode); |
590 KeyedStoreStubCacheRequirement handler_requirement); | |
591 static void GenerateSloppyArguments(MacroAssembler* masm); | 584 static void GenerateSloppyArguments(MacroAssembler* masm); |
592 | 585 |
593 protected: | 586 protected: |
594 virtual Handle<Code> pre_monomorphic_stub() const { | 587 virtual Handle<Code> pre_monomorphic_stub() const { |
595 return pre_monomorphic_stub(isolate(), strict_mode()); | 588 return pre_monomorphic_stub(isolate(), strict_mode()); |
596 } | 589 } |
597 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 590 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
598 StrictMode strict_mode) { | 591 StrictMode strict_mode) { |
599 if (strict_mode == STRICT) { | 592 if (strict_mode == STRICT) { |
600 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); | 593 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 | 708 |
716 // Support functions for interceptor handlers. | 709 // Support functions for interceptor handlers. |
717 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 710 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
718 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 711 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
719 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 712 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
720 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 713 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
721 } | 714 } |
722 } // namespace v8::internal | 715 } // namespace v8::internal |
723 | 716 |
724 #endif // V8_IC_H_ | 717 #endif // V8_IC_H_ |
OLD | NEW |