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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 GenerateMakeCodeYoungAgainCommon(masm); \ | 567 GenerateMakeCodeYoungAgainCommon(masm); \ |
568 } \ | 568 } \ |
569 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ | 569 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ |
570 MacroAssembler* masm) { \ | 570 MacroAssembler* masm) { \ |
571 GenerateMakeCodeYoungAgainCommon(masm); \ | 571 GenerateMakeCodeYoungAgainCommon(masm); \ |
572 } | 572 } |
573 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) | 573 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) |
574 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR | 574 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR |
575 | 575 |
576 | 576 |
| 577 void Builtins::Generate_NotifyICMiss(MacroAssembler* masm) { |
| 578 // Enter an internal frame. |
| 579 { |
| 580 FrameScope scope(masm, StackFrame::INTERNAL); |
| 581 |
| 582 // Preserve registers across notification, this is important for compiled |
| 583 // stubs that tail call the runtime on deopts passing their parameters in |
| 584 // registers. |
| 585 __ pushad(); |
| 586 __ CallRuntime(Runtime::kNotifyICMiss, 0); |
| 587 __ popad(); |
| 588 // Tear down internal frame. |
| 589 } |
| 590 |
| 591 __ pop(MemOperand(esp, 0)); // Ignore state offset |
| 592 __ ret(0); // Return to IC Miss stub, continuation still on stack. |
| 593 } |
| 594 |
| 595 |
577 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 596 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
578 Deoptimizer::BailoutType type) { | 597 Deoptimizer::BailoutType type) { |
579 { | 598 { |
580 FrameScope scope(masm, StackFrame::INTERNAL); | 599 FrameScope scope(masm, StackFrame::INTERNAL); |
581 | 600 |
582 // Pass deoptimization type to the runtime system. | 601 // Pass deoptimization type to the runtime system. |
583 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); | 602 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); |
584 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); | 603 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
585 | 604 |
586 // Tear down internal frame. | 605 // Tear down internal frame. |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1822 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
1804 generator.Generate(); | 1823 generator.Generate(); |
1805 } | 1824 } |
1806 | 1825 |
1807 | 1826 |
1808 #undef __ | 1827 #undef __ |
1809 } | 1828 } |
1810 } // namespace v8::internal | 1829 } // namespace v8::internal |
1811 | 1830 |
1812 #endif // V8_TARGET_ARCH_IA32 | 1831 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |