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

Unified Diff: src/scopes.cc

Issue 10538102: Enable lazy compilation for non-trivial outer contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ulan Degenbaev. Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scopes.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index ad6692e57fde763d4fa1fbfc7a9c0104130efb21..b77eac0f343e78006e88d5d69d8b9bcb412a98d1 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -637,11 +637,6 @@ bool Scope::AllocateVariables(CompilationInfo* info,
}
-bool Scope::AllowsLazyCompilation() const {
- return !force_eager_compilation_ && HasTrivialOuterContext();
-}
-
-
bool Scope::HasTrivialContext() const {
// A function scope has a trivial context if it always is the global
// context. We iteratively scan out the context chain to see if
@@ -666,12 +661,17 @@ bool Scope::HasTrivialOuterContext() const {
}
-bool Scope::AllowsLazyRecompilation() const {
+bool Scope::AllowsLazyCompilation() const {
return !force_eager_compilation_ &&
!TrivialDeclarationScopesBeforeWithScope();
}
+bool Scope::AllowsLazyCompilationWithoutContext() const {
+ return !force_eager_compilation_ && HasTrivialOuterContext();
+}
+
+
bool Scope::TrivialDeclarationScopesBeforeWithScope() const {
Scope* outer = outer_scope_;
if (outer == NULL) return false;
« no previous file with comments | « src/scopes.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698