Fix issue 67 by copying the receiver function one slot

down too. Also fix lint issue in codegen-arm.cc.

Reviewed offline by Ivan (iposva@chromium.org).
Review URL: http://codereview.chromium.org/3080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
kasperl@chromium.org 2008-09-16 11:40:21 +00:00
parent 88192fc01c
commit 6b4f5aba96
3 changed files with 4 additions and 7 deletions

View File

@ -270,7 +270,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
__ bind(&done);
}
// 2. Get the function to call. Already in r1.
// 2. Get the function to call from the stack.
// r0: actual number of argument
{ Label done, non_function, function;
__ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2));
@ -360,6 +360,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
{ Label loop;
// Calculate the copy start address (destination). Copy end address is sp.
__ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2));
__ add(r2, r2, Operand(kPointerSize)); // copy receiver too
__ bind(&loop);
__ ldr(ip, MemOperand(r2, -kPointerSize));
@ -383,7 +384,6 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
{ Label invoke;
__ tst(r1, r1);
__ b(ne, &invoke);
// __ stop("Generate_ArgumentsAdaptorTrampoline - non-function call");
__ mov(r2, Operand(0)); // expected arguments is 0 for CALL_NON_FUNCTION
__ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
__ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)), code_target);

View File

@ -2764,7 +2764,7 @@ void ArmCodeGenerator::VisitSwitchStatement(SwitchStatement* node) {
// Continue matching cases. The program will execute the default case's
// statements if it does not match any of the cases.
__ b(&next);
// Bind the default case label, so we can branch to it when we
// have compared against all other cases.
ASSERT(default_case.is_unused()); // at most one default clause
@ -2802,7 +2802,7 @@ void ArmCodeGenerator::VisitSwitchStatement(SwitchStatement* node) {
// Remove the switch value from the stack.
__ pop(r0);
}
__ bind(&fall_through);
__ bind(node->break_target());
}

View File

@ -62,6 +62,3 @@ debug-step-stub-callfunction: FAIL
debug-stepin-constructor: FAIL
debug-step: FAIL
regress/regress-998565: FAIL
# Issue 67: ARM fails in: Generate_ArgumentsAdaptorTrampoline - non-function call
call-non-function-call: FAIL