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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1733 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); | 1733 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); |
1734 } | 1734 } |
1735 } | 1735 } |
1736 | 1736 |
1737 | 1737 |
1738 // static | 1738 // static |
1739 void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { | 1739 void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { |
1740 // ----------- S t a t e ------------- | 1740 // ----------- S t a t e ------------- |
1741 // -- x0 : the number of arguments (not including the receiver) | 1741 // -- x0 : the number of arguments (not including the receiver) |
1742 // -- x1 : the constructor to call (checked to be a JSFunction) | 1742 // -- x1 : the constructor to call (checked to be a JSFunction) |
1743 // -- x3 : the new target (checked to be a JSFunction) | 1743 // -- x3 : the new target (checked to be a constructor) |
1744 // ----------------------------------- | 1744 // ----------------------------------- |
1745 __ AssertFunction(x1); | 1745 __ AssertFunction(x1); |
1746 __ AssertFunction(x3); | |
1747 | 1746 |
1748 // Calling convention for function specific ConstructStubs require | 1747 // Calling convention for function specific ConstructStubs require |
1749 // x2 to contain either an AllocationSite or undefined. | 1748 // x2 to contain either an AllocationSite or undefined. |
1750 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); | 1749 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); |
1751 | 1750 |
1752 // Tail call to the function-specific construct stub (still in the caller | 1751 // Tail call to the function-specific construct stub (still in the caller |
1753 // context at this point). | 1752 // context at this point). |
1754 __ Ldr(x4, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); | 1753 __ Ldr(x4, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); |
1755 __ Ldr(x4, FieldMemOperand(x4, SharedFunctionInfo::kConstructStubOffset)); | 1754 __ Ldr(x4, FieldMemOperand(x4, SharedFunctionInfo::kConstructStubOffset)); |
1756 __ Add(x4, x4, Code::kHeaderSize - kHeapObjectTag); | 1755 __ Add(x4, x4, Code::kHeaderSize - kHeapObjectTag); |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2055 } | 2054 } |
2056 } | 2055 } |
2057 | 2056 |
2058 | 2057 |
2059 #undef __ | 2058 #undef __ |
2060 | 2059 |
2061 } // namespace internal | 2060 } // namespace internal |
2062 } // namespace v8 | 2061 } // namespace v8 |
2063 | 2062 |
2064 #endif // V8_TARGET_ARCH_ARM | 2063 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |