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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 150063004: Support reusable boxes for Float32x4 fields (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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/intermediate_language.cc » ('j') | runtime/vm/intermediate_language_arm.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 6b4f67d46937bc78ba56db36a2463267a6c9c232..9a4897da711297dd40d1c6a7b3ee9748c3d7cc4b 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -455,10 +455,15 @@ void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id,
// and FlowGraphCompiler::SlowPathEnvironmentFor.
void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) {
if (is_optimizing()) {
+ RegisterSet* registers = locs->live_registers();
+ ASSERT(registers != NULL);
+ const intptr_t kFpuRegisterSpillFactor =
+ kFpuRegisterSize / kWordSize;
+ const intptr_t live_registers_size = registers->CpuRegisterCount() +
+ (registers->FpuRegisterCount() * kFpuRegisterSpillFactor);
BitmapBuilder* bitmap = locs->stack_bitmap();
ASSERT(bitmap != NULL);
- ASSERT(bitmap->Length() <= StackSize());
- // Pad the bitmap out to describe all the spill slots.
+ ASSERT(bitmap->Length() <= (StackSize() + live_registers_size));
Florian Schneider 2014/02/06 12:38:49 We should comment what's going on here: Maybe add
Cutch 2014/02/06 23:15:38 Done.
bitmap->SetLength(StackSize());
// Mark the bits in the stack map in the same order we push registers in
@@ -475,8 +480,6 @@ void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) {
//
// FPU registers have the highest register number at the highest
// address (i.e., first in the stackmap).
- const intptr_t kFpuRegisterSpillFactor =
- kFpuRegisterSize / kWordSize;
for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) {
FpuRegister reg = static_cast<FpuRegister>(i);
if (regs->ContainsFpuRegister(reg)) {
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | runtime/vm/intermediate_language_arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698