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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 783103003: Clobber non-live temporaries on some paths involving a possible slow-path allocation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: only clobber on slow path Created 6 years 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
Index: runtime/vm/intermediate_language_arm.cc
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 4a53bf031356c89dac1e4b0afa7544867a6e49e6..5f7c5838f5c82230d5d47116f9c8a9a9556b75da 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -1953,6 +1953,9 @@ void LoadCodeUnitsInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// If the value cannot fit in a smi then allocate a mint box for it.
Register value = locs()->temp(0).reg();
Register temp = locs()->temp(1).reg();
+ // Value register needs to be manually preserved on allocation slow-path.
+ locs()->live_registers()->Add(locs()->temp(0), kUnboxedInt32);
+
ASSERT(result != value);
__ MoveRegister(value, result);
__ SmiTag(result);
@@ -2133,6 +2136,9 @@ void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
locs()->live_registers()->Add(locs()->in(1));
}
+ // Manually preserve temp which could be clobbered on the slow path.
+ locs()->live_registers()->Add(locs()->temp(0));
+
{
__ Bind(&store_double);
EnsureMutableBox(compiler,

Powered by Google App Engine
This is Rietveld 408576698