comparison graal/GraalCompiler/src/com/sun/c1x/ir/LookupSwitch.java @ 2602:0c6564c254af

new node layout: BlockBegin, BlockEnd -Dc1x.dot=regex for pdf output escape dot graph labels (<, >, &)
author Lukas Stadler <lukas.stadler@jku.at>
date Fri, 06 May 2011 10:25:37 +0200
parents 4a36a0bd6d18
children a0dd2b907806
comparison
equal deleted inserted replaced
2601:224e8b4007bd 2602:0c6564c254af
24 24
25 import static com.sun.c1x.debug.InstructionPrinter.InstructionLineColumn.*; 25 import static com.sun.c1x.debug.InstructionPrinter.InstructionLineColumn.*;
26 26
27 import java.util.*; 27 import java.util.*;
28 28
29 import com.oracle.graal.graph.*;
29 import com.sun.c1x.debug.*; 30 import com.sun.c1x.debug.*;
30 import com.sun.c1x.value.*; 31 import com.sun.c1x.value.*;
31 32
32 /** 33 /**
33 * The {@code LookupSwitch} instruction represents a lookup switch bytecode, which has a sorted 34 * The {@code LookupSwitch} instruction represents a lookup switch bytecode, which has a sorted
34 * array of key values. 35 * array of key values.
35 *
36 * @author Ben L. Titzer
37 */ 36 */
38 public final class LookupSwitch extends Switch { 37 public final class LookupSwitch extends Switch {
38
39 private static final int INPUT_COUNT = 0;
40 private static final int SUCCESSOR_COUNT = 0;
39 41
40 final int[] keys; 42 final int[] keys;
41 43
42 /** 44 /**
43 * Constructs a new LookupSwitch instruction. 45 * Constructs a new LookupSwitch instruction.
44 * @param value the instruction producing the value being switched on 46 * @param value the instruction producing the value being switched on
45 * @param successors the list of successors 47 * @param successors the list of successors
46 * @param keys the list of keys, sorted 48 * @param keys the list of keys, sorted
47 * @param stateBefore the state before the switch 49 * @param stateBefore the state before the switch
48 * @param isSafepoint {@code true} if this instruction is a safepoint 50 * @param isSafepoint {@code true} if this instruction is a safepoint
51 * @param graph
49 */ 52 */
50 public LookupSwitch(Value value, List<BlockBegin> successors, int[] keys, FrameState stateBefore, boolean isSafepoint) { 53 public LookupSwitch(Value value, List<BlockBegin> successors, int[] keys, FrameState stateBefore, boolean isSafepoint, Graph graph) {
51 super(value, successors, stateBefore, isSafepoint); 54 super(value, successors, stateBefore, isSafepoint, INPUT_COUNT, SUCCESSOR_COUNT, graph);
52 this.keys = keys; 55 this.keys = keys;
53 } 56 }
54 57
55 /** 58 /**
56 * Gets the key at the specified index. 59 * Gets the key at the specified index.