Commit bbf48588 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Remove ambiguous getter for operator value counts.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/735583003

Cr-Commit-Position: refs/heads/master@{#25401}
parent 5bea77f7
...@@ -45,7 +45,7 @@ Node** StructuredGraphBuilder::EnsureInputBufferSize(int size) { ...@@ -45,7 +45,7 @@ Node** StructuredGraphBuilder::EnsureInputBufferSize(int size) {
Node* StructuredGraphBuilder::MakeNode(const Operator* op, Node* StructuredGraphBuilder::MakeNode(const Operator* op,
int value_input_count, int value_input_count,
Node** value_inputs, bool incomplete) { Node** value_inputs, bool incomplete) {
DCHECK(op->InputCount() == value_input_count); DCHECK(op->ValueInputCount() == value_input_count);
bool has_context = OperatorProperties::HasContextInput(op); bool has_context = OperatorProperties::HasContextInput(op);
bool has_framestate = OperatorProperties::HasFrameStateInput(op); bool has_framestate = OperatorProperties::HasFrameStateInput(op);
......
...@@ -59,7 +59,7 @@ void GraphReplayPrinter::PrintReplayOpCreator(const Operator* op) { ...@@ -59,7 +59,7 @@ void GraphReplayPrinter::PrintReplayOpCreator(const Operator* op) {
PrintF("unique_constant"); PrintF("unique_constant");
break; break;
case IrOpcode::kPhi: case IrOpcode::kPhi:
PrintF("%d", op->InputCount()); PrintF("%d", op->ValueInputCount());
break; break;
case IrOpcode::kEffectPhi: case IrOpcode::kEffectPhi:
PrintF("%d", op->EffectInputCount()); PrintF("%d", op->EffectInputCount());
......
...@@ -32,7 +32,7 @@ void Graph::Decorate(Node* node) { ...@@ -32,7 +32,7 @@ void Graph::Decorate(Node* node) {
Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs, Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs,
bool incomplete) { bool incomplete) {
DCHECK_LE(op->InputCount(), input_count); DCHECK_LE(op->ValueInputCount(), input_count);
Node* result = Node::New(this, input_count, inputs, incomplete); Node* result = Node::New(this, input_count, inputs, incomplete);
result->Initialize(op); result->Initialize(op);
if (!incomplete) { if (!incomplete) {
......
...@@ -295,7 +295,7 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer, ...@@ -295,7 +295,7 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer,
bool call_code_immediate, bool call_code_immediate,
bool call_address_immediate) { bool call_address_immediate) {
OperandGenerator g(this); OperandGenerator g(this);
DCHECK_EQ(call->op()->OutputCount(), DCHECK_EQ(call->op()->ValueOutputCount(),
static_cast<int>(buffer->descriptor->ReturnCount())); static_cast<int>(buffer->descriptor->ReturnCount()));
DCHECK_EQ( DCHECK_EQ(
call->op()->ValueInputCount(), call->op()->ValueInputCount(),
...@@ -929,7 +929,7 @@ void InstructionSelector::VisitPhi(Node* node) { ...@@ -929,7 +929,7 @@ void InstructionSelector::VisitPhi(Node* node) {
PhiInstruction* phi = new (instruction_zone()) PhiInstruction* phi = new (instruction_zone())
PhiInstruction(instruction_zone(), GetVirtualRegister(node)); PhiInstruction(instruction_zone(), GetVirtualRegister(node));
sequence()->InstructionBlockAt(current_block_->GetRpoNumber())->AddPhi(phi); sequence()->InstructionBlockAt(current_block_->GetRpoNumber())->AddPhi(phi);
const int input_count = node->op()->InputCount(); const int input_count = node->op()->ValueInputCount();
phi->operands().reserve(static_cast<size_t>(input_count)); phi->operands().reserve(static_cast<size_t>(input_count));
for (int i = 0; i < input_count; ++i) { for (int i = 0; i < input_count; ++i) {
Node* const input = node->InputAt(i); Node* const input = node->InputAt(i);
......
...@@ -87,7 +87,7 @@ class Inlinee { ...@@ -87,7 +87,7 @@ class Inlinee {
} }
// Counts JSFunction, Receiver, arguments, context but not effect, control. // Counts JSFunction, Receiver, arguments, context but not effect, control.
size_t total_parameters() { return start_->op()->OutputCount(); } size_t total_parameters() { return start_->op()->ValueOutputCount(); }
// Counts only formal parameters. // Counts only formal parameters.
size_t formal_parameters() { size_t formal_parameters() {
......
...@@ -82,14 +82,6 @@ class Operator : public ZoneObject { ...@@ -82,14 +82,6 @@ class Operator : public ZoneObject {
return (properties() & property) == property; return (properties() & property) == property;
} }
// Number of data inputs to the operator, for verifying graph structure.
// TODO(titzer): convert callers to ValueInputCount();
int InputCount() const { return ValueInputCount(); }
// Number of data outputs from the operator, for verifying graph structure.
// TODO(titzer): convert callers to ValueOutputCount();
int OutputCount() const { return ValueOutputCount(); }
Properties properties() const { return properties_; } Properties properties() const { return properties_; }
// TODO(titzer): convert return values here to size_t. // TODO(titzer): convert return values here to size_t.
......
...@@ -46,7 +46,7 @@ void SimplifiedGraphBuilder::End() { ...@@ -46,7 +46,7 @@ void SimplifiedGraphBuilder::End() {
Node* SimplifiedGraphBuilder::MakeNode(const Operator* op, Node* SimplifiedGraphBuilder::MakeNode(const Operator* op,
int value_input_count, int value_input_count,
Node** value_inputs, bool incomplete) { Node** value_inputs, bool incomplete) {
DCHECK(op->InputCount() == value_input_count); DCHECK(op->ValueInputCount() == value_input_count);
DCHECK(!OperatorProperties::HasContextInput(op)); DCHECK(!OperatorProperties::HasContextInput(op));
DCHECK(!OperatorProperties::HasFrameStateInput(op)); DCHECK(!OperatorProperties::HasFrameStateInput(op));
......
...@@ -772,7 +772,7 @@ TEST(CMergeReduce_edit_phi1) { ...@@ -772,7 +772,7 @@ TEST(CMergeReduce_edit_phi1) {
R.leaf[1], R.leaf[2], merge); R.leaf[1], R.leaf[2], merge);
R.ReduceMerge(merge, merge); R.ReduceMerge(merge, merge);
CHECK_EQ(IrOpcode::kPhi, phi->opcode()); CHECK_EQ(IrOpcode::kPhi, phi->opcode());
CHECK_EQ(2, phi->op()->InputCount()); CHECK_EQ(2, phi->op()->ValueInputCount());
CHECK_EQ(3, phi->InputCount()); CHECK_EQ(3, phi->InputCount());
CHECK_EQ(R.leaf[i < 1 ? 1 : 0], phi->InputAt(0)); CHECK_EQ(R.leaf[i < 1 ? 1 : 0], phi->InputAt(0));
CHECK_EQ(R.leaf[i < 2 ? 2 : 1], phi->InputAt(1)); CHECK_EQ(R.leaf[i < 2 ? 2 : 1], phi->InputAt(1));
...@@ -791,7 +791,7 @@ TEST(CMergeReduce_edit_effect_phi1) { ...@@ -791,7 +791,7 @@ TEST(CMergeReduce_edit_effect_phi1) {
R.leaf[2], merge); R.leaf[2], merge);
R.ReduceMerge(merge, merge); R.ReduceMerge(merge, merge);
CHECK_EQ(IrOpcode::kEffectPhi, phi->opcode()); CHECK_EQ(IrOpcode::kEffectPhi, phi->opcode());
CHECK_EQ(0, phi->op()->InputCount()); CHECK_EQ(0, phi->op()->ValueInputCount());
CHECK_EQ(2, phi->op()->EffectInputCount()); CHECK_EQ(2, phi->op()->EffectInputCount());
CHECK_EQ(3, phi->InputCount()); CHECK_EQ(3, phi->InputCount());
CHECK_EQ(R.leaf[i < 1 ? 1 : 0], phi->InputAt(0)); CHECK_EQ(R.leaf[i < 1 ? 1 : 0], phi->InputAt(0));
...@@ -883,7 +883,7 @@ TEST(CMergeReduce_exhaustive_4) { ...@@ -883,7 +883,7 @@ TEST(CMergeReduce_exhaustive_4) {
selector.CheckNode(ephi, IrOpcode::kEffectPhi, effects, merge); selector.CheckNode(ephi, IrOpcode::kEffectPhi, effects, merge);
CHECK_EQ(phi, phi_use->InputAt(0)); CHECK_EQ(phi, phi_use->InputAt(0));
CHECK_EQ(ephi, ephi_use->InputAt(0)); CHECK_EQ(ephi, ephi_use->InputAt(0));
CHECK_EQ(count, phi->op()->InputCount()); CHECK_EQ(count, phi->op()->ValueInputCount());
CHECK_EQ(count + 1, phi->InputCount()); CHECK_EQ(count + 1, phi->InputCount());
CHECK_EQ(count, ephi->op()->EffectInputCount()); CHECK_EQ(count, ephi->op()->EffectInputCount());
CHECK_EQ(count + 1, ephi->InputCount()); CHECK_EQ(count + 1, ephi->InputCount());
...@@ -909,7 +909,7 @@ TEST(CMergeReduce_edit_many_phis1) { ...@@ -909,7 +909,7 @@ TEST(CMergeReduce_edit_many_phis1) {
for (int j = 0; j < kPhiCount; j++) { for (int j = 0; j < kPhiCount; j++) {
Node* phi = phis[j]; Node* phi = phis[j];
CHECK_EQ(IrOpcode::kPhi, phi->opcode()); CHECK_EQ(IrOpcode::kPhi, phi->opcode());
CHECK_EQ(2, phi->op()->InputCount()); CHECK_EQ(2, phi->op()->ValueInputCount());
CHECK_EQ(3, phi->InputCount()); CHECK_EQ(3, phi->InputCount());
CHECK_EQ(R.leaf[i < 1 ? 1 : 0], phi->InputAt(0)); CHECK_EQ(R.leaf[i < 1 ? 1 : 0], phi->InputAt(0));
CHECK_EQ(R.leaf[i < 2 ? 2 : 1], phi->InputAt(1)); CHECK_EQ(R.leaf[i < 2 ? 2 : 1], phi->InputAt(1));
......
...@@ -820,7 +820,7 @@ TEST(RemoveToNumberEffects) { ...@@ -820,7 +820,7 @@ TEST(RemoveToNumberEffects) {
if (effect_use != NULL) { if (effect_use != NULL) {
R.CheckEffectInput(R.start(), effect_use); R.CheckEffectInput(R.start(), effect_use);
// Check that value uses of ToNumber() do not go to start(). // Check that value uses of ToNumber() do not go to start().
for (int i = 0; i < effect_use->op()->InputCount(); i++) { for (int i = 0; i < effect_use->op()->ValueInputCount(); i++) {
CHECK_NE(R.start(), effect_use->InputAt(i)); CHECK_NE(R.start(), effect_use->InputAt(i));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment