Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index 027df6c7fcf749dc3121bb51af59c81d8deca676..d748d2362234ea67800e4f948a7ce50122750186 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -364,9 +364,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ mov(esi, FieldOperand(edi, 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(eax); |
__ InvokeFunction(edi, actual, CALL_FUNCTION, |
@@ -1231,13 +1229,14 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- eax : actual number of arguments |
// -- ebx : expected number of arguments |
- // -- edx : code entry to call |
+ // -- edi : function (passed through to callee) |
// ----------------------------------- |
Label invoke, dont_adapt_arguments; |
__ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); |
Label enough, too_few; |
+ __ mov(edx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); |
__ cmp(eax, ebx); |
__ j(less, &too_few); |
__ cmp(ebx, SharedFunctionInfo::kDontAdaptArgumentsSentinel); |