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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 StrictModeFlag strict_mode, | 552 StrictModeFlag strict_mode, |
553 Handle<JSObject> receiver, | 553 Handle<JSObject> receiver, |
554 Handle<String> name, | 554 Handle<String> name, |
555 Handle<Object> value); | 555 Handle<Object> value); |
556 // Compute the code stub for this store; used for rewriting to | 556 // Compute the code stub for this store; used for rewriting to |
557 // monomorphic state and making sure that the code stub is in the | 557 // monomorphic state and making sure that the code stub is in the |
558 // stub cache. | 558 // stub cache. |
559 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, | 559 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, |
560 StrictModeFlag strict_mode, | 560 StrictModeFlag strict_mode, |
561 Handle<JSObject> receiver, | 561 Handle<JSObject> receiver, |
562 Handle<String> name); | 562 Handle<String> name, |
| 563 Handle<Object> value); |
563 | 564 |
564 private: | 565 private: |
565 void set_target(Code* code) { | 566 void set_target(Code* code) { |
566 // Strict mode must be preserved across IC patching. | 567 // Strict mode must be preserved across IC patching. |
567 ASSERT(Code::GetStrictMode(code->extra_ic_state()) == | 568 ASSERT(Code::GetStrictMode(code->extra_ic_state()) == |
568 Code::GetStrictMode(target()->extra_ic_state())); | 569 Code::GetStrictMode(target()->extra_ic_state())); |
569 IC::set_target(code); | 570 IC::set_target(code); |
570 } | 571 } |
571 | 572 |
572 static Handle<Code> initialize_stub() { | 573 static Handle<Code> initialize_stub() { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 static void GenerateNonStrictArguments(MacroAssembler* masm); | 620 static void GenerateNonStrictArguments(MacroAssembler* masm); |
620 static void GenerateTransitionElementsSmiToDouble(MacroAssembler* masm); | 621 static void GenerateTransitionElementsSmiToDouble(MacroAssembler* masm); |
621 static void GenerateTransitionElementsDoubleToObject(MacroAssembler* masm); | 622 static void GenerateTransitionElementsDoubleToObject(MacroAssembler* masm); |
622 | 623 |
623 protected: | 624 protected: |
624 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 625 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
625 | 626 |
626 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, | 627 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, |
627 StrictModeFlag strict_mode, | 628 StrictModeFlag strict_mode, |
628 Handle<JSObject> receiver, | 629 Handle<JSObject> receiver, |
629 Handle<String> name); | 630 Handle<String> name, |
| 631 Handle<Object> value); |
630 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } | 632 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } |
631 | 633 |
632 virtual Handle<Code> megamorphic_stub() { | 634 virtual Handle<Code> megamorphic_stub() { |
633 return isolate()->builtins()->KeyedStoreIC_Generic(); | 635 return isolate()->builtins()->KeyedStoreIC_Generic(); |
634 } | 636 } |
635 virtual Handle<Code> megamorphic_stub_strict() { | 637 virtual Handle<Code> megamorphic_stub_strict() { |
636 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); | 638 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); |
637 } | 639 } |
638 | 640 |
639 Handle<Code> StoreElementStub(Handle<JSObject> receiver, | 641 Handle<Code> StoreElementStub(Handle<JSObject> receiver, |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 }; | 814 }; |
813 | 815 |
814 | 816 |
815 // Helper for BinaryOpIC and CompareIC. | 817 // Helper for BinaryOpIC and CompareIC. |
816 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 818 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
817 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 819 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
818 | 820 |
819 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); | 821 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
820 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); | 822 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); |
821 DECLARE_RUNTIME_FUNCTION(MaybeObject*, UnaryOpIC_Miss); | 823 DECLARE_RUNTIME_FUNCTION(MaybeObject*, UnaryOpIC_Miss); |
| 824 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); |
822 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 825 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
823 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 826 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
824 | 827 |
825 | 828 |
826 } } // namespace v8::internal | 829 } } // namespace v8::internal |
827 | 830 |
828 #endif // V8_IC_H_ | 831 #endif // V8_IC_H_ |
OLD | NEW |