OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
6 | 6 |
7 #include "src/base/platform/elapsed-timer.h" | 7 #include "src/base/platform/elapsed-timer.h" |
8 #include "src/compiler/ast-graph-builder.h" | 8 #include "src/compiler/ast-graph-builder.h" |
9 #include "src/compiler/code-generator.h" | 9 #include "src/compiler/code-generator.h" |
10 #include "src/compiler/graph-replay.h" | 10 #include "src/compiler/graph-replay.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 if (FLAG_turbo_stats) { | 38 if (FLAG_turbo_stats) { |
39 timer_.Start(); | 39 timer_.Start(); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 ~PhaseStats() { | 43 ~PhaseStats() { |
44 if (FLAG_turbo_stats) { | 44 if (FLAG_turbo_stats) { |
45 base::TimeDelta delta = timer_.Elapsed(); | 45 base::TimeDelta delta = timer_.Elapsed(); |
46 size_t bytes = info_->zone()->allocation_size() - size_; | 46 size_t bytes = info_->zone()->allocation_size() - size_; |
47 HStatistics* stats = info_->isolate()->GetTStatistics(); | 47 HStatistics* stats = info_->isolate()->GetTStatistics(); |
48 stats->SaveTiming(name_, delta, bytes); | 48 stats->SaveTiming(name_, delta, static_cast<int>(bytes)); |
49 | 49 |
50 switch (kind_) { | 50 switch (kind_) { |
51 case CREATE_GRAPH: | 51 case CREATE_GRAPH: |
52 stats->IncrementCreateGraph(delta); | 52 stats->IncrementCreateGraph(delta); |
53 break; | 53 break; |
54 case OPTIMIZATION: | 54 case OPTIMIZATION: |
55 stats->IncrementOptimizeGraph(delta); | 55 stats->IncrementOptimizeGraph(delta); |
56 break; | 56 break; |
57 case CODEGEN: | 57 case CODEGEN: |
58 stats->IncrementGenerateCode(delta); | 58 stats->IncrementGenerateCode(delta); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 | 282 |
283 // Generate native sequence. | 283 // Generate native sequence. |
284 CodeGenerator generator(&sequence); | 284 CodeGenerator generator(&sequence); |
285 return generator.GenerateCode(); | 285 return generator.GenerateCode(); |
286 } | 286 } |
287 | 287 |
288 } // namespace compiler | 288 } // namespace compiler |
289 } // namespace internal | 289 } // namespace internal |
290 } // namespace v8 | 290 } // namespace v8 |
OLD | NEW |