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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 StrictModeFlag strict_mode, | 553 StrictModeFlag strict_mode, |
554 Handle<JSObject> receiver, | 554 Handle<JSObject> receiver, |
555 Handle<String> name, | 555 Handle<String> name, |
556 Handle<Object> value); | 556 Handle<Object> value); |
557 // Compute the code stub for this store; used for rewriting to | 557 // Compute the code stub for this store; used for rewriting to |
558 // monomorphic state and making sure that the code stub is in the | 558 // monomorphic state and making sure that the code stub is in the |
559 // stub cache. | 559 // stub cache. |
560 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, | 560 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, |
561 StrictModeFlag strict_mode, | 561 StrictModeFlag strict_mode, |
562 Handle<JSObject> receiver, | 562 Handle<JSObject> receiver, |
563 Handle<String> name, | 563 Handle<String> name); |
564 Handle<Object> value); | |
565 | 564 |
566 private: | 565 private: |
567 void set_target(Code* code) { | 566 void set_target(Code* code) { |
568 // Strict mode must be preserved across IC patching. | 567 // Strict mode must be preserved across IC patching. |
569 ASSERT(Code::GetStrictMode(code->extra_ic_state()) == | 568 ASSERT(Code::GetStrictMode(code->extra_ic_state()) == |
570 Code::GetStrictMode(target()->extra_ic_state())); | 569 Code::GetStrictMode(target()->extra_ic_state())); |
571 IC::set_target(code); | 570 IC::set_target(code); |
572 } | 571 } |
573 | 572 |
574 static Handle<Code> initialize_stub() { | 573 static Handle<Code> initialize_stub() { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 static void GenerateNonStrictArguments(MacroAssembler* masm); | 620 static void GenerateNonStrictArguments(MacroAssembler* masm); |
622 static void GenerateTransitionElementsSmiToDouble(MacroAssembler* masm); | 621 static void GenerateTransitionElementsSmiToDouble(MacroAssembler* masm); |
623 static void GenerateTransitionElementsDoubleToObject(MacroAssembler* masm); | 622 static void GenerateTransitionElementsDoubleToObject(MacroAssembler* masm); |
624 | 623 |
625 protected: | 624 protected: |
626 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 625 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
627 | 626 |
628 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, | 627 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, |
629 StrictModeFlag strict_mode, | 628 StrictModeFlag strict_mode, |
630 Handle<JSObject> receiver, | 629 Handle<JSObject> receiver, |
631 Handle<String> name, | 630 Handle<String> name); |
632 Handle<Object> value); | |
633 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } | 631 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } |
634 | 632 |
635 virtual Handle<Code> megamorphic_stub() { | 633 virtual Handle<Code> megamorphic_stub() { |
636 return isolate()->builtins()->KeyedStoreIC_Generic(); | 634 return isolate()->builtins()->KeyedStoreIC_Generic(); |
637 } | 635 } |
638 virtual Handle<Code> megamorphic_stub_strict() { | 636 virtual Handle<Code> megamorphic_stub_strict() { |
639 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); | 637 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); |
640 } | 638 } |
641 | 639 |
642 Handle<Code> StoreElementStub(Handle<JSObject> receiver, | 640 Handle<Code> StoreElementStub(Handle<JSObject> receiver, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 MaybeObject* ToBoolean(Handle<Object> object, Code::ExtraICState state); | 831 MaybeObject* ToBoolean(Handle<Object> object, Code::ExtraICState state); |
834 }; | 832 }; |
835 | 833 |
836 | 834 |
837 // Helper for BinaryOpIC and CompareIC. | 835 // Helper for BinaryOpIC and CompareIC. |
838 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 836 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
839 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 837 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
840 | 838 |
841 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); | 839 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
842 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); | 840 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); |
843 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); | |
844 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 841 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
845 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 842 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
846 | 843 |
847 | 844 |
848 } } // namespace v8::internal | 845 } } // namespace v8::internal |
849 | 846 |
850 #endif // V8_IC_H_ | 847 #endif // V8_IC_H_ |
OLD | NEW |