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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 Handle<JSObject> receiver, | 177 Handle<JSObject> receiver, |
178 Handle<String> name, | 178 Handle<String> name, |
179 Handle<Code> code); | 179 Handle<Code> code); |
180 void CopyICToMegamorphicCache(Handle<String> name); | 180 void CopyICToMegamorphicCache(Handle<String> name); |
181 bool IsTransitionedMapOfMonomorphicTarget(Map* receiver_map); | 181 bool IsTransitionedMapOfMonomorphicTarget(Map* receiver_map); |
182 void PatchCache(State state, | 182 void PatchCache(State state, |
183 StrictModeFlag strict_mode, | 183 StrictModeFlag strict_mode, |
184 Handle<JSObject> receiver, | 184 Handle<JSObject> receiver, |
185 Handle<String> name, | 185 Handle<String> name, |
186 Handle<Code> code); | 186 Handle<Code> code); |
187 virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code); | 187 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code); |
188 virtual Handle<Code> megamorphic_stub() { | 188 virtual Handle<Code> megamorphic_stub() { |
189 UNREACHABLE(); | 189 UNREACHABLE(); |
190 return Handle<Code>::null(); | 190 return Handle<Code>::null(); |
191 } | 191 } |
192 virtual Handle<Code> megamorphic_stub_strict() { | 192 virtual Handle<Code> megamorphic_stub_strict() { |
193 UNREACHABLE(); | 193 UNREACHABLE(); |
194 return Handle<Code>::null(); | 194 return Handle<Code>::null(); |
195 } | 195 } |
196 virtual Handle<Code> generic_stub() const { | 196 virtual Handle<Code> generic_stub() const { |
197 UNREACHABLE(); | 197 UNREACHABLE(); |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 return isolate()->builtins()->KeyedLoadIC_Generic(); | 464 return isolate()->builtins()->KeyedLoadIC_Generic(); |
465 } | 465 } |
466 | 466 |
467 // Update the inline cache. | 467 // Update the inline cache. |
468 virtual void UpdateMonomorphicIC(Handle<JSObject> receiver, | 468 virtual void UpdateMonomorphicIC(Handle<JSObject> receiver, |
469 Handle<Code> handler, | 469 Handle<Code> handler, |
470 Handle<String> name); | 470 Handle<String> name); |
471 virtual Handle<Code> ComputeLoadHandler(LookupResult* lookup, | 471 virtual Handle<Code> ComputeLoadHandler(LookupResult* lookup, |
472 Handle<JSObject> receiver, | 472 Handle<JSObject> receiver, |
473 Handle<String> name); | 473 Handle<String> name); |
474 virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code) { } | 474 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } |
475 | 475 |
476 private: | 476 private: |
477 // Stub accessors. | 477 // Stub accessors. |
478 static Handle<Code> initialize_stub() { | 478 static Handle<Code> initialize_stub() { |
479 return Isolate::Current()->builtins()->KeyedLoadIC_Initialize(); | 479 return Isolate::Current()->builtins()->KeyedLoadIC_Initialize(); |
480 } | 480 } |
481 virtual Handle<Code> pre_monomorphic_stub() { | 481 virtual Handle<Code> pre_monomorphic_stub() { |
482 return isolate()->builtins()->KeyedLoadIC_PreMonomorphic(); | 482 return isolate()->builtins()->KeyedLoadIC_PreMonomorphic(); |
483 } | 483 } |
484 Handle<Code> indexed_interceptor_stub() { | 484 Handle<Code> indexed_interceptor_stub() { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 static void GenerateTransitionElementsSmiToDouble(MacroAssembler* masm); | 613 static void GenerateTransitionElementsSmiToDouble(MacroAssembler* masm); |
614 static void GenerateTransitionElementsDoubleToObject(MacroAssembler* masm); | 614 static void GenerateTransitionElementsDoubleToObject(MacroAssembler* masm); |
615 | 615 |
616 protected: | 616 protected: |
617 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 617 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
618 | 618 |
619 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, | 619 virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, |
620 StrictModeFlag strict_mode, | 620 StrictModeFlag strict_mode, |
621 Handle<JSObject> receiver, | 621 Handle<JSObject> receiver, |
622 Handle<String> name); | 622 Handle<String> name); |
623 virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code) { } | 623 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } |
624 | 624 |
625 virtual Handle<Code> megamorphic_stub() { | 625 virtual Handle<Code> megamorphic_stub() { |
626 return isolate()->builtins()->KeyedStoreIC_Generic(); | 626 return isolate()->builtins()->KeyedStoreIC_Generic(); |
627 } | 627 } |
628 virtual Handle<Code> megamorphic_stub_strict() { | 628 virtual Handle<Code> megamorphic_stub_strict() { |
629 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); | 629 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); |
630 } | 630 } |
631 | 631 |
632 Handle<Code> StoreElementStub(Handle<JSObject> receiver, | 632 Handle<Code> StoreElementStub(Handle<JSObject> receiver, |
633 KeyedAccessStoreMode store_mode, | 633 KeyedAccessStoreMode store_mode, |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 810 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
811 | 811 |
812 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); | 812 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
813 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); | 813 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); |
814 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 814 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
815 | 815 |
816 | 816 |
817 } } // namespace v8::internal | 817 } } // namespace v8::internal |
818 | 818 |
819 #endif // V8_IC_H_ | 819 #endif // V8_IC_H_ |
OLD | NEW |