Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Unified Diff: src/wasm/ast-decoder.cc

Issue 2400863003: [wasm] Simd128 types should not be available in asmjs modules. (Closed)
Patch Set: Fix test Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/ast-decoder.h ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index 02d1db5bdad3b38998b0fd5b11e75c6202c58eab..025ccdf1d7bfc0d2c159e511600b0d313cf0fa9b 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -32,6 +32,9 @@ namespace wasm {
#endif
#define CHECK_PROTOTYPE_OPCODE(flag) \
+ if (module_ && module_->origin == kAsmJsOrigin) { \
+ error("Opcode not supported for asmjs modules"); \
+ } \
if (!FLAG_##flag) { \
error("Invalid opcode (enable with --" #flag ")"); \
break; \
@@ -500,7 +503,7 @@ class WasmFullDecoder : public WasmDecoder {
case kAstF64:
return builder_->Float64Constant(0);
case kAstS128:
- return builder_->DefaultS128Value();
+ return builder_->CreateS128Value(0);
default:
UNREACHABLE();
return nullptr;
« no previous file with comments | « src/wasm/ast-decoder.h ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698