| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 const intptr_t num_non_copied_params = flow_graph().num_non_copied_params(); | 803 const intptr_t num_non_copied_params = flow_graph().num_non_copied_params(); |
| 804 const intptr_t param_base = | 804 const intptr_t param_base = |
| 805 kParamEndSlotFromFp + num_non_copied_params; | 805 kParamEndSlotFromFp + num_non_copied_params; |
| 806 for (; i < num_non_copied_params; ++i) { | 806 for (; i < num_non_copied_params; ++i) { |
| 807 if ((*idefs)[i]->IsConstant()) continue; // Common constants | 807 if ((*idefs)[i]->IsConstant()) continue; // Common constants |
| 808 Location loc = env->LocationAt(i); | 808 Location loc = env->LocationAt(i); |
| 809 EmitTrySyncMove((param_base - i) * kWordSize, loc, &push_emitted); | 809 EmitTrySyncMove((param_base - i) * kWordSize, loc, &push_emitted); |
| 810 } | 810 } |
| 811 | 811 |
| 812 // Process locals. Skip exception_var and stacktrace_var. | 812 // Process locals. Skip exception_var and stacktrace_var. |
| 813 CatchEntryInstr* catch_entry = catch_block->next()->AsCatchEntry(); | |
| 814 intptr_t local_base = kFirstLocalSlotFromFp + num_non_copied_params; | 813 intptr_t local_base = kFirstLocalSlotFromFp + num_non_copied_params; |
| 815 intptr_t ex_idx = local_base - catch_entry->exception_var().index(); | 814 intptr_t ex_idx = local_base - catch_block->exception_var().index(); |
| 816 intptr_t st_idx = local_base - catch_entry->stacktrace_var().index(); | 815 intptr_t st_idx = local_base - catch_block->stacktrace_var().index(); |
| 817 for (; i < flow_graph().variable_count(); ++i) { | 816 for (; i < flow_graph().variable_count(); ++i) { |
| 818 if (i == ex_idx || i == st_idx) continue; | 817 if (i == ex_idx || i == st_idx) continue; |
| 819 if ((*idefs)[i]->IsConstant()) continue; | 818 if ((*idefs)[i]->IsConstant()) continue; |
| 820 Location loc = env->LocationAt(i); | 819 Location loc = env->LocationAt(i); |
| 821 EmitTrySyncMove((local_base - i) * kWordSize, loc, &push_emitted); | 820 EmitTrySyncMove((local_base - i) * kWordSize, loc, &push_emitted); |
| 822 // Update safepoint bitmap to indicate that the target location | 821 // Update safepoint bitmap to indicate that the target location |
| 823 // now contains a pointer. | 822 // now contains a pointer. |
| 824 instr->locs()->stack_bitmap()->Set(i - num_non_copied_params, true); | 823 instr->locs()->stack_bitmap()->Set(i - num_non_copied_params, true); |
| 825 } | 824 } |
| 826 if (push_emitted) { | 825 if (push_emitted) { |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 __ movups(reg, Address(ESP, 0)); | 1909 __ movups(reg, Address(ESP, 0)); |
| 1911 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1910 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1912 } | 1911 } |
| 1913 | 1912 |
| 1914 | 1913 |
| 1915 #undef __ | 1914 #undef __ |
| 1916 | 1915 |
| 1917 } // namespace dart | 1916 } // namespace dart |
| 1918 | 1917 |
| 1919 #endif // defined TARGET_ARCH_IA32 | 1918 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |