| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/il_printer.h" | 5 #include "vm/il_printer.h" |
| 6 | 6 |
| 7 #include "vm/intermediate_language.h" | 7 #include "vm/intermediate_language.h" |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } | 320 } |
| 321 | 321 |
| 322 | 322 |
| 323 void FlowGraphPrinter::VisitStoreContext(StoreContextComp* comp) { | 323 void FlowGraphPrinter::VisitStoreContext(StoreContextComp* comp) { |
| 324 OS::Print("StoreContext("); | 324 OS::Print("StoreContext("); |
| 325 comp->value()->Accept(this); | 325 comp->value()->Accept(this); |
| 326 OS::Print(")"); | 326 OS::Print(")"); |
| 327 } | 327 } |
| 328 | 328 |
| 329 | 329 |
| 330 void FlowGraphPrinter::VisitGraphEntry(GraphEntryInstr* instr) { |
| 331 OS::Print("%2d: [graph]", reverse_index(instr->postorder_number())); |
| 332 } |
| 333 |
| 334 |
| 330 void FlowGraphPrinter::VisitJoinEntry(JoinEntryInstr* instr) { | 335 void FlowGraphPrinter::VisitJoinEntry(JoinEntryInstr* instr) { |
| 331 OS::Print("%2d: [join]", reverse_index(instr->postorder_number())); | 336 OS::Print("%2d: [join]", reverse_index(instr->postorder_number())); |
| 332 } | 337 } |
| 333 | 338 |
| 334 | 339 |
| 335 void FlowGraphPrinter::VisitTargetEntry(TargetEntryInstr* instr) { | 340 void FlowGraphPrinter::VisitTargetEntry(TargetEntryInstr* instr) { |
| 336 OS::Print("%2d: [target", reverse_index(instr->postorder_number())); | 341 OS::Print("%2d: [target", reverse_index(instr->postorder_number())); |
| 337 if (instr->HasTryIndex()) { | 342 if (instr->HasTryIndex()) { |
| 338 OS::Print(" catch %d]", instr->try_index()); | 343 OS::Print(" catch %d]", instr->try_index()); |
| 339 } else { | 344 } else { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 354 } | 359 } |
| 355 | 360 |
| 356 | 361 |
| 357 void FlowGraphPrinter::VisitReturn(ReturnInstr* instr) { | 362 void FlowGraphPrinter::VisitReturn(ReturnInstr* instr) { |
| 358 OS::Print(" return "); | 363 OS::Print(" return "); |
| 359 instr->value()->Accept(this); | 364 instr->value()->Accept(this); |
| 360 } | 365 } |
| 361 | 366 |
| 362 | 367 |
| 363 void FlowGraphPrinter::VisitThrow(ThrowInstr* instr) { | 368 void FlowGraphPrinter::VisitThrow(ThrowInstr* instr) { |
| 364 OS::Print("Throw("); | 369 OS::Print(" throw "); |
| 365 instr->exception()->Accept(this); | 370 instr->exception()->Accept(this); |
| 366 OS::Print(")"); | |
| 367 } | 371 } |
| 368 | 372 |
| 369 | 373 |
| 370 void FlowGraphPrinter::VisitReThrow(ReThrowInstr* instr) { | 374 void FlowGraphPrinter::VisitReThrow(ReThrowInstr* instr) { |
| 371 OS::Print("ReThrow("); | 375 OS::Print(" rethrow ("); |
| 372 instr->exception()->Accept(this); | 376 instr->exception()->Accept(this); |
| 373 OS::Print(", "); | 377 OS::Print(", "); |
| 374 instr->stack_trace()->Accept(this); | 378 instr->stack_trace()->Accept(this); |
| 375 OS::Print(")"); | 379 OS::Print(")"); |
| 376 } | 380 } |
| 377 | 381 |
| 378 | 382 |
| 379 void FlowGraphPrinter::VisitBranch(BranchInstr* instr) { | 383 void FlowGraphPrinter::VisitBranch(BranchInstr* instr) { |
| 380 OS::Print(" if "); | 384 OS::Print(" if "); |
| 381 instr->value()->Accept(this); | 385 instr->value()->Accept(this); |
| 382 OS::Print(" goto(%d, %d)", | 386 OS::Print(" goto (%d, %d)", |
| 383 reverse_index(instr->true_successor()->postorder_number()), | 387 reverse_index(instr->true_successor()->postorder_number()), |
| 384 reverse_index(instr->false_successor()->postorder_number())); | 388 reverse_index(instr->false_successor()->postorder_number())); |
| 385 } | 389 } |
| 386 | 390 |
| 387 | 391 |
| 388 } // namespace dart | 392 } // namespace dart |
| OLD | NEW |