Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index dde101f04ca3d5b4bdf6d1679f8a054c11b5c5dd..70b2ad16d36e4498506648b6f1a8c17c4f5aa14e 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -280,8 +280,8 @@ |
// runtime. |
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
__ mov(edi, Operand(esp, offset)); |
- __ push(edi); // constructor function |
- __ push(edx); // original constructor |
+ __ push(edi); // argument 2/1: constructor function |
+ __ push(edx); // argument 3/2: original constructor |
__ CallRuntime(Runtime::kNewObject, 2); |
__ mov(ebx, eax); // store result in ebx |
@@ -1361,7 +1361,6 @@ |
// ----------- S t a t e ------------- |
// -- eax : number of arguments |
// -- edi : constructor function |
- // -- edx : original constructor |
// -- esp[0] : return address |
// -- esp[(argc - n) * 4] : arg[n] (zero-based) |
// -- esp[(argc + 1) * 4] : receiver |
@@ -1387,18 +1386,16 @@ |
{ |
Label convert, done_convert; |
__ JumpIfSmi(ebx, &convert, Label::kNear); |
- __ CmpObjectType(ebx, FIRST_NONSTRING_TYPE, ecx); |
+ __ CmpObjectType(ebx, FIRST_NONSTRING_TYPE, edx); |
__ j(below, &done_convert); |
__ bind(&convert); |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
ToStringStub stub(masm->isolate()); |
__ Push(edi); |
- __ Push(edx); |
__ Move(eax, ebx); |
__ CallStub(&stub); |
__ Move(ebx, eax); |
- __ Pop(edx); |
__ Pop(edi); |
} |
__ bind(&done_convert); |
@@ -1409,15 +1406,9 @@ |
// ----------- S t a t e ------------- |
// -- ebx : the first argument |
// -- edi : constructor function |
- // -- edx : original constructor |
// ----------------------------------- |
- Label allocate, done_allocate, rt_call; |
- |
- // Fall back to runtime if the original constructor and constructor differ. |
- __ cmp(edx, edi); |
- __ j(not_equal, &rt_call); |
- |
+ Label allocate, done_allocate; |
__ Allocate(JSValue::kSize, eax, ecx, no_reg, &allocate, TAG_OBJECT); |
__ bind(&done_allocate); |
@@ -1444,21 +1435,6 @@ |
__ Pop(ebx); |
} |
__ jmp(&done_allocate); |
- |
- // Fallback to the runtime to create new object. |
- __ bind(&rt_call); |
- { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
- __ Push(ebx); |
- __ Push(edi); |
- __ Push(edi); // constructor function |
- __ Push(edx); // original constructor |
- __ CallRuntime(Runtime::kNewObject, 2); |
- __ Pop(edi); |
- __ Pop(ebx); |
- } |
- __ mov(FieldOperand(eax, JSValue::kValueOffset), ebx); |
- __ Ret(); |
} |
} |