OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/hydrogen-range-analysis.h" | 5 #include "src/hydrogen-range-analysis.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 | 9 |
10 | 10 |
11 class Pending { | 11 class Pending { |
12 public: | 12 public: |
13 Pending(HBasicBlock* block, int last_changed_range) | 13 Pending(HBasicBlock* block, int last_changed_range) |
14 : block_(block), last_changed_range_(last_changed_range) {} | 14 : block_(block), last_changed_range_(last_changed_range) {} |
15 | 15 |
16 HBasicBlock* block() const { return block_; } | 16 HBasicBlock* block() const { return block_; } |
17 int last_changed_range() const { return last_changed_range_; } | 17 int last_changed_range() const { return last_changed_range_; } |
18 | 18 |
19 private: | 19 private: |
20 HBasicBlock* block_; | 20 HBasicBlock* block_; |
21 int last_changed_range_; | 21 int last_changed_range_; |
22 }; | 22 }; |
23 | 23 |
24 | 24 |
25 void HRangeAnalysisPhase::TraceRange(const char* msg, ...) { | 25 void HRangeAnalysisPhase::TraceRange(const char* msg, ...) { |
26 if (FLAG_trace_range) { | 26 if (FLAG_trace_range) { |
27 va_list arguments; | 27 va_list arguments; |
28 va_start(arguments, msg); | 28 va_start(arguments, msg); |
29 OS::VPrint(msg, arguments); | 29 base::OS::VPrint(msg, arguments); |
30 va_end(arguments); | 30 va_end(arguments); |
31 } | 31 } |
32 } | 32 } |
33 | 33 |
34 | 34 |
35 void HRangeAnalysisPhase::Run() { | 35 void HRangeAnalysisPhase::Run() { |
36 HBasicBlock* block(graph()->entry_block()); | 36 HBasicBlock* block(graph()->entry_block()); |
37 ZoneList<Pending> stack(graph()->blocks()->length(), zone()); | 37 ZoneList<Pending> stack(graph()->blocks()->length(), zone()); |
38 while (block != NULL) { | 38 while (block != NULL) { |
39 TraceRange("Analyzing block B%d\n", block->block_id()); | 39 TraceRange("Analyzing block B%d\n", block->block_id()); |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 in_worklist_.Clear(); | 284 in_worklist_.Clear(); |
285 ASSERT(in_worklist_.IsEmpty()); | 285 ASSERT(in_worklist_.IsEmpty()); |
286 ASSERT(worklist_.is_empty()); | 286 ASSERT(worklist_.is_empty()); |
287 } | 287 } |
288 | 288 |
289 | 289 |
290 } } // namespace v8::internal | 290 } } // namespace v8::internal |
OLD | NEW |