| Index: src/ia32/builtins-ia32.cc
|
| diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
|
| index e12e79af765225a03cf79d2fc763e2c0742a8448..6dc8b18f14cf34107604be62e228510fd0a4053f 100644
|
| --- a/src/ia32/builtins-ia32.cc
|
| +++ b/src/ia32/builtins-ia32.cc
|
| @@ -88,10 +88,8 @@ void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
|
| __ j(not_equal, &slow);
|
|
|
| // Jump to the function-specific construct stub.
|
| - __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
|
| - __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kConstructStubOffset));
|
| - __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize));
|
| - __ jmp(ebx);
|
| + ParameterCount actual(eax);
|
| + __ InvokeConstruct(edi, actual);
|
|
|
| // edi: called object
|
| // eax: number of arguments
|
| @@ -118,6 +116,11 @@ void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
|
| static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| bool is_api_function,
|
| bool count_constructions) {
|
| + // ----------- S t a t e -------------
|
| + // -- eax: number of arguments
|
| + // -- edi: constructor function
|
| + // -----------------------------------
|
| +
|
| // Should never count constructions for api objects.
|
| ASSERT(!is_api_function || !count_constructions);
|
|
|
|
|