| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 FixedArray::kHeaderSize)); | 2010 FixedArray::kHeaderSize)); |
| 2011 __ CompareRoot(FieldOperand(rbx, 0), Heap::kAllocationSiteMapRootIndex); | 2011 __ CompareRoot(FieldOperand(rbx, 0), Heap::kAllocationSiteMapRootIndex); |
| 2012 __ j(equal, &feedback_register_initialized); | 2012 __ j(equal, &feedback_register_initialized); |
| 2013 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); | 2013 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); |
| 2014 __ bind(&feedback_register_initialized); | 2014 __ bind(&feedback_register_initialized); |
| 2015 } | 2015 } |
| 2016 | 2016 |
| 2017 __ AssertUndefinedOrAllocationSite(rbx); | 2017 __ AssertUndefinedOrAllocationSite(rbx); |
| 2018 } | 2018 } |
| 2019 | 2019 |
| 2020 // Pass original constructor to construct stub. |
| 2021 __ movp(rdx, rdi); |
| 2022 |
| 2020 // Jump to the function-specific construct stub. | 2023 // Jump to the function-specific construct stub. |
| 2021 Register jmp_reg = rcx; | 2024 Register jmp_reg = rcx; |
| 2022 __ movp(jmp_reg, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 2025 __ movp(jmp_reg, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
| 2023 __ movp(jmp_reg, FieldOperand(jmp_reg, | 2026 __ movp(jmp_reg, FieldOperand(jmp_reg, |
| 2024 SharedFunctionInfo::kConstructStubOffset)); | 2027 SharedFunctionInfo::kConstructStubOffset)); |
| 2025 __ leap(jmp_reg, FieldOperand(jmp_reg, Code::kHeaderSize)); | 2028 __ leap(jmp_reg, FieldOperand(jmp_reg, Code::kHeaderSize)); |
| 2026 __ jmp(jmp_reg); | 2029 __ jmp(jmp_reg); |
| 2027 | 2030 |
| 2028 // rdi: called object | 2031 // rdi: called object |
| 2029 // rax: number of arguments | 2032 // rax: number of arguments |
| (...skipping 2993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5023 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, | 5026 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, |
| 5024 kStackSpace, nullptr, return_value_operand, NULL); | 5027 kStackSpace, nullptr, return_value_operand, NULL); |
| 5025 } | 5028 } |
| 5026 | 5029 |
| 5027 | 5030 |
| 5028 #undef __ | 5031 #undef __ |
| 5029 | 5032 |
| 5030 } } // namespace v8::internal | 5033 } } // namespace v8::internal |
| 5031 | 5034 |
| 5032 #endif // V8_TARGET_ARCH_X64 | 5035 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |