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

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: 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') | no next file » | 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 f60c05896f02cfd6f7590727343765f6034c85e6..b52946228b4c01089477445126a005f1697115ff 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -1335,7 +1335,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_function_scope());
titzer 2016/08/19 09:38:55 Is it possible that some yahoo would do "use asm"
Toon Verwaest 2016/08/19 11:04:45 As far as I know directives are only processed at
+ this->scope()->AsDeclarationScope()->set_asm_module();
} else {
// Should not change mode, but will increment UseCounter
// if appropriate. Ditto usages below.
@@ -4331,7 +4332,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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698