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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 526343002: Remove NotMissMinorKey implementation from HydrogenCodeStub shims. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/graph-inl.h" 7 #include "src/compiler/graph-inl.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-aux-data-inl.h" 10 #include "src/compiler/node-aux-data-inl.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 virtual void InitializeInterfaceDescriptor( 47 virtual void InitializeInterfaceDescriptor(
48 CodeStubInterfaceDescriptor* descriptor) OVERRIDE { 48 CodeStubInterfaceDescriptor* descriptor) OVERRIDE {
49 CallInterfaceDescriptor* call_descriptor = 49 CallInterfaceDescriptor* call_descriptor =
50 isolate()->call_descriptor(CallDescriptorKey::LoadICCall); 50 isolate()->call_descriptor(CallDescriptorKey::LoadICCall);
51 descriptor->Initialize(MajorKey(), call_descriptor); 51 descriptor->Initialize(MajorKey(), call_descriptor);
52 } 52 }
53 53
54 private: 54 private:
55 virtual Major MajorKey() const OVERRIDE { return NoCache; } 55 virtual Major MajorKey() const OVERRIDE { return NoCache; }
56 virtual int NotMissMinorKey() const OVERRIDE { return 0; }
57 virtual bool UseSpecialCache() OVERRIDE { return true; } 56 virtual bool UseSpecialCache() OVERRIDE { return true; }
58 57
59 ContextualMode contextual_mode_; 58 ContextualMode contextual_mode_;
60 }; 59 };
61 60
62 61
63 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub 62 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub
64 // which doesn't have an interface descriptor yet. It mimics a hydrogen code 63 // which doesn't have an interface descriptor yet. It mimics a hydrogen code
65 // stub for the underlying IC stub code. 64 // stub for the underlying IC stub code.
66 class KeyedLoadICStubShim : public HydrogenCodeStub { 65 class KeyedLoadICStubShim : public HydrogenCodeStub {
67 public: 66 public:
68 explicit KeyedLoadICStubShim(Isolate* isolate) : HydrogenCodeStub(isolate) { 67 explicit KeyedLoadICStubShim(Isolate* isolate) : HydrogenCodeStub(isolate) {
69 i::compiler::GetInterfaceDescriptor(isolate, this); 68 i::compiler::GetInterfaceDescriptor(isolate, this);
70 } 69 }
71 70
72 virtual Handle<Code> GenerateCode() OVERRIDE { 71 virtual Handle<Code> GenerateCode() OVERRIDE {
73 return isolate()->builtins()->KeyedLoadIC_Initialize(); 72 return isolate()->builtins()->KeyedLoadIC_Initialize();
74 } 73 }
75 74
76 virtual void InitializeInterfaceDescriptor( 75 virtual void InitializeInterfaceDescriptor(
77 CodeStubInterfaceDescriptor* descriptor) OVERRIDE { 76 CodeStubInterfaceDescriptor* descriptor) OVERRIDE {
78 CallInterfaceDescriptor* call_descriptor = 77 CallInterfaceDescriptor* call_descriptor =
79 isolate()->call_descriptor(CallDescriptorKey::LoadICCall); 78 isolate()->call_descriptor(CallDescriptorKey::LoadICCall);
80 descriptor->Initialize(MajorKey(), call_descriptor); 79 descriptor->Initialize(MajorKey(), call_descriptor);
81 } 80 }
82 81
83 private: 82 private:
84 virtual Major MajorKey() const OVERRIDE { return NoCache; } 83 virtual Major MajorKey() const OVERRIDE { return NoCache; }
85 virtual int NotMissMinorKey() const OVERRIDE { return 0; }
86 virtual bool UseSpecialCache() OVERRIDE { return true; } 84 virtual bool UseSpecialCache() OVERRIDE { return true; }
87 }; 85 };
88 86
89 87
90 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub 88 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub
91 // which doesn't have an interface descriptor yet. It mimics a hydrogen code 89 // which doesn't have an interface descriptor yet. It mimics a hydrogen code
92 // stub for the underlying IC stub code. 90 // stub for the underlying IC stub code.
93 class StoreICStubShim : public HydrogenCodeStub { 91 class StoreICStubShim : public HydrogenCodeStub {
94 public: 92 public:
95 StoreICStubShim(Isolate* isolate, StrictMode strict_mode) 93 StoreICStubShim(Isolate* isolate, StrictMode strict_mode)
96 : HydrogenCodeStub(isolate), strict_mode_(strict_mode) { 94 : HydrogenCodeStub(isolate), strict_mode_(strict_mode) {
97 i::compiler::GetInterfaceDescriptor(isolate, this); 95 i::compiler::GetInterfaceDescriptor(isolate, this);
98 } 96 }
99 97
100 virtual Handle<Code> GenerateCode() OVERRIDE { 98 virtual Handle<Code> GenerateCode() OVERRIDE {
101 return StoreIC::initialize_stub(isolate(), strict_mode_); 99 return StoreIC::initialize_stub(isolate(), strict_mode_);
102 } 100 }
103 101
104 virtual void InitializeInterfaceDescriptor( 102 virtual void InitializeInterfaceDescriptor(
105 CodeStubInterfaceDescriptor* descriptor) OVERRIDE { 103 CodeStubInterfaceDescriptor* descriptor) OVERRIDE {
106 CallInterfaceDescriptor* call_descriptor = 104 CallInterfaceDescriptor* call_descriptor =
107 isolate()->call_descriptor(CallDescriptorKey::StoreICCall); 105 isolate()->call_descriptor(CallDescriptorKey::StoreICCall);
108 descriptor->Initialize(MajorKey(), call_descriptor); 106 descriptor->Initialize(MajorKey(), call_descriptor);
109 } 107 }
110 108
111 private: 109 private:
112 virtual Major MajorKey() const OVERRIDE { return NoCache; } 110 virtual Major MajorKey() const OVERRIDE { return NoCache; }
113 virtual int NotMissMinorKey() const OVERRIDE { return 0; }
114 virtual bool UseSpecialCache() OVERRIDE { return true; } 111 virtual bool UseSpecialCache() OVERRIDE { return true; }
115 112
116 StrictMode strict_mode_; 113 StrictMode strict_mode_;
117 }; 114 };
118 115
119 116
120 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub 117 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub
121 // which doesn't have an interface descriptor yet. It mimics a hydrogen code 118 // which doesn't have an interface descriptor yet. It mimics a hydrogen code
122 // stub for the underlying IC stub code. 119 // stub for the underlying IC stub code.
123 class KeyedStoreICStubShim : public HydrogenCodeStub { 120 class KeyedStoreICStubShim : public HydrogenCodeStub {
(...skipping 11 matching lines...) Expand all
135 132
136 virtual void InitializeInterfaceDescriptor( 133 virtual void InitializeInterfaceDescriptor(
137 CodeStubInterfaceDescriptor* descriptor) OVERRIDE { 134 CodeStubInterfaceDescriptor* descriptor) OVERRIDE {
138 CallInterfaceDescriptor* call_descriptor = 135 CallInterfaceDescriptor* call_descriptor =
139 isolate()->call_descriptor(CallDescriptorKey::StoreICCall); 136 isolate()->call_descriptor(CallDescriptorKey::StoreICCall);
140 descriptor->Initialize(MajorKey(), call_descriptor); 137 descriptor->Initialize(MajorKey(), call_descriptor);
141 } 138 }
142 139
143 private: 140 private:
144 virtual Major MajorKey() const OVERRIDE { return NoCache; } 141 virtual Major MajorKey() const OVERRIDE { return NoCache; }
145 virtual int NotMissMinorKey() const OVERRIDE { return 0; }
146 virtual bool UseSpecialCache() OVERRIDE { return true; } 142 virtual bool UseSpecialCache() OVERRIDE { return true; }
147 143
148 StrictMode strict_mode_; 144 StrictMode strict_mode_;
149 }; 145 };
150 146
151 147
152 JSGenericLowering::JSGenericLowering(CompilationInfo* info, JSGraph* jsgraph, 148 JSGenericLowering::JSGenericLowering(CompilationInfo* info, JSGraph* jsgraph,
153 MachineOperatorBuilder* machine) 149 MachineOperatorBuilder* machine)
154 : info_(info), 150 : info_(info),
155 jsgraph_(jsgraph), 151 jsgraph_(jsgraph),
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { 561 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) {
566 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); 562 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node);
567 int arity = OperatorProperties::GetValueInputCount(node->op()); 563 int arity = OperatorProperties::GetValueInputCount(node->op());
568 ReplaceWithRuntimeCall(node, function, arity); 564 ReplaceWithRuntimeCall(node, function, arity);
569 return node; 565 return node;
570 } 566 }
571 567
572 } // namespace compiler 568 } // namespace compiler
573 } // namespace internal 569 } // namespace internal
574 } // namespace v8 570 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698