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

Unified Diff: src/parsing/parser.cc

Issue 2253913002: Move asm_module_ and asm_function_ down to DeclarationScope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test 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/ast/scopes.cc ('k') | test/mjsunit/asm-directive.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 880ad2d5554f4757c672ea688dc430b780ac5a15..60938c7036dc22222409df0c516109dcd8dd233a 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -1317,7 +1317,8 @@ void Parser::ParseStatementList(ZoneList<Statement*>* body, int end_token,
// Store the usage count; The actual use counter on the isolate is
// incremented after parsing is done.
++use_counts_[v8::Isolate::kUseAsm];
- this->scope()->SetAsmModule();
+ DCHECK(this->scope()->is_declaration_scope());
+ this->scope()->AsDeclarationScope()->set_asm_module();
} else {
// Should not change mode, but will increment UseCounter
// if appropriate. Ditto usages below.
@@ -4307,7 +4308,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
extension_ == NULL && allow_lazy() &&
function_type == FunctionLiteral::kDeclaration &&
eager_compile_hint != FunctionLiteral::kShouldEagerCompile &&
- !(FLAG_validate_asm && scope()->asm_module());
+ !(FLAG_validate_asm && scope()->IsAsmModule());
DeclarationScope* main_scope = nullptr;
if (use_temp_zone) {
« no previous file with comments | « src/ast/scopes.cc ('k') | test/mjsunit/asm-directive.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698