Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java @ 2726:819a40e46826
Clean up
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Thu, 19 May 2011 17:02:12 +0200 |
parents | e2d20fc3760f |
children | 1ddcbcd33325 |
comparison
equal
deleted
inserted
replaced
2725:c379183d1c54 | 2726:819a40e46826 |
---|---|
72 public void setEnd(BlockEnd end) { | 72 public void setEnd(BlockEnd end) { |
73 assert end != null; | 73 assert end != null; |
74 successors().set(super.successorCount() + SUCCESSOR_END, end); | 74 successors().set(super.successorCount() + SUCCESSOR_END, end); |
75 } | 75 } |
76 | 76 |
77 private static final List<BlockBegin> NO_HANDLERS = Collections.emptyList(); | |
78 | |
79 /** | 77 /** |
80 * A unique id used in tracing. | 78 * A unique id used in tracing. |
81 */ | 79 */ |
82 public final int blockID; | 80 public final int blockID; |
83 | 81 |
92 // LIR block | 90 // LIR block |
93 private LIRBlock lirBlock; | 91 private LIRBlock lirBlock; |
94 | 92 |
95 public void setLIRBlock(LIRBlock block) { | 93 public void setLIRBlock(LIRBlock block) { |
96 this.lirBlock = block; | 94 this.lirBlock = block; |
95 } | |
96 | |
97 public LIRBlock lirBlock() { | |
98 return lirBlock; | |
97 } | 99 } |
98 | 100 |
99 /** | 101 /** |
100 * Index of bytecode that generated this node when appended in a basic block. | 102 * Index of bytecode that generated this node when appended in a basic block. |
101 * Negative values indicate special cases. | 103 * Negative values indicate special cases. |
407 } else { | 409 } else { |
408 return predecessors().size(); | 410 return predecessors().size(); |
409 } | 411 } |
410 } | 412 } |
411 | 413 |
412 /** | |
413 * @return the label associated with the block, used by the LIR | |
414 */ | |
415 public Label label() { | |
416 return lirBlock().label; | |
417 } | |
418 | |
419 public LIRList lir() { | |
420 return lirBlock().lir(); | |
421 } | |
422 | |
423 public LIRBlock lirBlock() { | |
424 return lirBlock; | |
425 } | |
426 | |
427 public Instruction predAt(int j) { | 414 public Instruction predAt(int j) { |
428 return (Instruction) predecessors().get(j); | 415 return (Instruction) predecessors().get(j); |
429 } | |
430 | |
431 | |
432 public boolean isPredecessor(Instruction block) { | |
433 return predecessors().contains(block); | |
434 } | 416 } |
435 | 417 |
436 public void printWithoutPhis(LogStream out) { | 418 public void printWithoutPhis(LogStream out) { |
437 // print block id | 419 // print block id |
438 BlockEnd end = end(); | 420 BlockEnd end = end(); |
537 } | 519 } |
538 } | 520 } |
539 } | 521 } |
540 | 522 |
541 } | 523 } |
542 | |
543 | |
544 | 524 |
545 /** | 525 /** |
546 * Determines if a given instruction is a phi whose {@linkplain Phi#block() join block} is a given block. | 526 * Determines if a given instruction is a phi whose {@linkplain Phi#block() join block} is a given block. |
547 * | 527 * |
548 * @param value the instruction to test | 528 * @param value the instruction to test |
612 if (x instanceof ExceptionEdgeInstruction && ((ExceptionEdgeInstruction) x).exceptionEdge() != null) { | 592 if (x instanceof ExceptionEdgeInstruction && ((ExceptionEdgeInstruction) x).exceptionEdge() != null) { |
613 closure.apply(((ExceptionEdgeInstruction) x).exceptionEdge()); | 593 closure.apply(((ExceptionEdgeInstruction) x).exceptionEdge()); |
614 } | 594 } |
615 } | 595 } |
616 } | 596 } |
617 | |
618 | |
619 } | 597 } |