Remove some dead code from full-codegen on all platforms.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6966033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
whesse@chromium.org 2011-05-24 15:11:48 +00:00
parent fb22bcc926
commit ce77e9499d
4 changed files with 47 additions and 54 deletions

View File

@ -760,23 +760,22 @@ 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.
// A const declaration aliasing a parameter is an illegal redeclaration.
ASSERT(mode != Variable::CONST);
if (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());
}
if (function != NULL) {
__ push(r0);
VisitForAccumulatorValue(function);
__ pop(r2);
} else {
__ mov(r2, r0);
__ LoadRoot(r0, Heap::kTheHoleValueRootIndex);
}
ASSERT(prop->key()->AsLiteral() != NULL &&
prop->key()->AsLiteral()->handle()->IsSmi());
__ mov(r1, Operand(prop->key()->AsLiteral()->handle()));

View File

@ -727,24 +727,22 @@ 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.
// A const declaration aliasing a parameter is an illegal redeclaration.
ASSERT(mode != Variable::CONST);
if (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());
}
if (function != NULL) {
__ push(eax);
VisitForAccumulatorValue(function);
__ pop(edx);
} else {
__ mov(edx, eax);
__ mov(eax, isolate()->factory()->the_hole_value());
}
ASSERT(prop->key()->AsLiteral() != NULL &&
prop->key()->AsLiteral()->handle()->IsSmi());
__ SafeSet(ecx, Immediate(prop->key()->AsLiteral()->handle()));

View File

@ -752,24 +752,23 @@ 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.
// A const declaration aliasing a parameter is an illegal redeclaration.
ASSERT(mode != Variable::CONST);
if (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());
}
if (function != NULL) {
__ push(result_register());
VisitForAccumulatorValue(function);
__ mov(a0, result_register());
__ pop(a2);
} else {
__ mov(a2, result_register());
__ LoadRoot(a0, Heap::kTheHoleValueRootIndex);
}
ASSERT(prop->key()->AsLiteral() != NULL &&
prop->key()->AsLiteral()->handle()->IsSmi());
__ li(a1, Operand(prop->key()->AsLiteral()->handle()));

View File

@ -730,23 +730,20 @@ 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.
// A const declaration aliasing a parameter is an illegal redeclaration.
ASSERT(mode != Variable::CONST);
if (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());
}
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());
@ -754,7 +751,7 @@ void FullCodeGenerator::EmitDeclaration(Variable* variable,
Handle<Code> ic = is_strict_mode()
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
: isolate()->builtins()->KeyedStoreIC_Initialize();
EmitCallIC(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop));
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
}
}
}