| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 334 |
| 335 | 335 |
| 336 void JSGenericLowering::LowerJSToObject(Node* node) { | 336 void JSGenericLowering::LowerJSToObject(Node* node) { |
| 337 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); | 337 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); |
| 338 } | 338 } |
| 339 | 339 |
| 340 | 340 |
| 341 void JSGenericLowering::LowerJSLoadProperty(Node* node) { | 341 void JSGenericLowering::LowerJSLoadProperty(Node* node) { |
| 342 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 342 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 343 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); | 343 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); |
| 344 Callable callable = | 344 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode( |
| 345 CodeFactory::KeyedLoadICInOptimizedCode(isolate(), UNINITIALIZED); | 345 isolate(), p.language_mode(), UNINITIALIZED); |
| 346 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); | 346 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); |
| 347 node->InsertInput(zone(), 3, jsgraph()->HeapConstant(p.feedback().vector())); | 347 node->InsertInput(zone(), 3, jsgraph()->HeapConstant(p.feedback().vector())); |
| 348 ReplaceWithStubCall(node, callable, | 348 ReplaceWithStubCall(node, callable, |
| 349 CallDescriptor::kPatchableCallSite | flags); | 349 CallDescriptor::kPatchableCallSite | flags); |
| 350 } | 350 } |
| 351 | 351 |
| 352 | 352 |
| 353 void JSGenericLowering::LowerJSLoadNamed(Node* node) { | 353 void JSGenericLowering::LowerJSLoadNamed(Node* node) { |
| 354 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 354 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 355 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); | 355 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); |
| 356 Callable callable = CodeFactory::LoadICInOptimizedCode( | 356 Callable callable = CodeFactory::LoadICInOptimizedCode( |
| 357 isolate(), p.contextual_mode(), UNINITIALIZED); | 357 isolate(), p.contextual_mode(), p.language_mode(), UNINITIALIZED); |
| 358 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); | 358 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); |
| 359 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); | 359 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); |
| 360 node->InsertInput(zone(), 3, jsgraph()->HeapConstant(p.feedback().vector())); | 360 node->InsertInput(zone(), 3, jsgraph()->HeapConstant(p.feedback().vector())); |
| 361 ReplaceWithStubCall(node, callable, | 361 ReplaceWithStubCall(node, callable, |
| 362 CallDescriptor::kPatchableCallSite | flags); | 362 CallDescriptor::kPatchableCallSite | flags); |
| 363 } | 363 } |
| 364 | 364 |
| 365 | 365 |
| 366 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 366 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
| 367 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 367 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 } | 831 } |
| 832 | 832 |
| 833 | 833 |
| 834 MachineOperatorBuilder* JSGenericLowering::machine() const { | 834 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 835 return jsgraph()->machine(); | 835 return jsgraph()->machine(); |
| 836 } | 836 } |
| 837 | 837 |
| 838 } // namespace compiler | 838 } // namespace compiler |
| 839 } // namespace internal | 839 } // namespace internal |
| 840 } // namespace v8 | 840 } // namespace v8 |
| OLD | NEW |