| 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 // Copy arguments and receiver to the expression stack. | 531 // Copy arguments and receiver to the expression stack. |
| 532 Label loop, entry; | 532 Label loop, entry; |
| 533 __ mov(ecx, eax); | 533 __ mov(ecx, eax); |
| 534 __ jmp(&entry); | 534 __ jmp(&entry); |
| 535 __ bind(&loop); | 535 __ bind(&loop); |
| 536 __ push(Operand(ebx, ecx, times_4, 0)); | 536 __ push(Operand(ebx, ecx, times_4, 0)); |
| 537 __ bind(&entry); | 537 __ bind(&entry); |
| 538 __ dec(ecx); | 538 __ dec(ecx); |
| 539 __ j(greater_equal, &loop); | 539 __ j(greater_equal, &loop); |
| 540 | 540 |
| 541 __ inc(eax); // Pushed new.target. | |
| 542 | |
| 543 | |
| 544 // Handle step in. | 541 // Handle step in. |
| 545 Label skip_step_in; | 542 Label skip_step_in; |
| 546 ExternalReference debug_step_in_fp = | 543 ExternalReference debug_step_in_fp = |
| 547 ExternalReference::debug_step_in_fp_address(masm->isolate()); | 544 ExternalReference::debug_step_in_fp_address(masm->isolate()); |
| 548 __ cmp(Operand::StaticVariable(debug_step_in_fp), Immediate(0)); | 545 __ cmp(Operand::StaticVariable(debug_step_in_fp), Immediate(0)); |
| 549 __ j(equal, &skip_step_in); | 546 __ j(equal, &skip_step_in); |
| 550 | 547 |
| 551 __ push(eax); | 548 __ push(eax); |
| 552 __ push(edi); | 549 __ push(edi); |
| 553 __ push(edi); | 550 __ push(edi); |
| 554 __ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1); | 551 __ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1); |
| 555 __ pop(edi); | 552 __ pop(edi); |
| 556 __ pop(eax); | 553 __ pop(eax); |
| 557 | 554 |
| 558 __ bind(&skip_step_in); | 555 __ bind(&skip_step_in); |
| 559 | 556 |
| 560 // Invoke function. | 557 // Invoke function. |
| 561 ParameterCount actual(eax); | 558 ParameterCount actual(eax); |
| 562 __ InvokeFunction(edi, actual, CALL_FUNCTION, NullCallWrapper()); | 559 __ InvokeFunction(edi, actual, CALL_FUNCTION, NullCallWrapper()); |
| 563 | 560 |
| 564 // Restore context from the frame. | 561 // Restore context from the frame. |
| 565 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 562 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 566 | 563 |
| 567 __ mov(ebx, Operand(esp, 0)); | 564 // Get arguments count, skipping over new.target. |
| 565 __ mov(ebx, Operand(esp, kPointerSize)); |
| 568 } | 566 } |
| 569 | 567 |
| 570 __ pop(ecx); // Return address. | 568 __ pop(ecx); // Return address. |
| 571 __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); | 569 __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); |
| 572 __ push(ecx); | 570 __ push(ecx); |
| 573 __ ret(0); | 571 __ ret(0); |
| 574 } | 572 } |
| 575 | 573 |
| 576 | 574 |
| 577 enum IsTagged { kEaxIsSmiTagged, kEaxIsUntaggedInt }; | 575 enum IsTagged { kEaxIsSmiTagged, kEaxIsUntaggedInt }; |
| (...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 | 1714 |
| 1717 __ bind(&ok); | 1715 __ bind(&ok); |
| 1718 __ ret(0); | 1716 __ ret(0); |
| 1719 } | 1717 } |
| 1720 | 1718 |
| 1721 #undef __ | 1719 #undef __ |
| 1722 } // namespace internal | 1720 } // namespace internal |
| 1723 } // namespace v8 | 1721 } // namespace v8 |
| 1724 | 1722 |
| 1725 #endif // V8_TARGET_ARCH_X87 | 1723 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |