| 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 = | 317 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode( |
| 318 CodeFactory::KeyedLoadICInOptimizedCode(isolate(), UNINITIALIZED); | 318 isolate(), p.language_mode(), 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(), UNINITIALIZED); | 328 isolate(), p.contextual_mode(), p.language_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::LowerJSLoadGlobal(Node* node) { | 335 void JSGenericLowering::LowerJSLoadGlobal(Node* node) { |
| 336 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 336 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 337 const LoadNamedParameters& p = LoadGlobalParametersOf(node->op()); | 337 const LoadNamedParameters& p = LoadGlobalParametersOf(node->op()); |
| 338 Callable callable = CodeFactory::LoadICInOptimizedCode( | 338 Callable callable = CodeFactory::LoadICInOptimizedCode( |
| 339 isolate(), p.contextual_mode(), UNINITIALIZED); | 339 isolate(), p.contextual_mode(), SLOPPY, UNINITIALIZED); |
| 340 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); | 340 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); |
| 341 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); | 341 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); |
| 342 ReplaceWithStubCall(node, callable, flags); | 342 ReplaceWithStubCall(node, callable, flags); |
| 343 } | 343 } |
| 344 | 344 |
| 345 | 345 |
| 346 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 346 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
| 347 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 347 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 348 const StorePropertyParameters& p = StorePropertyParametersOf(node->op()); | 348 const StorePropertyParameters& p = StorePropertyParametersOf(node->op()); |
| 349 LanguageMode language_mode = OpParameter<LanguageMode>(node); | 349 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 } | 806 } |
| 807 | 807 |
| 808 | 808 |
| 809 MachineOperatorBuilder* JSGenericLowering::machine() const { | 809 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 810 return jsgraph()->machine(); | 810 return jsgraph()->machine(); |
| 811 } | 811 } |
| 812 | 812 |
| 813 } // namespace compiler | 813 } // namespace compiler |
| 814 } // namespace internal | 814 } // namespace internal |
| 815 } // namespace v8 | 815 } // namespace v8 |
| OLD | NEW |