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

Unified Diff: runtime/vm/flow_graph_compiler_arm.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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_arm.cc
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index c96c03662381807578def1dcc26b71addd2bcb42..4c093f8bdf8ae5c15a17e8f120573b53cb70cd25 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -1188,17 +1188,16 @@ void FlowGraphCompiler::EmitEdgeCounter(intptr_t edge_id) {
// optimization/deoptimization cycles we will attempt.
ASSERT(!edge_counters_array_.IsNull());
ASSERT(assembler_->constant_pool_allowed());
- const Array& counter = Array::ZoneHandle(zone(), Array::New(1, Heap::kOld));
- counter.SetAt(0, Smi::Handle(zone(), Smi::New(0)));
__ Comment("Edge counter");
__ LoadObject(R0, edge_counters_array_);
#if defined(DEBUG)
bool old_use_far_branches = assembler_->use_far_branches();
assembler_->set_use_far_branches(true);
#endif // DEBUG
- __ ldr(IP, FieldAddress(R0, Array::element_offset(edge_id)));
- __ add(IP, IP, Operand(Smi::RawValue(1)));
- __ StoreIntoSmiField(FieldAddress(R0, Array::element_offset(edge_id)), IP);
+ __ LoadFieldFromOffset(kWord, R1, R0, Array::element_offset(edge_id));
+ __ add(R1, R1, Operand(Smi::RawValue(1)));
+ __ StoreIntoObjectNoBarrierOffset(
+ R0, Array::element_offset(edge_id), R1, Assembler::kOnlySmi);
#if defined(DEBUG)
assembler_->set_use_far_branches(old_use_far_branches);
#endif // DEBUG
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698