| 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/parser.h" | 5 #include "src/parser.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 4092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4103 // parsing if it suspect that wasn't a good idea. If so, or if we didn't | 4103 // parsing if it suspect that wasn't a good idea. If so, or if we didn't |
| 4104 // try to lazy parse in the first place, we'll have to parse eagerly. | 4104 // try to lazy parse in the first place, we'll have to parse eagerly. |
| 4105 Scanner::BookmarkScope bookmark(scanner()); | 4105 Scanner::BookmarkScope bookmark(scanner()); |
| 4106 if (is_lazily_parsed) { | 4106 if (is_lazily_parsed) { |
| 4107 Scanner::BookmarkScope* maybe_bookmark = | 4107 Scanner::BookmarkScope* maybe_bookmark = |
| 4108 bookmark.Set() ? &bookmark : nullptr; | 4108 bookmark.Set() ? &bookmark : nullptr; |
| 4109 SkipLazyFunctionBody(&materialized_literal_count, | 4109 SkipLazyFunctionBody(&materialized_literal_count, |
| 4110 &expected_property_count, /*CHECK_OK*/ ok, | 4110 &expected_property_count, /*CHECK_OK*/ ok, |
| 4111 maybe_bookmark); | 4111 maybe_bookmark); |
| 4112 | 4112 |
| 4113 if (bookmark.HasBeenReset()) { | 4113 if (maybe_bookmark && maybe_bookmark->HasBeenReset()) { |
| 4114 // Trigger eager (re-)parsing, just below this block. | 4114 // Trigger eager (re-)parsing, just below this block. |
| 4115 is_lazily_parsed = false; | 4115 is_lazily_parsed = false; |
| 4116 | 4116 |
| 4117 // This is probably an initialization function. Inform the compiler it | 4117 // This is probably an initialization function. Inform the compiler it |
| 4118 // should also eager-compile this function, and that we expect it to be | 4118 // should also eager-compile this function, and that we expect it to be |
| 4119 // used once. | 4119 // used once. |
| 4120 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; | 4120 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; |
| 4121 should_be_used_once_hint = true; | 4121 should_be_used_once_hint = true; |
| 4122 } | 4122 } |
| 4123 } | 4123 } |
| (...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6015 Expression* Parser::SpreadCallNew(Expression* function, | 6015 Expression* Parser::SpreadCallNew(Expression* function, |
| 6016 ZoneList<v8::internal::Expression*>* args, | 6016 ZoneList<v8::internal::Expression*>* args, |
| 6017 int pos) { | 6017 int pos) { |
| 6018 args->InsertAt(0, function, zone()); | 6018 args->InsertAt(0, function, zone()); |
| 6019 | 6019 |
| 6020 return factory()->NewCallRuntime( | 6020 return factory()->NewCallRuntime( |
| 6021 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 6021 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 6022 } | 6022 } |
| 6023 } // namespace internal | 6023 } // namespace internal |
| 6024 } // namespace v8 | 6024 } // namespace v8 |
| OLD | NEW |