| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 6886fcca2a0419281270fcecc70c5e54a9307b0d..ad6a2981126d83370ed2b9e325a638e9b742abe4 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -801,12 +801,11 @@ FunctionLiteral* Parser::DoParseProgram(CompilationInfo* info,
|
| ast_value_factory_->Internalize(isolate());
|
| }
|
| original_scope_ = scope;
|
| - if (info->is_eval()) {
|
| - if (!scope->is_global_scope() || info->strict_mode() == STRICT) {
|
| - scope = NewScope(scope, EVAL_SCOPE);
|
| - }
|
| + if (info->is_eval() &&
|
| + (!scope->is_global_scope() || info->strict_mode() == STRICT)) {
|
| + scope = NewScope(scope, EVAL_SCOPE);
|
| } else if (info->is_global()) {
|
| - scope = NewScope(scope, GLOBAL_SCOPE);
|
| + scope = NewScope(scope, SCRIPT_SCOPE);
|
| }
|
| scope->set_start_position(0);
|
| scope->set_end_position(source->length());
|
| @@ -1401,8 +1400,6 @@ Statement* Parser::ParseExportDeclaration(bool* ok) {
|
| //
|
| // TODO(ES6): implement structuring ExportSpecifiers
|
|
|
| - ASSERT(strict_mode() == STRICT);
|
| -
|
| Expect(Token::EXPORT, CHECK_OK);
|
|
|
| Statement* result = NULL;
|
|
|