Commit 83162121 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] [decoder] Also trace global index

With --trace-wasm-decoder, we were printing the local variable index
for values on the stack generated by get_local instructions. This CL
adds the same feature for globals.

R=titzer@chromium.org

Change-Id: Ie113ebcc2d1abcd67df2d01bf4bdb452635732c8
Reviewed-on: https://chromium-review.googlesource.com/684737Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48170}
parent 02d999ab
......@@ -1751,14 +1751,16 @@ class WasmFullDecoder : public WasmDecoder<validate> {
PrintF("[%d]", operand.value);
break;
}
case kExprGetLocal: {
case kExprGetLocal:
case kExprSetLocal:
case kExprTeeLocal: {
LocalIndexOperand<validate> operand(this, val.pc);
PrintF("[%u]", operand.index);
break;
}
case kExprSetLocal: // fallthru
case kExprTeeLocal: {
LocalIndexOperand<validate> operand(this, val.pc);
case kExprGetGlobal:
case kExprSetGlobal: {
GlobalIndexOperand<validate> operand(this, val.pc);
PrintF("[%u]", operand.index);
break;
}
......
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