| 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 } | 447 } |
| 448 | 448 |
| 449 | 449 |
| 450 void JSGenericLowering::LowerJSLoadDynamicGlobal(Node* node) { | 450 void JSGenericLowering::LowerJSLoadDynamicGlobal(Node* node) { |
| 451 const DynamicGlobalAccess& access = DynamicGlobalAccessOf(node->op()); | 451 const DynamicGlobalAccess& access = DynamicGlobalAccessOf(node->op()); |
| 452 Runtime::FunctionId function_id = | 452 Runtime::FunctionId function_id = |
| 453 (access.mode() == CONTEXTUAL) ? Runtime::kLoadLookupSlot | 453 (access.mode() == CONTEXTUAL) ? Runtime::kLoadLookupSlot |
| 454 : Runtime::kLoadLookupSlotNoReferenceError; | 454 : Runtime::kLoadLookupSlotNoReferenceError; |
| 455 Node* projection = graph()->NewNode(common()->Projection(0), node); | 455 Node* projection = graph()->NewNode(common()->Projection(0), node); |
| 456 NodeProperties::ReplaceWithValue(node, projection, node, node); | 456 NodeProperties::ReplaceWithValue(node, projection, node, node); |
| 457 node->RemoveInput(NodeProperties::FirstFrameStateIndex(node) + 1); |
| 457 node->InsertInput(zone(), 1, jsgraph()->Constant(access.name())); | 458 node->InsertInput(zone(), 1, jsgraph()->Constant(access.name())); |
| 458 ReplaceWithRuntimeCall(node, function_id); | 459 ReplaceWithRuntimeCall(node, function_id); |
| 459 projection->ReplaceInput(0, node); | 460 projection->ReplaceInput(0, node); |
| 460 } | 461 } |
| 461 | 462 |
| 462 | 463 |
| 463 void JSGenericLowering::LowerJSLoadDynamicContext(Node* node) { | 464 void JSGenericLowering::LowerJSLoadDynamicContext(Node* node) { |
| 464 const DynamicContextAccess& access = DynamicContextAccessOf(node->op()); | 465 const DynamicContextAccess& access = DynamicContextAccessOf(node->op()); |
| 465 Node* projection = graph()->NewNode(common()->Projection(0), node); | 466 Node* projection = graph()->NewNode(common()->Projection(0), node); |
| 466 NodeProperties::ReplaceWithValue(node, projection, node, node); | 467 NodeProperties::ReplaceWithValue(node, projection, node, node); |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 } | 831 } |
| 831 | 832 |
| 832 | 833 |
| 833 MachineOperatorBuilder* JSGenericLowering::machine() const { | 834 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 834 return jsgraph()->machine(); | 835 return jsgraph()->machine(); |
| 835 } | 836 } |
| 836 | 837 |
| 837 } // namespace compiler | 838 } // namespace compiler |
| 838 } // namespace internal | 839 } // namespace internal |
| 839 } // namespace v8 | 840 } // namespace v8 |
| OLD | NEW |