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

Side by Side Diff: src/scopes.h

Issue 1216013002: Parse eagerly inside block scopes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: simplified a lot Created 5 years, 5 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 | « src/preparser.h ('k') | src/scopes.cc » ('j') | 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 #ifndef V8_SCOPES_H_ 5 #ifndef V8_SCOPES_H_
6 #define V8_SCOPES_H_ 6 #define V8_SCOPES_H_
7 7
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/pending-compilation-error-handler.h" 9 #include "src/pending-compilation-error-handler.h"
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 // For script scopes, the number of module literals (including nested ones). 464 // For script scopes, the number of module literals (including nested ones).
465 int num_modules() const { return num_modules_; } 465 int num_modules() const { return num_modules_; }
466 466
467 // For module scopes, the host scope's internal variable binding this module. 467 // For module scopes, the host scope's internal variable binding this module.
468 Variable* module_var() const { return module_var_; } 468 Variable* module_var() const { return module_var_; }
469 469
470 // Make sure this scope and all outer scopes are eagerly compiled. 470 // Make sure this scope and all outer scopes are eagerly compiled.
471 void ForceEagerCompilation() { force_eager_compilation_ = true; } 471 void ForceEagerCompilation() { force_eager_compilation_ = true; }
472 472
473 // Determine if we can parse a function literal in this scope lazily.
474 bool AllowsLazyParsing() const;
475
473 // Determine if we can use lazy compilation for this scope. 476 // Determine if we can use lazy compilation for this scope.
474 bool AllowsLazyCompilation() const; 477 bool AllowsLazyCompilation() const;
475 478
476 // Determine if we can use lazy compilation for this scope without a context. 479 // Determine if we can use lazy compilation for this scope without a context.
477 bool AllowsLazyCompilationWithoutContext() const; 480 bool AllowsLazyCompilationWithoutContext() const;
478 481
479 // True if the outer context of this scope is always the native context. 482 // True if the outer context of this scope is always the native context.
480 bool HasTrivialOuterContext() const; 483 bool HasTrivialOuterContext() const;
481 484
482 // True if the outer context allows lazy compilation of this scope. 485 // True if the outer context allows lazy compilation of this scope.
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 PendingCompilationErrorHandler pending_error_handler_; 768 PendingCompilationErrorHandler pending_error_handler_;
766 769
767 // For tracking which classes are declared consecutively. Needed for strong 770 // For tracking which classes are declared consecutively. Needed for strong
768 // mode. 771 // mode.
769 int class_declaration_group_start_; 772 int class_declaration_group_start_;
770 }; 773 };
771 774
772 } } // namespace v8::internal 775 } } // namespace v8::internal
773 776
774 #endif // V8_SCOPES_H_ 777 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698