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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 code->Disassemble("test code", os); | 237 code->Disassemble("test code", os); |
238 } | 238 } |
239 #endif | 239 #endif |
240 return code; | 240 return code; |
241 } | 241 } |
242 | 242 |
243 | 243 |
244 Handle<Code> Pipeline::GenerateCode(Linkage* linkage, Graph* graph, | 244 Handle<Code> Pipeline::GenerateCode(Linkage* linkage, Graph* graph, |
245 Schedule* schedule, | 245 Schedule* schedule, |
246 SourcePositionTable* source_positions) { | 246 SourcePositionTable* source_positions) { |
247 ASSERT_NOT_NULL(graph); | 247 DCHECK_NOT_NULL(graph); |
248 ASSERT_NOT_NULL(linkage); | 248 DCHECK_NOT_NULL(linkage); |
249 ASSERT_NOT_NULL(schedule); | 249 DCHECK_NOT_NULL(schedule); |
250 ASSERT(SupportedTarget()); | 250 DCHECK(SupportedTarget()); |
251 | 251 |
252 InstructionSequence sequence(linkage, graph, schedule); | 252 InstructionSequence sequence(linkage, graph, schedule); |
253 | 253 |
254 // Select and schedule instructions covering the scheduled graph. | 254 // Select and schedule instructions covering the scheduled graph. |
255 { | 255 { |
256 InstructionSelector selector(&sequence, source_positions); | 256 InstructionSelector selector(&sequence, source_positions); |
257 selector.SelectInstructions(); | 257 selector.SelectInstructions(); |
258 } | 258 } |
259 | 259 |
260 if (FLAG_trace_turbo) { | 260 if (FLAG_trace_turbo) { |
(...skipping 23 matching lines...) Expand all Loading... |
284 } | 284 } |
285 | 285 |
286 // Generate native sequence. | 286 // Generate native sequence. |
287 CodeGenerator generator(&sequence); | 287 CodeGenerator generator(&sequence); |
288 return generator.GenerateCode(); | 288 return generator.GenerateCode(); |
289 } | 289 } |
290 | 290 |
291 } // namespace compiler | 291 } // namespace compiler |
292 } // namespace internal | 292 } // namespace internal |
293 } // namespace v8 | 293 } // namespace v8 |
OLD | NEW |