| Index: src/full-codegen.h
|
| diff --git a/src/full-codegen.h b/src/full-codegen.h
|
| index c4f3fcc722b3252ce6970c87abb02b3a8a4423f7..0cefcfaaeccaaa81e7de8cb1b1292c93df0258fb 100644
|
| --- a/src/full-codegen.h
|
| +++ b/src/full-codegen.h
|
| @@ -36,6 +36,7 @@
|
| #include "codegen.h"
|
| #include "compiler.h"
|
| #include "data-flow.h"
|
| +#include "scopes.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -580,6 +581,8 @@ class FullCodeGenerator: public AstVisitor {
|
| bool is_eval() { return info_->is_eval(); }
|
| bool is_native() { return info_->is_native(); }
|
| bool is_classic_mode() { return language_mode() == CLASSIC_MODE; }
|
| + bool IsOneTimeCode() {
|
| + return loop_depth() == 0 && scope()->is_global_scope(); }
|
| LanguageMode language_mode() { return function()->language_mode(); }
|
| FunctionLiteral* function() { return info_->function(); }
|
| Scope* scope() { return scope_; }
|
|
|