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

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

Issue 1912633002: [ic] Split LoadIC into LoadGlobalIC and LoadIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 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/compiler.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.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 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-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 ReplaceWithStubCall(node, callable, flags); 173 ReplaceWithStubCall(node, callable, flags);
174 } 174 }
175 175
176 176
177 void JSGenericLowering::LowerJSLoadNamed(Node* node) { 177 void JSGenericLowering::LowerJSLoadNamed(Node* node) {
178 Node* closure = NodeProperties::GetValueInput(node, 1); 178 Node* closure = NodeProperties::GetValueInput(node, 1);
179 Node* effect = NodeProperties::GetEffectInput(node); 179 Node* effect = NodeProperties::GetEffectInput(node);
180 Node* control = NodeProperties::GetControlInput(node); 180 Node* control = NodeProperties::GetControlInput(node);
181 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 181 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
182 NamedAccess const& p = NamedAccessOf(node->op()); 182 NamedAccess const& p = NamedAccessOf(node->op());
183 Callable callable = 183 Callable callable = CodeFactory::LoadICInOptimizedCode(isolate());
184 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF);
185 // Load the type feedback vector from the closure. 184 // Load the type feedback vector from the closure.
186 Node* literals = effect = graph()->NewNode( 185 Node* literals = effect = graph()->NewNode(
187 machine()->Load(MachineType::AnyTagged()), closure, 186 machine()->Load(MachineType::AnyTagged()), closure,
188 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), 187 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag),
189 effect, control); 188 effect, control);
190 Node* vector = effect = graph()->NewNode( 189 Node* vector = effect = graph()->NewNode(
191 machine()->Load(MachineType::AnyTagged()), literals, 190 machine()->Load(MachineType::AnyTagged()), literals,
192 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - 191 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset -
193 kHeapObjectTag), 192 kHeapObjectTag),
194 effect, control); 193 effect, control);
195 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); 194 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
196 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 195 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
197 node->ReplaceInput(3, vector); 196 node->ReplaceInput(3, vector);
198 node->ReplaceInput(6, effect); 197 node->ReplaceInput(6, effect);
199 ReplaceWithStubCall(node, callable, flags); 198 ReplaceWithStubCall(node, callable, flags);
200 } 199 }
201 200
202 201
203 void JSGenericLowering::LowerJSLoadGlobal(Node* node) { 202 void JSGenericLowering::LowerJSLoadGlobal(Node* node) {
204 Node* closure = NodeProperties::GetValueInput(node, 0); 203 Node* closure = NodeProperties::GetValueInput(node, 0);
205 Node* context = NodeProperties::GetContextInput(node); 204 Node* context = NodeProperties::GetContextInput(node);
206 Node* effect = NodeProperties::GetEffectInput(node); 205 Node* effect = NodeProperties::GetEffectInput(node);
207 Node* control = NodeProperties::GetControlInput(node); 206 Node* control = NodeProperties::GetControlInput(node);
208 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 207 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
209 const LoadGlobalParameters& p = LoadGlobalParametersOf(node->op()); 208 const LoadGlobalParameters& p = LoadGlobalParametersOf(node->op());
210 Callable callable = 209 Callable callable =
211 CodeFactory::LoadICInOptimizedCode(isolate(), p.typeof_mode()); 210 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), p.typeof_mode());
212 // Load the type feedback vector from the closure. 211 // Load the type feedback vector from the closure.
213 Node* literals = effect = graph()->NewNode( 212 Node* literals = effect = graph()->NewNode(
214 machine()->Load(MachineType::AnyTagged()), closure, 213 machine()->Load(MachineType::AnyTagged()), closure,
215 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), 214 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag),
216 effect, control); 215 effect, control);
217 Node* vector = effect = graph()->NewNode( 216 Node* vector = effect = graph()->NewNode(
218 machine()->Load(MachineType::AnyTagged()), literals, 217 machine()->Load(MachineType::AnyTagged()), literals,
219 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - 218 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset -
220 kHeapObjectTag), 219 kHeapObjectTag),
221 effect, control); 220 effect, control);
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 } 739 }
741 740
742 741
743 MachineOperatorBuilder* JSGenericLowering::machine() const { 742 MachineOperatorBuilder* JSGenericLowering::machine() const {
744 return jsgraph()->machine(); 743 return jsgraph()->machine();
745 } 744 }
746 745
747 } // namespace compiler 746 } // namespace compiler
748 } // namespace internal 747 } // namespace internal
749 } // namespace v8 748 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698