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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 __ j(not_equal, &loop); | 586 __ j(not_equal, &loop); |
587 | 587 |
588 // Invoke the code. | 588 // Invoke the code. |
589 if (is_construct) { | 589 if (is_construct) { |
590 // No type feedback cell is available | 590 // No type feedback cell is available |
591 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); | 591 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); |
592 // Expects rdi to hold function pointer. | 592 // Expects rdi to hold function pointer. |
593 CallConstructStub stub(masm->isolate(), NO_CALL_CONSTRUCTOR_FLAGS); | 593 CallConstructStub stub(masm->isolate(), NO_CALL_CONSTRUCTOR_FLAGS); |
594 __ CallStub(&stub); | 594 __ CallStub(&stub); |
595 } else { | 595 } else { |
596 __ Call(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); | 596 ParameterCount actual(rax); |
| 597 // Function must be in rdi. |
| 598 __ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper()); |
597 } | 599 } |
598 // Exit the internal frame. Notice that this also removes the empty | 600 // Exit the internal frame. Notice that this also removes the empty |
599 // context and the function left on the stack by the code | 601 // context and the function left on the stack by the code |
600 // invocation. | 602 // invocation. |
601 } | 603 } |
602 | 604 |
603 // TODO(X64): Is argument correct? Is there a receiver to remove? | 605 // TODO(X64): Is argument correct? Is there a receiver to remove? |
604 __ ret(1 * kPointerSize); // Remove receiver. | 606 __ ret(1 * kPointerSize); // Remove receiver. |
605 } | 607 } |
606 | 608 |
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 __ ret(0); | 1831 __ ret(0); |
1830 } | 1832 } |
1831 | 1833 |
1832 | 1834 |
1833 #undef __ | 1835 #undef __ |
1834 | 1836 |
1835 } // namespace internal | 1837 } // namespace internal |
1836 } // namespace v8 | 1838 } // namespace v8 |
1837 | 1839 |
1838 #endif // V8_TARGET_ARCH_X64 | 1840 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |