X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..refs/heads/master:/bytecode/OperandsInlines.h diff --git a/bytecode/OperandsInlines.h b/bytecode/OperandsInlines.h index 74ad60b..c9dee88 100644 --- a/bytecode/OperandsInlines.h +++ b/bytecode/OperandsInlines.h @@ -47,6 +47,22 @@ void Operands::dumpInContext(PrintStream& out, DumpContext* context) } } +template +void Operands::dump(PrintStream& out) const +{ + CommaPrinter comma(" "); + for (size_t argumentIndex = numberOfArguments(); argumentIndex--;) { + if (Traits::isEmptyForDump(argument(argumentIndex))) + continue; + out.print(comma, "arg", argumentIndex, ":", argument(argumentIndex)); + } + for (size_t localIndex = 0; localIndex < numberOfLocals(); ++localIndex) { + if (Traits::isEmptyForDump(local(localIndex))) + continue; + out.print(comma, "loc", localIndex, ":", local(localIndex)); + } +} + } // namespace JSC #endif // OperandsInlines_h