Index: src/compiler/js-generic-lowering.cc |
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc |
index 5fe37e5ad68ceebb9a6cf1bced507714fee68437..4c31b7312b9f194cb4f702d84753d878c6415ca1 100644 |
--- a/src/compiler/js-generic-lowering.cc |
+++ b/src/compiler/js-generic-lowering.cc |
@@ -447,6 +447,29 @@ void JSGenericLowering::LowerJSStoreContext(Node* node) { |
} |
+void JSGenericLowering::LowerJSLoadDynamicGlobal(Node* node) { |
+ const DynamicGlobalAccess& access = DynamicGlobalAccessOf(node->op()); |
+ Runtime::FunctionId function_id = |
+ (access.mode() == CONTEXTUAL) ? Runtime::kLoadLookupSlot |
+ : Runtime::kLoadLookupSlotNoReferenceError; |
+ Node* projection = graph()->NewNode(common()->Projection(0), node); |
+ NodeProperties::ReplaceWithValue(node, projection, node, node); |
+ node->InsertInput(zone(), 1, jsgraph()->Constant(access.name())); |
+ ReplaceWithRuntimeCall(node, function_id); |
+ projection->ReplaceInput(0, node); |
+} |
+ |
+ |
+void JSGenericLowering::LowerJSLoadDynamicContext(Node* node) { |
+ const DynamicContextAccess& access = DynamicContextAccessOf(node->op()); |
+ Node* projection = graph()->NewNode(common()->Projection(0), node); |
+ NodeProperties::ReplaceWithValue(node, projection, node, node); |
+ node->InsertInput(zone(), 1, jsgraph()->Constant(access.name())); |
+ ReplaceWithRuntimeCall(node, Runtime::kLoadLookupSlot); |
+ projection->ReplaceInput(0, node); |
+} |
+ |
+ |
void JSGenericLowering::LowerJSCreateClosure(Node* node) { |
CreateClosureParameters p = CreateClosureParametersOf(node->op()); |
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.shared_info())); |