Index: src/full-codegen.cc |
diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
index 0eb36f4e66a5f0d750671ccb362c168e4dd3dece..efcd3461dba77c103e863c238fc9a7141bda945e 100644 |
--- a/src/full-codegen.cc |
+++ b/src/full-codegen.cc |
@@ -547,11 +547,10 @@ void FullCodeGenerator::VisitDeclarations( |
int FullCodeGenerator::DeclareGlobalsFlags() { |
- int flags = 0; |
- if (is_eval()) flags |= kDeclareGlobalsEvalFlag; |
- if (is_strict_mode()) flags |= kDeclareGlobalsStrictModeFlag; |
- if (is_native()) flags |= kDeclareGlobalsNativeFlag; |
- return flags; |
+ ASSERT(DeclareGlobalsStrictModeFlag::is_valid(strict_mode_flag())); |
+ return DeclareGlobalsEvalFlag::encode(is_eval()) | |
+ DeclareGlobalsStrictModeFlag::encode(strict_mode_flag()) | |
+ DeclareGlobalsNativeFlag::encode(is_native()); |
} |