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

Unified Diff: src/asmjs/typing-asm.cc

Issue 2123283007: [wasm] throw in case of assignment to module parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | test/mjsunit/regress/regress-613928.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/typing-asm.cc
diff --git a/src/asmjs/typing-asm.cc b/src/asmjs/typing-asm.cc
index f3a4ad82ce9e2856654c770f794cec6e2657f0f0..01db88aa94ad0acdab6a9d776a97fcf0084a9357 100644
--- a/src/asmjs/typing-asm.cc
+++ b/src/asmjs/typing-asm.cc
@@ -675,6 +675,9 @@ void AsmTyper::VisitAssignment(Assignment* expr) {
}
expected_type_ = target_type;
Variable* var = proxy->var();
+ if (!in_function_ && var->IsParameter()) {
+ FAIL(expr, "assignment to module parameter");
+ }
VariableInfo* info = GetVariableInfo(var);
if (info == nullptr || info->type == nullptr) {
if (var->mode() == TEMPORARY) {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-613928.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698