Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index e2bdef7d452d0950c8e2b362960fa59101fb2070..766b59b5a44586f45df3968c5ef2da16fd8f5415 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -714,32 +714,27 @@ void FullCodeGenerator::EmitDeclaration(Variable* variable, |
} |
} else if (prop != NULL) { |
- if (function != NULL || mode == Variable::CONST) { |
- // We are declaring a function or constant that rewrites to a |
- // property. Use (keyed) IC to set the initial value. We |
- // cannot visit the rewrite because it's shared and we risk |
- // recording duplicate AST IDs for bailouts from optimized code. |
- ASSERT(prop->obj()->AsVariableProxy() != NULL); |
- { AccumulatorValueContext for_object(this); |
- EmitVariableLoad(prop->obj()->AsVariableProxy()->var()); |
- } |
- if (function != NULL) { |
- __ push(rax); |
- VisitForAccumulatorValue(function); |
- __ pop(rdx); |
- } else { |
- __ movq(rdx, rax); |
- __ LoadRoot(rax, Heap::kTheHoleValueRootIndex); |
- } |
- ASSERT(prop->key()->AsLiteral() != NULL && |
- prop->key()->AsLiteral()->handle()->IsSmi()); |
- __ Move(rcx, prop->key()->AsLiteral()->handle()); |
- |
- Handle<Code> ic = is_strict_mode() |
- ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() |
- : isolate()->builtins()->KeyedStoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); |
+ ASSERT(mode != Variable::CONST); |
+ ASSERT(function != NULL); |
+ // We are declaring a function that rewrites to a property. |
+ // Use (keyed) IC to set the initial value. We cannot visit the |
+ // rewrite because it's shared and we risk recording duplicate AST |
+ // IDs for bailouts from optimized code. |
+ ASSERT(prop->obj()->AsVariableProxy() != NULL); |
+ { AccumulatorValueContext for_object(this); |
+ EmitVariableLoad(prop->obj()->AsVariableProxy()->var()); |
} |
+ __ push(rax); |
+ VisitForAccumulatorValue(function); |
+ __ pop(rdx); |
+ ASSERT(prop->key()->AsLiteral() != NULL && |
+ prop->key()->AsLiteral()->handle()->IsSmi()); |
+ __ Move(rcx, prop->key()->AsLiteral()->handle()); |
+ |
+ Handle<Code> ic = is_strict_mode() |
+ ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() |
+ : isolate()->builtins()->KeyedStoreIC_Initialize(); |
+ EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber); |
} |
} |