Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(796)

Unified Diff: src/compiler/js-generic-lowering.cc

Issue 1435873002: [turbofan] Initial support for constructor call inlining. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/frame-states.cc ('k') | src/compiler/js-inlining.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index 8c363d3e8b6e5c07bc03a8bdcf18d1c23a9fa93f..82e5e6fd691d35d3505a54f269a338116152f47b 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -456,7 +456,12 @@ void JSGenericLowering::LowerJSLoadDynamic(Node* node) {
}
-void JSGenericLowering::LowerJSCreate(Node* node) { UNIMPLEMENTED(); }
+void JSGenericLowering::LowerJSCreate(Node* node) {
+ // TODO(4544): The duplication of the constructor function is only valid if
+ // actual constructor and original constructor coincide. Fix this!
+ node->InsertInput(zone(), 1, node->InputAt(0)); // Duplicate constructor.
+ ReplaceWithRuntimeCall(node, Runtime::kNewObject);
+}
void JSGenericLowering::LowerJSCreateArguments(Node* node) {
« no previous file with comments | « src/compiler/frame-states.cc ('k') | src/compiler/js-inlining.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698