OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/hydrogen.h" | 7 #include "src/hydrogen.h" |
8 #include "src/lithium-allocator-inl.h" | 8 #include "src/lithium-allocator-inl.h" |
9 #include "src/string-stream.h" | 9 #include "src/string-stream.h" |
10 | 10 |
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1611 } else { | 1611 } else { |
1612 return DoubleRegister::AllocationIndexToString(allocation_index); | 1612 return DoubleRegister::AllocationIndexToString(allocation_index); |
1613 } | 1613 } |
1614 } | 1614 } |
1615 | 1615 |
1616 | 1616 |
1617 void LAllocator::TraceAlloc(const char* msg, ...) { | 1617 void LAllocator::TraceAlloc(const char* msg, ...) { |
1618 if (FLAG_trace_alloc) { | 1618 if (FLAG_trace_alloc) { |
1619 va_list arguments; | 1619 va_list arguments; |
1620 va_start(arguments, msg); | 1620 va_start(arguments, msg); |
1621 OS::VPrint(msg, arguments); | 1621 base::OS::VPrint(msg, arguments); |
1622 va_end(arguments); | 1622 va_end(arguments); |
1623 } | 1623 } |
1624 } | 1624 } |
1625 | 1625 |
1626 | 1626 |
1627 bool LAllocator::HasTaggedValue(int virtual_register) const { | 1627 bool LAllocator::HasTaggedValue(int virtual_register) const { |
1628 HValue* value = graph_->LookupValue(virtual_register); | 1628 HValue* value = graph_->LookupValue(virtual_register); |
1629 if (value == NULL) return false; | 1629 if (value == NULL) return false; |
1630 return value->representation().IsTagged() && !value->type().IsSmi(); | 1630 return value->representation().IsTagged() && !value->type().IsSmi(); |
1631 } | 1631 } |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2185 allocator_zone_start_allocation_size_ = | 2185 allocator_zone_start_allocation_size_ = |
2186 allocator->zone()->allocation_size(); | 2186 allocator->zone()->allocation_size(); |
2187 } | 2187 } |
2188 } | 2188 } |
2189 | 2189 |
2190 | 2190 |
2191 LAllocatorPhase::~LAllocatorPhase() { | 2191 LAllocatorPhase::~LAllocatorPhase() { |
2192 if (FLAG_hydrogen_stats) { | 2192 if (FLAG_hydrogen_stats) { |
2193 unsigned size = allocator_->zone()->allocation_size() - | 2193 unsigned size = allocator_->zone()->allocation_size() - |
2194 allocator_zone_start_allocation_size_; | 2194 allocator_zone_start_allocation_size_; |
2195 isolate()->GetHStatistics()->SaveTiming(name(), TimeDelta(), size); | 2195 isolate()->GetHStatistics()->SaveTiming(name(), base::TimeDelta(), size); |
2196 } | 2196 } |
2197 | 2197 |
2198 if (ShouldProduceTraceOutput()) { | 2198 if (ShouldProduceTraceOutput()) { |
2199 isolate()->GetHTracer()->TraceLithium(name(), allocator_->chunk()); | 2199 isolate()->GetHTracer()->TraceLithium(name(), allocator_->chunk()); |
2200 isolate()->GetHTracer()->TraceLiveRanges(name(), allocator_); | 2200 isolate()->GetHTracer()->TraceLiveRanges(name(), allocator_); |
2201 } | 2201 } |
2202 | 2202 |
2203 #ifdef DEBUG | 2203 #ifdef DEBUG |
2204 if (allocator_ != NULL) allocator_->Verify(); | 2204 if (allocator_ != NULL) allocator_->Verify(); |
2205 #endif | 2205 #endif |
2206 } | 2206 } |
2207 | 2207 |
2208 | 2208 |
2209 } } // namespace v8::internal | 2209 } } // namespace v8::internal |
OLD | NEW |