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 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 | 1200 |
1201 void FlowGraphCompiler::EmitEdgeCounter(intptr_t edge_id) { | 1201 void FlowGraphCompiler::EmitEdgeCounter(intptr_t edge_id) { |
1202 // We do not check for overflow when incrementing the edge counter. The | 1202 // We do not check for overflow when incrementing the edge counter. The |
1203 // function should normally be optimized long before the counter can | 1203 // function should normally be optimized long before the counter can |
1204 // overflow; and though we do not reset the counters when we optimize or | 1204 // overflow; and though we do not reset the counters when we optimize or |
1205 // deoptimize, there is a bound on the number of | 1205 // deoptimize, there is a bound on the number of |
1206 // optimization/deoptimization cycles we will attempt. | 1206 // optimization/deoptimization cycles we will attempt. |
1207 ASSERT(!edge_counters_array_.IsNull()); | 1207 ASSERT(!edge_counters_array_.IsNull()); |
1208 __ Comment("Edge counter"); | 1208 __ Comment("Edge counter"); |
1209 __ LoadObject(T0, edge_counters_array_); | 1209 __ LoadObject(T0, edge_counters_array_); |
1210 __ lw(T1, FieldAddress(T0, Array::element_offset(edge_id))); | 1210 __ LoadFieldFromOffset(T1, T0, Array::element_offset(edge_id)); |
1211 __ AddImmediate(T1, T1, Smi::RawValue(1)); | 1211 __ AddImmediate(T1, T1, Smi::RawValue(1)); |
1212 __ sw(T1, FieldAddress(T0, Array::element_offset(edge_id))); | 1212 __ StoreFieldToOffset(T1, T0, Array::element_offset(edge_id)); |
1213 } | 1213 } |
1214 | 1214 |
1215 | 1215 |
1216 void FlowGraphCompiler::EmitOptimizedInstanceCall( | 1216 void FlowGraphCompiler::EmitOptimizedInstanceCall( |
1217 const StubEntry& stub_entry, | 1217 const StubEntry& stub_entry, |
1218 const ICData& ic_data, | 1218 const ICData& ic_data, |
1219 intptr_t argument_count, | 1219 intptr_t argument_count, |
1220 intptr_t deopt_id, | 1220 intptr_t deopt_id, |
1221 intptr_t token_pos, | 1221 intptr_t token_pos, |
1222 LocationSummary* locs) { | 1222 LocationSummary* locs) { |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 __ AddImmediate(SP, kDoubleSize); | 1840 __ AddImmediate(SP, kDoubleSize); |
1841 } | 1841 } |
1842 | 1842 |
1843 | 1843 |
1844 #undef __ | 1844 #undef __ |
1845 | 1845 |
1846 | 1846 |
1847 } // namespace dart | 1847 } // namespace dart |
1848 | 1848 |
1849 #endif // defined TARGET_ARCH_MIPS | 1849 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |