| 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 #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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |