OLD | NEW |
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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 307 |
308 | 308 |
309 void JSGenericLowering::LowerJSToObject(Node* node) { | 309 void JSGenericLowering::LowerJSToObject(Node* node) { |
310 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); | 310 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); |
311 } | 311 } |
312 | 312 |
313 | 313 |
314 void JSGenericLowering::LowerJSLoadProperty(Node* node) { | 314 void JSGenericLowering::LowerJSLoadProperty(Node* node) { |
315 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 315 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
316 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); | 316 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); |
317 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode( | 317 Callable callable = |
318 isolate(), p.language_mode(), UNINITIALIZED); | 318 CodeFactory::KeyedLoadICInOptimizedCode(isolate(), UNINITIALIZED); |
319 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); | 319 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); |
320 ReplaceWithStubCall(node, callable, flags); | 320 ReplaceWithStubCall(node, callable, flags); |
321 } | 321 } |
322 | 322 |
323 | 323 |
324 void JSGenericLowering::LowerJSLoadNamed(Node* node) { | 324 void JSGenericLowering::LowerJSLoadNamed(Node* node) { |
325 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 325 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
326 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); | 326 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); |
327 Callable callable = CodeFactory::LoadICInOptimizedCode( | 327 Callable callable = CodeFactory::LoadICInOptimizedCode( |
328 isolate(), p.contextual_mode(), p.language_mode(), UNINITIALIZED); | 328 isolate(), p.contextual_mode(), UNINITIALIZED); |
329 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); | 329 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); |
330 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); | 330 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); |
331 ReplaceWithStubCall(node, callable, flags); | 331 ReplaceWithStubCall(node, callable, flags); |
332 } | 332 } |
333 | 333 |
334 | 334 |
335 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 335 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
336 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 336 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
337 LanguageMode language_mode = OpParameter<LanguageMode>(node); | 337 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
338 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( | 338 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 } | 770 } |
771 | 771 |
772 | 772 |
773 MachineOperatorBuilder* JSGenericLowering::machine() const { | 773 MachineOperatorBuilder* JSGenericLowering::machine() const { |
774 return jsgraph()->machine(); | 774 return jsgraph()->machine(); |
775 } | 775 } |
776 | 776 |
777 } // namespace compiler | 777 } // namespace compiler |
778 } // namespace internal | 778 } // namespace internal |
779 } // namespace v8 | 779 } // namespace v8 |
OLD | NEW |