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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "codegen.h" | 9 #include "codegen.h" |
10 #include "deoptimizer.h" | 10 #include "deoptimizer.h" |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 __ addp(rcx, Immediate(1)); | 568 __ addp(rcx, Immediate(1)); |
569 __ bind(&entry); | 569 __ bind(&entry); |
570 __ cmpp(rcx, rax); | 570 __ cmpp(rcx, rax); |
571 __ j(not_equal, &loop); | 571 __ j(not_equal, &loop); |
572 | 572 |
573 // Invoke the code. | 573 // Invoke the code. |
574 if (is_construct) { | 574 if (is_construct) { |
575 // No type feedback cell is available | 575 // No type feedback cell is available |
576 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); | 576 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); |
577 // Expects rdi to hold function pointer. | 577 // Expects rdi to hold function pointer. |
578 CallConstructStub stub(masm->isolate(), NO_CALL_FUNCTION_FLAGS); | 578 CallConstructStub stub(masm->isolate(), NO_CALL_CONSTRUCTOR_FLAGS); |
579 __ CallStub(&stub); | 579 __ CallStub(&stub); |
580 } else { | 580 } else { |
581 ParameterCount actual(rax); | 581 ParameterCount actual(rax); |
582 // Function must be in rdi. | 582 // Function must be in rdi. |
583 __ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper()); | 583 __ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper()); |
584 } | 584 } |
585 // Exit the internal frame. Notice that this also removes the empty | 585 // Exit the internal frame. Notice that this also removes the empty |
586 // context and the function left on the stack by the code | 586 // context and the function left on the stack by the code |
587 // invocation. | 587 // invocation. |
588 } | 588 } |
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 __ bind(&ok); | 1506 __ bind(&ok); |
1507 __ ret(0); | 1507 __ ret(0); |
1508 } | 1508 } |
1509 | 1509 |
1510 | 1510 |
1511 #undef __ | 1511 #undef __ |
1512 | 1512 |
1513 } } // namespace v8::internal | 1513 } } // namespace v8::internal |
1514 | 1514 |
1515 #endif // V8_TARGET_ARCH_X64 | 1515 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |