Chromium Code Reviews| Index: src/hydrogen.h |
| diff --git a/src/hydrogen.h b/src/hydrogen.h |
| index 7f5326bcb5422053548ae3e086cf646b7c48ffa2..7169f682d7928ed38b8133a123a9fbee5e8f2746 100644 |
| --- a/src/hydrogen.h |
| +++ b/src/hydrogen.h |
| @@ -36,6 +36,7 @@ |
| #include "hydrogen-instructions.h" |
| #include "type-info.h" |
| #include "zone.h" |
| +#include "scopes.h" |
| namespace v8 { |
| namespace internal { |
| @@ -1022,6 +1023,11 @@ class HGraphBuilder { |
| ElementsKind to_elements_kind, |
| HValue* length); |
| + bool IsOneTimeCode() { |
| + return info_->scope()->is_global_scope() && |
| + current_block()->LoopNestingDepth() == 0; |
| + } |
| + |
| private: |
| HGraphBuilder(); |
| CompilationInfo* info_; |