| 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 ParameterCount actual(rax); | 596 __ Call(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
| 597 // Function must be in rdi. | |
| 598 __ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper()); | |
| 599 } | 597 } |
| 600 // Exit the internal frame. Notice that this also removes the empty | 598 // Exit the internal frame. Notice that this also removes the empty |
| 601 // context and the function left on the stack by the code | 599 // context and the function left on the stack by the code |
| 602 // invocation. | 600 // invocation. |
| 603 } | 601 } |
| 604 | 602 |
| 605 // TODO(X64): Is argument correct? Is there a receiver to remove? | 603 // TODO(X64): Is argument correct? Is there a receiver to remove? |
| 606 __ ret(1 * kPointerSize); // Remove receiver. | 604 __ ret(1 * kPointerSize); // Remove receiver. |
| 607 } | 605 } |
| 608 | 606 |
| (...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1831 __ ret(0); | 1829 __ ret(0); |
| 1832 } | 1830 } |
| 1833 | 1831 |
| 1834 | 1832 |
| 1835 #undef __ | 1833 #undef __ |
| 1836 | 1834 |
| 1837 } // namespace internal | 1835 } // namespace internal |
| 1838 } // namespace v8 | 1836 } // namespace v8 |
| 1839 | 1837 |
| 1840 #endif // V8_TARGET_ARCH_X64 | 1838 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |