Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/ic/ic.h

Issue 1149053004: Make KeyedStores from a sloppy arguments array use a handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code comments. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/ia32/ic-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_IC_H_ 5 #ifndef V8_IC_H_
6 #define V8_IC_H_ 6 #define V8_IC_H_
7 7
8 #include "src/ic/ic-state.h" 8 #include "src/ic/ic-state.h"
9 #include "src/macro-assembler.h" 9 #include "src/macro-assembler.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 603
604 // Code generators for stub routines. Only called once at startup. 604 // Code generators for stub routines. Only called once at startup.
605 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 605 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
606 static void GeneratePreMonomorphic(MacroAssembler* masm) { 606 static void GeneratePreMonomorphic(MacroAssembler* masm) {
607 GenerateMiss(masm); 607 GenerateMiss(masm);
608 } 608 }
609 static void GenerateMiss(MacroAssembler* masm); 609 static void GenerateMiss(MacroAssembler* masm);
610 static void GenerateSlow(MacroAssembler* masm); 610 static void GenerateSlow(MacroAssembler* masm);
611 static void GenerateMegamorphic(MacroAssembler* masm, 611 static void GenerateMegamorphic(MacroAssembler* masm,
612 LanguageMode language_mode); 612 LanguageMode language_mode);
613 static void GenerateSloppyArguments(MacroAssembler* masm);
614 613
615 static Handle<Code> initialize_stub(Isolate* isolate, 614 static Handle<Code> initialize_stub(Isolate* isolate,
616 LanguageMode language_mode, 615 LanguageMode language_mode,
617 State initialization_state); 616 State initialization_state);
618 617
619 protected: 618 protected:
620 virtual Handle<Code> pre_monomorphic_stub() const { 619 virtual Handle<Code> pre_monomorphic_stub() const {
621 return pre_monomorphic_stub(isolate(), language_mode()); 620 return pre_monomorphic_stub(isolate(), language_mode());
622 } 621 }
623 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, 622 static Handle<Code> pre_monomorphic_stub(Isolate* isolate,
624 LanguageMode language_mode) { 623 LanguageMode language_mode) {
625 if (is_strict(language_mode)) { 624 if (is_strict(language_mode)) {
626 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); 625 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict();
627 } else { 626 } else {
628 return isolate->builtins()->KeyedStoreIC_PreMonomorphic(); 627 return isolate->builtins()->KeyedStoreIC_PreMonomorphic();
629 } 628 }
630 } 629 }
631 630
632 Handle<Code> StoreElementStub(Handle<JSObject> receiver, 631 Handle<Code> StoreElementStub(Handle<JSObject> receiver,
633 KeyedAccessStoreMode store_mode); 632 KeyedAccessStoreMode store_mode);
634 633
635 private: 634 private:
636 inline void set_target(Code* code); 635 inline void set_target(Code* code);
637 636
638 // Stub accessors.
639 Handle<Code> sloppy_arguments_stub() {
640 return isolate()->builtins()->KeyedStoreIC_SloppyArguments();
641 }
642
643 static void Clear(Isolate* isolate, Address address, Code* target, 637 static void Clear(Isolate* isolate, Address address, Code* target,
644 ConstantPoolArray* constant_pool); 638 ConstantPoolArray* constant_pool);
645 639
646 KeyedAccessStoreMode GetStoreMode(Handle<JSObject> receiver, 640 KeyedAccessStoreMode GetStoreMode(Handle<JSObject> receiver,
647 Handle<Object> key, Handle<Object> value); 641 Handle<Object> key, Handle<Object> value);
648 642
649 Handle<Map> ComputeTransitionedMap(Handle<Map> map, 643 Handle<Map> ComputeTransitionedMap(Handle<Map> map,
650 KeyedAccessStoreMode store_mode); 644 KeyedAccessStoreMode store_mode);
651 645
652 friend class IC; 646 friend class IC;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 738
745 // Support functions for interceptor handlers. 739 // Support functions for interceptor handlers.
746 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); 740 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly);
747 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); 741 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor);
748 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); 742 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor);
749 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); 743 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor);
750 } 744 }
751 } // namespace v8::internal 745 } // namespace v8::internal
752 746
753 #endif // V8_IC_H_ 747 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ic/ia32/ic-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698