Chromium Code Reviews| 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) { |