Fix printing order of opcode prefix and space
Leading whitespaces are used to indiate control depth, opcode prefix should be printed after the whitespaces. Change-Id: I0a22864d1d5a2e643b15a4c10909c0387922f8e3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224959 Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Jie Pan <jie.pan@intel.com> Cr-Commit-Position: refs/heads/master@{#68092}
This commit is contained in:
parent
cc1b741ef3
commit
1f5842ad7a
@ -176,8 +176,10 @@ bool PrintRawWasmCode(AccountingAllocator* allocator, const FunctionBody& body,
|
||||
|
||||
unsigned offset = 1;
|
||||
WasmOpcode opcode = i.current();
|
||||
if (WasmOpcodes::IsPrefixOpcode(opcode)) {
|
||||
os << PrefixName(opcode) << ", ";
|
||||
WasmOpcode prefix = kExprUnreachable;
|
||||
bool has_prefix = WasmOpcodes::IsPrefixOpcode(opcode);
|
||||
if (has_prefix) {
|
||||
prefix = i.current();
|
||||
opcode = i.prefixed_opcode();
|
||||
offset = 2;
|
||||
}
|
||||
@ -193,6 +195,10 @@ bool PrintRawWasmCode(AccountingAllocator* allocator, const FunctionBody& body,
|
||||
" ";
|
||||
os.write(padding, num_whitespaces);
|
||||
|
||||
if (has_prefix) {
|
||||
os << PrefixName(prefix) << ", ";
|
||||
}
|
||||
|
||||
os << RawOpcodeName(opcode) << ",";
|
||||
|
||||
if (opcode == kExprLoop || opcode == kExprIf || opcode == kExprBlock ||
|
||||
|
Loading…
Reference in New Issue
Block a user