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

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

Issue 1442643002: [turbofan] Rename "original constructor" to "new target". (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/js-generic-lowering.cc ('k') | src/frames.h » ('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 fa114225540b6663a6848b6edfa5bb35c0db2189..117085db293671ef476ebc8fcd7ef3c29f579606 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -53,7 +53,7 @@ class JSCallAccessor {
return call_->InputAt(1);
}
- Node* original_constructor() {
+ Node* new_target() {
DCHECK_EQ(IrOpcode::kJSCallConstruct, call_->opcode());
return call_->InputAt(formal_arguments() + 1);
}
@@ -70,7 +70,7 @@ class JSCallAccessor {
int formal_arguments() {
// Both, {JSCallFunction} and {JSCallConstruct}, have two extra inputs:
- // - JSCallConstruct: Includes target function and original constructor.
+ // - JSCallConstruct: Includes target function and new target.
// - JSCallFunction: Includes target function and receiver.
return call_->op()->ValueInputCount() - 2;
}
@@ -452,13 +452,13 @@ 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(),
- call.original_constructor(), context, effect);
+ Node* create = jsgraph_->graph()->NewNode(jsgraph_->javascript()->Create(),
+ call.target(), call.new_target(),
+ context, effect);
NodeProperties::ReplaceEffectInput(node, create);
- // 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 now Runtime_GetNewTarget depends on the actual target to
+ // coincide with the new target. Fix this!
+ CHECK_EQ(call.target(), call.new_target());
// TODO(4544): For derived constructors we should not allocate an implicit
// receiver and also the return value should not be checked afterwards.
CHECK(!IsClassConstructor(function->shared()->kind()));
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698