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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 isolate()->factory()->allocation_site_map(); | 1829 isolate()->factory()->allocation_site_map(); |
1830 __ cmp(FieldOperand(ebx, 0), Immediate(allocation_site_map)); | 1830 __ cmp(FieldOperand(ebx, 0), Immediate(allocation_site_map)); |
1831 __ j(equal, &feedback_register_initialized); | 1831 __ j(equal, &feedback_register_initialized); |
1832 __ mov(ebx, isolate()->factory()->undefined_value()); | 1832 __ mov(ebx, isolate()->factory()->undefined_value()); |
1833 __ bind(&feedback_register_initialized); | 1833 __ bind(&feedback_register_initialized); |
1834 } | 1834 } |
1835 | 1835 |
1836 __ AssertUndefinedOrAllocationSite(ebx); | 1836 __ AssertUndefinedOrAllocationSite(ebx); |
1837 } | 1837 } |
1838 | 1838 |
| 1839 // Pass original constructor to construct stub. |
| 1840 __ mov(edx, edi); |
| 1841 |
1839 // Jump to the function-specific construct stub. | 1842 // Jump to the function-specific construct stub. |
1840 Register jmp_reg = ecx; | 1843 Register jmp_reg = ecx; |
1841 __ mov(jmp_reg, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 1844 __ mov(jmp_reg, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
1842 __ mov(jmp_reg, FieldOperand(jmp_reg, | 1845 __ mov(jmp_reg, FieldOperand(jmp_reg, |
1843 SharedFunctionInfo::kConstructStubOffset)); | 1846 SharedFunctionInfo::kConstructStubOffset)); |
1844 __ lea(jmp_reg, FieldOperand(jmp_reg, Code::kHeaderSize)); | 1847 __ lea(jmp_reg, FieldOperand(jmp_reg, Code::kHeaderSize)); |
1845 __ jmp(jmp_reg); | 1848 __ jmp(jmp_reg); |
1846 | 1849 |
1847 // edi: called object | 1850 // edi: called object |
1848 // eax: number of arguments | 1851 // eax: number of arguments |
(...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4714 ApiParameterOperand(2), kStackSpace, nullptr, | 4717 ApiParameterOperand(2), kStackSpace, nullptr, |
4715 Operand(ebp, 7 * kPointerSize), NULL); | 4718 Operand(ebp, 7 * kPointerSize), NULL); |
4716 } | 4719 } |
4717 | 4720 |
4718 | 4721 |
4719 #undef __ | 4722 #undef __ |
4720 | 4723 |
4721 } } // namespace v8::internal | 4724 } } // namespace v8::internal |
4722 | 4725 |
4723 #endif // V8_TARGET_ARCH_X87 | 4726 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |