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

Unified Diff: src/compiler/js-inlining.cc

Issue 1434873004: [turbofan] Pass new target to JSCreate nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_inlining-constructor-1
Patch Set: 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/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index 28365af906606442b4760274f4a2652a24ab7426..fa114225540b6663a6848b6edfa5bb35c0db2189 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -452,12 +452,12 @@ Reduction JSInliner::ReduceJSCall(Node* node, Handle<JSFunction> function) {
if (node->opcode() == IrOpcode::kJSCallConstruct) {
Node* effect = NodeProperties::GetEffectInput(node);
Node* context = NodeProperties::GetContextInput(node);
- Node* create = jsgraph_->graph()->NewNode(jsgraph_->javascript()->Create(),
- call.target(), context, effect);
+ Node* create = jsgraph_->graph()->NewNode(
+ jsgraph_->javascript()->Create(), call.target(),
+ call.original_constructor(), context, effect);
NodeProperties::ReplaceEffectInput(node, create);
- // TODO(4544): For now {JSCreate} requires the actual constructor to
- // coincide with the original constructor. Adapt JSGenericLowering to fix.
- // Also Runtime_GetOriginalConstructor depends on this for now. Fix as well!
+ // TODO(4544): For now Runtime_GetOriginalConstructor depends on the actual
+ // constructor to coincide with the original constructor. Fix this!
CHECK_EQ(call.target(), call.original_constructor());
// TODO(4544): For derived constructors we should not allocate an implicit
// receiver and also the return value should not be checked afterwards.
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698