| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/ast.h" | 8 #include "src/ast.h" |
| 9 #include "src/ast-literal-reindexer.h" | 9 #include "src/ast-literal-reindexer.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 scope_->language_mode() | STRICT)); | 1330 scope_->language_mode() | STRICT)); |
| 1331 } | 1331 } |
| 1332 | 1332 |
| 1333 if (use_strong_found) { | 1333 if (use_strong_found) { |
| 1334 scope_->SetLanguageMode(static_cast<LanguageMode>( | 1334 scope_->SetLanguageMode(static_cast<LanguageMode>( |
| 1335 scope_->language_mode() | STRONG)); | 1335 scope_->language_mode() | STRONG)); |
| 1336 } | 1336 } |
| 1337 // Because declarations in strict eval code don't leak into the scope | 1337 // Because declarations in strict eval code don't leak into the scope |
| 1338 // of the eval call, it is likely that functions declared in strict | 1338 // of the eval call, it is likely that functions declared in strict |
| 1339 // eval code will be used within the eval code, so lazy parsing is | 1339 // eval code will be used within the eval code, so lazy parsing is |
| 1340 // probably not a win. Also, resolution of "var" bindings defined in | 1340 // probably not a win. |
| 1341 // strict eval code from within nested functions is currently broken | |
| 1342 // with the pre-parser; lazy parsing of strict eval code causes | |
| 1343 // regress/regress-crbug-135066.js to fail. | |
| 1344 if (scope_->is_eval_scope()) mode_ = PARSE_EAGERLY; | 1341 if (scope_->is_eval_scope()) mode_ = PARSE_EAGERLY; |
| 1345 } else if (literal->raw_value()->AsString() == | 1342 } else if (literal->raw_value()->AsString() == |
| 1346 ast_value_factory()->use_asm_string() && | 1343 ast_value_factory()->use_asm_string() && |
| 1347 token_loc.end_pos - token_loc.beg_pos == | 1344 token_loc.end_pos - token_loc.beg_pos == |
| 1348 ast_value_factory()->use_asm_string()->length() + 2) { | 1345 ast_value_factory()->use_asm_string()->length() + 2) { |
| 1349 // Store the usage count; The actual use counter on the isolate is | 1346 // Store the usage count; The actual use counter on the isolate is |
| 1350 // incremented after parsing is done. | 1347 // incremented after parsing is done. |
| 1351 ++use_counts_[v8::Isolate::kUseAsm]; | 1348 ++use_counts_[v8::Isolate::kUseAsm]; |
| 1352 scope_->SetAsmModule(); | 1349 scope_->SetAsmModule(); |
| 1353 } | 1350 } |
| (...skipping 4656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6010 Expression* Parser::SpreadCallNew(Expression* function, | 6007 Expression* Parser::SpreadCallNew(Expression* function, |
| 6011 ZoneList<v8::internal::Expression*>* args, | 6008 ZoneList<v8::internal::Expression*>* args, |
| 6012 int pos) { | 6009 int pos) { |
| 6013 args->InsertAt(0, function, zone()); | 6010 args->InsertAt(0, function, zone()); |
| 6014 | 6011 |
| 6015 return factory()->NewCallRuntime( | 6012 return factory()->NewCallRuntime( |
| 6016 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 6013 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 6017 } | 6014 } |
| 6018 } // namespace internal | 6015 } // namespace internal |
| 6019 } // namespace v8 | 6016 } // namespace v8 |
| OLD | NEW |