diff options
Diffstat (limited to 'deps/v8/src/x64/codegen-x64.cc')
-rw-r--r-- | deps/v8/src/x64/codegen-x64.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/deps/v8/src/x64/codegen-x64.cc b/deps/v8/src/x64/codegen-x64.cc index b6256faf8..04078efa2 100644 --- a/deps/v8/src/x64/codegen-x64.cc +++ b/deps/v8/src/x64/codegen-x64.cc @@ -2630,9 +2630,8 @@ void CodeGenerator::CallApplyLazy(Expression* applicand, __ j(is_smi, &build_args); __ CmpObjectType(rax, JS_FUNCTION_TYPE, rcx); __ j(not_equal, &build_args); - __ movq(rax, FieldOperand(rax, JSFunction::kSharedFunctionInfoOffset)); Handle<Code> apply_code(Builtins::builtin(Builtins::FunctionApply)); - __ Cmp(FieldOperand(rax, SharedFunctionInfo::kCodeOffset), apply_code); + __ Cmp(FieldOperand(rax, JSFunction::kCodeOffset), apply_code); __ j(not_equal, &build_args); // Check that applicand is a function. @@ -8635,6 +8634,12 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) { __ movq(FieldOperand(rax, JSFunction::kContextOffset), rsi); __ movq(FieldOperand(rax, JSFunction::kLiteralsOffset), rbx); + // Initialize the code pointer in the function to be the one + // found in the shared function info object. + __ movq(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); + __ movq(FieldOperand(rax, JSFunction::kCodeOffset), rdx); + + // Return and remove the on-stack parameter. __ ret(1 * kPointerSize); |