Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 64400de81d1f1eeca8f8c950b53a5b60ab17c9b4..de8e490d2873c87cc4c43c46b7326eafcb0411fb 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -810,10 +810,9 @@ void FullCodeGenerator::VisitVariableDeclaration( |
__ push(esi); |
__ push(Immediate(variable->name())); |
// VariableDeclaration nodes are always introduced in one of four modes. |
- ASSERT(mode == VAR || mode == LET || |
- mode == CONST || mode == CONST_HARMONY); |
- PropertyAttributes attr = (mode == CONST || mode == CONST_HARMONY) |
- ? READ_ONLY : NONE; |
+ ASSERT(IsDeclaredVariableMode(mode)); |
+ PropertyAttributes attr = |
+ IsImmutableVariableMode(mode) ? READ_ONLY : NONE; |
__ push(Immediate(Smi::FromInt(attr))); |
// Push initial value, if any. |
// Note: For variables we must not push an initial value (such as |