Chromium Code Reviews| Index: src/scopes.cc |
| diff --git a/src/scopes.cc b/src/scopes.cc |
| index ad6692e57fde763d4fa1fbfc7a9c0104130efb21..d1e43c831336d3b86c8881cb38d086aae41eb88b 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,6 +661,17 @@ bool Scope::HasTrivialOuterContext() const { |
| } |
| +bool Scope::AllowsLazyCompilation() const { |
| + return !force_eager_compilation_ && |
| + !TrivialDeclarationScopesBeforeWithScope(); |
| +} |
| + |
| + |
| +bool Scope::AllowsLazyCompilationWithoutContext() const { |
| + return !force_eager_compilation_ && HasTrivialOuterContext(); |
| +} |
| + |
| + |
| bool Scope::AllowsLazyRecompilation() const { |
|
ulan
2012/06/12 15:07:23
Now that it is the same as AllowsLazyCompilation,
Michael Starzinger
2012/06/12 15:54:05
Done.
|
| return !force_eager_compilation_ && |
| !TrivialDeclarationScopesBeforeWithScope(); |