OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 __ lea(eax, FieldOperand(eax, Code::kHeaderSize)); | 530 __ lea(eax, FieldOperand(eax, Code::kHeaderSize)); |
531 __ jmp(eax); | 531 __ jmp(eax); |
532 } | 532 } |
533 | 533 |
534 | 534 |
535 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 535 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
536 Deoptimizer::BailoutType type) { | 536 Deoptimizer::BailoutType type) { |
537 { | 537 { |
538 FrameScope scope(masm, StackFrame::INTERNAL); | 538 FrameScope scope(masm, StackFrame::INTERNAL); |
539 | 539 |
540 // Pass the function and deoptimization type to the runtime system. | 540 // Pass deoptimization type to the runtime system. |
541 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); | 541 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); |
542 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); | 542 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
543 | 543 |
544 // Tear down internal frame. | 544 // Tear down internal frame. |
545 } | 545 } |
546 | 546 |
547 // Get the full codegen state from the stack and untag it. | 547 // Get the full codegen state from the stack and untag it. |
548 __ mov(ecx, Operand(esp, 1 * kPointerSize)); | 548 __ mov(ecx, Operand(esp, 1 * kPointerSize)); |
549 __ SmiUntag(ecx); | 549 __ SmiUntag(ecx); |
550 | 550 |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 __ cmp(eax, ebx); | 1637 __ cmp(eax, ebx); |
1638 __ j(less, &fill); | 1638 __ j(less, &fill); |
1639 } | 1639 } |
1640 | 1640 |
1641 // Call the entry point. | 1641 // Call the entry point. |
1642 __ bind(&invoke); | 1642 __ bind(&invoke); |
1643 // Restore function pointer. | 1643 // Restore function pointer. |
1644 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1644 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
1645 __ call(edx); | 1645 __ call(edx); |
1646 | 1646 |
| 1647 masm->isolate()->heap()->SetArgumentsAdaptorDeoptPCOffset(masm->pc_offset()); |
1647 // Leave frame and return. | 1648 // Leave frame and return. |
1648 LeaveArgumentsAdaptorFrame(masm); | 1649 LeaveArgumentsAdaptorFrame(masm); |
1649 __ ret(0); | 1650 __ ret(0); |
1650 | 1651 |
1651 // ------------------------------------------- | 1652 // ------------------------------------------- |
1652 // Dont adapt arguments. | 1653 // Dont adapt arguments. |
1653 // ------------------------------------------- | 1654 // ------------------------------------------- |
1654 __ bind(&dont_adapt_arguments); | 1655 __ bind(&dont_adapt_arguments); |
1655 __ jmp(edx); | 1656 __ jmp(edx); |
1656 } | 1657 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1724 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1725 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
1725 generator.Generate(); | 1726 generator.Generate(); |
1726 } | 1727 } |
1727 | 1728 |
1728 | 1729 |
1729 #undef __ | 1730 #undef __ |
1730 } | 1731 } |
1731 } // namespace v8::internal | 1732 } // namespace v8::internal |
1732 | 1733 |
1733 #endif // V8_TARGET_ARCH_IA32 | 1734 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |