OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 | 2661 |
2662 | 2662 |
2663 LocationSummary* CatchBlockEntryInstr::MakeLocationSummary(Zone* zone, | 2663 LocationSummary* CatchBlockEntryInstr::MakeLocationSummary(Zone* zone, |
2664 bool opt) const { | 2664 bool opt) const { |
2665 UNREACHABLE(); | 2665 UNREACHABLE(); |
2666 return NULL; | 2666 return NULL; |
2667 } | 2667 } |
2668 | 2668 |
2669 | 2669 |
2670 void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2670 void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2671 // Ensure space for patching return sites for lazy deopt. |
| 2672 if (!FLAG_precompiled_mode && compiler->is_optimizing()) { |
| 2673 for (intptr_t i = 0; |
| 2674 i < CallPattern::kDeoptCallLengthInInstructions; |
| 2675 ++i) { |
| 2676 __ nop(); |
| 2677 } |
| 2678 } |
2671 __ Bind(compiler->GetJumpLabel(this)); | 2679 __ Bind(compiler->GetJumpLabel(this)); |
2672 compiler->AddExceptionHandler(catch_try_index(), | 2680 compiler->AddExceptionHandler(catch_try_index(), |
2673 try_index(), | 2681 try_index(), |
2674 compiler->assembler()->CodeSize(), | 2682 compiler->assembler()->CodeSize(), |
2675 catch_handler_types_, | 2683 catch_handler_types_, |
2676 needs_stacktrace()); | 2684 needs_stacktrace()); |
2677 // On lazy deoptimization we patch the optimized code here to enter the | 2685 // On lazy deoptimization we patch the optimized code here to enter the |
2678 // deoptimization stub. | 2686 // deoptimization stub. |
2679 const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId()); | 2687 const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId()); |
2680 if (compiler->is_optimizing()) { | 2688 if (compiler->is_optimizing()) { |
(...skipping 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5786 1, | 5794 1, |
5787 locs()); | 5795 locs()); |
5788 __ lw(result, Address(SP, 1 * kWordSize)); | 5796 __ lw(result, Address(SP, 1 * kWordSize)); |
5789 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5797 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
5790 } | 5798 } |
5791 | 5799 |
5792 | 5800 |
5793 } // namespace dart | 5801 } // namespace dart |
5794 | 5802 |
5795 #endif // defined TARGET_ARCH_MIPS | 5803 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |