Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index 514cec8c1f9b7814f365b43e5201b0b73ea17cc2..f3d15309c1edc98d7e0f2edd26def2039ebcd1df 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -369,9 +369,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |
Handle<Code> code = |
masm->isolate()->builtins()->HandleApiCallConstruct(); |
- ParameterCount expected(0); |
- __ InvokeCode(code, expected, expected, RelocInfo::CODE_TARGET, |
- CALL_FUNCTION, NullCallWrapper()); |
+ __ Call(code, RelocInfo::CODE_TARGET); |
} else { |
ParameterCount actual(rax); |
__ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper()); |
@@ -1303,7 +1301,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- rax : actual number of arguments |
// -- rbx : expected number of arguments |
- // -- rdx : code entry to call |
+ // -- rdi: function (passed through to callee) |
// ----------------------------------- |
Label invoke, dont_adapt_arguments; |
@@ -1311,6 +1309,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
__ IncrementCounter(counters->arguments_adaptors(), 1); |
Label enough, too_few; |
+ __ movq(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); |
__ cmpq(rax, rbx); |
__ j(less, &too_few); |
__ cmpq(rbx, Immediate(SharedFunctionInfo::kDontAdaptArgumentsSentinel)); |