Index: src/lithium.cc |
diff --git a/src/lithium.cc b/src/lithium.cc |
index 2993c9aa73155bbfad9122a3d021d08f9107c761..a7c625afba4a52ff63a7d56646f6c985bba1ff9e 100644 |
--- a/src/lithium.cc |
+++ b/src/lithium.cc |
@@ -307,7 +307,7 @@ Label* LChunk::GetAssemblyLabel(int block_id) const { |
} |
void LChunk::MarkEmptyBlocks() { |
- HPhase phase("L_Mark empty blocks", this); |
+ LPhase phase("L_Mark empty blocks", this); |
for (int i = 0; i < graph()->blocks()->length(); ++i) { |
HBasicBlock* block = graph()->blocks()->at(i); |
int first = block->first_instruction_index(); |
@@ -491,4 +491,28 @@ void LChunk::set_allocated_double_registers(BitVector* allocated_registers) { |
} |
+LPhase::LPhase(const char* name, LAllocator* allocator) |
+ : CompilationPhase(name, allocator->isolate(), allocator->zone()), |
+ allocator_(allocator), chunk_(allocator->chunk()) { } |
+ |
+ |
+LPhase::LPhase(const char* name, LChunk* chunk) |
+ : CompilationPhase(name, chunk->isolate(), chunk->zone()), |
+ allocator_(NULL), chunk_(chunk) { } |
+ |
+ |
+LPhase::~LPhase() { |
+ if (ShouldProduceTraceOutput()) { |
+ isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
+ if (allocator_ != NULL) { |
+ isolate()->GetHTracer()->TraceLiveRanges(name(), allocator_); |
+ } |
+ } |
+ |
+#ifdef DEBUG |
+ if (allocator_ != NULL) allocator_->Verify(); |
+#endif |
+} |
+ |
+ |
} } // namespace v8::internal |