Index: src/wasm/module-decoder.cc |
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc |
index ee211ad57e2fff003dae3f398150e33979104903..b7d38cef39aac4bcc04d6d2eff9e252abac6164d 100644 |
--- a/src/wasm/module-decoder.cc |
+++ b/src/wasm/module-decoder.cc |
@@ -1063,14 +1063,21 @@ class ModuleDecoder : public Decoder { |
return kWasmF32; |
case kLocalF64: |
return kWasmF64; |
- case kLocalS128: |
+ default: |
if (origin_ != kAsmJsOrigin && FLAG_wasm_simd_prototype) { |
- return kWasmS128; |
- } else { |
- error(pc_ - 1, "invalid local type"); |
- return kWasmStmt; |
+ switch (t) { |
+ case kLocalS128: |
+ return kWasmS128; |
+ case kLocalS1x4: |
+ return kWasmS1x4; |
+ case kLocalS1x8: |
+ return kWasmS1x8; |
+ case kLocalS1x16: |
+ return kWasmS1x16; |
+ default: |
+ break; |
+ } |
} |
- default: |
error(pc_ - 1, "invalid local type"); |
return kWasmStmt; |
} |