diff --git a/js/src/ion/MIR.cpp b/js/src/ion/MIR.cpp index 9054d0e3f66..f8c9a65031f 100644 --- a/js/src/ion/MIR.cpp +++ b/js/src/ion/MIR.cpp @@ -229,11 +229,9 @@ void MDefinition::printOpcode(FILE *fp) { PrintOpcodeName(fp, op()); - fprintf(fp, " "); for (size_t j = 0; j < numOperands(); j++) { + fprintf(fp, " "); getOperand(j)->printName(fp); - if (j != numOperands() - 1) - fprintf(fp, " "); } } @@ -444,6 +442,21 @@ MConstant::printOpcode(FILE *fp) } } +void +MControlInstruction::printOpcode(FILE *fp) +{ + MDefinition::printOpcode(fp); + for (size_t j = 0; j < numSuccessors(); j++) + fprintf(fp, " block%d", getSuccessor(j)->id()); +} + +void +MCompare::printOpcode(FILE *fp) +{ + MDefinition::printOpcode(fp); + fprintf(fp, " %s", js_CodeName[jsop()]); +} + void MConstantElements::printOpcode(FILE *fp) { diff --git a/js/src/ion/MIR.h b/js/src/ion/MIR.h index 1c6dcf02161..50481a7cc85 100644 --- a/js/src/ion/MIR.h +++ b/js/src/ion/MIR.h @@ -814,6 +814,8 @@ class MControlInstruction : public MInstruction bool isControlInstruction() const { return true; } + + void printOpcode(FILE *fp); }; class MTableSwitch @@ -1907,6 +1909,8 @@ class MCompare return AliasSet::None(); } + void printOpcode(FILE *fp); + protected: bool congruentTo(MDefinition *const &ins) const { if (!MBinaryInstruction::congruentTo(ins))