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

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

Issue 2662263002: [turbo] Rename CallConstruct* operators to Construct*. (Closed)
Patch Set: Created 3 years, 11 months 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-inlining-heuristic.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 3869a3ef9ba326ddcd6568900845dfd8cc113c56..448881501c640c2f0ca0aec42b1ba731b6de6804 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -31,16 +31,16 @@ namespace compiler {
// Provides convenience accessors for the common layout of nodes having either
-// the {JSCallFunction} or the {JSCallConstruct} operator.
+// the {JSCallFunction} or the {JSConstruct} operator.
class JSCallAccessor {
public:
explicit JSCallAccessor(Node* call) : call_(call) {
DCHECK(call->opcode() == IrOpcode::kJSCallFunction ||
- call->opcode() == IrOpcode::kJSCallConstruct);
+ call->opcode() == IrOpcode::kJSConstruct);
}
Node* target() {
- // Both, {JSCallFunction} and {JSCallConstruct}, have same layout here.
+ // Both, {JSCallFunction} and {JSConstruct}, have same layout here.
return call_->InputAt(0);
}
@@ -50,18 +50,18 @@ class JSCallAccessor {
}
Node* new_target() {
- DCHECK_EQ(IrOpcode::kJSCallConstruct, call_->opcode());
+ DCHECK_EQ(IrOpcode::kJSConstruct, call_->opcode());
return call_->InputAt(formal_arguments() + 1);
}
Node* frame_state() {
- // Both, {JSCallFunction} and {JSCallConstruct}, have frame state.
+ // Both, {JSCallFunction} and {JSConstruct}, have frame state.
return NodeProperties::GetFrameStateInput(call_);
}
int formal_arguments() {
- // Both, {JSCallFunction} and {JSCallConstruct}, have two extra inputs:
- // - JSCallConstruct: Includes target function and new target.
+ // Both, {JSCallFunction} and {JSConstruct}, have two extra inputs:
+ // - JSConstruct: Includes target function and new target.
// - JSCallFunction: Includes target function and receiver.
return call_->op()->ValueInputCount() - 2;
}
@@ -69,7 +69,7 @@ class JSCallAccessor {
float frequency() const {
return (call_->opcode() == IrOpcode::kJSCallFunction)
? CallFunctionParametersOf(call_->op()).frequency()
- : CallConstructParametersOf(call_->op()).frequency();
+ : ConstructParametersOf(call_->op()).frequency();
}
private:
@@ -354,7 +354,7 @@ Reduction JSInliner::Reduce(Node* node) {
// This reducer can handle both normal function calls as well a constructor
// calls whenever the target is a constant function object, as follows:
// - JSCallFunction(target:constant, receiver, args...)
- // - JSCallConstruct(target:constant, args..., new.target)
+ // - JSConstruct(target:constant, args..., new.target)
HeapObjectMatcher match(node->InputAt(0));
if (!match.HasValue() || !match.Value()->IsJSFunction()) return NoChange();
Handle<JSFunction> function = Handle<JSFunction>::cast(match.Value());
@@ -384,7 +384,7 @@ Reduction JSInliner::ReduceJSCall(Node* node, Handle<JSFunction> function) {
}
// Constructor must be constructable.
- if (node->opcode() == IrOpcode::kJSCallConstruct &&
+ if (node->opcode() == IrOpcode::kJSConstruct &&
IsNonConstructible(shared_info)) {
TRACE("Not inlining %s into %s because constructor is not constructable.\n",
shared_info->DebugName()->ToCString().get(),
@@ -550,8 +550,8 @@ Reduction JSInliner::ReduceJSCall(Node* node, Handle<JSFunction> function) {
Node* frame_state = call.frame_state();
Node* new_target = jsgraph()->UndefinedConstant();
- // Inline {JSCallConstruct} requires some additional magic.
- if (node->opcode() == IrOpcode::kJSCallConstruct) {
+ // Inline {JSConstruct} requires some additional magic.
+ if (node->opcode() == IrOpcode::kJSConstruct) {
// Insert nodes around the call that model the behavior required for a
// constructor dispatch (allocate implicit receiver and check return value).
// This models the behavior usually accomplished by our {JSConstructStub}.
@@ -579,7 +579,7 @@ Reduction JSInliner::ReduceJSCall(Node* node, Handle<JSFunction> function) {
receiver = create; // The implicit receiver.
}
- // Swizzle the inputs of the {JSCallConstruct} node to look like inputs to a
+ // Swizzle the inputs of the {JSConstruct} node to look like inputs to a
// normal {JSCallFunction} node so that the rest of the inlining machinery
// behaves as if we were dealing with a regular function invocation.
new_target = call.new_target(); // Retrieve new target value input.
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-inlining-heuristic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698