Index: src/wasm/wasm-opcodes.cc |
diff --git a/src/wasm/wasm-opcodes.cc b/src/wasm/wasm-opcodes.cc |
index 8f54207661363ca59b2fa41134d500cade481fa1..3bffa60a7b8ef0c995a9d68933469d71dd6e3de7 100644 |
--- a/src/wasm/wasm-opcodes.cc |
+++ b/src/wasm/wasm-opcodes.cc |
@@ -38,6 +38,18 @@ const char* WasmOpcodes::ShortOpcodeName(WasmOpcode opcode) { |
return "Unknown"; |
} |
+bool WasmOpcodes::IsPrefixOpcode(WasmOpcode opcode) { |
+ switch (opcode) { |
+#define CHECK_PREFIX(name, opcode) \ |
+ case k##name##Prefix: \ |
+ return true; |
+ FOREACH_PREFIX(CHECK_PREFIX) |
+#undef CHECK_PREFIX |
+ default: |
+ return false; |
+ } |
+} |
+ |
std::ostream& operator<<(std::ostream& os, const FunctionSig& sig) { |
if (sig.return_count() == 0) os << "v"; |
for (size_t i = 0; i < sig.return_count(); ++i) { |