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

Unified Diff: src/parsing/parser.cc

Issue 2398023002: [wasm] asm.js - Parse and convert asm.js to wasm a function at a time. (Closed)
Patch Set: revised Created 4 years, 1 month 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
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 073800d8167d4583c3091880555cb5b474ed11c6..2fb16a68b25f1da31f614fc531f6ea5ca06d3e7e 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -855,6 +855,9 @@ FunctionLiteral* Parser::ParseFunction(Isolate* isolate, ParseInfo* info) {
}
Handle<SharedFunctionInfo> shared_info = info->shared_info();
DeserializeScopeChain(info, info->maybe_outer_scope_info());
+ if (info->asm_function_scope()) {
titzer 2016/11/28 10:40:11 Also fishy. I am not sure why we have to manually
bradn 2016/11/29 06:30:35 Agreed. I had tried instead to set the outer funct
+ original_scope_ = info->asm_function_scope();
+ }
// Initialize parser state.
source = String::Flatten(source);
@@ -2610,8 +2613,6 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
// FunctionExpression; even without enclosing parentheses it might be
// immediately invoked.
// - The function literal shouldn't be hinted to eagerly compile.
- // - For asm.js functions the body needs to be available when module
- // validation is active, because we examine the entire module at once.
// Inner functions will be parsed using a temporary Zone. After parsing, we
// will migrate unresolved variable into a Scope in the main Zone.
@@ -2621,8 +2622,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
? can_preparse
: (is_lazy_top_level_function ||
(allow_lazy_ && function_type == FunctionLiteral::kDeclaration &&
- eager_compile_hint == FunctionLiteral::kShouldLazyCompile))) &&
- !(FLAG_validate_asm && scope()->IsAsmModule());
+ eager_compile_hint == FunctionLiteral::kShouldLazyCompile)));
bool is_lazy_inner_function =
use_temp_zone && FLAG_lazy_inner_functions && !is_lazy_top_level_function;
« src/compiler.h ('K') | « src/parsing/parse-info.cc ('k') | src/wasm/wasm-module-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698