comparison graal/GraalCompiler/src/com/sun/c1x/ir/TypeCheck.java @ 2622:91d3952f7eb7

Framestate work : using stateAFter and reducting the number of nodes with framestates. Intermediate state (does not pass tests)
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Tue, 10 May 2011 12:37:46 +0200
parents f1bc67c2d453
children f9f40748442f
comparison
equal deleted inserted replaced
2621:dd115f80acf8 2622:91d3952f7eb7
21 * questions. 21 * questions.
22 */ 22 */
23 package com.sun.c1x.ir; 23 package com.sun.c1x.ir;
24 24
25 import com.oracle.graal.graph.*; 25 import com.oracle.graal.graph.*;
26 import com.sun.c1x.value.*;
27 import com.sun.cri.ci.*; 26 import com.sun.cri.ci.*;
28 import com.sun.cri.ri.*; 27 import com.sun.cri.ri.*;
29 28
30 /** 29 /**
31 * The {@code TypeCheck} instruction is the base class of casts and instanceof tests. 30 * The {@code TypeCheck} instruction is the base class of casts and instanceof tests.
32 */ 31 */
33 public abstract class TypeCheck extends StateSplit { 32 public abstract class TypeCheck extends Instruction {
34 33
35 private static final int INPUT_COUNT = 2; 34 private static final int INPUT_COUNT = 2;
36 private static final int INPUT_OBJECT = 0; 35 private static final int INPUT_OBJECT = 0;
37 private static final int INPUT_TARGET_CLASS_INSTRUCTION = 1; 36 private static final int INPUT_TARGET_CLASS_INSTRUCTION = 1;
38 37
80 * @param stateBefore the state before this instruction is executed 79 * @param stateBefore the state before this instruction is executed
81 * @param inputCount 80 * @param inputCount
82 * @param successorCount 81 * @param successorCount
83 * @param graph 82 * @param graph
84 */ 83 */
85 public TypeCheck(RiType targetClass, Value targetClassInstruction, Value object, CiKind kind, FrameState stateBefore, int inputCount, int successorCount, Graph graph) { 84 public TypeCheck(RiType targetClass, Value targetClassInstruction, Value object, CiKind kind, int inputCount, int successorCount, Graph graph) {
86 super(kind, stateBefore, inputCount + INPUT_COUNT, successorCount + SUCCESSOR_COUNT, graph); 85 super(kind, inputCount + INPUT_COUNT, successorCount + SUCCESSOR_COUNT, graph);
87 this.targetClass = targetClass; 86 this.targetClass = targetClass;
88 setObject(object); 87 setObject(object);
89 setTargetClassInstruction(targetClassInstruction); 88 setTargetClassInstruction(targetClassInstruction);
90 } 89 }
91 90