OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 } | 489 } |
490 | 490 |
491 static void Clear(Address address, Code* target); | 491 static void Clear(Address address, Code* target); |
492 | 492 |
493 friend class IC; | 493 friend class IC; |
494 }; | 494 }; |
495 | 495 |
496 | 496 |
497 class StoreIC: public IC { | 497 class StoreIC: public IC { |
498 public: | 498 public: |
499 explicit StoreIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { | 499 StoreIC(FrameDepth depth, Isolate* isolate) : IC(depth, isolate) { |
500 ASSERT(target()->is_store_stub() || target()->is_keyed_store_stub()); | 500 ASSERT(target()->is_store_stub() || target()->is_keyed_store_stub()); |
501 } | 501 } |
502 | 502 |
503 // Code generators for stub routines. Only called once at startup. | 503 // Code generators for stub routines. Only called once at startup. |
504 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 504 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
505 static void GenerateMiss(MacroAssembler* masm); | 505 static void GenerateMiss(MacroAssembler* masm); |
506 static void GenerateMegamorphic(MacroAssembler* masm, | 506 static void GenerateMegamorphic(MacroAssembler* masm, |
507 StrictModeFlag strict_mode); | 507 StrictModeFlag strict_mode); |
508 static void GenerateNormal(MacroAssembler* masm); | 508 static void GenerateNormal(MacroAssembler* masm); |
509 static void GenerateGlobalProxy(MacroAssembler* masm, | 509 static void GenerateGlobalProxy(MacroAssembler* masm, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 | 578 |
579 | 579 |
580 enum KeyedStoreIncrementLength { | 580 enum KeyedStoreIncrementLength { |
581 kDontIncrementLength, | 581 kDontIncrementLength, |
582 kIncrementLength | 582 kIncrementLength |
583 }; | 583 }; |
584 | 584 |
585 | 585 |
586 class KeyedStoreIC: public StoreIC { | 586 class KeyedStoreIC: public StoreIC { |
587 public: | 587 public: |
588 explicit KeyedStoreIC(Isolate* isolate) : StoreIC(isolate) { | 588 KeyedStoreIC(FrameDepth depth, Isolate* isolate) |
| 589 : StoreIC(depth, isolate) { |
589 ASSERT(target()->is_keyed_store_stub()); | 590 ASSERT(target()->is_keyed_store_stub()); |
590 } | 591 } |
591 | 592 |
592 MUST_USE_RESULT MaybeObject* Store(State state, | 593 MUST_USE_RESULT MaybeObject* Store(State state, |
593 StrictModeFlag strict_mode, | 594 StrictModeFlag strict_mode, |
594 Handle<Object> object, | 595 Handle<Object> object, |
595 Handle<Object> name, | 596 Handle<Object> name, |
596 Handle<Object> value, | 597 Handle<Object> value, |
597 ICMissMode force_generic); | 598 ICMissMode force_generic); |
598 | 599 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 | 780 |
780 void patch(Code* code); | 781 void patch(Code* code); |
781 }; | 782 }; |
782 | 783 |
783 | 784 |
784 // Helper for BinaryOpIC and CompareIC. | 785 // Helper for BinaryOpIC and CompareIC. |
785 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 786 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
786 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 787 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
787 | 788 |
788 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); | 789 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
| 790 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); |
789 | 791 |
790 } } // namespace v8::internal | 792 } } // namespace v8::internal |
791 | 793 |
792 #endif // V8_IC_H_ | 794 #endif // V8_IC_H_ |
OLD | NEW |