Chromium Code Reviews| Index: src/x64/full-codegen-x64.cc |
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
| index 900b2ca15d2118243bcc5f0f9bfccca74838a4d8..454a4a85a43e7bc5482d87163aca105e991bb62f 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); |
|
Kevin Millikin (Chromium)
2011/05/24 14:36:25
You still can't assert this here.
|
| + // 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); |
| } |
| } |