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

Side by Side Diff: src/parser.cc

Issue 1304413007: Revert of Deactivate Parser Bookmarks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4150 matching lines...) Expand 10 before | Expand all | Expand 10 after
4161 !parenthesized_function_; 4161 !parenthesized_function_;
4162 parenthesized_function_ = false; // The bit was set for this function only. 4162 parenthesized_function_ = false; // The bit was set for this function only.
4163 4163
4164 // Eager or lazy parse? 4164 // Eager or lazy parse?
4165 // If is_lazily_parsed, we'll parse lazy. If we can set a bookmark, we'll 4165 // If is_lazily_parsed, we'll parse lazy. If we can set a bookmark, we'll
4166 // pass it to SkipLazyFunctionBody, which may use it to abort lazy 4166 // pass it to SkipLazyFunctionBody, which may use it to abort lazy
4167 // parsing if it suspect that wasn't a good idea. If so, or if we didn't 4167 // parsing if it suspect that wasn't a good idea. If so, or if we didn't
4168 // try to lazy parse in the first place, we'll have to parse eagerly. 4168 // try to lazy parse in the first place, we'll have to parse eagerly.
4169 Scanner::BookmarkScope bookmark(scanner()); 4169 Scanner::BookmarkScope bookmark(scanner());
4170 if (is_lazily_parsed) { 4170 if (is_lazily_parsed) {
4171 // Deactivate bookmarks for now because they result 4171 Scanner::BookmarkScope* maybe_bookmark =
4172 // race conditions while parsing. 4172 bookmark.Set() ? &bookmark : nullptr;
4173 Scanner::BookmarkScope* maybe_bookmark = nullptr;
4174 SkipLazyFunctionBody(&materialized_literal_count, 4173 SkipLazyFunctionBody(&materialized_literal_count,
4175 &expected_property_count, /*CHECK_OK*/ ok, 4174 &expected_property_count, /*CHECK_OK*/ ok,
4176 maybe_bookmark); 4175 maybe_bookmark);
4177 4176
4178 if (bookmark.HasBeenReset()) { 4177 if (bookmark.HasBeenReset()) {
4179 // Trigger eager (re-)parsing, just below this block. 4178 // Trigger eager (re-)parsing, just below this block.
4180 is_lazily_parsed = false; 4179 is_lazily_parsed = false;
4181 4180
4182 // This is probably an initialization function. Inform the compiler it 4181 // This is probably an initialization function. Inform the compiler it
4183 // should also eager-compile this function, and that we expect it to be 4182 // should also eager-compile this function, and that we expect it to be
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after
6114 6113
6115 Expression* Parser::SpreadCallNew(Expression* function, 6114 Expression* Parser::SpreadCallNew(Expression* function,
6116 ZoneList<v8::internal::Expression*>* args, 6115 ZoneList<v8::internal::Expression*>* args,
6117 int pos) { 6116 int pos) {
6118 args->InsertAt(0, function, zone()); 6117 args->InsertAt(0, function, zone());
6119 6118
6120 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); 6119 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos);
6121 } 6120 }
6122 } // namespace internal 6121 } // namespace internal
6123 } // namespace v8 6122 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698