Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 1373013002: VM: Fix bug in the new edge counter code on ARM and MIPS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: removed dead code Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698