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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 const intptr_t num_non_copied_params = flow_graph().num_non_copied_params(); | 810 const intptr_t num_non_copied_params = flow_graph().num_non_copied_params(); |
811 const intptr_t param_base = | 811 const intptr_t param_base = |
812 kParamEndSlotFromFp + num_non_copied_params; | 812 kParamEndSlotFromFp + num_non_copied_params; |
813 for (; i < num_non_copied_params; ++i) { | 813 for (; i < num_non_copied_params; ++i) { |
814 if ((*idefs)[i]->IsConstant()) continue; // Common constants | 814 if ((*idefs)[i]->IsConstant()) continue; // Common constants |
815 Location loc = env->LocationAt(i); | 815 Location loc = env->LocationAt(i); |
816 EmitTrySyncMove((param_base - i) * kWordSize, loc, &push_emitted); | 816 EmitTrySyncMove((param_base - i) * kWordSize, loc, &push_emitted); |
817 } | 817 } |
818 | 818 |
819 // Process locals. Skip exception_var and stacktrace_var. | 819 // Process locals. Skip exception_var and stacktrace_var. |
820 CatchEntryInstr* catch_entry = catch_block->next()->AsCatchEntry(); | |
821 intptr_t local_base = kFirstLocalSlotFromFp + num_non_copied_params; | 820 intptr_t local_base = kFirstLocalSlotFromFp + num_non_copied_params; |
822 intptr_t ex_idx = local_base - catch_entry->exception_var().index(); | 821 intptr_t ex_idx = local_base - catch_block->exception_var().index(); |
823 intptr_t st_idx = local_base - catch_entry->stacktrace_var().index(); | 822 intptr_t st_idx = local_base - catch_block->stacktrace_var().index(); |
824 for (; i < flow_graph().variable_count(); ++i) { | 823 for (; i < flow_graph().variable_count(); ++i) { |
825 if (i == ex_idx || i == st_idx) continue; | 824 if (i == ex_idx || i == st_idx) continue; |
826 if ((*idefs)[i]->IsConstant()) continue; | 825 if ((*idefs)[i]->IsConstant()) continue; |
827 Location loc = env->LocationAt(i); | 826 Location loc = env->LocationAt(i); |
828 EmitTrySyncMove((local_base - i) * kWordSize, loc, &push_emitted); | 827 EmitTrySyncMove((local_base - i) * kWordSize, loc, &push_emitted); |
829 // Update safepoint bitmap to indicate that the target location | 828 // Update safepoint bitmap to indicate that the target location |
830 // now contains a pointer. | 829 // now contains a pointer. |
831 instr->locs()->stack_bitmap()->Set(i - num_non_copied_params, true); | 830 instr->locs()->stack_bitmap()->Set(i - num_non_copied_params, true); |
832 } | 831 } |
833 if (push_emitted) { | 832 if (push_emitted) { |
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2000 __ AddImmediate(SP, kDoubleSize); | 1999 __ AddImmediate(SP, kDoubleSize); |
2001 } | 2000 } |
2002 | 2001 |
2003 | 2002 |
2004 #undef __ | 2003 #undef __ |
2005 | 2004 |
2006 | 2005 |
2007 } // namespace dart | 2006 } // namespace dart |
2008 | 2007 |
2009 #endif // defined TARGET_ARCH_MIPS | 2008 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |