Index: src/compiler/js-generic-lowering.cc |
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc |
index d2e94ce906ef0df32f8ae2513e164792d258bc33..d859f526e67c04a8b019e8c956658fa0f40173b5 100644 |
--- a/src/compiler/js-generic-lowering.cc |
+++ b/src/compiler/js-generic-lowering.cc |
@@ -45,13 +45,6 @@ Reduction JSGenericLowering::Reduce(Node* node) { |
} |
return Changed(node); |
} |
-#define REPLACE_RUNTIME_CALL(op, fun) \ |
- void JSGenericLowering::Lower##op(Node* node) { \ |
- ReplaceWithRuntimeCall(node, fun); \ |
- } |
-REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext) |
-REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver) |
-#undef REPLACE_RUNTIME_CALL |
#define REPLACE_STUB_CALL(Name) \ |
void JSGenericLowering::LowerJS##Name(Node* node) { \ |
@@ -518,6 +511,11 @@ void JSGenericLowering::LowerJSCreateCatchContext(Node* node) { |
ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext); |
} |
+void JSGenericLowering::LowerJSCreateWithContext(Node* node) { |
+ Handle<ScopeInfo> scope_info = OpParameter<Handle<ScopeInfo>>(node); |
+ node->InsertInput(zone(), 1, jsgraph()->HeapConstant(scope_info)); |
+ ReplaceWithRuntimeCall(node, Runtime::kPushWithContext); |
+} |
void JSGenericLowering::LowerJSCreateBlockContext(Node* node) { |
Handle<ScopeInfo> scope_info = OpParameter<Handle<ScopeInfo>>(node); |
@@ -577,6 +575,9 @@ void JSGenericLowering::LowerJSCallRuntime(Node* node) { |
ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); |
} |
+void JSGenericLowering::LowerJSConvertReceiver(Node* node) { |
+ ReplaceWithRuntimeCall(node, Runtime::kConvertReceiver); |
+} |
void JSGenericLowering::LowerJSForInNext(Node* node) { |
ReplaceWithRuntimeCall(node, Runtime::kForInNext); |