Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 7d8aa27d5eaa06857b918a0eaa9924f713528115..c522d2cf763e95396bd65c960ff5b84a92497a80 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -809,10 +809,8 @@ void FullCodeGenerator::VisitVariableDeclaration( |
} else { |
__ Push(Smi::FromInt(0)); // Indicates no initial value. |
} |
- __ CallRuntime(IsImmutableVariableMode(mode) |
- ? Runtime::kDeclareReadOnlyLookupSlot |
- : Runtime::kDeclareLookupSlot, |
- 2); |
+ __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
+ __ CallRuntime(Runtime::kDeclareLookupSlot, 3); |
break; |
} |
} |
@@ -865,7 +863,8 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
Comment cmnt(masm_, "[ FunctionDeclaration"); |
__ Push(variable->name()); |
VisitForStackValue(declaration->fun()); |
- __ CallRuntime(Runtime::kDeclareLookupSlot, 2); |
+ __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
+ __ CallRuntime(Runtime::kDeclareLookupSlot, 3); |
break; |
} |
} |