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 0133c09d6e7d78b618b095073c09f9e05d52cb42..4439a5caa135a7881016980eb106478f96cc7e90 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -814,10 +814,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; |
} |
} |
@@ -870,7 +868,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; |
} |
} |