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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 10882055: Put live register bits in stackmaps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 264b623ade62d524a66d1fd3562d0a00c9cc2d39..dd03a01ab3582295651d5797f94113efdc9cda1a 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -237,8 +237,24 @@ void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) {
if (is_optimizing()) {
BitmapBuilder* bitmap = locs->stack_bitmap();
ASSERT(bitmap != NULL);
+ ASSERT(bitmap->Length() <= StackSize());
+ // Pad the bitmap out to describe all the spill slots.
bitmap->SetLength(StackSize());
- stackmap_table_builder_->AddEntry(assembler()->CodeSize(), bitmap);
+
+ // Slow path code can have registers at the safepoint.
+ if (!locs->always_calls()) {
+ for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) {
Vyacheslav Egorov (Google) 2012/08/27 14:54:51 This is tightly couple with the way we push regist
Kevin Millikin (Google) 2012/08/29 12:40:41 Done.
+ Register reg = static_cast<Register>(i);
+ if (locs->live_registers()->ContainsRegister(reg)) {
+ bitmap->Set(bitmap->Length(), true);
+ }
+ }
Vyacheslav Egorov (Google) 2012/08/27 14:54:51 Also please handle XMMRegisters here and remove a
+ }
+
+ intptr_t register_count = bitmap->Length() - StackSize();
+ stackmap_table_builder_->AddEntry(assembler()->CodeSize(),
+ bitmap,
+ register_count);
}
}

Powered by Google App Engine
This is Rietveld 408576698