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

Unified Diff: src/asmjs/asm-wasm-builder.cc

Issue 2264913002: [wasm] asm.js - Remove Wasm.instantiateModuleFromAsm, use asm.js directly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 4 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/asmjs/asm-typer.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-wasm-builder.cc
diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc
index 0dfd5e2ade8061d400f782556e419ac4e06f29bd..6419459307be958b5d32e80a6471ec01fb56dc2a 100644
--- a/src/asmjs/asm-wasm-builder.cc
+++ b/src/asmjs/asm-wasm-builder.cc
@@ -830,6 +830,12 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
void VisitAssignment(Assignment* expr) {
bool as_init = false;
if (scope_ == kModuleScope) {
+ // Skip extra assignment inserted by the parser when in this form:
+ // (function Module(a, b, c) {... })
+ if (expr->target()->IsVariableProxy() &&
+ expr->target()->AsVariableProxy()->var()->mode() == CONST_LEGACY) {
+ return;
+ }
Property* prop = expr->value()->AsProperty();
if (prop != nullptr) {
VariableProxy* vp = prop->obj()->AsVariableProxy();
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698