Index: src/lithium.cc |
diff --git a/src/lithium.cc b/src/lithium.cc |
index 108eb7f777fe2720853c8a121e3fd1bb67dc2962..aaaf8f26332c044ce857b429cb57162cc5c1a73a 100644 |
--- a/src/lithium.cc |
+++ b/src/lithium.cc |
@@ -257,6 +257,16 @@ int ElementsKindToShiftSize(ElementsKind elements_kind) { |
} |
+LChunk::LChunk(CompilationInfo* info, HGraph* graph) |
+ : spill_slot_count_(0), |
+ info_(info), |
+ graph_(graph), |
+ instructions_(32, graph->zone()), |
+ pointer_maps_(8, graph->zone()), |
+ inlined_closures_(1, graph->zone()) { |
+} |
+ |
+ |
LLabel* LChunk::GetLabel(int block_id) const { |
HBasicBlock* block = graph_->blocks()->at(block_id); |
int first_instruction = block->first_instruction_index(); |
@@ -410,6 +420,9 @@ LChunk* LChunk::NewChunk(HGraph* graph) { |
return NULL; |
} |
+ chunk->set_allocated_double_registers( |
+ allocator.assigned_double_registers()); |
+ |
return chunk; |
} |
@@ -457,4 +470,22 @@ void LChunk::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) { |
} |
} |
+ |
+void LChunk::set_allocated_double_registers(BitVector* allocated_registers) { |
+ allocated_double_registers_ = allocated_registers; |
+ BitVector* doubles = allocated_double_registers(); |
+ BitVector::Iterator iterator(doubles); |
+ while (!iterator.Done()) { |
+ if (info()->saves_caller_doubles()) { |
+ if (kDoubleSize == kPointerSize * 2) { |
+ spill_slot_count_ += 2; |
+ } else { |
+ spill_slot_count_++; |
+ } |
+ } |
+ iterator.Advance(); |
+ } |
+} |
+ |
+ |
} } // namespace v8::internal |