| 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); |
| 564 | 565 |
| 565 private: | 566 private: |
| 566 void set_target(Code* code) { | 567 void set_target(Code* code) { |
| 567 // Strict mode must be preserved across IC patching. | 568 // Strict mode must be preserved across IC patching. |
| 568 ASSERT(Code::GetStrictMode(code->extra_ic_state()) == | 569 ASSERT(Code::GetStrictMode(code->extra_ic_state()) == |
| 569 Code::GetStrictMode(target()->extra_ic_state())); | 570 Code::GetStrictMode(target()->extra_ic_state())); |
| 570 IC::set_target(code); | 571 IC::set_target(code); |
| 571 } | 572 } |
| 572 | 573 |
| 573 static Handle<Code> initialize_stub() { | 574 static Handle<Code> initialize_stub() { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 static void GenerateNonStrictArguments(MacroAssembler* masm); | 621 static void GenerateNonStrictArguments(MacroAssembler* masm); |
| 621 static void GenerateTransitionElementsSmiToDouble(MacroAssembler* masm); | 622 static void GenerateTransitionElementsSmiToDouble(MacroAssembler* masm); |
| 622 static void GenerateTransitionElementsDoubleToObject(MacroAssembler* masm); | 623 static void GenerateTransitionElementsDoubleToObject(MacroAssembler* masm); |
| 623 | 624 |
| 624 protected: | 625 protected: |
| 625 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 626 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
| 626 | 627 |
| 627 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, | 628 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, |
| 628 StrictModeFlag strict_mode, | 629 StrictModeFlag strict_mode, |
| 629 Handle<JSObject> receiver, | 630 Handle<JSObject> receiver, |
| 630 Handle<String> name); | 631 Handle<String> name, |
| 632 Handle<Object> value); |
| 631 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } | 633 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } |
| 632 | 634 |
| 633 virtual Handle<Code> megamorphic_stub() { | 635 virtual Handle<Code> megamorphic_stub() { |
| 634 return isolate()->builtins()->KeyedStoreIC_Generic(); | 636 return isolate()->builtins()->KeyedStoreIC_Generic(); |
| 635 } | 637 } |
| 636 virtual Handle<Code> megamorphic_stub_strict() { | 638 virtual Handle<Code> megamorphic_stub_strict() { |
| 637 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); | 639 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); |
| 638 } | 640 } |
| 639 | 641 |
| 640 Handle<Code> StoreElementStub(Handle<JSObject> receiver, | 642 Handle<Code> StoreElementStub(Handle<JSObject> receiver, |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 MaybeObject* ToBoolean(Handle<Object> object, Code::ExtraICState state); | 812 MaybeObject* ToBoolean(Handle<Object> object, Code::ExtraICState state); |
| 811 }; | 813 }; |
| 812 | 814 |
| 813 | 815 |
| 814 // Helper for BinaryOpIC and CompareIC. | 816 // Helper for BinaryOpIC and CompareIC. |
| 815 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 817 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
| 816 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 818 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
| 817 | 819 |
| 818 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); | 820 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
| 819 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); | 821 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); |
| 822 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); |
| 820 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 823 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
| 821 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 824 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
| 822 | 825 |
| 823 | 826 |
| 824 } } // namespace v8::internal | 827 } } // namespace v8::internal |
| 825 | 828 |
| 826 #endif // V8_IC_H_ | 829 #endif // V8_IC_H_ |
| OLD | NEW |