Modified: trunk/Source/_javascript_Core/bytecode/BytecodeDumper.cpp (237140 => 237141)
--- trunk/Source/_javascript_Core/bytecode/BytecodeDumper.cpp 2018-10-15 20:52:15 UTC (rev 237140)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeDumper.cpp 2018-10-15 20:58:24 UTC (rev 237141)
@@ -1359,7 +1359,11 @@
int defaultTarget = (++it)->u.operand;
int scrutineeRegister = (++it)->u.operand;
printLocationAndOp(out, location, it, "switch_imm");
- out.printf("%d, %d(->%d), %s", tableIndex, defaultTarget, location + defaultTarget, registerName(scrutineeRegister).data());
+ out.printf("%d, default:%d(->%d)", tableIndex, defaultTarget, location + defaultTarget);
+ const auto& table = block()->switchJumpTable(tableIndex);
+ for (unsigned i = 0; i < table.branchOffsets.size(); ++i)
+ out.printf(", %d:%d(->%d)", i, table.branchOffsets[i], location + table.branchOffsets[i]);
+ out.print(", ", registerName(scrutineeRegister).data());
break;
}
case op_switch_char: {
@@ -1367,7 +1371,11 @@
int defaultTarget = (++it)->u.operand;
int scrutineeRegister = (++it)->u.operand;
printLocationAndOp(out, location, it, "switch_char");
- out.printf("%d, %d(->%d), %s", tableIndex, defaultTarget, location + defaultTarget, registerName(scrutineeRegister).data());
+ out.printf("%d, default:%d(->%d)", tableIndex, defaultTarget, location + defaultTarget);
+ const auto& table = block()->switchJumpTable(tableIndex);
+ for (unsigned i = 0; i < table.branchOffsets.size(); ++i)
+ out.printf(", %c:%d(->%d)", i, table.branchOffsets[i], location + table.branchOffsets[i]);
+ out.print(", ", registerName(scrutineeRegister).data());
break;
}
case op_switch_string: {
@@ -1375,7 +1383,13 @@
int defaultTarget = (++it)->u.operand;
int scrutineeRegister = (++it)->u.operand;
printLocationAndOp(out, location, it, "switch_string");
- out.printf("%d, %d(->%d), %s", tableIndex, defaultTarget, location + defaultTarget, registerName(scrutineeRegister).data());
+ out.printf("%d, default:%d(->%d)", tableIndex, defaultTarget, location + defaultTarget);
+ const auto& table = block()->stringSwitchJumpTable(tableIndex);
+ for (const auto& offset : table.offsetTable) {
+ out.print(", ", Identifier::fromUid(vm(), static_cast<UniquedStringImpl*>(offset.key.get())));
+ out.printf(":%d(%d)", offset.value.branchOffset, location + offset.value.branchOffset);
+ }
+ out.print(", ", registerName(scrutineeRegister).data());
break;
}
case op_new_func: {