OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 __ Push(edi); | 1601 __ Push(edi); |
1602 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); | 1602 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); |
1603 } | 1603 } |
1604 } | 1604 } |
1605 | 1605 |
1606 | 1606 |
1607 // static | 1607 // static |
1608 void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { | 1608 void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { |
1609 // ----------- S t a t e ------------- | 1609 // ----------- S t a t e ------------- |
1610 // -- eax : the number of arguments (not including the receiver) | 1610 // -- eax : the number of arguments (not including the receiver) |
1611 // -- edx : the new target (checked to be a JSFunction) | 1611 // -- edx : the new target (checked to be a constructor) |
1612 // -- edi : the constructor to call (checked to be a JSFunction) | 1612 // -- edi : the constructor to call (checked to be a JSFunction) |
1613 // ----------------------------------- | 1613 // ----------------------------------- |
1614 __ AssertFunction(edx); | |
1615 __ AssertFunction(edi); | 1614 __ AssertFunction(edi); |
1616 | 1615 |
1617 // Calling convention for function specific ConstructStubs require | 1616 // Calling convention for function specific ConstructStubs require |
1618 // ebx to contain either an AllocationSite or undefined. | 1617 // ebx to contain either an AllocationSite or undefined. |
1619 __ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); | 1618 __ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); |
1620 | 1619 |
1621 // Tail call to the function-specific construct stub (still in the caller | 1620 // Tail call to the function-specific construct stub (still in the caller |
1622 // context at this point). | 1621 // context at this point). |
1623 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 1622 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
1624 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); | 1623 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1995 | 1994 |
1996 __ bind(&ok); | 1995 __ bind(&ok); |
1997 __ ret(0); | 1996 __ ret(0); |
1998 } | 1997 } |
1999 | 1998 |
2000 #undef __ | 1999 #undef __ |
2001 } // namespace internal | 2000 } // namespace internal |
2002 } // namespace v8 | 2001 } // namespace v8 |
2003 | 2002 |
2004 #endif // V8_TARGET_ARCH_IA32 | 2003 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |