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

Unified Diff: src/wasm/module-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.cc ('k') | test/mjsunit/regress/wasm/regression-648079.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index 865d481bed89a42552db5465e57155b849fdfab1..68f4247e3a69b70eddcb82ecb5f7e1fab08ac0b1 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -6,6 +6,7 @@
#include "src/base/functional.h"
#include "src/base/platform/platform.h"
+#include "src/flags.h"
#include "src/macro-assembler.h"
#include "src/objects.h"
#include "src/v8.h"
@@ -932,7 +933,12 @@ class ModuleDecoder : public Decoder {
case kLocalF64:
return kAstF64;
case kLocalS128:
- return kAstS128;
+ if (origin_ != kAsmJsOrigin && FLAG_wasm_simd_prototype) {
+ return kAstS128;
+ } else {
+ error(pc_ - 1, "invalid local type");
+ return kAstStmt;
+ }
default:
error(pc_ - 1, "invalid local type");
return kAstStmt;
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | test/mjsunit/regress/wasm/regression-648079.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698