From 2f8af4f0a4c26f24eb1eaa5f7ac2536cc4cae5f0 Mon Sep 17 00:00:00 2001 From: "ricow@chromium.org" Date: Mon, 23 Aug 2010 11:21:09 +0000 Subject: [PATCH] Fix bug in 64 bit codegen causing us to always go slowcase in apply. After introducing the direct instruction pointer in functions the CallApplyLazy method was changed on all platforms. The change made to the 64 bit version was wrong, not using the right operand for the code comparisons always forcing us into slow case. Review URL: http://codereview.chromium.org/3104027 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/x64/codegen-x64.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc index 77828d6..98dd978 100644 --- a/src/x64/codegen-x64.cc +++ b/src/x64/codegen-x64.cc @@ -2619,7 +2619,7 @@ void CodeGenerator::CallApplyLazy(Expression* applicand, __ movq(rcx, FieldOperand(rax, JSFunction::kCodeEntryOffset)); __ subq(rcx, Immediate(Code::kHeaderSize - kHeapObjectTag)); Handle apply_code(Builtins::builtin(Builtins::FunctionApply)); - __ Cmp(FieldOperand(rcx, SharedFunctionInfo::kCodeOffset), apply_code); + __ Cmp(rcx, apply_code); __ j(not_equal, &build_args); // Check that applicand is a function. -- 2.7.4