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

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

Issue 945313003: emit premonomorphic ics for keyed loads/stores in optimized code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/ia32/lithium-codegen-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 10
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 static void GenerateMegamorphic(MacroAssembler* masm); 474 static void GenerateMegamorphic(MacroAssembler* masm);
475 475
476 // Bit mask to be tested against bit field for the cases when 476 // Bit mask to be tested against bit field for the cases when
477 // generic stub should go into slow case. 477 // generic stub should go into slow case.
478 // Access check is necessary explicitly since generic stub does not perform 478 // Access check is necessary explicitly since generic stub does not perform
479 // map checks. 479 // map checks.
480 static const int kSlowCaseBitFieldMask = 480 static const int kSlowCaseBitFieldMask =
481 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor); 481 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor);
482 482
483 static Handle<Code> initialize_stub(Isolate* isolate); 483 static Handle<Code> initialize_stub(Isolate* isolate);
484 static Handle<Code> initialize_stub_in_optimized_code(Isolate* isolate); 484 static Handle<Code> initialize_stub_in_optimized_code(
485 Isolate* isolate, State initialization_state);
485 static Handle<Code> ChooseMegamorphicStub(Isolate* isolate); 486 static Handle<Code> ChooseMegamorphicStub(Isolate* isolate);
486 static Handle<Code> pre_monomorphic_stub(Isolate* isolate); 487 static Handle<Code> pre_monomorphic_stub(Isolate* isolate);
487 488
488 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus); 489 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus);
489 490
490 protected: 491 protected:
491 // receiver is HeapObject because it could be a String or a JSObject 492 // receiver is HeapObject because it could be a String or a JSObject
492 Handle<Code> LoadElementStub(Handle<HeapObject> receiver); 493 Handle<Code> LoadElementStub(Handle<HeapObject> receiver);
493 virtual Handle<Code> pre_monomorphic_stub() const { 494 virtual Handle<Code> pre_monomorphic_stub() const {
494 return pre_monomorphic_stub(isolate()); 495 return pre_monomorphic_stub(isolate());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 626 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
626 static void GeneratePreMonomorphic(MacroAssembler* masm) { 627 static void GeneratePreMonomorphic(MacroAssembler* masm) {
627 GenerateMiss(masm); 628 GenerateMiss(masm);
628 } 629 }
629 static void GenerateMiss(MacroAssembler* masm); 630 static void GenerateMiss(MacroAssembler* masm);
630 static void GenerateSlow(MacroAssembler* masm); 631 static void GenerateSlow(MacroAssembler* masm);
631 static void GenerateMegamorphic(MacroAssembler* masm, 632 static void GenerateMegamorphic(MacroAssembler* masm,
632 LanguageMode language_mode); 633 LanguageMode language_mode);
633 static void GenerateSloppyArguments(MacroAssembler* masm); 634 static void GenerateSloppyArguments(MacroAssembler* masm);
634 635
636 static Handle<Code> initialize_stub(Isolate* isolate,
637 LanguageMode language_mode,
638 State initialization_state);
639
635 protected: 640 protected:
636 virtual Handle<Code> pre_monomorphic_stub() const { 641 virtual Handle<Code> pre_monomorphic_stub() const {
637 return pre_monomorphic_stub(isolate(), language_mode()); 642 return pre_monomorphic_stub(isolate(), language_mode());
638 } 643 }
639 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, 644 static Handle<Code> pre_monomorphic_stub(Isolate* isolate,
640 LanguageMode language_mode) { 645 LanguageMode language_mode) {
641 if (is_strict(language_mode)) { 646 if (is_strict(language_mode)) {
642 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); 647 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict();
643 } else { 648 } else {
644 return isolate->builtins()->KeyedStoreIC_PreMonomorphic(); 649 return isolate->builtins()->KeyedStoreIC_PreMonomorphic();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 762
758 // Support functions for interceptor handlers. 763 // Support functions for interceptor handlers.
759 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); 764 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly);
760 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); 765 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor);
761 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); 766 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor);
762 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); 767 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor);
763 } 768 }
764 } // namespace v8::internal 769 } // namespace v8::internal
765 770
766 #endif // V8_IC_H_ 771 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698