changeset 5503:438ab53efdd0

Renaming CiKind => RiKind.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 07 Jun 2012 17:08:33 +0200
parents 13aee5aba8cc
children 452f91ebdb54
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BoxingEliminationPhase.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/IdentifyBoxingPhase.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/SnippetIntrinsificationPhase.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirAssembler.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/TypeFeedbackCache.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentThread.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCompiledMethod.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotField.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotSignature.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypePrimitive.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeUnresolved.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotXirGenerator.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/server/ReplacingStreams.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/UnsafeSnippets.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnwindNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueUtil.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ArithmeticNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatArithmeticNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerArithmeticNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerRemNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LogicNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ShiftNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxingMethodPool.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LocationNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessIndexedNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/IsTypeNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewMultiArrayNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeFeedbackStore.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/GenericStamp.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/ObjectStamp.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/Stamp.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampFactory.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/nodes/MathIntrinsicNode.java graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64.java graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64MacroAssembler.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAddress.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiKind.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiMonitorValue.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegister.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfig.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterValue.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiStackSlot.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTarget.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiUtil.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValue.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiVirtualObject.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/RiKind.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/package-info.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiConstant.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiField.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRegisterConfig.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiSignature.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiType.java graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/RiXirGenerator.java graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirSnippet.java
diffstat 146 files changed, 1325 insertions(+), 1325 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Thu Jun 07 17:08:33 2012 +0200
@@ -422,7 +422,7 @@
      * The kind of this interval.
      * Only valid if this is a {@linkplain #xxisVariable() variable}.
      */
-    private CiKind kind;
+    private RiKind kind;
 
     /**
      * The head of the list of ranges describing this interval. This list is sorted by {@linkplain LIRInstruction#id instruction ids}.
@@ -489,14 +489,14 @@
     void assignLocation(CiValue newLocation) {
         if (isRegister(newLocation)) {
             assert this.location == null : "cannot re-assign location for " + this;
-            if (newLocation.kind == CiKind.Illegal && kind != CiKind.Illegal) {
+            if (newLocation.kind == RiKind.Illegal && kind != RiKind.Illegal) {
                 this.location = asRegister(newLocation).asValue(kind);
                 return;
             }
         } else {
             assert this.location == null || isRegister(this.location) : "cannot re-assign location for " + this;
             assert isStackSlot(newLocation);
-            assert newLocation.kind != CiKind.Illegal;
+            assert newLocation.kind != RiKind.Illegal;
             assert newLocation.kind == this.kind;
         }
         this.location = newLocation;
@@ -509,14 +509,14 @@
         return location;
     }
 
-    public CiKind kind() {
+    public RiKind kind() {
         assert !isRegister(operand) : "cannot access type for fixed interval";
         return kind;
     }
 
-    void setKind(CiKind kind) {
-        assert isRegister(operand) || this.kind() == CiKind.Illegal || this.kind() == kind : "overwriting existing type";
-        assert kind == kind.stackKind() || kind == CiKind.Short : "these kinds should have int type registers";
+    void setKind(RiKind kind) {
+        assert isRegister(operand) || this.kind() == RiKind.Illegal || this.kind() == kind : "overwriting existing type";
+        assert kind == kind.stackKind() || kind == RiKind.Short : "these kinds should have int type registers";
         this.kind = kind;
     }
 
@@ -669,7 +669,7 @@
         } else {
             assert isIllegal(operand) || isVariable(operand);
         }
-        this.kind = CiKind.Illegal;
+        this.kind = RiKind.Illegal;
         this.first = Range.EndMarker;
         this.usePosList = new UsePosList(4);
         this.current = Range.EndMarker;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Thu Jun 07 17:08:33 2012 +0200
@@ -147,7 +147,7 @@
 
     /**
      * The {@linkplain #operandNumber(CiValue) number} of the first variable operand
-     * {@linkplain #newVariable(CiKind) allocated} from this pool.
+     * {@linkplain #newVariable(RiKind) allocated} from this pool.
      */
     private final int firstVariableNumber;
 
@@ -233,7 +233,7 @@
     static final IntervalPredicate IS_OOP_INTERVAL = new IntervalPredicate() {
         @Override
         public boolean apply(Interval i) {
-            return !isRegister(i.operand) && i.kind()  == CiKind.Object;
+            return !isRegister(i.operand) && i.kind()  == RiKind.Object;
         }
     };
 
@@ -912,7 +912,7 @@
         TTY.println(blockData.get(block).liveOut.toString());
     }
 
-    void addUse(CiValue operand, int from, int to, RegisterPriority registerPriority, CiKind kind) {
+    void addUse(CiValue operand, int from, int to, RegisterPriority registerPriority, RiKind kind) {
         if (!isProcessed(operand)) {
             return;
         }
@@ -925,7 +925,7 @@
             interval = createInterval(operand);
         }
 
-        if (kind != CiKind.Illegal) {
+        if (kind != RiKind.Illegal) {
             interval.setKind(kind);
         }
 
@@ -935,7 +935,7 @@
         interval.addUsePos(to & ~1, registerPriority);
     }
 
-    void addTemp(CiValue operand, int tempPos, RegisterPriority registerPriority, CiKind kind) {
+    void addTemp(CiValue operand, int tempPos, RegisterPriority registerPriority, RiKind kind) {
         if (!isProcessed(operand)) {
             return;
         }
@@ -947,7 +947,7 @@
             interval = createInterval(operand);
         }
 
-        if (kind != CiKind.Illegal) {
+        if (kind != RiKind.Illegal) {
             interval.setKind(kind);
         }
 
@@ -959,7 +959,7 @@
         return !isRegister(operand) || attributes(asRegister(operand)).isAllocatable;
     }
 
-    void addDef(CiValue operand, int defPos, RegisterPriority registerPriority, CiKind kind) {
+    void addDef(CiValue operand, int defPos, RegisterPriority registerPriority, RiKind kind) {
         if (!isProcessed(operand)) {
             return;
         }
@@ -969,7 +969,7 @@
         Interval interval = intervalFor(operand);
         if (interval != null) {
 
-            if (kind != CiKind.Illegal) {
+            if (kind != RiKind.Illegal) {
                 interval.setKind(kind);
             }
 
@@ -994,7 +994,7 @@
             // Dead value - make vacuous interval
             // also add register priority for dead intervals
             interval = createInterval(operand);
-            if (kind != CiKind.Illegal) {
+            if (kind != RiKind.Illegal) {
                 interval.setKind(kind);
             }
 
@@ -1019,7 +1019,7 @@
     static RegisterPriority registerPriorityOfOutputOperand(LIRInstruction op) {
         if (op instanceof MoveOp) {
             MoveOp move = (MoveOp) op;
-            if (isStackSlot(move.getInput()) && move.getInput().kind != CiKind.Object) {
+            if (isStackSlot(move.getInput()) && move.getInput().kind != RiKind.Object) {
                 // method argument (condition must be equal to handleMethodArguments)
                 return RegisterPriority.None;
             }
@@ -1049,7 +1049,7 @@
     void handleMethodArguments(LIRInstruction op) {
         if (op instanceof MoveOp) {
             MoveOp move = (MoveOp) op;
-            if (isStackSlot(move.getInput()) && move.getInput().kind != CiKind.Object) {
+            if (isStackSlot(move.getInput()) && move.getInput().kind != RiKind.Object) {
                 CiStackSlot slot = (CiStackSlot) move.getInput();
                 if (GraalOptions.DetailedAsserts) {
                     assert op.id() > 0 : "invalid id";
@@ -1117,7 +1117,7 @@
                     TTY.println("live in %s to %d", operand, blockTo + 2);
                 }
 
-                addUse(operand, blockFrom, blockTo + 2, RegisterPriority.None, CiKind.Illegal);
+                addUse(operand, blockFrom, blockTo + 2, RegisterPriority.None, RiKind.Illegal);
 
                 // add special use positions for loop-end blocks when the
                 // interval is used anywhere inside this loop. It's possible
@@ -1140,7 +1140,7 @@
                 if (op.hasCall()) {
                     for (CiRegister r : callerSaveRegs) {
                         if (attributes(r).isAllocatable) {
-                            addTemp(r.asValue(), opId, RegisterPriority.None, CiKind.Illegal);
+                            addTemp(r.asValue(), opId, RegisterPriority.None, RiKind.Illegal);
                         }
                     }
                     if (GraalOptions.TraceLinearScanLevel >= 4) {
@@ -1552,7 +1552,7 @@
     // (includes computation of debug information and oop maps)
 
     boolean verifyAssignedLocation(Interval interval, CiValue location) {
-        CiKind kind = interval.kind();
+        RiKind kind = interval.kind();
 
         assert isRegister(location) || isStackSlot(location);
 
@@ -1954,7 +1954,7 @@
                 throw new GraalInternalError("");
             }
 
-            if (isVariable(i1.operand) && i1.kind()  == CiKind.Illegal) {
+            if (isVariable(i1.operand) && i1.kind()  == RiKind.Illegal) {
                 TTY.println("Interval %d has no type assigned", i1.operandNumber);
                 TTY.println(i1.logString(this));
                 throw new GraalInternalError("");
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Thu Jun 07 17:08:33 2012 +0200
@@ -190,8 +190,8 @@
      * @return a new variable
      */
     @Override
-    public Variable newVariable(CiKind kind) {
-        CiKind stackKind = kind.stackKind();
+    public Variable newVariable(RiKind kind) {
+        RiKind stackKind = kind.stackKind();
         switch (stackKind) {
             case Jsr:
             case Int:
@@ -235,11 +235,11 @@
         return value;
     }
 
-    public CiValue loadForStore(CiValue value, CiKind storeKind) {
+    public CiValue loadForStore(CiValue value, RiKind storeKind) {
         if (isConstant(value) && canStoreConstant((RiConstant) value)) {
             return value;
         }
-        if (storeKind == CiKind.Byte || storeKind == CiKind.Boolean) {
+        if (storeKind == RiKind.Byte || storeKind == RiKind.Boolean) {
             Variable tempVar = new Variable(value.kind, lir.nextVariable(), CiRegister.RegisterFlag.Byte);
             emitMove(value, tempVar);
             return tempVar;
@@ -279,8 +279,8 @@
      * @param kind the kind of value being returned
      * @return the operand representing the ABI defined location used return a value of kind {@code kind}
      */
-    public CiValue resultOperandFor(CiKind kind) {
-        if (kind == CiKind.Void) {
+    public CiValue resultOperandFor(RiKind kind) {
+        if (kind == RiKind.Void) {
             return IllegalValue;
         }
         return frameMap.registerConfig.getReturnRegister(kind).asValue(kind);
@@ -593,7 +593,7 @@
     @Override
     public void visitNewObjectArray(NewObjectArrayNode x) {
         XirArgument length = toXirArgument(x.length());
-        XirSnippet snippet = xir.genNewArray(site(x), length, CiKind.Object, x.elementType(), x.elementType().arrayOf());
+        XirSnippet snippet = xir.genNewArray(site(x), length, RiKind.Object, x.elementType(), x.elementType().arrayOf());
         emitXir(snippet, x, state(), true);
     }
 
@@ -827,7 +827,7 @@
 
             if (stackIndex == 0 && !isStatic) {
                 // Current argument is receiver.
-                stackIndex += stackSlots(CiKind.Object);
+                stackIndex += stackSlots(RiKind.Object);
             } else {
                 stackIndex += stackSlots(signature.argumentKindAt(argumentIndex, false));
                 argumentIndex++;
@@ -837,13 +837,13 @@
     }
 
 
-    public static int stackSlots(CiKind kind) {
+    public static int stackSlots(RiKind kind) {
         return isTwoSlot(kind) ? 2 : 1;
     }
 
-    public static boolean isTwoSlot(CiKind kind) {
-        assert kind != CiKind.Void && kind != CiKind.Illegal;
-        return kind == CiKind.Long || kind == CiKind.Double;
+    public static boolean isTwoSlot(RiKind kind) {
+        assert kind != RiKind.Void && kind != RiKind.Illegal;
+        return kind == RiKind.Long || kind == RiKind.Double;
     }
 
     @Override
@@ -862,12 +862,12 @@
                 snippet = xir.genInvokeSpecial(site(x.node(), callTarget.receiver()), receiver, targetMethod);
                 break;
             case Virtual:
-                assert callTarget.receiver().kind() == CiKind.Object : callTarget + ": " + callTarget.targetMethod().toString();
+                assert callTarget.receiver().kind() == RiKind.Object : callTarget + ": " + callTarget.targetMethod().toString();
                 receiver = toXirArgument(callTarget.receiver());
                 snippet = xir.genInvokeVirtual(site(x.node(), callTarget.receiver()), receiver, targetMethod, x.isMegamorphic());
                 break;
             case Interface:
-                assert callTarget.receiver().kind() == CiKind.Object : callTarget;
+                assert callTarget.receiver().kind() == RiKind.Object : callTarget;
                 receiver = toXirArgument(callTarget.receiver());
                 snippet = xir.genInvokeInterface(site(x.node(), callTarget.receiver()), receiver, targetMethod);
                 break;
@@ -883,7 +883,7 @@
 
         CiValue resultOperand = resultOperandFor(x.node().kind());
 
-        CiKind[] signature = CiUtil.signatureToKinds(callTarget.targetMethod().signature(), callTarget.isStatic() ? null : callTarget.targetMethod().holder().kind(true));
+        RiKind[] signature = CiUtil.signatureToKinds(callTarget.targetMethod().signature(), callTarget.isStatic() ? null : callTarget.targetMethod().holder().kind(true));
         CiCallingConvention cc = frameMap.registerConfig.getCallingConvention(JavaCall, signature, target(), false);
         frameMap.callsMethod(cc, JavaCall);
         List<CiValue> argList = visitInvokeArguments(cc, callTarget.arguments());
@@ -940,7 +940,7 @@
     protected abstract LabelRef createDeoptStub(RiDeoptAction action, RiDeoptReason reason, LIRDebugInfo info, Object deoptInfo);
 
     @Override
-    public Variable emitCall(@SuppressWarnings("hiding") Object target, CiKind result, CiKind[] arguments, boolean canTrap, CiValue... args) {
+    public Variable emitCall(@SuppressWarnings("hiding") Object target, RiKind result, RiKind[] arguments, boolean canTrap, CiValue... args) {
         LIRDebugInfo info = canTrap ? state() : null;
 
         CiValue physReg = resultOperandFor(result);
@@ -1155,7 +1155,7 @@
             return value;
         }
         Variable variable = load(value);
-        if (var.kind == CiKind.Byte || var.kind == CiKind.Boolean) {
+        if (var.kind == RiKind.Byte || var.kind == RiKind.Boolean) {
             Variable tempVar = new Variable(value.kind, lir.nextVariable(), CiRegister.RegisterFlag.Byte);
             emitMove(variable, tempVar);
             variable = tempVar;
@@ -1182,7 +1182,7 @@
             CiValue outputOperand = IllegalValue;
             // This snippet has a result that must be separately allocated
             // Otherwise it is assumed that the result is part of the inputs
-            if (resultOperand.kind != CiKind.Void && resultOperand.kind != CiKind.Illegal) {
+            if (resultOperand.kind != RiKind.Void && resultOperand.kind != RiKind.Illegal) {
                 if (setInstructionResult) {
                     outputOperand = newVariable(instruction.kind());
                 } else {
@@ -1279,8 +1279,8 @@
 
     protected final CiValue callRuntime(CiRuntimeCall runtimeCall, LIRDebugInfo info, CiValue... args) {
         // get a result register
-        CiKind result = runtimeCall.resultKind;
-        CiKind[] arguments = runtimeCall.arguments;
+        RiKind result = runtimeCall.resultKind;
+        RiKind[] arguments = runtimeCall.arguments;
 
         CiValue physReg = result.isVoid() ? IllegalValue : resultOperandFor(result);
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BoxingEliminationPhase.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BoxingEliminationPhase.java	Thu Jun 07 17:08:33 2012 +0200
@@ -63,7 +63,7 @@
         }
     }
 
-    private PhiNode getReplacementPhi(PhiNode phiNode, CiKind kind, Map<PhiNode, PhiNode> phiReplacements) {
+    private PhiNode getReplacementPhi(PhiNode phiNode, RiKind kind, Map<PhiNode, PhiNode> phiReplacements) {
         if (!phiReplacements.containsKey(phiNode)) {
             PhiNode result = null;
             ObjectStamp stamp = phiNode.objectStamp();
@@ -94,7 +94,7 @@
         return phiReplacements.get(phiNode);
     }
 
-    private ValueNode unboxedValue(ValueNode n, CiKind kind, Map<PhiNode, PhiNode> phiReplacements) {
+    private ValueNode unboxedValue(ValueNode n, RiKind kind, Map<PhiNode, PhiNode> phiReplacements) {
         if (n instanceof BoxNode) {
             BoxNode boxNode = (BoxNode) n;
             return boxNode.source();
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/IdentifyBoxingPhase.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/IdentifyBoxingPhase.java	Thu Jun 07 17:08:33 2012 +0200
@@ -51,15 +51,15 @@
         RiResolvedMethod targetMethod = callTarget.targetMethod();
         if (pool.isSpecialMethod(targetMethod)) {
             assert callTarget.arguments().size() == 1 : "boxing/unboxing method must have exactly one argument";
-            CiKind returnKind = callTarget.returnKind();
+            RiKind returnKind = callTarget.returnKind();
             ValueNode sourceValue = callTarget.arguments().get(0);
 
             // Check whether this is a boxing or an unboxing.
             Node newNode = null;
-            if (returnKind == CiKind.Object) {
+            if (returnKind == RiKind.Object) {
                 // We have a boxing method here.
                 assert Modifier.isStatic(targetMethod.accessFlags()) : "boxing method must be static";
-                CiKind sourceKind = targetMethod.signature().argumentKindAt(0, false);
+                RiKind sourceKind = targetMethod.signature().argumentKindAt(0, false);
                 newNode = invoke.graph().add(new BoxNode(sourceValue, targetMethod.holder(), sourceKind, invoke.bci()));
             } else {
                 // We have an unboxing method here.
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Thu Jun 07 17:08:33 2012 +0200
@@ -365,7 +365,7 @@
             if (GraalOptions.InliningBonusPerTransferredValue != 0) {
                 RiSignature signature = info.invoke.callTarget().targetMethod().signature();
                 int transferredValues = signature.argumentCount(!Modifier.isStatic(info.invoke.callTarget().targetMethod().accessFlags()));
-                if (signature.returnKind(false) != CiKind.Void) {
+                if (signature.returnKind(false) != RiKind.Void) {
                     transferredValues++;
                 }
                 maxSize += transferredValues * GraalOptions.InliningBonusPerTransferredValue;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/SnippetIntrinsificationPhase.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/SnippetIntrinsificationPhase.java	Thu Jun 07 17:08:33 2012 +0200
@@ -214,7 +214,7 @@
     /**
      * Calls a Java method via reflection.
      */
-    private static RiConstant callMethod(CiKind returnKind, Class< ? > holder, String name, Class< ? >[] parameterTypes, Object receiver, Object[] arguments) {
+    private static RiConstant callMethod(RiKind returnKind, Class< ? > holder, String name, Class< ? >[] parameterTypes, Object receiver, Object[] arguments) {
         Method method;
         try {
             method = holder.getDeclaredMethod(name, parameterTypes);
@@ -234,7 +234,7 @@
     }
 
     public void cleanUpReturnCheckCast(Node newInstance) {
-        if (newInstance instanceof ValueNode && ((ValueNode) newInstance).kind() != CiKind.Object) {
+        if (newInstance instanceof ValueNode && ((ValueNode) newInstance).kind() != RiKind.Object) {
             StructuredGraph graph = (StructuredGraph) newInstance.graph();
             for (CheckCastNode checkCastNode : newInstance.usages().filter(CheckCastNode.class).snapshot()) {
                 for (ValueProxyNode vpn : checkCastNode.usages().filter(ValueProxyNode.class).snapshot()) {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java	Thu Jun 07 17:08:33 2012 +0200
@@ -79,11 +79,11 @@
  */
 public abstract class AMD64LIRGenerator extends LIRGenerator {
 
-    private static final CiRegisterValue RAX_I = AMD64.rax.asValue(CiKind.Int);
-    private static final CiRegisterValue RAX_L = AMD64.rax.asValue(CiKind.Long);
-    private static final CiRegisterValue RDX_I = AMD64.rdx.asValue(CiKind.Int);
-    private static final CiRegisterValue RDX_L = AMD64.rdx.asValue(CiKind.Long);
-    private static final CiRegisterValue RCX_I = AMD64.rcx.asValue(CiKind.Int);
+    private static final CiRegisterValue RAX_I = AMD64.rax.asValue(RiKind.Int);
+    private static final CiRegisterValue RAX_L = AMD64.rax.asValue(RiKind.Long);
+    private static final CiRegisterValue RDX_I = AMD64.rdx.asValue(RiKind.Int);
+    private static final CiRegisterValue RDX_L = AMD64.rdx.asValue(RiKind.Long);
+    private static final CiRegisterValue RCX_I = AMD64.rcx.asValue(RiKind.Int);
 
     public static class AMD64SpillMoveFactory implements LIR.SpillMoveFactory {
         @Override
@@ -161,7 +161,7 @@
                     index = CiValue.IllegalValue;
                 } else {
                     // create a temporary variable for the index, the pointer load cannot handle a constant index
-                    CiValue newIndex = newVariable(CiKind.Long);
+                    CiValue newIndex = newVariable(RiKind.Long);
                     emitMove(index, newIndex);
                     index = newIndex;
                 }
@@ -586,7 +586,7 @@
 
     @Override
     public void visitCompareAndSwap(CompareAndSwapNode node) {
-        CiKind kind = node.newValue().kind();
+        RiKind kind = node.newValue().kind();
         assert kind == node.expected().kind();
 
         CiValue expected = loadNonConst(operand(node.expected()));
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirAssembler.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirAssembler.java	Thu Jun 07 17:08:33 2012 +0200
@@ -79,11 +79,11 @@
                     XirOperand xOp = i.x();
                     if (i.op == XirOp.Div || i.op == XirOp.Mod) {
                         if (fixedRDX == null) {
-                            fixedRDX = createRegisterTemp("divModTemp", CiKind.Int, AMD64.rdx);
+                            fixedRDX = createRegisterTemp("divModTemp", RiKind.Int, AMD64.rdx);
                         }
                         // Special treatment to make sure that the left input of % and / is in RAX
                         if (fixedRAX == null) {
-                            fixedRAX = createRegisterTemp("divModLeftInput", CiKind.Int, AMD64.rax);
+                            fixedRAX = createRegisterTemp("divModLeftInput", RiKind.Int, AMD64.rax);
                         }
                         currentList.add(new XirInstruction(i.x().kind, XirOp.Mov, fixedRAX, i.x()));
                         xOp = fixedRAX;
@@ -141,7 +141,7 @@
                     currentList.add(new XirInstruction(target.wordKind, XirOp.Mov, fixedRSI, i.x()));
                     currentList.add(new XirInstruction(target.wordKind, XirOp.Mov, fixedRDI, i.y()));
                     currentList.add(new XirInstruction(target.wordKind, XirOp.Mov, fixedRCX, i.z()));
-                    currentList.add(new XirInstruction(CiKind.Illegal, i.op, i.result, fixedRSI, fixedRDI, fixedRCX));
+                    currentList.add(new XirInstruction(RiKind.Illegal, i.op, i.result, fixedRSI, fixedRDI, fixedRCX));
                     appended = true;
                     break;
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java	Thu Jun 07 17:08:33 2012 +0200
@@ -194,7 +194,7 @@
 
                     CiAddress src;
                     if (isConstant(index)) {
-                        assert index.kind == CiKind.Int;
+                        assert index.kind == RiKind.Int;
                         RiConstant constantIndex = (RiConstant) index;
                         src = new CiAddress(inst.kind, pointer, constantIndex.asInt() * scale.value + displacement);
                     } else {
@@ -217,7 +217,7 @@
 
                     pointer = assureInRegister(tasm, masm, pointer);
                     assert isRegister(pointer);
-                    CiAddress src = new CiAddress(CiKind.Illegal, pointer, index, scale, displacement);
+                    CiAddress src = new CiAddress(RiKind.Illegal, pointer, index, scale, displacement);
                     masm.leaq(asRegister(result), src);
                     break;
                 }
@@ -238,7 +238,7 @@
 
                     CiAddress dst;
                     if (isConstant(index)) {
-                        assert index.kind == CiKind.Int;
+                        assert index.kind == RiKind.Int;
                         RiConstant constantIndex = (RiConstant) index;
                         dst = new CiAddress(inst.kind, pointer, IllegalValue, scale, constantIndex.asInt() * scale.value + displacement);
                     } else {
@@ -279,7 +279,7 @@
                     break;
 
                 case CallRuntime: {
-                    CiKind[] signature = new CiKind[inst.arguments.length];
+                    RiKind[] signature = new RiKind[inst.arguments.length];
                     for (int i = 0; i < signature.length; i++) {
                         signature[i] = inst.arguments[i].kind;
                     }
@@ -296,7 +296,7 @@
                     RuntimeCallInformation runtimeCallInformation = (RuntimeCallInformation) inst.extra;
                     AMD64Call.directCall(tasm, masm, runtimeCallInformation.target, (runtimeCallInformation.useInfoAfter) ? infoAfter : info);
 
-                    if (inst.result != null && inst.result.kind != CiKind.Illegal && inst.result.kind != CiKind.Void) {
+                    if (inst.result != null && inst.result.kind != RiKind.Illegal && inst.result.kind != RiKind.Void) {
                         CiRegister returnRegister = tasm.frameMap.registerConfig.getReturnRegister(inst.result.kind);
                         CiValue resultLocation = returnRegister.asValue(inst.result.kind.stackKind());
                         AMD64Move.move(tasm, masm, operands[inst.result.index], resultLocation);
@@ -315,10 +315,10 @@
                 case DecAndJumpNotZero: {
                     Label label = labels[((XirLabel) inst.extra).index];
                     CiValue value = operands[inst.x().index];
-                    if (value.kind == CiKind.Long) {
+                    if (value.kind == RiKind.Long) {
                         masm.decq(asRegister(value));
                     } else {
-                        assert value.kind == CiKind.Int;
+                        assert value.kind == RiKind.Int;
                         masm.decl(asRegister(value));
                     }
                     masm.jcc(ConditionFlag.notZero, label);
@@ -475,7 +475,7 @@
     }
 
     private static CiValue assureNot64BitConstant(TargetMethodAssembler tasm, AMD64MacroAssembler masm, CiValue value) {
-        if (isConstant(value) && (value.kind == CiKind.Long || value.kind == CiKind.Object)) {
+        if (isConstant(value) && (value.kind == RiKind.Long || value.kind == RiKind.Object)) {
             CiRegisterValue register = tasm.frameMap.registerConfig.getScratchRegister().asValue(value.kind);
             AMD64Move.move(tasm, masm, register, value);
             return register;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/TypeFeedbackCache.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/TypeFeedbackCache.java	Thu Jun 07 17:08:33 2012 +0200
@@ -62,7 +62,7 @@
 
     @Override
     public ScalarTypeFeedbackTool addScalar(ValueNode value) {
-        assert value.kind() == CiKind.Int || value.kind() == CiKind.Long || value.kind() == CiKind.Float || value.kind() == CiKind.Double;
+        assert value.kind() == RiKind.Int || value.kind() == RiKind.Long || value.kind() == RiKind.Float || value.kind() == RiKind.Double;
         ScalarTypeFeedbackStore result = scalarTypeFeedback.get(value);
         if (result == null) {
             if (value.stamp().scalarType() != null) {
@@ -77,7 +77,7 @@
 
     @Override
     public ObjectTypeFeedbackTool addObject(ValueNode value) {
-        assert value.kind() == CiKind.Object;
+        assert value.kind() == RiKind.Object;
         ObjectTypeFeedbackStore result = objectTypeFeedback.get(value);
         if (result == null) {
             if (value.stamp().objectType() != null) {
@@ -168,7 +168,7 @@
         // meet the phi nodes
         for (PhiNode phi : phis) {
             assert phi.valueCount() == cacheList.length;
-            if (phi.kind() == CiKind.Int || phi.kind() == CiKind.Long) {
+            if (phi.kind() == RiKind.Int || phi.kind() == RiKind.Long) {
                 ScalarTypeFeedbackStore[] types = new ScalarTypeFeedbackStore[phi.valueCount()];
                 for (int i = 0; i < phi.valueCount(); i++) {
                     ScalarTypeFeedbackStore other = cacheList[i].scalarTypeFeedback.get(phi.valueAt(i));
@@ -182,7 +182,7 @@
                     result.scalarTypeFeedback.put(phi, scalar);
 //                    phi.setStamp(StampFactory.forKind(phi.kind(), scalar.query(), null));
                 }
-            } else if (phi.kind() == CiKind.Object) {
+            } else if (phi.kind() == RiKind.Object) {
                 ObjectTypeFeedbackStore[] types = new ObjectTypeFeedbackStore[phi.valueCount()];
                 for (int i = 0; i < phi.valueCount(); i++) {
                     ObjectTypeFeedbackStore other = cacheList[i].objectTypeFeedback.get(phi.valueAt(i));
@@ -203,7 +203,7 @@
 
     @Override
     public ScalarTypeQuery queryScalar(ValueNode value) {
-        assert value.kind() == CiKind.Int || value.kind() == CiKind.Long || value.kind() == CiKind.Float || value.kind() == CiKind.Double;
+        assert value.kind() == RiKind.Int || value.kind() == RiKind.Long || value.kind() == RiKind.Float || value.kind() == RiKind.Double;
         if (NO_SCALAR_TYPES) {
             return new ScalarTypeFeedbackStore(value.kind(), changed).query();
         }
@@ -221,7 +221,7 @@
     @Override
     public ObjectTypeQuery queryObject(ValueNode value) {
         assert value != null;
-        assert value.kind() == CiKind.Object;
+        assert value.kind() == RiKind.Object;
         if (NO_OBJECT_TYPES) {
             return new ObjectTypeFeedbackStore(changed).query();
         }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java	Thu Jun 07 17:08:33 2012 +0200
@@ -251,7 +251,7 @@
         @Override
         public void inline(StructuredGraph graph, ExtendedRiRuntime runtime, InliningCallback callback) {
             int numberOfMethods = concretes.size();
-            boolean hasReturnValue = invoke.node().kind() != CiKind.Void;
+            boolean hasReturnValue = invoke.node().kind() != RiKind.Void;
 
             // receiver null check must be the first node
             InliningUtil.receiverNullCheck(invoke);
@@ -291,8 +291,8 @@
 
                 FixedNode exceptionSux = exceptionObject.next();
                 graph.addBeforeFixed(exceptionSux, exceptionMerge);
-                exceptionObjectPhi = graph.unique(new PhiNode(CiKind.Object, exceptionMerge));
-                exceptionMerge.setStateAfter(exceptionEdge.stateAfter().duplicateModified(invoke.stateAfter().bci, true, CiKind.Void, exceptionObjectPhi));
+                exceptionObjectPhi = graph.unique(new PhiNode(RiKind.Object, exceptionMerge));
+                exceptionMerge.setStateAfter(exceptionEdge.stateAfter().duplicateModified(invoke.stateAfter().bci, true, RiKind.Void, exceptionObjectPhi));
             }
 
             // create one separate block for each invoked method
@@ -460,7 +460,7 @@
             result.setUseForInlining(useForInlining);
             result.setProbability(probability);
 
-            CiKind kind = invoke.node().kind();
+            RiKind kind = invoke.node().kind();
             if (!kind.isVoid()) {
                 FrameState stateAfter = invoke.stateAfter();
                 stateAfter = stateAfter.duplicate(stateAfter.bci);
@@ -479,7 +479,7 @@
                 BeginNode newExceptionEdge = (BeginNode) exceptionEdge.copyWithInputs();
                 ExceptionObjectNode newExceptionObject = (ExceptionObjectNode) exceptionObject.copyWithInputs();
                 // set new state (pop old exception object, push new one)
-                newExceptionObject.setStateAfter(stateAfterException.duplicateModified(stateAfterException.bci, stateAfterException.rethrowException(), CiKind.Object, newExceptionObject));
+                newExceptionObject.setStateAfter(stateAfterException.duplicateModified(stateAfterException.bci, stateAfterException.rethrowException(), RiKind.Object, newExceptionObject));
                 newExceptionEdge.setNext(newExceptionObject);
 
                 EndNode endNode = graph.add(new EndNode());
@@ -907,7 +907,7 @@
         StructuredGraph graph = (StructuredGraph) invoke.graph();
         NodeInputList<ValueNode> parameters = callTarget.arguments();
         ValueNode firstParam = parameters.size() <= 0 ? null : parameters.get(0);
-        if (!callTarget.isStatic() && firstParam.kind() == CiKind.Object && !firstParam.objectStamp().nonNull()) {
+        if (!callTarget.isStatic() && firstParam.kind() == RiKind.Object && !firstParam.objectStamp().nonNull()) {
             graph.addBeforeFixed(invoke.node(), graph.add(new FixedGuardNode(graph.unique(new IsNullNode(firstParam)), RiDeoptReason.ClassCastException, RiDeoptAction.InvalidateReprofile, true, invoke.leafGraphId())));
         }
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerImpl.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerImpl.java	Thu Jun 07 17:08:33 2012 +0200
@@ -211,7 +211,7 @@
     public RiType lookupType(String returnType, HotSpotTypeResolved accessingClass, boolean eagerResolve) {
         if (returnType.length() == 1 && vmToCompiler instanceof VMToCompilerImpl) {
             VMToCompilerImpl exitsNative = (VMToCompilerImpl) vmToCompiler;
-            CiKind kind = CiKind.fromPrimitiveOrVoidTypeChar(returnType.charAt(0));
+            RiKind kind = RiKind.fromPrimitiveOrVoidTypeChar(returnType.charAt(0));
             switch(kind) {
                 case Boolean:
                     return exitsNative.typeBoolean;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java	Thu Jun 07 17:08:33 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.io.*;
 
-import com.oracle.max.cri.ci.CiKind.FormatWithToString;
+import com.oracle.max.cri.ci.RiKind.FormatWithToString;
 
 
 /**
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java	Thu Jun 07 17:08:33 2012 +0200
@@ -112,7 +112,7 @@
         assert stackShadowPages > 0;
     }
 
-    public int getArrayOffset(CiKind kind) {
+    public int getArrayOffset(RiKind kind) {
         return arrayOffsets[kind.ordinal()];
     }
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java	Thu Jun 07 17:08:33 2012 +0200
@@ -73,7 +73,7 @@
 
     RiType RiType_leastCommonAncestor(HotSpotTypeResolved thisType, HotSpotTypeResolved otherType);
 
-    RiType getPrimitiveArrayType(CiKind kind);
+    RiType getPrimitiveArrayType(RiKind kind);
 
     RiType RiType_arrayOf(HotSpotTypeResolved klass);
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java	Thu Jun 07 17:08:33 2012 +0200
@@ -93,7 +93,7 @@
     public native RiType RiType_leastCommonAncestor(HotSpotTypeResolved thisType, HotSpotTypeResolved otherType);
 
     @Override
-    public native RiType getPrimitiveArrayType(CiKind kind);
+    public native RiType getPrimitiveArrayType(RiKind kind);
 
     @Override
     public native RiType RiType_arrayOf(HotSpotTypeResolved klass);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java	Thu Jun 07 17:08:33 2012 +0200
@@ -58,7 +58,7 @@
 
     RiType createRiTypeUnresolved(String name);
 
-    RiConstant createCiConstant(CiKind kind, long value);
+    RiConstant createCiConstant(RiKind kind, long value);
 
     RiConstant createCiConstantFloat(float value);
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Thu Jun 07 17:08:33 2012 +0200
@@ -73,15 +73,15 @@
     public VMToCompilerImpl(Compiler compiler) {
         this.compiler = compiler;
 
-        typeBoolean = new HotSpotTypePrimitive(compiler, CiKind.Boolean);
-        typeChar = new HotSpotTypePrimitive(compiler, CiKind.Char);
-        typeFloat = new HotSpotTypePrimitive(compiler, CiKind.Float);
-        typeDouble = new HotSpotTypePrimitive(compiler, CiKind.Double);
-        typeByte = new HotSpotTypePrimitive(compiler, CiKind.Byte);
-        typeShort = new HotSpotTypePrimitive(compiler, CiKind.Short);
-        typeInt = new HotSpotTypePrimitive(compiler, CiKind.Int);
-        typeLong = new HotSpotTypePrimitive(compiler, CiKind.Long);
-        typeVoid = new HotSpotTypePrimitive(compiler, CiKind.Void);
+        typeBoolean = new HotSpotTypePrimitive(compiler, RiKind.Boolean);
+        typeChar = new HotSpotTypePrimitive(compiler, RiKind.Char);
+        typeFloat = new HotSpotTypePrimitive(compiler, RiKind.Float);
+        typeDouble = new HotSpotTypePrimitive(compiler, RiKind.Double);
+        typeByte = new HotSpotTypePrimitive(compiler, RiKind.Byte);
+        typeShort = new HotSpotTypePrimitive(compiler, RiKind.Short);
+        typeInt = new HotSpotTypePrimitive(compiler, RiKind.Int);
+        typeLong = new HotSpotTypePrimitive(compiler, RiKind.Long);
+        typeVoid = new HotSpotTypePrimitive(compiler, RiKind.Void);
     }
 
     public void startCompiler() throws Throwable {
@@ -454,18 +454,18 @@
     }
 
     @Override
-    public RiConstant createCiConstant(CiKind kind, long value) {
-        if (kind == CiKind.Long) {
+    public RiConstant createCiConstant(RiKind kind, long value) {
+        if (kind == RiKind.Long) {
             return RiConstant.forLong(value);
-        } else if (kind == CiKind.Int) {
+        } else if (kind == RiKind.Int) {
             return RiConstant.forInt((int) value);
-        } else if (kind == CiKind.Short) {
+        } else if (kind == RiKind.Short) {
             return RiConstant.forShort((short) value);
-        } else if (kind == CiKind.Char) {
+        } else if (kind == RiKind.Char) {
             return RiConstant.forChar((char) value);
-        } else if (kind == CiKind.Byte) {
+        } else if (kind == RiKind.Byte) {
             return RiConstant.forByte((byte) value);
-        } else if (kind == CiKind.Boolean) {
+        } else if (kind == RiKind.Boolean) {
             return (value == 0) ? RiConstant.FALSE : RiConstant.TRUE;
         } else {
             throw new IllegalArgumentException();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java	Thu Jun 07 17:08:33 2012 +0200
@@ -85,12 +85,12 @@
             int scale = Unsafe.getUnsafe().arrayIndexScale(long[].class);
 
             AMD64Move.move(tasm, masm, counterArr, RiConstant.forObject(counter.counts));
-            AMD64Move.load(tasm, masm, callerPc, new CiAddress(CiKind.Long, AMD64.rbp.asValue(CiKind.Long), 8), null);
+            AMD64Move.load(tasm, masm, callerPc, new CiAddress(RiKind.Long, AMD64.rbp.asValue(RiKind.Long), 8), null);
 
             Label done = new Label();
             for (int i = 0; i < counter.counts.length - 2; i += 2) {
-                CiAddress counterPcAddr = new CiAddress(CiKind.Long, counterArr, i * scale + off);
-                CiAddress counterValueAddr = new CiAddress(CiKind.Long, counterArr, (i + 1) * scale + off);
+                CiAddress counterPcAddr = new CiAddress(RiKind.Long, counterArr, i * scale + off);
+                CiAddress counterValueAddr = new CiAddress(RiKind.Long, counterArr, (i + 1) * scale + off);
 
                 Label skipClaim = new Label();
                 masm.cmpq(counterPcAddr, 0);
@@ -106,7 +106,7 @@
                 masm.bind(skipInc);
             }
 
-            CiAddress counterValueAddr = new CiAddress(CiKind.Long, counterArr, (counter.counts.length - 1) * scale + off);
+            CiAddress counterValueAddr = new CiAddress(RiKind.Long, counterArr, (counter.counts.length - 1) * scale + off);
             masm.addq(counterValueAddr, 1);
             masm.bind(done);
 
@@ -131,7 +131,7 @@
         if (!GraalOptions.MethodEntryCounters) {
             return;
         }
-        gen.append(new AMD64MethodEntryOp(new Counter(method), gen.newVariable(CiKind.Long), gen.newVariable(CiKind.Long)));
+        gen.append(new AMD64MethodEntryOp(new Counter(method), gen.newVariable(RiKind.Long), gen.newVariable(RiKind.Long)));
     }
 
     public static int getCodeSize() {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentThread.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentThread.java	Thu Jun 07 17:08:33 2012 +0200
@@ -40,7 +40,7 @@
 
     @Override
     public void generate(LIRGeneratorTool generator) {
-        generator.setResult(this, generator.emitLoad(new CiAddress(CiKind.Object, AMD64.r15.asValue(generator.target().wordKind), threadObjectOffset), false));
+        generator.setResult(this, generator.emitLoad(new CiAddress(RiKind.Object, AMD64.r15.asValue(generator.target().wordKind), threadObjectOffset), false));
     }
 
     @SuppressWarnings("unused")
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -61,7 +61,7 @@
         RiResolvedMethod method = frameState.method();
         boolean isStatic = Modifier.isStatic(method.accessFlags());
 
-        CiKind[] signature = CiUtil.signatureToKinds(method.signature(), isStatic ? null : method.holder().kind(true));
+        RiKind[] signature = CiUtil.signatureToKinds(method.signature(), isStatic ? null : method.holder().kind(true));
         CiCallingConvention cc = gen.frameMap().registerConfig.getCallingConvention(CiCallingConvention.Type.JavaCall, signature, gen.target(), false);
         gen.frameMap().callsMethod(cc, CiCallingConvention.Type.JavaCall); // TODO (aw): I think this is unnecessary for a tail call.
         List<ValueNode> parameters = new ArrayList<>();
@@ -70,7 +70,7 @@
         }
         List<CiValue> argList = gen.visitInvokeArguments(cc, parameters);
 
-        CiValue entry = gen.emitLoad(new CiAddress(CiKind.Long, gen.operand(target), config.nmethodEntryOffset), false);
+        CiValue entry = gen.emitLoad(new CiAddress(RiKind.Long, gen.operand(target), config.nmethodEntryOffset), false);
 
         gen.append(new AMD64TailcallOp(argList, entry, cc.locations));
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java	Thu Jun 07 17:08:33 2012 +0200
@@ -46,6 +46,6 @@
         } else {
             base = gen.emitAdd(base, RiConstant.forLong(config.cardtableStartAddress));
         }
-        gen.emitStore(new CiAddress(CiKind.Boolean, base, displacement), RiConstant.FALSE, false);
+        gen.emitStore(new CiAddress(RiKind.Boolean, base, displacement), RiConstant.FALSE, false);
     }
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCompiledMethod.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCompiledMethod.java	Thu Jun 07 17:08:33 2012 +0200
@@ -65,14 +65,14 @@
     @Override
     public Object execute(Object arg1, Object arg2, Object arg3) {
         assert method.signature().argumentCount(!Modifier.isStatic(method.accessFlags())) == 3;
-        assert method.signature().argumentKindAt(0, false) == CiKind.Object;
-        assert method.signature().argumentKindAt(1, false) == CiKind.Object;
-        assert !Modifier.isStatic(method.accessFlags()) || method.signature().argumentKindAt(2, false) == CiKind.Object;
+        assert method.signature().argumentKindAt(0, false) == RiKind.Object;
+        assert method.signature().argumentKindAt(1, false) == RiKind.Object;
+        assert !Modifier.isStatic(method.accessFlags()) || method.signature().argumentKindAt(2, false) == RiKind.Object;
         return compiler.getCompilerToVM().executeCompiledMethod(this, arg1, arg2, arg3);
     }
 
     private boolean checkArgs(Object... args) {
-        CiKind[] sig = CiUtil.signatureToKinds(method);
+        RiKind[] sig = CiUtil.signatureToKinds(method);
         assert args.length == sig.length : CiUtil.format("%H.%n(%p): expected ", method) + sig.length + " args, got " + args.length;
         for (int i = 0; i < sig.length; i++) {
             Object arg = args[i];
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotField.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotField.java	Thu Jun 07 17:08:33 2012 +0200
@@ -94,7 +94,7 @@
     }
 
     @Override
-    public CiKind kind(boolean architecture) {
+    public RiKind kind(boolean architecture) {
         return type().kind(architecture);
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java	Thu Jun 07 17:08:33 2012 +0200
@@ -108,7 +108,7 @@
     }
 
     @Override
-    public CiCallingConvention getCallingConvention(Type type, CiKind[] parameters, CiTarget target, boolean stackOnly) {
+    public CiCallingConvention getCallingConvention(Type type, RiKind[] parameters, CiTarget target, boolean stackOnly) {
         if (type == Type.NativeCall) {
             throw new UnsupportedOperationException();
         }
@@ -119,7 +119,7 @@
         return allParameterRegisters;
     }
 
-    private CiCallingConvention callingConvention(CiKind[] types, Type type, CiTarget target, boolean stackOnly) {
+    private CiCallingConvention callingConvention(RiKind[] types, Type type, CiTarget target, boolean stackOnly) {
         CiValue[] locations = new CiValue[types.length];
 
         int currentGeneral = 0;
@@ -127,7 +127,7 @@
         int currentStackOffset = 0;
 
         for (int i = 0; i < types.length; i++) {
-            final CiKind kind = types[i];
+            final RiKind kind = types[i];
 
             switch (kind) {
                 case Byte:
@@ -163,7 +163,7 @@
     }
 
     @Override
-    public CiRegister getReturnRegister(CiKind kind) {
+    public CiRegister getReturnRegister(RiKind kind) {
         switch (kind) {
             case Boolean:
             case Byte:
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java	Thu Jun 07 17:08:33 2012 +0200
@@ -184,7 +184,7 @@
     }
 
     @Override
-    public RiResolvedType asRiType(CiKind kind) {
+    public RiResolvedType asRiType(RiKind kind) {
         return (RiResolvedType) compiler.getCompilerToVM().getType(kind.toJavaClass());
     }
 
@@ -239,7 +239,7 @@
         } else if (n instanceof LoadFieldNode) {
             LoadFieldNode field = (LoadFieldNode) n;
             int displacement = ((HotSpotField) field.field()).offset();
-            assert field.kind() != CiKind.Illegal;
+            assert field.kind() != RiKind.Illegal;
             ReadNode memoryRead = graph.add(new ReadNode(field.object(), LocationNode.create(field.field(), field.field().kind(true), displacement, graph), field.stamp()));
             memoryRead.dependencies().add(tool.createNullCheckGuard(field.object(), field.leafGraphId()));
             graph.replaceFixedWithFixed(field, memoryRead);
@@ -258,7 +258,7 @@
             graph.replaceFixedWithFixed(storeField, memoryWrite);
 
             FixedWithNextNode last = memoryWrite;
-            if (field.kind(true) == CiKind.Object && !memoryWrite.value().isNullConstant()) {
+            if (field.kind(true) == RiKind.Object && !memoryWrite.value().isNullConstant()) {
                 FieldWriteBarrier writeBarrier = graph.add(new FieldWriteBarrier(memoryWrite.object()));
                 graph.addAfterFixed(memoryWrite, writeBarrier);
                 last = writeBarrier;
@@ -273,7 +273,7 @@
             // Separate out GC barrier semantics
             CompareAndSwapNode cas = (CompareAndSwapNode) n;
             ValueNode expected = cas.expected();
-            if (expected.kind() == CiKind.Object && !cas.newValue().isNullConstant()) {
+            if (expected.kind() == RiKind.Object && !cas.newValue().isNullConstant()) {
                 RiResolvedType type = cas.object().objectStamp().type();
                 if (type != null && !type.isArrayClass() && type.toJava() != Object.class) {
                     // Use a field write barrier since it's not an array store
@@ -290,7 +290,7 @@
 
             ValueNode boundsCheck = createBoundsCheck(loadIndexed, tool);
 
-            CiKind elementKind = loadIndexed.elementKind();
+            RiKind elementKind = loadIndexed.elementKind();
             LocationNode arrayLocation = createArrayLocation(graph, elementKind, loadIndexed.index());
             ReadNode memoryRead = graph.add(new ReadNode(loadIndexed.array(), arrayLocation, loadIndexed.stamp()));
             memoryRead.dependencies().add(boundsCheck);
@@ -299,12 +299,12 @@
             StoreIndexedNode storeIndexed = (StoreIndexedNode) n;
             ValueNode boundsCheck = createBoundsCheck(storeIndexed, tool);
 
-            CiKind elementKind = storeIndexed.elementKind();
+            RiKind elementKind = storeIndexed.elementKind();
             LocationNode arrayLocation = createArrayLocation(graph, elementKind, storeIndexed.index());
             ValueNode value = storeIndexed.value();
             CheckCastNode checkcast = null;
             ValueNode array = storeIndexed.array();
-            if (elementKind == CiKind.Object && !value.isNullConstant()) {
+            if (elementKind == RiKind.Object && !value.isNullConstant()) {
                 // Store check!
                 RiResolvedType arrayType = array.objectStamp().type();
                 if (arrayType != null && array.objectStamp().isExactType()) {
@@ -319,9 +319,9 @@
                     }
                 } else {
                     ValueNode guard = tool.createNullCheckGuard(array, StructuredGraph.INVALID_GRAPH_ID);
-                    FloatingReadNode arrayClass = graph.unique(new FloatingReadNode(array, LocationNode.create(LocationNode.FINAL_LOCATION, CiKind.Object, config.hubOffset, graph), null, StampFactory.objectNonNull()));
+                    FloatingReadNode arrayClass = graph.unique(new FloatingReadNode(array, LocationNode.create(LocationNode.FINAL_LOCATION, RiKind.Object, config.hubOffset, graph), null, StampFactory.objectNonNull()));
                     arrayClass.dependencies().add(guard);
-                    FloatingReadNode arrayElementKlass = graph.unique(new FloatingReadNode(arrayClass, LocationNode.create(LocationNode.FINAL_LOCATION, CiKind.Object, config.arrayClassElementOffset, graph), null, StampFactory.objectNonNull()));
+                    FloatingReadNode arrayElementKlass = graph.unique(new FloatingReadNode(arrayClass, LocationNode.create(LocationNode.FINAL_LOCATION, RiKind.Object, config.arrayClassElementOffset, graph), null, StampFactory.objectNonNull()));
                     checkcast = graph.add(new CheckCastNode(arrayElementKlass, null, value));
                     graph.addBeforeFixed(storeIndexed, checkcast);
                     value = checkcast;
@@ -333,12 +333,12 @@
 
             graph.replaceFixedWithFixed(storeIndexed, memoryWrite);
 
-            if (elementKind == CiKind.Object && !value.isNullConstant()) {
+            if (elementKind == RiKind.Object && !value.isNullConstant()) {
                 graph.addAfterFixed(memoryWrite, graph.add(new ArrayWriteBarrier(array, arrayLocation)));
             }
         } else if (n instanceof UnsafeLoadNode) {
             UnsafeLoadNode load = (UnsafeLoadNode) n;
-            assert load.kind() != CiKind.Illegal;
+            assert load.kind() != RiKind.Illegal;
             IndexedLocationNode location = IndexedLocationNode.create(LocationNode.ANY_LOCATION, load.loadKind(), load.displacement(), load.offset(), graph, false);
             ReadNode memoryRead = graph.add(new ReadNode(load.object(), location, load.stamp()));
             memoryRead.dependencies().add(tool.createNullCheckGuard(load.object(), StructuredGraph.INVALID_GRAPH_ID));
@@ -349,13 +349,13 @@
             WriteNode write = graph.add(new WriteNode(store.object(), store.value(), location));
             write.setStateAfter(store.stateAfter());
             graph.replaceFixedWithFixed(store, write);
-            if (write.value().kind() == CiKind.Object && !write.value().isNullConstant()) {
+            if (write.value().kind() == RiKind.Object && !write.value().isNullConstant()) {
                 FieldWriteBarrier barrier = graph.add(new FieldWriteBarrier(write.object()));
                 graph.addBeforeFixed(write, barrier);
             }
         } else if (n instanceof ReadHubNode) {
             ReadHubNode objectClassNode = (ReadHubNode) n;
-            LocationNode location = LocationNode.create(LocationNode.FINAL_LOCATION, CiKind.Object, config.hubOffset, graph);
+            LocationNode location = LocationNode.create(LocationNode.FINAL_LOCATION, RiKind.Object, config.hubOffset, graph);
             ReadNode memoryRead = graph.add(new ReadNode(objectClassNode.object(), location, StampFactory.objectNonNull()));
             memoryRead.dependencies().add(tool.createNullCheckGuard(objectClassNode.object(), StructuredGraph.INVALID_GRAPH_ID));
             graph.replaceFixed(objectClassNode, memoryRead);
@@ -380,12 +380,12 @@
         return false;
     }
 
-    private IndexedLocationNode createArrayLocation(Graph graph, CiKind elementKind, ValueNode index) {
+    private IndexedLocationNode createArrayLocation(Graph graph, RiKind elementKind, ValueNode index) {
         return IndexedLocationNode.create(LocationNode.getArrayLocation(elementKind), elementKind, config.getArrayOffset(elementKind), index, graph, true);
     }
 
     private SafeReadNode safeReadArrayLength(ValueNode array, long leafGraphId) {
-        return safeRead(array.graph(), CiKind.Int, array, config.arrayLengthOffset, StampFactory.positiveInt(), leafGraphId);
+        return safeRead(array.graph(), RiKind.Int, array, config.arrayLengthOffset, StampFactory.positiveInt(), leafGraphId);
     }
 
     private static ValueNode createBoundsCheck(AccessIndexedNode n, CiLoweringTool tool) {
@@ -417,7 +417,7 @@
                 LocalNode receiver = graph.unique(new LocalNode(0, StampFactory.objectNonNull()));
                 SafeReadNode klassOop = safeReadHub(graph, receiver, StructuredGraph.INVALID_GRAPH_ID);
                 Stamp resultStamp = StampFactory.declaredNonNull(getType(Class.class));
-                FloatingReadNode result = graph.unique(new FloatingReadNode(klassOop, LocationNode.create(LocationNode.FINAL_LOCATION, CiKind.Object, config.classMirrorOffset, graph), null, resultStamp));
+                FloatingReadNode result = graph.unique(new FloatingReadNode(klassOop, LocationNode.create(LocationNode.FINAL_LOCATION, RiKind.Object, config.classMirrorOffset, graph), null, resultStamp));
                 ReturnNode ret = graph.add(new ReturnNode(result));
                 graph.start().setNext(klassOop);
                 klassOop.setNext(ret);
@@ -427,10 +427,10 @@
             if (fullName.equals("getModifiers()I")) {
                 StructuredGraph graph = new StructuredGraph();
                 LocalNode receiver = graph.unique(new LocalNode(0, StampFactory.objectNonNull()));
-                SafeReadNode klassOop = safeRead(graph, CiKind.Object, receiver, config.klassOopOffset, StampFactory.objectNonNull(), StructuredGraph.INVALID_GRAPH_ID);
+                SafeReadNode klassOop = safeRead(graph, RiKind.Object, receiver, config.klassOopOffset, StampFactory.objectNonNull(), StructuredGraph.INVALID_GRAPH_ID);
                 graph.start().setNext(klassOop);
                 // TODO(thomaswue): Care about primitive classes! Crashes for primitive classes at the moment (klassOop == null)
-                FloatingReadNode result = graph.unique(new FloatingReadNode(klassOop, LocationNode.create(LocationNode.FINAL_LOCATION, CiKind.Int, config.klassModifierFlagsOffset, graph), null, StampFactory.intValue()));
+                FloatingReadNode result = graph.unique(new FloatingReadNode(klassOop, LocationNode.create(LocationNode.FINAL_LOCATION, RiKind.Int, config.klassModifierFlagsOffset, graph), null, StampFactory.intValue()));
                 ReturnNode ret = graph.add(new ReturnNode(result));
                 klassOop.setNext(ret);
                 return graph;
@@ -447,10 +447,10 @@
     }
 
     private SafeReadNode safeReadHub(Graph graph, ValueNode value, long leafGraphId) {
-        return safeRead(graph, CiKind.Object, value, config.hubOffset, StampFactory.objectNonNull(), leafGraphId);
+        return safeRead(graph, RiKind.Object, value, config.hubOffset, StampFactory.objectNonNull(), leafGraphId);
     }
 
-    private static SafeReadNode safeRead(Graph graph, CiKind kind, ValueNode value, int offset, Stamp stamp, long leafGraphId) {
+    private static SafeReadNode safeRead(Graph graph, RiKind kind, ValueNode value, int offset, Stamp stamp, long leafGraphId) {
         return graph.add(new SafeReadNode(value, LocationNode.create(LocationNode.FINAL_LOCATION, kind, offset, graph), stamp, leafGraphId));
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotSignature.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotSignature.java	Thu Jun 07 17:08:33 2012 +0200
@@ -100,8 +100,8 @@
     }
 
     @Override
-    public CiKind argumentKindAt(int index, boolean architecture) {
-        return CiKind.fromTypeString(arguments.get(index));
+    public RiKind argumentKindAt(int index, boolean architecture) {
+        return RiKind.fromTypeString(arguments.get(index));
     }
 
     @Override
@@ -132,8 +132,8 @@
     }
 
     @Override
-    public CiKind returnKind(boolean architecture) {
-        return CiKind.fromTypeString(returnType);
+    public RiKind returnKind(boolean architecture) {
+        return RiKind.fromTypeString(returnType);
     }
 
     @Override
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypePrimitive.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypePrimitive.java	Thu Jun 07 17:08:33 2012 +0200
@@ -36,10 +36,10 @@
 public final class HotSpotTypePrimitive extends HotSpotType implements RiResolvedType {
 
     private static final long serialVersionUID = -6208552348908071473L;
-    private CiKind kind;
+    private RiKind kind;
     private final HotSpotKlassOop klassOop;
 
-    public HotSpotTypePrimitive(Compiler compiler, CiKind kind) {
+    public HotSpotTypePrimitive(Compiler compiler, RiKind kind) {
         super(compiler);
         this.kind = kind;
         this.name = String.valueOf(Character.toUpperCase(kind.typeChar));
@@ -83,7 +83,7 @@
     }
 
     @Override
-    public CiKind getRepresentationKind(Representation r) {
+    public RiKind getRepresentationKind(Representation r) {
         return kind;
     }
 
@@ -133,7 +133,7 @@
     }
 
     @Override
-    public CiKind kind(boolean architecture) {
+    public RiKind kind(boolean architecture) {
         return kind;
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java	Thu Jun 07 17:08:33 2012 +0200
@@ -129,8 +129,8 @@
     }
 
     @Override
-    public CiKind getRepresentationKind(Representation r) {
-        return CiKind.Object;
+    public RiKind getRepresentationKind(Representation r) {
+        return RiKind.Object;
     }
 
     @Override
@@ -186,8 +186,8 @@
     }
 
     @Override
-    public CiKind kind(boolean architecture) {
-        return CiKind.Object;
+    public RiKind kind(boolean architecture) {
+        return RiKind.Object;
     }
 
     @Override
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeUnresolved.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeUnresolved.java	Thu Jun 07 17:08:33 2012 +0200
@@ -92,8 +92,8 @@
     }
 
     @Override
-    public CiKind kind(boolean architecture) {
-        return CiKind.Object;
+    public RiKind kind(boolean architecture) {
+        return RiKind.Object;
     }
 
     @Override
@@ -112,8 +112,8 @@
     }
 
     @Override
-    public CiKind getRepresentationKind(RiType.Representation r) {
-        return CiKind.Object;
+    public RiKind getRepresentationKind(RiType.Representation r) {
+        return RiKind.Object;
     }
 
     @Override
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotXirGenerator.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotXirGenerator.java	Thu Jun 07 17:08:33 2012 +0200
@@ -89,19 +89,19 @@
     }
 
     private XirConstant wordConst(CiXirAssembler asm, long value) {
-        if (target.wordKind == CiKind.Long) {
+        if (target.wordKind == RiKind.Long) {
             return asm.createConstant(RiConstant.forLong(value));
         } else {
-            assert target.wordKind == CiKind.Int;
+            assert target.wordKind == RiKind.Int;
             return asm.createConstant(RiConstant.forInt((int) value));
         }
     }
 
     private XirArgument wordArg(long value) {
-        if (target.wordKind == CiKind.Long) {
+        if (target.wordKind == RiKind.Long) {
             return XirArgument.forLong(value);
         } else {
-            assert target.wordKind == CiKind.Int;
+            assert target.wordKind == RiKind.Int;
             return XirArgument.forInt((int) value);
         }
     }
@@ -111,10 +111,10 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
             asm.restart();
-            XirParameter receiver = asm.createInputParameter("receiver", CiKind.Object);
+            XirParameter receiver = asm.createInputParameter("receiver", RiKind.Object);
             XirParameter addr = asm.createConstantInputParameter("addr", target.wordKind);
             XirOperand temp = asm.createRegisterTemp("temp", target.wordKind, AMD64.rax);
-            XirOperand tempO = asm.createRegister("tempO", CiKind.Object, AMD64.rax);
+            XirOperand tempO = asm.createRegister("tempO", RiKind.Object, AMD64.rax);
 
             if (is(NULL_CHECK, flags)) {
                 asm.mark(MARK_IMPLICIT_NULL);
@@ -132,10 +132,10 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
             asm.restart();
-            XirParameter receiver = asm.createInputParameter("receiver", CiKind.Object);
+            XirParameter receiver = asm.createInputParameter("receiver", RiKind.Object);
             XirParameter addr = asm.createConstantInputParameter("addr", target.wordKind);
             XirOperand temp = asm.createRegisterTemp("temp", target.wordKind, AMD64.rax);
-            XirOperand tempO = asm.createRegister("tempO", CiKind.Object, AMD64.rax);
+            XirOperand tempO = asm.createRegister("tempO", RiKind.Object, AMD64.rax);
 
             if (is(NULL_CHECK, flags)) {
                 asm.mark(MARK_IMPLICIT_NULL);
@@ -153,9 +153,9 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int vtableEntryOffset) {
             asm.restart();
-            XirParameter receiver = asm.createInputParameter("receiver", CiKind.Object);
+            XirParameter receiver = asm.createInputParameter("receiver", RiKind.Object);
             XirOperand temp = asm.createRegisterTemp("temp", target.wordKind, AMD64.rax);
-            XirOperand method = asm.createRegisterTemp("method", CiKind.Object, AMD64.rbx);
+            XirOperand method = asm.createRegisterTemp("method", RiKind.Object, AMD64.rbx);
 
             // load class from receiver
             if (is(NULL_CHECK, flags)) {
@@ -178,7 +178,7 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
             asm.restart();
-            XirParameter receiver = asm.createInputParameter("receiver", CiKind.Object);
+            XirParameter receiver = asm.createInputParameter("receiver", RiKind.Object);
             XirParameter addr = asm.createConstantInputParameter("addr", target.wordKind);
             XirOperand temp = asm.createRegisterTemp("temp", target.wordKind, AMD64.rax);
             XirLabel stub = asm.createOutOfLineLabel("call stub");
@@ -229,8 +229,8 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
-            asm.restart(CiKind.Void);
-            XirParameter object = asm.createInputParameter("object", CiKind.Object);
+            asm.restart(RiKind.Void);
+            XirParameter object = asm.createInputParameter("object", RiKind.Object);
             XirParameter lock = asm.createInputParameter("lock", target.wordKind);
 
             if (is(NULL_CHECK, flags)) {
@@ -251,7 +251,7 @@
             } else {
                 asm.reserveOutgoingStack(target.wordSize * 2);
                 XirOperand rsp = asm.createRegister("rsp", target.wordKind, asRegister(AMD64.RSP));
-                asm.pstore(CiKind.Object, rsp, asm.i(target.wordSize), object, false);
+                asm.pstore(RiKind.Object, rsp, asm.i(target.wordSize), object, false);
                 asm.pstore(target.wordKind, rsp, asm.i(0), lock, false);
                 asm.callRuntime(config.monitorEnterStub, null, useInfoAfter);
             }
@@ -268,8 +268,8 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
-            asm.restart(CiKind.Void);
-            XirParameter object = asm.createInputParameter("object", CiKind.Object);
+            asm.restart(RiKind.Void);
+            XirParameter object = asm.createInputParameter("object", RiKind.Object);
             XirParameter lock = asm.createInputParameter("lock", target.wordKind);
 
             if (config.useFastLocking) {
@@ -292,18 +292,18 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int size) {
             XirOperand result = asm.restart(target.wordKind);
-            XirOperand hub = asm.createInputParameter("hub", CiKind.Object);
+            XirOperand hub = asm.createInputParameter("hub", RiKind.Object);
 
             XirOperand temp1 = asm.createRegisterTemp("temp1", target.wordKind, AMD64.rcx);
-            XirOperand temp1o = asm.createRegister("temp1o", CiKind.Object, AMD64.rcx);
+            XirOperand temp1o = asm.createRegister("temp1o", RiKind.Object, AMD64.rcx);
             XirOperand temp2 = asm.createRegisterTemp("temp2", target.wordKind, AMD64.rbx);
-            XirOperand temp2i = asm.createRegister("temp2i", CiKind.Int, AMD64.rbx);
+            XirOperand temp2i = asm.createRegister("temp2i", RiKind.Int, AMD64.rbx);
             useRegisters(asm, AMD64.rsi);
             XirLabel tlabFull = asm.createOutOfLineLabel("tlab full");
             XirLabel resume = asm.createInlineLabel("resume");
 
             // check if the class is already initialized
-            asm.pload(CiKind.Int, temp2i, hub, asm.i(config.klassStateOffset), false);
+            asm.pload(RiKind.Int, temp2i, hub, asm.i(config.klassStateOffset), false);
             asm.jneq(tlabFull, temp2i, asm.i(config.klassStateFullyInitialized));
 
             XirOperand thread = asm.createRegisterTemp("thread", target.wordKind, AMD64.r15);
@@ -319,7 +319,7 @@
             asm.pload(target.wordKind, temp1, hub, asm.i(config.instanceHeaderPrototypeOffset), false);
             asm.pstore(target.wordKind, result, temp1, false);
             asm.mov(temp1o, hub); // need a temporary register since Intel cannot store 64-bit constants to memory
-            asm.pstore(CiKind.Object, result, asm.i(config.hubOffset), temp1o, false);
+            asm.pstore(RiKind.Object, result, asm.i(config.hubOffset), temp1o, false);
 
             if (size > 2 * target.wordSize) {
                 asm.mov(temp1, wordConst(asm, 0));
@@ -330,7 +330,7 @@
 
             // -- out of line -------------------------------------------------------
             asm.bindOutOfLine(tlabFull);
-            XirOperand arg = asm.createRegisterTemp("runtime call argument", CiKind.Object, AMD64.rdx);
+            XirOperand arg = asm.createRegisterTemp("runtime call argument", RiKind.Object, AMD64.rdx);
             asm.mov(arg, hub);
             useRegisters(asm, AMD64.rax);
             asm.callRuntime(config.newInstanceStub, result);
@@ -344,28 +344,28 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
-            emitNewTypeArray(asm, CiKind.Object, config.useFastNewObjectArray, config.newObjectArrayStub);
+            emitNewTypeArray(asm, RiKind.Object, config.useFastNewObjectArray, config.newObjectArrayStub);
             return asm.finishTemplate("newObjectArray");
         }
     };
 
-    private void emitNewTypeArray(CiXirAssembler asm, CiKind kind, boolean useFast, long slowPathStub) {
+    private void emitNewTypeArray(CiXirAssembler asm, RiKind kind, boolean useFast, long slowPathStub) {
         XirOperand result = asm.restart(target.wordKind);
 
-        XirParameter lengthParam = asm.createInputParameter("length", CiKind.Int, true);
+        XirParameter lengthParam = asm.createInputParameter("length", RiKind.Int, true);
 
-        XirOperand length = asm.createRegisterTemp("length", CiKind.Int, AMD64.rbx);
-        XirOperand hub = asm.createRegisterTemp("hub", CiKind.Object, AMD64.rdx);
+        XirOperand length = asm.createRegisterTemp("length", RiKind.Int, AMD64.rbx);
+        XirOperand hub = asm.createRegisterTemp("hub", RiKind.Object, AMD64.rdx);
 
         // Registers rsi, rcx, rdi, and rax are needed by the runtime call.
         // Hub needs to be on rdx, length on rbx.
         XirOperand temp1 = asm.createRegisterTemp("temp1", target.wordKind, AMD64.rcx);
-        XirOperand temp1o = asm.createRegister("temp1o", CiKind.Object, AMD64.rcx);
+        XirOperand temp1o = asm.createRegister("temp1o", RiKind.Object, AMD64.rcx);
         XirOperand temp2 = asm.createRegisterTemp("temp2", target.wordKind, AMD64.rax);
         XirOperand temp3 = asm.createRegisterTemp("temp3", target.wordKind, AMD64.rdi);
-        XirOperand size = asm.createRegisterTemp("size", CiKind.Int, AMD64.rsi);
+        XirOperand size = asm.createRegisterTemp("size", RiKind.Int, AMD64.rsi);
 
-        asm.mov(hub, asm.createConstantInputParameter("hub", CiKind.Object));
+        asm.mov(hub, asm.createConstantInputParameter("hub", RiKind.Object));
         asm.mov(length, lengthParam);
 
         if (useFast) {
@@ -405,10 +405,10 @@
             asm.pload(target.wordKind, temp1, hub, asm.i(config.instanceHeaderPrototypeOffset), false);
             asm.pstore(target.wordKind, result, temp1, false);
             asm.mov(temp1o, hub); // need a temporary register since Intel cannot store 64-bit constants to memory
-            asm.pstore(CiKind.Object, result, asm.i(config.hubOffset), temp1o, false);
+            asm.pstore(RiKind.Object, result, asm.i(config.hubOffset), temp1o, false);
 
             // Store array length
-            asm.pstore(CiKind.Int, result, asm.i(arrayLengthOffset), length, false);
+            asm.pstore(RiKind.Int, result, asm.i(arrayLengthOffset), length, false);
 
             // Initialize with 0
             XirLabel top = asm.createInlineLabel("top");
@@ -433,7 +433,7 @@
 
     private KindTemplates newTypeArrayTemplates = new KindTemplates() {
         @Override
-        protected XirTemplate create(CiXirAssembler asm, long flags, CiKind kind) {
+        protected XirTemplate create(CiXirAssembler asm, long flags, RiKind kind) {
             emitNewTypeArray(asm, kind, config.useFastNewTypeArray, config.newTypeArrayStub);
             return asm.finishTemplate("newTypeArray<" + kind.toString() + ">");
         }
@@ -443,19 +443,19 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int dimensions) {
-            XirOperand result = asm.restart(CiKind.Object);
+            XirOperand result = asm.restart(RiKind.Object);
 
-            XirOperand hub = asm.createRegisterTemp("hub", CiKind.Object, AMD64.rax);
-            XirOperand rank = asm.createRegisterTemp("rank", CiKind.Int, AMD64.rbx);
-            XirOperand sizes = asm.createRegisterTemp("sizes", CiKind.Long, AMD64.rcx);
-            XirOperand thread = asm.createRegisterTemp("thread", CiKind.Long, AMD64.r15);
+            XirOperand hub = asm.createRegisterTemp("hub", RiKind.Object, AMD64.rax);
+            XirOperand rank = asm.createRegisterTemp("rank", RiKind.Int, AMD64.rbx);
+            XirOperand sizes = asm.createRegisterTemp("sizes", RiKind.Long, AMD64.rcx);
+            XirOperand thread = asm.createRegisterTemp("thread", RiKind.Long, AMD64.r15);
             asm.add(sizes, thread, asm.l(config.threadMultiNewArrayStorage));
             for (int i = 0; i < dimensions; i++) {
-                XirParameter length = asm.createInputParameter("length" + i, CiKind.Int, true);
-                asm.pstore(CiKind.Int, sizes, asm.i(i * target.sizeInBytes(CiKind.Int)), length, false);
+                XirParameter length = asm.createInputParameter("length" + i, RiKind.Int, true);
+                asm.pstore(RiKind.Int, sizes, asm.i(i * target.sizeInBytes(RiKind.Int)), length, false);
             }
 
-            asm.mov(hub, asm.createConstantInputParameter("hub", CiKind.Object));
+            asm.mov(hub, asm.createConstantInputParameter("hub", RiKind.Object));
 
             asm.mov(rank, asm.i(dimensions));
             // not necessary because we already have a temp in rax:  useRegisters(asm, AMD64.rax);
@@ -491,21 +491,21 @@
             int disp = Unsafe.getUnsafe().arrayBaseOffset(long[].class);
             Scale scale = Scale.fromInt(Unsafe.getUnsafe().arrayIndexScale(long[].class));
             XirConstant index = asm.i(offset.ordinal());
-            asm.pload(CiKind.Long, counter, counters, index, disp, scale, false);
+            asm.pload(RiKind.Long, counter, counters, index, disp, scale, false);
             asm.add(counter, counter, asm.i(1));
-            asm.pstore(CiKind.Long, counters, index, counter, disp, scale, false);
+            asm.pstore(RiKind.Long, counters, index, counter, disp, scale, false);
         }
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int hintCount) {
-            asm.restart(CiKind.Void);
+            asm.restart(RiKind.Void);
             boolean exact = is(EXACT_HINTS, flags);
-            XirParameter counters = GraalOptions.CheckcastCounters ? asm.createConstantInputParameter("counters", CiKind.Object) : null;
-            XirParameter object = asm.createInputParameter("object", CiKind.Object);
-            final XirOperand hub = exact ? null : asm.createConstantInputParameter("hub", CiKind.Object);
+            XirParameter counters = GraalOptions.CheckcastCounters ? asm.createConstantInputParameter("counters", RiKind.Object) : null;
+            XirParameter object = asm.createInputParameter("object", RiKind.Object);
+            final XirOperand hub = exact ? null : asm.createConstantInputParameter("hub", RiKind.Object);
 
-            XirOperand objHub = asm.createTemp("objHub", CiKind.Object);
-            XirOperand counter = counters != null ? asm.createTemp("counter", CiKind.Long) : null;
+            XirOperand objHub = asm.createTemp("objHub", RiKind.Object);
+            XirOperand counter = counters != null ? asm.createTemp("counter", RiKind.Long) : null;
 
             XirLabel success = asm.createInlineLabel("success");
             XirLabel slowPath = asm.createOutOfLineLabel("slow path");
@@ -524,7 +524,7 @@
 
             }
 
-            asm.pload(CiKind.Object, objHub, object, asm.i(config.hubOffset), false);
+            asm.pload(RiKind.Object, objHub, object, asm.i(config.hubOffset), false);
             if (hintCount == 0) {
                 assert !exact;
                 if (counters != null) {
@@ -547,10 +547,10 @@
                 asm.bindOutOfLine(slowPath);
             } else {
                 XirLabel hintsSuccess = counters == null ? success : asm.createInlineLabel("hintsSuccess");
-                XirOperand scratchObject = asm.createRegisterTemp("scratch", CiKind.Object, AMD64.r10);
+                XirOperand scratchObject = asm.createRegisterTemp("scratch", RiKind.Object, AMD64.r10);
                 // if we get an exact match: succeed immediately
                 for (int i = 0; i < hintCount; i++) {
-                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, CiKind.Object);
+                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, RiKind.Object);
                     asm.mov(scratchObject, hintHub);
                     if (i < hintCount - 1) {
                         asm.jeq(hintsSuccess, objHub, scratchObject);
@@ -594,11 +594,11 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int hintCount) {
-            asm.restart(CiKind.Void);
-            XirParameter object = asm.createInputParameter("object", CiKind.Object);
-            final XirOperand hub = is(EXACT_HINTS, flags) ? null : asm.createConstantInputParameter("hub", CiKind.Object);
+            asm.restart(RiKind.Void);
+            XirParameter object = asm.createInputParameter("object", RiKind.Object);
+            final XirOperand hub = is(EXACT_HINTS, flags) ? null : asm.createConstantInputParameter("hub", RiKind.Object);
 
-            XirOperand objHub = asm.createTemp("objHub", CiKind.Object);
+            XirOperand objHub = asm.createTemp("objHub", RiKind.Object);
 
             XirLabel trueSucc = asm.createInlineLabel(XirLabel.TrueSuccessor);
             XirLabel falseSucc = asm.createInlineLabel(XirLabel.FalseSuccessor);
@@ -608,7 +608,7 @@
                 asm.jeq(falseSucc, object, asm.o(null));
             }
 
-            asm.pload(CiKind.Object, objHub, object, asm.i(config.hubOffset), false);
+            asm.pload(RiKind.Object, objHub, object, asm.i(config.hubOffset), false);
             if (hintCount == 0) {
                 assert !is(EXACT_HINTS, flags);
                 checkSubtype(asm, objHub, objHub, hub);
@@ -616,11 +616,11 @@
                 asm.jmp(trueSucc);
             } else {
                 XirLabel slowPath = null;
-                XirOperand scratchObject = asm.createRegisterTemp("scratch", CiKind.Object, AMD64.r10);
+                XirOperand scratchObject = asm.createRegisterTemp("scratch", RiKind.Object, AMD64.r10);
 
                 // if we get an exact match: succeed immediately
                 for (int i = 0; i < hintCount; i++) {
-                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, CiKind.Object);
+                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, RiKind.Object);
                     asm.mov(scratchObject, hintHub);
                     if (i < hintCount - 1) {
                         asm.jeq(trueSucc, objHub, scratchObject);
@@ -653,13 +653,13 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int hintCount) {
-            XirOperand result = asm.restart(CiKind.Int);
-            XirParameter object = asm.createInputParameter("object", CiKind.Object);
-            final XirOperand hub = is(EXACT_HINTS, flags) ? null : asm.createConstantInputParameter("hub", CiKind.Object);
-            XirOperand trueValue = asm.createInputParameter("trueValue", CiKind.Int);
-            XirOperand falseValue = asm.createInputParameter("falseValue", CiKind.Int);
+            XirOperand result = asm.restart(RiKind.Int);
+            XirParameter object = asm.createInputParameter("object", RiKind.Object);
+            final XirOperand hub = is(EXACT_HINTS, flags) ? null : asm.createConstantInputParameter("hub", RiKind.Object);
+            XirOperand trueValue = asm.createInputParameter("trueValue", RiKind.Int);
+            XirOperand falseValue = asm.createInputParameter("falseValue", RiKind.Int);
 
-            XirOperand objHub = asm.createTemp("objHub", CiKind.Object);
+            XirOperand objHub = asm.createTemp("objHub", RiKind.Object);
 
             XirLabel end = asm.createInlineLabel("end");
             XirLabel falseSucc = asm.createInlineLabel("ko");
@@ -669,7 +669,7 @@
                 asm.jeq(falseSucc, object, asm.o(null));
             }
 
-            asm.pload(CiKind.Object, objHub, object, asm.i(config.hubOffset), false);
+            asm.pload(RiKind.Object, objHub, object, asm.i(config.hubOffset), false);
             asm.mov(result, trueValue);
 
             if (hintCount == 0) {
@@ -681,11 +681,11 @@
                 asm.bindInline(end);
             } else {
                 XirLabel slowPath = null;
-                XirOperand scratchObject = asm.createRegisterTemp("scratch", CiKind.Object, AMD64.r10);
+                XirOperand scratchObject = asm.createRegisterTemp("scratch", RiKind.Object, AMD64.r10);
 
                 // if we get an exact match: succeed immediately
                 for (int i = 0; i < hintCount; i++) {
-                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, CiKind.Object);
+                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, RiKind.Object);
                     asm.mov(scratchObject, hintHub);
                     if (i < hintCount - 1) {
                         asm.jeq(end, objHub, scratchObject);
@@ -719,12 +719,12 @@
     private SimpleTemplates typeCheckTemplates = new SimpleTemplates(NULL_CHECK) {
        @Override
        protected XirTemplate create(CiXirAssembler asm, long flags) {
-           asm.restart(CiKind.Void);
-           XirParameter objHub = asm.createInputParameter("objectHub", CiKind.Object);
-           XirOperand hub = asm.createConstantInputParameter("hub", CiKind.Object);
+           asm.restart(RiKind.Void);
+           XirParameter objHub = asm.createInputParameter("objectHub", RiKind.Object);
+           XirOperand hub = asm.createConstantInputParameter("hub", RiKind.Object);
            XirLabel falseSucc = asm.createInlineLabel(XirLabel.FalseSuccessor);
 
-           XirOperand checkHub = asm.createTemp("checkHub", CiKind.Object);
+           XirOperand checkHub = asm.createTemp("checkHub", RiKind.Object);
 
            if (is(NULL_CHECK, flags)) {
                asm.mark(MARK_IMPLICIT_NULL);
@@ -788,8 +788,8 @@
     }
 
     @Override
-    public XirSnippet genNewArray(XirSite site, XirArgument length, CiKind elementKind, RiType componentType, RiType arrayType) {
-        if (elementKind == CiKind.Object) {
+    public XirSnippet genNewArray(XirSite site, XirArgument length, RiKind elementKind, RiType componentType, RiType arrayType) {
+        if (elementKind == RiKind.Object) {
             assert arrayType instanceof RiResolvedType;
             return new XirSnippet(newObjectArrayTemplates.get(site), length, XirArgument.forObject(((HotSpotType) arrayType).klassOop()));
         } else {
@@ -907,7 +907,7 @@
     private static void useRegisters(CiXirAssembler asm, CiRegister... registers) {
         if (registers != null) {
             for (CiRegister register : registers) {
-                asm.createRegisterTemp("reg", CiKind.Illegal, register);
+                asm.createRegisterTemp("reg", RiKind.Illegal, register);
             }
         }
     }
@@ -999,12 +999,12 @@
 
         @Override
         protected final XirTemplate create(CiXirAssembler asm, long flags) {
-            return create(asm, flags & FLAGS_MASK, CiKind.VALUES[(int) (flags & INDEX_MASK)]);
+            return create(asm, flags & FLAGS_MASK, RiKind.VALUES[(int) (flags & INDEX_MASK)]);
         }
 
-        protected abstract XirTemplate create(CiXirAssembler asm, long flags, CiKind kind);
+        protected abstract XirTemplate create(CiXirAssembler asm, long flags, RiKind kind);
 
-        public XirTemplate get(XirSite site, CiKind kind, TemplateFlag... flags) {
+        public XirTemplate get(XirSite site, RiKind kind, TemplateFlag... flags) {
             return getInternal(getBits(kind.ordinal(), site, flags));
         }
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/server/ReplacingStreams.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/server/ReplacingStreams.java	Thu Jun 07 17:08:33 2012 +0200
@@ -168,7 +168,7 @@
             // is the object a constant of object type?
             if (obj.getClass() == RiConstant.class) {
                 RiConstant constant = (RiConstant) obj;
-                if (constant.kind != CiKind.Object) {
+                if (constant.kind != RiKind.Object) {
                     return obj;
                 }
                 Object contents = constant.asObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java	Thu Jun 07 17:08:33 2012 +0200
@@ -221,14 +221,14 @@
         if (srcPos < 0 || destPos < 0 || length < 0 || srcPos + length > src.length || destPos + length > dest.length) {
             throw new IndexOutOfBoundsException();
         }
-        final int scale = arrayIndexScale(CiKind.Object);
+        final int scale = arrayIndexScale(RiKind.Object);
         if (src == dest && srcPos < destPos) { // bad aliased case
             copyObjectsDown(src, srcPos * scale, dest, destPos * scale, length);
         } else {
             copyObjectsUp(src, srcPos * scale, dest, destPos * scale, length);
         }
         if (length > 0) {
-            int header = arrayBaseOffset(CiKind.Object);
+            int header = arrayBaseOffset(RiKind.Object);
             int cardShift = cardTableShift();
             long cardStart = cardTableStart();
             long dstAddr = GetObjectAddressNode.get(dest);
@@ -243,47 +243,47 @@
 
     @Snippet
     public static void copyBytesDown(Object src, int srcPos, Object dest, int destPos, int length)  {
-        int header = arrayBaseOffset(CiKind.Byte);
+        int header = arrayBaseOffset(RiKind.Byte);
         for (long i = length - 1; i >= 0; i--) {
-            Byte a = UnsafeLoadNode.load(src, header, i + srcPos, CiKind.Byte);
-            UnsafeStoreNode.store(dest, header, i + destPos, a.byteValue(), CiKind.Byte);
+            Byte a = UnsafeLoadNode.load(src, header, i + srcPos, RiKind.Byte);
+            UnsafeStoreNode.store(dest, header, i + destPos, a.byteValue(), RiKind.Byte);
         }
     }
 
     @Snippet
     public static void copyShortsDown(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(CiKind.Short);
+        int header = arrayBaseOffset(RiKind.Short);
         for (long i = (length - 1) * 2; i >= 0; i -= 2) {
-            Character a = UnsafeLoadNode.load(src, header, i + srcOffset, CiKind.Short);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.charValue(), CiKind.Short);
+            Character a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Short);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.charValue(), RiKind.Short);
         }
     }
 
     @Snippet
     public static void copyIntsDown(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(CiKind.Int);
+        int header = arrayBaseOffset(RiKind.Int);
         for (long i = (length - 1) * 4; i >= 0; i -= 4) {
-            Integer a = UnsafeLoadNode.load(src, header, i + srcOffset, CiKind.Int);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.intValue(), CiKind.Int);
+            Integer a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Int);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.intValue(), RiKind.Int);
         }
     }
 
     @Snippet
     public static void copyLongsDown(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(CiKind.Long);
+        int header = arrayBaseOffset(RiKind.Long);
         for (long i = (length - 1) * 8; i >= 0; i -= 8) {
-            Long a = UnsafeLoadNode.load(src, header, i + srcOffset, CiKind.Long);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.longValue(), CiKind.Long);
+            Long a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Long);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.longValue(), RiKind.Long);
         }
     }
 
     // Does NOT perform store checks
     @Snippet
     public static void copyObjectsDown(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(CiKind.Object);
-        final int scale = arrayIndexScale(CiKind.Object);
+        int header = arrayBaseOffset(RiKind.Object);
+        final int scale = arrayIndexScale(RiKind.Object);
         for (long i = (length - 1) * scale; i >= 0; i -= scale) {
-            Object a = UnsafeLoadNode.load(src, header, i + srcOffset, CiKind.Object);
+            Object a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Object);
             DirectObjectStoreNode.store(dest, header, i + destOffset, a);
         }
     }
@@ -297,10 +297,10 @@
      */
     @Snippet
     public static void copyBytesUp(Object src, int srcPos, Object dest, int destPos, int length)  {
-        int header = arrayBaseOffset(CiKind.Byte);
+        int header = arrayBaseOffset(RiKind.Byte);
         for (long i = 0; i < length; i++) {
-            Byte a = UnsafeLoadNode.load(src, header, i + srcPos, CiKind.Byte);
-            UnsafeStoreNode.store(dest, header, i + destPos, a.byteValue(), CiKind.Byte);
+            Byte a = UnsafeLoadNode.load(src, header, i + srcPos, RiKind.Byte);
+            UnsafeStoreNode.store(dest, header, i + destPos, a.byteValue(), RiKind.Byte);
         }
     }
 
@@ -314,61 +314,61 @@
      */
     @Snippet
     public static void copyShortsUp(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(CiKind.Short);
+        int header = arrayBaseOffset(RiKind.Short);
         for (long i = 0; i < length * 2L; i += 2) {
-            Character a = UnsafeLoadNode.load(src, header, i + srcOffset, CiKind.Short);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.charValue(), CiKind.Short);
+            Character a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Short);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.charValue(), RiKind.Short);
         }
     }
 
     @Snippet
     public static void copyIntsUp(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(CiKind.Int);
+        int header = arrayBaseOffset(RiKind.Int);
         for (long i = 0; i < length * 4L; i += 4) {
-            Integer a = UnsafeLoadNode.load(src, header, i + srcOffset, CiKind.Int);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.intValue(), CiKind.Int);
+            Integer a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Int);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.intValue(), RiKind.Int);
         }
     }
 
     @Snippet
     public static void copyLongsUp(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(CiKind.Long);
+        int header = arrayBaseOffset(RiKind.Long);
         for (long i = 0; i < length * 8L; i += 8) {
-            Long a = UnsafeLoadNode.load(src, header, i + srcOffset, CiKind.Long);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.longValue(), CiKind.Long);
+            Long a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Long);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.longValue(), RiKind.Long);
         }
     }
 
     // Does NOT perform store checks
     @Snippet
     public static void copyObjectsUp(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(CiKind.Object);
-        final int scale = arrayIndexScale(CiKind.Object);
+        int header = arrayBaseOffset(RiKind.Object);
+        final int scale = arrayIndexScale(RiKind.Object);
         for (long i = 0; i < length * scale; i += scale) {
-            Object a = UnsafeLoadNode.load(src, header, i + srcOffset, CiKind.Object);
+            Object a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Object);
             DirectObjectStoreNode.store(dest, header, i + destOffset, a);
         }
     }
 
     @Fold
-    static int arrayBaseOffset(CiKind elementKind) {
+    static int arrayBaseOffset(RiKind elementKind) {
         return elementKind.arrayBaseOffset();
     }
 
     @Fold
-    static int arrayIndexScale(CiKind elementKind) {
+    static int arrayIndexScale(RiKind elementKind) {
         return elementKind.arrayIndexScale();
     }
 
     static {
-        assert arrayIndexScale(CiKind.Byte) == 1;
-        assert arrayIndexScale(CiKind.Boolean) == 1;
-        assert arrayIndexScale(CiKind.Char) == 2;
-        assert arrayIndexScale(CiKind.Short) == 2;
-        assert arrayIndexScale(CiKind.Int) == 4;
-        assert arrayIndexScale(CiKind.Long) == 8;
-        assert arrayIndexScale(CiKind.Float) == 4;
-        assert arrayIndexScale(CiKind.Double) == 8;
+        assert arrayIndexScale(RiKind.Byte) == 1;
+        assert arrayIndexScale(RiKind.Boolean) == 1;
+        assert arrayIndexScale(RiKind.Char) == 2;
+        assert arrayIndexScale(RiKind.Short) == 2;
+        assert arrayIndexScale(RiKind.Int) == 4;
+        assert arrayIndexScale(RiKind.Long) == 8;
+        assert arrayIndexScale(RiKind.Float) == 4;
+        assert arrayIndexScale(RiKind.Double) == 8;
     }
 
     @Fold
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java	Thu Jun 07 17:08:33 2012 +0200
@@ -155,7 +155,7 @@
 
     //This is used instead of a Java array read to avoid the array bounds check.
     static Object loadNonNullObjectElement(Object array, int index) {
-        return UnsafeLoadNode.loadObject(array, arrayBaseOffset(CiKind.Object), index * arrayIndexScale(CiKind.Object), true);
+        return UnsafeLoadNode.loadObject(array, arrayBaseOffset(RiKind.Object), index * arrayIndexScale(RiKind.Object), true);
     }
 
     static boolean checkSecondarySubType(Object t, Object s) {
@@ -187,7 +187,7 @@
 
     static boolean checkUnknownSubType(Object t, Object s) {
         // int off = T.offset
-        int superCheckOffset = UnsafeLoadNode.load(t, 0, superCheckOffsetOffset(), CiKind.Int);
+        int superCheckOffset = UnsafeLoadNode.load(t, 0, superCheckOffsetOffset(), RiKind.Int);
         boolean primary = superCheckOffset != secondarySuperCacheOffset();
 
         // if (T = S[off]) return true
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -37,7 +37,7 @@
     @Input private ValueNode object;
 
     public GetObjectAddressNode(ValueNode obj) {
-        super(StampFactory.forKind(CiKind.Long));
+        super(StampFactory.forKind(RiKind.Long));
         this.object = obj;
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java	Thu Jun 07 17:08:33 2012 +0200
@@ -87,26 +87,26 @@
                                 && srcType.isArrayClass()
                                 && destType != null
                                 && destType.isArrayClass()) {
-                    CiKind componentKind = srcType.componentType().kind(false);
+                    RiKind componentKind = srcType.componentType().kind(false);
                     if (srcType.componentType() == destType.componentType()) {
-                        if (componentKind == CiKind.Int) {
+                        if (componentKind == RiKind.Int) {
                             snippetMethod = intArrayCopy;
-                        } else if (componentKind == CiKind.Char) {
+                        } else if (componentKind == RiKind.Char) {
                             snippetMethod = charArrayCopy;
-                        } else if (componentKind == CiKind.Long) {
+                        } else if (componentKind == RiKind.Long) {
                             snippetMethod = longArrayCopy;
-                        } else if (componentKind == CiKind.Byte) {
+                        } else if (componentKind == RiKind.Byte) {
                             snippetMethod = byteArrayCopy;
-                        } else if (componentKind == CiKind.Short) {
+                        } else if (componentKind == RiKind.Short) {
                             snippetMethod = shortArrayCopy;
-                        } else if (componentKind == CiKind.Float) {
+                        } else if (componentKind == RiKind.Float) {
                             snippetMethod = floatArrayCopy;
-                        } else if (componentKind == CiKind.Double) {
+                        } else if (componentKind == RiKind.Double) {
                             snippetMethod = doubleArrayCopy;
-                        } else if (componentKind == CiKind.Object) {
+                        } else if (componentKind == RiKind.Object) {
                             snippetMethod = objectArrayCopy;
                         }
-                    } else if (componentKind == CiKind.Object
+                    } else if (componentKind == RiKind.Object
                                     && srcType.componentType().isSubtypeOf(destType.componentType())) {
                         snippetMethod = objectArrayCopy;
                     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/UnsafeSnippets.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/UnsafeSnippets.java	Thu Jun 07 17:08:33 2012 +0200
@@ -47,7 +47,7 @@
     }
 
     public Object getObject(Object o, long offset) {
-        return UnsafeLoadNode.load(o, 0, offset, CiKind.Object);
+        return UnsafeLoadNode.load(o, 0, offset, RiKind.Object);
     }
 
     public Object getObjectVolatile(Object o, long offset) {
@@ -58,7 +58,7 @@
     }
 
     public void putObject(Object o, long offset, Object x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Object);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Object);
     }
 
     public void putObjectVolatile(Object o, long offset, Object x) {
@@ -68,7 +68,7 @@
     }
 
     public int getInt(Object o, long offset) {
-        Integer value = UnsafeLoadNode.load(o, 0, offset, CiKind.Int);
+        Integer value = UnsafeLoadNode.load(o, 0, offset, RiKind.Int);
         return value;
     }
 
@@ -80,7 +80,7 @@
     }
 
     public void putInt(Object o, long offset, int x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Int);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Int);
     }
 
     public void putIntVolatile(Object o, long offset, int x) {
@@ -91,7 +91,7 @@
 
     public boolean getBoolean(Object o, long offset) {
         @JavacBug(id = 6995200)
-        Boolean result = UnsafeLoadNode.load(o, 0, offset, CiKind.Boolean);
+        Boolean result = UnsafeLoadNode.load(o, 0, offset, RiKind.Boolean);
         return result;
     }
 
@@ -103,7 +103,7 @@
     }
 
     public void putBoolean(Object o, long offset, boolean x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Boolean);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Boolean);
     }
 
     public void putBooleanVolatile(Object o, long offset, boolean x) {
@@ -114,7 +114,7 @@
 
     public byte getByte(Object o, long offset) {
         @JavacBug(id = 6995200)
-        Byte result = UnsafeLoadNode.load(o, 0, offset, CiKind.Byte);
+        Byte result = UnsafeLoadNode.load(o, 0, offset, RiKind.Byte);
         return result;
     }
 
@@ -126,7 +126,7 @@
     }
 
     public void putByte(Object o, long offset, byte x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Byte);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Byte);
     }
 
     public void putByteVolatile(Object o, long offset, byte x) {
@@ -137,7 +137,7 @@
 
     public short getShort(Object o, long offset) {
         @JavacBug(id = 6995200)
-        Short result = UnsafeLoadNode.load(o, 0, offset, CiKind.Short);
+        Short result = UnsafeLoadNode.load(o, 0, offset, RiKind.Short);
         return result;
     }
 
@@ -149,7 +149,7 @@
     }
 
     public void putShort(Object o, long offset, short x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Short);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Short);
     }
 
     public void putShortVolatile(Object o, long offset, short x) {
@@ -160,7 +160,7 @@
 
     public char getChar(Object o, long offset) {
         @JavacBug(id = 6995200)
-        Character result = UnsafeLoadNode.load(o, 0, offset, CiKind.Char);
+        Character result = UnsafeLoadNode.load(o, 0, offset, RiKind.Char);
         return result;
     }
 
@@ -172,7 +172,7 @@
     }
 
     public void putChar(Object o, long offset, char x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Char);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Char);
     }
 
     public void putCharVolatile(Object o, long offset, char x) {
@@ -183,7 +183,7 @@
 
     public long getLong(Object o, long offset) {
         @JavacBug(id = 6995200)
-        Long result = UnsafeLoadNode.load(o, 0, offset, CiKind.Long);
+        Long result = UnsafeLoadNode.load(o, 0, offset, RiKind.Long);
         return result;
     }
 
@@ -195,7 +195,7 @@
     }
 
     public void putLong(Object o, long offset, long x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Long);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Long);
     }
 
     public void putLongVolatile(Object o, long offset, long x) {
@@ -206,7 +206,7 @@
 
     public float getFloat(Object o, long offset) {
         @JavacBug(id = 6995200)
-        Float result = UnsafeLoadNode.load(o, 0, offset, CiKind.Float);
+        Float result = UnsafeLoadNode.load(o, 0, offset, RiKind.Float);
         return result;
     }
 
@@ -218,7 +218,7 @@
     }
 
     public void putFloat(Object o, long offset, float x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Float);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Float);
     }
 
     public void putFloatVolatile(Object o, long offset, float x) {
@@ -229,7 +229,7 @@
 
     public double getDouble(Object o, long offset) {
         @JavacBug(id = 6995200)
-        Double result = UnsafeLoadNode.load(o, 0, offset, CiKind.Double);
+        Double result = UnsafeLoadNode.load(o, 0, offset, RiKind.Double);
         return result;
     }
 
@@ -241,7 +241,7 @@
     }
 
     public void putDouble(Object o, long offset, double x) {
-        UnsafeStoreNode.store(o, 0, offset, x, CiKind.Double);
+        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Double);
     }
 
     public void putDoubleVolatile(Object o, long offset, double x) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java	Thu Jun 07 17:08:33 2012 +0200
@@ -69,8 +69,8 @@
             public void visitExceptionObject(ExceptionObjectNode x) {
                 HotSpotVMConfig config = ((HotSpotRuntime) runtime).config;
                 CiRegisterValue thread = r15.asValue();
-                CiAddress exceptionAddress = new CiAddress(CiKind.Object, thread, config.threadExceptionOopOffset);
-                CiAddress pcAddress = new CiAddress(CiKind.Long, thread, config.threadExceptionPcOffset);
+                CiAddress exceptionAddress = new CiAddress(RiKind.Object, thread, config.threadExceptionOopOffset);
+                CiAddress pcAddress = new CiAddress(RiKind.Long, thread, config.threadExceptionPcOffset);
                 CiValue exception = emitLoad(exceptionAddress, false);
                 emitStore(exceptionAddress, RiConstant.NULL_OBJECT, false);
                 emitStore(pcAddress, RiConstant.LONG_0, false);
@@ -105,7 +105,7 @@
             if (GraalOptions.ZapStackOnMethodEntry) {
                 final int intSize = 4;
                 for (int i = 0; i < frameSize / intSize; ++i) {
-                    asm.movl(new CiAddress(CiKind.Int, rsp.asValue(), i * intSize), 0xC1C1C1C1);
+                    asm.movl(new CiAddress(RiKind.Int, rsp.asValue(), i * intSize), 0xC1C1C1C1);
                 }
             }
             CiCalleeSaveLayout csl = frameMap.registerConfig.getCalleeSaveLayout();
@@ -188,7 +188,7 @@
         boolean isStatic = Modifier.isStatic(method.accessFlags());
         if (!isStatic) {
             tasm.recordMark(MARK_UNVERIFIED_ENTRY);
-            CiCallingConvention cc = regConfig.getCallingConvention(JavaCallee, new CiKind[] {CiKind.Object}, target, false);
+            CiCallingConvention cc = regConfig.getCallingConvention(JavaCallee, new RiKind[] {RiKind.Object}, target, false);
             CiRegister inlineCacheKlass = rax; // see definition of IC_Klass in c1_LIRAssembler_x86.cpp
             CiRegister receiver = asRegister(cc.locations[0]);
             CiAddress src = new CiAddress(target.wordKind, receiver.asValue(), config.hubOffset);
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java	Thu Jun 07 17:08:33 2012 +0200
@@ -71,9 +71,9 @@
             if (eagerResolve) {
                 type = type.resolve(accessingClass);
             }
-            CiKind kind = type.kind(false).stackKind();
+            RiKind kind = type.kind(false).stackKind();
             Stamp stamp;
-            if (kind == CiKind.Object && type instanceof RiResolvedType) {
+            if (kind == RiKind.Object && type instanceof RiResolvedType) {
                 stamp = StampFactory.declared((RiResolvedType) type);
             } else {
                 stamp = StampFactory.forKind(kind);
@@ -343,14 +343,14 @@
     }
 
     /**
-     * Stores a given local variable at the specified index. If the value is a {@linkplain CiKind#isDoubleWord() double word},
+     * Stores a given local variable at the specified index. If the value is a {@linkplain RiKind#isDoubleWord() double word},
      * then the next local variable index is also overwritten.
      *
      * @param i the index at which to store
      * @param x the instruction which produces the value for the local
      */
     public void storeLocal(int i, ValueNode x) {
-        assert x == null || x.kind() != CiKind.Void && x.kind() != CiKind.Illegal : "unexpected value: " + x;
+        assert x == null || x.kind() != RiKind.Void && x.kind() != RiKind.Illegal : "unexpected value: " + x;
         locals[i] = x;
         if (x != null && isTwoSlot(x.kind())) {
             // if this is a double word, then kill i+1
@@ -375,8 +375,8 @@
      * @param kind the type expected for this instruction
      * @param x the instruction to push onto the stack
      */
-    public void push(CiKind kind, ValueNode x) {
-        assert !x.isDeleted() && x.kind() != CiKind.Void && x.kind() != CiKind.Illegal;
+    public void push(RiKind kind, ValueNode x) {
+        assert !x.isDeleted() && x.kind() != RiKind.Void && x.kind() != RiKind.Illegal;
         xpush(assertKind(kind, x));
         if (isTwoSlot(kind)) {
             xpush(null);
@@ -388,7 +388,7 @@
      * @param x the instruction to push onto the stack
      */
     public void xpush(ValueNode x) {
-        assert x == null || (!x.isDeleted() && x.kind() != CiKind.Void && x.kind() != CiKind.Illegal);
+        assert x == null || (!x.isDeleted() && x.kind() != RiKind.Void && x.kind() != RiKind.Illegal);
         stack[stackSize++] = x;
     }
 
@@ -443,8 +443,8 @@
         xpush(null);
     }
 
-    public void pushReturn(CiKind kind, ValueNode x) {
-        if (kind != CiKind.Void) {
+    public void pushReturn(RiKind kind, ValueNode x) {
+        if (kind != RiKind.Void) {
             push(kind.stackKind(), x);
         }
     }
@@ -454,8 +454,8 @@
      * @param kind the expected type
      * @return the instruction on the top of the stack
      */
-    public ValueNode pop(CiKind kind) {
-        assert kind != CiKind.Void;
+    public ValueNode pop(RiKind kind) {
+        assert kind != RiKind.Void;
         if (isTwoSlot(kind)) {
             xpop();
         }
@@ -567,13 +567,13 @@
         stackSize = 0;
     }
 
-    public static int stackSlots(CiKind kind) {
+    public static int stackSlots(RiKind kind) {
         return isTwoSlot(kind) ? 2 : 1;
     }
 
-    public static boolean isTwoSlot(CiKind kind) {
-        assert kind != CiKind.Void && kind != CiKind.Illegal;
-        return kind == CiKind.Long || kind == CiKind.Double;
+    public static boolean isTwoSlot(RiKind kind) {
+        assert kind != RiKind.Void && kind != RiKind.Illegal;
+        return kind == RiKind.Long || kind == RiKind.Double;
     }
 
     public boolean contains(ValueNode value) {
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Thu Jun 07 17:08:33 2012 +0200
@@ -225,11 +225,11 @@
         return stream.currentBCI();
     }
 
-    private void loadLocal(int index, CiKind kind) {
+    private void loadLocal(int index, RiKind kind) {
         frameState.push(kind, frameState.loadLocal(index));
     }
 
-    private void storeLocal(CiKind kind, int index) {
+    private void storeLocal(RiKind kind, int index) {
         frameState.storeLocal(index, frameState.pop(kind));
     }
 
@@ -284,10 +284,10 @@
             // this is a load of class constant which might be unresolved
             RiType riType = (RiType) con;
             if (riType instanceof RiResolvedType) {
-                frameState.push(CiKind.Object, append(ConstantNode.forCiConstant(((RiResolvedType) riType).getEncoding(Representation.JavaClass), runtime, currentGraph)));
+                frameState.push(RiKind.Object, append(ConstantNode.forCiConstant(((RiResolvedType) riType).getEncoding(Representation.JavaClass), runtime, currentGraph)));
             } else {
                 append(currentGraph.add(new DeoptimizeNode(RiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
-                frameState.push(CiKind.Object, append(ConstantNode.forObject(null, runtime, currentGraph)));
+                frameState.push(RiKind.Object, append(ConstantNode.forObject(null, runtime, currentGraph)));
             }
         } else if (con instanceof RiConstant) {
             RiConstant constant = (RiConstant) con;
@@ -297,7 +297,7 @@
         }
     }
 
-    private void genLoadIndexed(CiKind kind) {
+    private void genLoadIndexed(RiKind kind) {
         emitExplicitExceptions(frameState.peek(1), frameState.peek(0));
 
         ValueNode index = frameState.ipop();
@@ -306,7 +306,7 @@
         frameState.push(kind.stackKind(), v);
     }
 
-    private void genStoreIndexed(CiKind kind) {
+    private void genStoreIndexed(RiKind kind) {
         emitExplicitExceptions(frameState.peek(2), frameState.peek(1));
 
         ValueNode value = frameState.pop(kind.stackKind());
@@ -397,7 +397,7 @@
 
     }
 
-    private void genArithmeticOp(CiKind result, int opcode, boolean canTrap) {
+    private void genArithmeticOp(RiKind result, int opcode, boolean canTrap) {
         ValueNode y = frameState.pop(result);
         ValueNode x = frameState.pop(result);
         boolean isStrictFP = isStrict(method.accessFlags());
@@ -433,11 +433,11 @@
         frameState.push(result, result1);
     }
 
-    private void genNegateOp(CiKind kind) {
+    private void genNegateOp(RiKind kind) {
         frameState.push(kind, append(currentGraph.unique(new NegateNode(frameState.pop(kind)))));
     }
 
-    private void genShiftOp(CiKind kind, int opcode) {
+    private void genShiftOp(RiKind kind, int opcode) {
         ValueNode s = frameState.ipop();
         ValueNode x = frameState.pop(kind);
         ShiftNode v;
@@ -454,7 +454,7 @@
         frameState.push(kind, append(currentGraph.unique(v)));
     }
 
-    private void genLogicOp(CiKind kind, int opcode) {
+    private void genLogicOp(RiKind kind, int opcode) {
         ValueNode y = frameState.pop(kind);
         ValueNode x = frameState.pop(kind);
         LogicNode v;
@@ -471,7 +471,7 @@
         frameState.push(kind, append(currentGraph.unique(v)));
     }
 
-    private void genCompareOp(CiKind kind, boolean isUnorderedLess) {
+    private void genCompareOp(RiKind kind, boolean isUnorderedLess) {
         ValueNode y = frameState.pop(kind);
         ValueNode x = frameState.pop(kind);
         frameState.ipush(append(currentGraph.unique(new NormalizeCompareNode(x, y, isUnorderedLess))));
@@ -487,7 +487,7 @@
         int delta = stream().readIncrement();
         ValueNode x = frameState.loadLocal(index);
         ValueNode y = append(ConstantNode.forInt(delta, currentGraph));
-        frameState.storeLocal(index, append(currentGraph.unique(new IntegerAddNode(CiKind.Int, x, y))));
+        frameState.storeLocal(index, append(currentGraph.unique(new IntegerAddNode(RiKind.Int, x, y))));
     }
 
     private void genGoto() {
@@ -526,13 +526,13 @@
         CompareNode condition;
         assert !a.kind().isFloatOrDouble();
         if (cond == Condition.EQ || cond == Condition.NE) {
-            if (a.kind() == CiKind.Object) {
+            if (a.kind() == RiKind.Object) {
                 condition = new ObjectEqualsNode(a, b);
             } else {
                 condition = new IntegerEqualsNode(a, b);
             }
         } else {
-            assert a.kind() != CiKind.Object && !cond.isUnsigned();
+            assert a.kind() != RiKind.Object && !cond.isUnsigned();
             condition = new IntegerLessThanNode(a, b);
         }
         condition = currentGraph.unique(condition);
@@ -556,7 +556,7 @@
         ifNode(x, cond, y);
     }
 
-    private void genIfSame(CiKind kind, Condition cond) {
+    private void genIfSame(RiKind kind, Condition cond) {
         ValueNode y = frameState.pop(kind);
         ValueNode x = frameState.pop(kind);
         assert !x.isDeleted() && !y.isDeleted();
@@ -676,24 +676,24 @@
      * @param code the array type code
      * @return the kind from the array type code
      */
-    public static CiKind arrayTypeCodeToKind(int code) {
+    public static RiKind arrayTypeCodeToKind(int code) {
         // Checkstyle: stop
         switch (code) {
-            case 4:  return CiKind.Boolean;
-            case 5:  return CiKind.Char;
-            case 6:  return CiKind.Float;
-            case 7:  return CiKind.Double;
-            case 8:  return CiKind.Byte;
-            case 9:  return CiKind.Short;
-            case 10: return CiKind.Int;
-            case 11: return CiKind.Long;
+            case 4:  return RiKind.Boolean;
+            case 5:  return RiKind.Char;
+            case 6:  return RiKind.Float;
+            case 7:  return RiKind.Double;
+            case 8:  return RiKind.Byte;
+            case 9:  return RiKind.Short;
+            case 10: return RiKind.Int;
+            case 11: return RiKind.Long;
             default: throw new IllegalArgumentException("unknown array type code: " + code);
         }
         // Checkstyle: resume
     }
 
     private void genNewTypeArray(int typeCode) {
-        CiKind kind = arrayTypeCodeToKind(typeCode);
+        RiKind kind = arrayTypeCodeToKind(typeCode);
         RiResolvedType elementType = runtime.asRiType(kind);
         NewTypeArrayNode nta = currentGraph.add(new NewTypeArrayNode(frameState.ipop(), elementType));
         frameState.apush(append(nta));
@@ -731,7 +731,7 @@
     private void genGetField(RiField field) {
         emitExplicitExceptions(frameState.peek(0), null);
 
-        CiKind kind = field.kind(false);
+        RiKind kind = field.kind(false);
         ValueNode receiver = frameState.apop();
         if ((field instanceof RiResolvedField) && ((RiResolvedField) field).holder().isInitialized()) {
             LoadFieldNode load = currentGraph.add(new LoadFieldNode(receiver, (RiResolvedField) field, graphId));
@@ -829,7 +829,7 @@
             frameState.push(constantValue.kind.stackKind(), appendConstant(constantValue));
         } else {
             ValueNode container = genTypeOrDeopt(RiType.Representation.StaticFields, holder, isInitialized);
-            CiKind kind = field.kind(false);
+            RiKind kind = field.kind(false);
             if (container != null) {
                 LoadFieldNode load = currentGraph.add(new LoadFieldNode(container, (RiResolvedField) field, graphId));
                 appendOptimizedLoadField(kind, load);
@@ -865,7 +865,7 @@
         append(store);
     }
 
-    private void appendOptimizedLoadField(CiKind kind, LoadFieldNode load) {
+    private void appendOptimizedLoadField(RiKind kind, LoadFieldNode load) {
         // append the load to the instruction
         ValueNode optimized = append(load);
         frameState.push(kind.stackKind(), optimized);
@@ -919,8 +919,8 @@
     private void genInvokeDeopt(RiMethod unresolvedTarget, boolean withReceiver) {
         append(currentGraph.add(new DeoptimizeNode(RiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
         frameState.popArguments(unresolvedTarget.signature().argumentSlots(withReceiver), unresolvedTarget.signature().argumentCount(withReceiver));
-        CiKind kind = unresolvedTarget.signature().returnKind(false);
-        if (kind != CiKind.Void) {
+        RiKind kind = unresolvedTarget.signature().returnKind(false);
+        if (kind != RiKind.Void) {
             frameState.push(kind.stackKind(), append(ConstantNode.defaultForKind(kind, currentGraph)));
         }
     }
@@ -955,7 +955,7 @@
     }
 
     private void appendInvoke(InvokeKind invokeKind, RiResolvedMethod targetMethod, ValueNode[] args) {
-        CiKind resultType = targetMethod.signature().returnKind(false);
+        RiKind resultType = targetMethod.signature().returnKind(false);
         if (GraalOptions.DeoptALot) {
             DeoptimizeNode deoptimize = currentGraph.add(new DeoptimizeNode(RiDeoptAction.None, RiDeoptReason.RuntimeConstraint, graphId));
             deoptimize.setMessage("invoke " + targetMethod.name());
@@ -1020,7 +1020,7 @@
         if (successor.jsrScope.nextReturnAddress() != stream().nextBCI()) {
             throw new JsrNotSupportedBailout("unstructured control flow (internal limitation)");
         }
-        frameState.push(CiKind.Jsr, ConstantNode.forJsr(stream().nextBCI(), currentGraph));
+        frameState.push(RiKind.Jsr, ConstantNode.forJsr(stream().nextBCI(), currentGraph));
         appendGoto(createTarget(successor, frameState));
     }
 
@@ -1345,8 +1345,8 @@
         if (method.isConstructor() && method.holder().superType() == null) {
             callRegisterFinalizer();
         }
-        CiKind returnKind = method.signature().returnKind(false).stackKind();
-        ValueNode x = returnKind == CiKind.Void ? null : frameState.pop(returnKind);
+        RiKind returnKind = method.signature().returnKind(false).stackKind();
+        ValueNode x = returnKind == RiKind.Void ? null : frameState.pop(returnKind);
         assert frameState.stackSize() == 0;
 
         // TODO (gdub) remove this when FloatingRead can handle this case
@@ -1534,72 +1534,72 @@
             case LDC            : // fall through
             case LDC_W          : // fall through
             case LDC2_W         : genLoadConstant(stream.readCPI(), opcode); break;
-            case ILOAD          : loadLocal(stream.readLocalIndex(), CiKind.Int); break;
-            case LLOAD          : loadLocal(stream.readLocalIndex(), CiKind.Long); break;
-            case FLOAD          : loadLocal(stream.readLocalIndex(), CiKind.Float); break;
-            case DLOAD          : loadLocal(stream.readLocalIndex(), CiKind.Double); break;
-            case ALOAD          : loadLocal(stream.readLocalIndex(), CiKind.Object); break;
+            case ILOAD          : loadLocal(stream.readLocalIndex(), RiKind.Int); break;
+            case LLOAD          : loadLocal(stream.readLocalIndex(), RiKind.Long); break;
+            case FLOAD          : loadLocal(stream.readLocalIndex(), RiKind.Float); break;
+            case DLOAD          : loadLocal(stream.readLocalIndex(), RiKind.Double); break;
+            case ALOAD          : loadLocal(stream.readLocalIndex(), RiKind.Object); break;
             case ILOAD_0        : // fall through
             case ILOAD_1        : // fall through
             case ILOAD_2        : // fall through
-            case ILOAD_3        : loadLocal(opcode - ILOAD_0, CiKind.Int); break;
+            case ILOAD_3        : loadLocal(opcode - ILOAD_0, RiKind.Int); break;
             case LLOAD_0        : // fall through
             case LLOAD_1        : // fall through
             case LLOAD_2        : // fall through
-            case LLOAD_3        : loadLocal(opcode - LLOAD_0, CiKind.Long); break;
+            case LLOAD_3        : loadLocal(opcode - LLOAD_0, RiKind.Long); break;
             case FLOAD_0        : // fall through
             case FLOAD_1        : // fall through
             case FLOAD_2        : // fall through
-            case FLOAD_3        : loadLocal(opcode - FLOAD_0, CiKind.Float); break;
+            case FLOAD_3        : loadLocal(opcode - FLOAD_0, RiKind.Float); break;
             case DLOAD_0        : // fall through
             case DLOAD_1        : // fall through
             case DLOAD_2        : // fall through
-            case DLOAD_3        : loadLocal(opcode - DLOAD_0, CiKind.Double); break;
+            case DLOAD_3        : loadLocal(opcode - DLOAD_0, RiKind.Double); break;
             case ALOAD_0        : // fall through
             case ALOAD_1        : // fall through
             case ALOAD_2        : // fall through
-            case ALOAD_3        : loadLocal(opcode - ALOAD_0, CiKind.Object); break;
-            case IALOAD         : genLoadIndexed(CiKind.Int   ); break;
-            case LALOAD         : genLoadIndexed(CiKind.Long  ); break;
-            case FALOAD         : genLoadIndexed(CiKind.Float ); break;
-            case DALOAD         : genLoadIndexed(CiKind.Double); break;
-            case AALOAD         : genLoadIndexed(CiKind.Object); break;
-            case BALOAD         : genLoadIndexed(CiKind.Byte  ); break;
-            case CALOAD         : genLoadIndexed(CiKind.Char  ); break;
-            case SALOAD         : genLoadIndexed(CiKind.Short ); break;
-            case ISTORE         : storeLocal(CiKind.Int, stream.readLocalIndex()); break;
-            case LSTORE         : storeLocal(CiKind.Long, stream.readLocalIndex()); break;
-            case FSTORE         : storeLocal(CiKind.Float, stream.readLocalIndex()); break;
-            case DSTORE         : storeLocal(CiKind.Double, stream.readLocalIndex()); break;
-            case ASTORE         : storeLocal(CiKind.Object, stream.readLocalIndex()); break;
+            case ALOAD_3        : loadLocal(opcode - ALOAD_0, RiKind.Object); break;
+            case IALOAD         : genLoadIndexed(RiKind.Int   ); break;
+            case LALOAD         : genLoadIndexed(RiKind.Long  ); break;
+            case FALOAD         : genLoadIndexed(RiKind.Float ); break;
+            case DALOAD         : genLoadIndexed(RiKind.Double); break;
+            case AALOAD         : genLoadIndexed(RiKind.Object); break;
+            case BALOAD         : genLoadIndexed(RiKind.Byte  ); break;
+            case CALOAD         : genLoadIndexed(RiKind.Char  ); break;
+            case SALOAD         : genLoadIndexed(RiKind.Short ); break;
+            case ISTORE         : storeLocal(RiKind.Int, stream.readLocalIndex()); break;
+            case LSTORE         : storeLocal(RiKind.Long, stream.readLocalIndex()); break;
+            case FSTORE         : storeLocal(RiKind.Float, stream.readLocalIndex()); break;
+            case DSTORE         : storeLocal(RiKind.Double, stream.readLocalIndex()); break;
+            case ASTORE         : storeLocal(RiKind.Object, stream.readLocalIndex()); break;
             case ISTORE_0       : // fall through
             case ISTORE_1       : // fall through
             case ISTORE_2       : // fall through
-            case ISTORE_3       : storeLocal(CiKind.Int, opcode - ISTORE_0); break;
+            case ISTORE_3       : storeLocal(RiKind.Int, opcode - ISTORE_0); break;
             case LSTORE_0       : // fall through
             case LSTORE_1       : // fall through
             case LSTORE_2       : // fall through
-            case LSTORE_3       : storeLocal(CiKind.Long, opcode - LSTORE_0); break;
+            case LSTORE_3       : storeLocal(RiKind.Long, opcode - LSTORE_0); break;
             case FSTORE_0       : // fall through
             case FSTORE_1       : // fall through
             case FSTORE_2       : // fall through
-            case FSTORE_3       : storeLocal(CiKind.Float, opcode - FSTORE_0); break;
+            case FSTORE_3       : storeLocal(RiKind.Float, opcode - FSTORE_0); break;
             case DSTORE_0       : // fall through
             case DSTORE_1       : // fall through
             case DSTORE_2       : // fall through
-            case DSTORE_3       : storeLocal(CiKind.Double, opcode - DSTORE_0); break;
+            case DSTORE_3       : storeLocal(RiKind.Double, opcode - DSTORE_0); break;
             case ASTORE_0       : // fall through
             case ASTORE_1       : // fall through
             case ASTORE_2       : // fall through
-            case ASTORE_3       : storeLocal(CiKind.Object, opcode - ASTORE_0); break;
-            case IASTORE        : genStoreIndexed(CiKind.Int   ); break;
-            case LASTORE        : genStoreIndexed(CiKind.Long  ); break;
-            case FASTORE        : genStoreIndexed(CiKind.Float ); break;
-            case DASTORE        : genStoreIndexed(CiKind.Double); break;
-            case AASTORE        : genStoreIndexed(CiKind.Object); break;
-            case BASTORE        : genStoreIndexed(CiKind.Byte  ); break;
-            case CASTORE        : genStoreIndexed(CiKind.Char  ); break;
-            case SASTORE        : genStoreIndexed(CiKind.Short ); break;
+            case ASTORE_3       : storeLocal(RiKind.Object, opcode - ASTORE_0); break;
+            case IASTORE        : genStoreIndexed(RiKind.Int   ); break;
+            case LASTORE        : genStoreIndexed(RiKind.Long  ); break;
+            case FASTORE        : genStoreIndexed(RiKind.Float ); break;
+            case DASTORE        : genStoreIndexed(RiKind.Double); break;
+            case AASTORE        : genStoreIndexed(RiKind.Object); break;
+            case BASTORE        : genStoreIndexed(RiKind.Byte  ); break;
+            case CASTORE        : genStoreIndexed(RiKind.Char  ); break;
+            case SASTORE        : genStoreIndexed(RiKind.Short ); break;
             case POP            : // fall through
             case POP2           : // fall through
             case DUP            : // fall through
@@ -1611,40 +1611,40 @@
             case SWAP           : stackOp(opcode); break;
             case IADD           : // fall through
             case ISUB           : // fall through
-            case IMUL           : genArithmeticOp(CiKind.Int, opcode, false); break;
+            case IMUL           : genArithmeticOp(RiKind.Int, opcode, false); break;
             case IDIV           : // fall through
-            case IREM           : genArithmeticOp(CiKind.Int, opcode, true); break;
+            case IREM           : genArithmeticOp(RiKind.Int, opcode, true); break;
             case LADD           : // fall through
             case LSUB           : // fall through
-            case LMUL           : genArithmeticOp(CiKind.Long, opcode, false); break;
+            case LMUL           : genArithmeticOp(RiKind.Long, opcode, false); break;
             case LDIV           : // fall through
-            case LREM           : genArithmeticOp(CiKind.Long, opcode, true); break;
+            case LREM           : genArithmeticOp(RiKind.Long, opcode, true); break;
             case FADD           : // fall through
             case FSUB           : // fall through
             case FMUL           : // fall through
             case FDIV           : // fall through
-            case FREM           : genArithmeticOp(CiKind.Float, opcode, false); break;
+            case FREM           : genArithmeticOp(RiKind.Float, opcode, false); break;
             case DADD           : // fall through
             case DSUB           : // fall through
             case DMUL           : // fall through
             case DDIV           : // fall through
-            case DREM           : genArithmeticOp(CiKind.Double, opcode, false); break;
-            case INEG           : genNegateOp(CiKind.Int); break;
-            case LNEG           : genNegateOp(CiKind.Long); break;
-            case FNEG           : genNegateOp(CiKind.Float); break;
-            case DNEG           : genNegateOp(CiKind.Double); break;
+            case DREM           : genArithmeticOp(RiKind.Double, opcode, false); break;
+            case INEG           : genNegateOp(RiKind.Int); break;
+            case LNEG           : genNegateOp(RiKind.Long); break;
+            case FNEG           : genNegateOp(RiKind.Float); break;
+            case DNEG           : genNegateOp(RiKind.Double); break;
             case ISHL           : // fall through
             case ISHR           : // fall through
-            case IUSHR          : genShiftOp(CiKind.Int, opcode); break;
+            case IUSHR          : genShiftOp(RiKind.Int, opcode); break;
             case IAND           : // fall through
             case IOR            : // fall through
-            case IXOR           : genLogicOp(CiKind.Int, opcode); break;
+            case IXOR           : genLogicOp(RiKind.Int, opcode); break;
             case LSHL           : // fall through
             case LSHR           : // fall through
-            case LUSHR          : genShiftOp(CiKind.Long, opcode); break;
+            case LUSHR          : genShiftOp(RiKind.Long, opcode); break;
             case LAND           : // fall through
             case LOR            : // fall through
-            case LXOR           : genLogicOp(CiKind.Long, opcode); break;
+            case LXOR           : genLogicOp(RiKind.Long, opcode); break;
             case IINC           : genIncrement(); break;
             case I2L            : genConvert(ConvertNode.Op.I2L); break;
             case I2F            : genConvert(ConvertNode.Op.I2F); break;
@@ -1661,25 +1661,25 @@
             case I2B            : genConvert(ConvertNode.Op.I2B); break;
             case I2C            : genConvert(ConvertNode.Op.I2C); break;
             case I2S            : genConvert(ConvertNode.Op.I2S); break;
-            case LCMP           : genCompareOp(CiKind.Long, false); break;
-            case FCMPL          : genCompareOp(CiKind.Float, true); break;
-            case FCMPG          : genCompareOp(CiKind.Float, false); break;
-            case DCMPL          : genCompareOp(CiKind.Double, true); break;
-            case DCMPG          : genCompareOp(CiKind.Double, false); break;
+            case LCMP           : genCompareOp(RiKind.Long, false); break;
+            case FCMPL          : genCompareOp(RiKind.Float, true); break;
+            case FCMPG          : genCompareOp(RiKind.Float, false); break;
+            case DCMPL          : genCompareOp(RiKind.Double, true); break;
+            case DCMPG          : genCompareOp(RiKind.Double, false); break;
             case IFEQ           : genIfZero(Condition.EQ); break;
             case IFNE           : genIfZero(Condition.NE); break;
             case IFLT           : genIfZero(Condition.LT); break;
             case IFGE           : genIfZero(Condition.GE); break;
             case IFGT           : genIfZero(Condition.GT); break;
             case IFLE           : genIfZero(Condition.LE); break;
-            case IF_ICMPEQ      : genIfSame(CiKind.Int, Condition.EQ); break;
-            case IF_ICMPNE      : genIfSame(CiKind.Int, Condition.NE); break;
-            case IF_ICMPLT      : genIfSame(CiKind.Int, Condition.LT); break;
-            case IF_ICMPGE      : genIfSame(CiKind.Int, Condition.GE); break;
-            case IF_ICMPGT      : genIfSame(CiKind.Int, Condition.GT); break;
-            case IF_ICMPLE      : genIfSame(CiKind.Int, Condition.LE); break;
-            case IF_ACMPEQ      : genIfSame(CiKind.Object, Condition.EQ); break;
-            case IF_ACMPNE      : genIfSame(CiKind.Object, Condition.NE); break;
+            case IF_ICMPEQ      : genIfSame(RiKind.Int, Condition.EQ); break;
+            case IF_ICMPNE      : genIfSame(RiKind.Int, Condition.NE); break;
+            case IF_ICMPLT      : genIfSame(RiKind.Int, Condition.LT); break;
+            case IF_ICMPGE      : genIfSame(RiKind.Int, Condition.GE); break;
+            case IF_ICMPGT      : genIfSame(RiKind.Int, Condition.GT); break;
+            case IF_ICMPLE      : genIfSame(RiKind.Int, Condition.LE); break;
+            case IF_ACMPEQ      : genIfSame(RiKind.Object, Condition.EQ); break;
+            case IF_ACMPNE      : genIfSame(RiKind.Object, Condition.NE); break;
             case GOTO           : genGoto(); break;
             case JSR            : genJsr(stream.readBranchDest()); break;
             case RET            : genRet(stream.readLocalIndex()); break;
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java	Thu Jun 07 17:08:33 2012 +0200
@@ -254,7 +254,7 @@
             assert isConstant(y) || asRegister(y) == AMD64.rcx;
             assert differentRegisters(result, y) || sameRegister(x, y);
             verifyKind((AMD64Arithmetic) code, result, x, x);
-            assert y.kind.stackKind() == CiKind.Int;
+            assert y.kind.stackKind() == RiKind.Int;
         }
     }
 
@@ -557,9 +557,9 @@
 
 
     private static void verifyKind(AMD64Arithmetic opcode, CiValue result, CiValue x, CiValue y) {
-        assert (opcode.name().startsWith("I") && result.kind == CiKind.Int && x.kind.stackKind() == CiKind.Int && y.kind.stackKind() == CiKind.Int)
-            || (opcode.name().startsWith("L") && result.kind == CiKind.Long && x.kind == CiKind.Long && y.kind == CiKind.Long)
-            || (opcode.name().startsWith("F") && result.kind == CiKind.Float && x.kind == CiKind.Float && y.kind == CiKind.Float)
-            || (opcode.name().startsWith("D") && result.kind == CiKind.Double && x.kind == CiKind.Double && y.kind == CiKind.Double);
+        assert (opcode.name().startsWith("I") && result.kind == RiKind.Int && x.kind.stackKind() == RiKind.Int && y.kind.stackKind() == RiKind.Int)
+            || (opcode.name().startsWith("L") && result.kind == RiKind.Long && x.kind == RiKind.Long && y.kind == RiKind.Long)
+            || (opcode.name().startsWith("F") && result.kind == RiKind.Float && x.kind == RiKind.Float && y.kind == RiKind.Float)
+            || (opcode.name().startsWith("D") && result.kind == RiKind.Double && x.kind == RiKind.Double && y.kind == RiKind.Double);
     }
 }
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java	Thu Jun 07 17:08:33 2012 +0200
@@ -64,12 +64,12 @@
             CiValue y = input(1);
 
             super.verify();
-            assert (name().startsWith("I") && x.kind == CiKind.Int && y.kind.stackKind() == CiKind.Int)
-                || (name().startsWith("I") && x.kind == CiKind.Jsr && y.kind == CiKind.Jsr)
-                || (name().startsWith("L") && x.kind == CiKind.Long && y.kind == CiKind.Long)
-                || (name().startsWith("A") && x.kind == CiKind.Object && y.kind == CiKind.Object)
-                || (name().startsWith("F") && x.kind == CiKind.Float && y.kind == CiKind.Float)
-                || (name().startsWith("D") && x.kind == CiKind.Double && y.kind == CiKind.Double);
+            assert (name().startsWith("I") && x.kind == RiKind.Int && y.kind.stackKind() == RiKind.Int)
+                || (name().startsWith("I") && x.kind == RiKind.Jsr && y.kind == RiKind.Jsr)
+                || (name().startsWith("L") && x.kind == RiKind.Long && y.kind == RiKind.Long)
+                || (name().startsWith("A") && x.kind == RiKind.Object && y.kind == RiKind.Object)
+                || (name().startsWith("F") && x.kind == RiKind.Float && y.kind == RiKind.Float)
+                || (name().startsWith("D") && x.kind == RiKind.Double && y.kind == RiKind.Double);
         }
     }
 
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java	Thu Jun 07 17:08:33 2012 +0200
@@ -258,7 +258,7 @@
         int afterLea = buf.position();
 
         // Load jump table entry into scratch and jump to it
-        masm.movslq(value, new CiAddress(CiKind.Int, scratch.asValue(), value.asValue(), Scale.Times4, 0));
+        masm.movslq(value, new CiAddress(RiKind.Int, scratch.asValue(), value.asValue(), Scale.Times4, 0));
         masm.addq(scratch, value);
         masm.jmp(scratch);
 
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Thu Jun 07 17:08:33 2012 +0200
@@ -241,7 +241,7 @@
         outgoingSize = Math.max(outgoingSize, argsSize);
     }
 
-    private CiStackSlot getSlot(CiKind kind, int additionalOffset) {
+    private CiStackSlot getSlot(RiKind kind, int additionalOffset) {
         return CiStackSlot.get(kind, -spillSize + additionalOffset, true);
     }
 
@@ -251,7 +251,7 @@
      * @param kind The kind of the spill slot to be reserved.
      * @return A spill slot denoting the reserved memory area.
      */
-    public CiStackSlot allocateSpillSlot(CiKind kind) {
+    public CiStackSlot allocateSpillSlot(RiKind kind) {
         assert frameSize == -1 : "frame size must not yet be fixed";
         int size = target.sizeInBytes(kind);
         spillSize = NumUtil.roundUp(spillSize + size, size);
@@ -276,10 +276,10 @@
 
         if (refs) {
             assert size % target.wordSize == 0;
-            CiStackSlot result = getSlot(CiKind.Object, 0);
+            CiStackSlot result = getSlot(RiKind.Object, 0);
             objectStackBlocks.add(result);
             for (int i = target.wordSize; i < size; i += target.wordSize) {
-                objectStackBlocks.add(getSlot(CiKind.Object, i));
+                objectStackBlocks.add(getSlot(RiKind.Object, i));
             }
             return result;
 
@@ -324,7 +324,7 @@
      * @param frameRefMap A frame reference map, as created by {@link #initFrameRefMap()}.
      */
     public void setReference(CiValue location, CiBitMap registerRefMap, CiBitMap frameRefMap) {
-        if (location.kind == CiKind.Object) {
+        if (location.kind == RiKind.Object) {
             if (isRegister(location)) {
                 assert registerRefMap.size() == target.arch.registerReferenceMapBitCount;
                 registerRefMap.set(asRegister(location).number);
@@ -348,7 +348,7 @@
      * @param frameRefMap A frame reference map, as created by {@link #initFrameRefMap()}.
      */
     public void clearReference(CiValue location, CiBitMap registerRefMap, CiBitMap frameRefMap) {
-        if (location.kind == CiKind.Object) {
+        if (location.kind == RiKind.Object) {
             if (location instanceof CiRegisterValue) {
                 assert registerRefMap.size() == target.arch.registerReferenceMapBitCount;
                 registerRefMap.clear(asRegister(location).number);
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java	Thu Jun 07 17:08:33 2012 +0200
@@ -46,7 +46,7 @@
      * @param kind
      * @param index
      */
-    public Variable(CiKind kind, int index, CiRegister.RegisterFlag flag) {
+    public Variable(RiKind kind, int index, CiRegister.RegisterFlag flag) {
         super(kind);
         assert kind == kind.stackKind() : "Variables can be only created for stack kinds";
         assert index >= 0;
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java	Thu Jun 07 17:08:33 2012 +0200
@@ -220,7 +220,7 @@
      * including long constants that fit into the 32-bit range.
      */
     public int asIntConst(CiValue value) {
-        assert (value.kind.stackKind() == CiKind.Int || value.kind == CiKind.Jsr || value.kind == CiKind.Long) && isConstant(value);
+        assert (value.kind.stackKind() == RiKind.Int || value.kind == RiKind.Jsr || value.kind == RiKind.Long) && isConstant(value);
         long c = ((RiConstant) value).asLong();
         if (!(NumUtil.isInt(c))) {
             throw GraalInternalError.shouldNotReachHere();
@@ -236,7 +236,7 @@
     }
 
     public CiAddress asFloatConstRef(CiValue value, int alignment) {
-        assert value.kind == CiKind.Float && isConstant(value);
+        assert value.kind == RiKind.Float && isConstant(value);
         return recordDataReferenceInCode((RiConstant) value, alignment);
     }
 
@@ -248,7 +248,7 @@
     }
 
     public CiAddress asDoubleConstRef(CiValue value, int alignment) {
-        assert value.kind == CiKind.Double && isConstant(value);
+        assert value.kind == RiKind.Double && isConstant(value);
         return recordDataReferenceInCode((RiConstant) value, alignment);
     }
 
@@ -256,32 +256,32 @@
      * Returns the address of a long constant that is embedded as a data references into the code.
      */
     public CiAddress asLongConstRef(CiValue value) {
-        assert value.kind == CiKind.Long && isConstant(value);
+        assert value.kind == RiKind.Long && isConstant(value);
         return recordDataReferenceInCode((RiConstant) value, 8);
     }
 
     public CiAddress asIntAddr(CiValue value) {
-        assert value.kind == CiKind.Int;
+        assert value.kind == RiKind.Int;
         return asAddress(value);
     }
 
     public CiAddress asLongAddr(CiValue value) {
-        assert value.kind == CiKind.Long;
+        assert value.kind == RiKind.Long;
         return asAddress(value);
     }
 
     public CiAddress asObjectAddr(CiValue value) {
-        assert value.kind == CiKind.Object;
+        assert value.kind == RiKind.Object;
         return asAddress(value);
     }
 
     public CiAddress asFloatAddr(CiValue value) {
-        assert value.kind == CiKind.Float;
+        assert value.kind == RiKind.Float;
         return asAddress(value);
     }
 
     public CiAddress asDoubleAddr(CiValue value) {
-        assert value.kind == CiKind.Double;
+        assert value.kind == RiKind.Double;
         return asAddress(value);
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -42,7 +42,7 @@
 
     public abstract RiType returnType();
 
-    public abstract CiKind returnKind();
+    public abstract RiKind returnKind();
 
     @Override
     public void generate(LIRGeneratorTool gen) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -66,7 +66,7 @@
     }
 
     public static ConstantNode forCiConstant(RiConstant constant, RiRuntime runtime, Graph graph) {
-        if (constant.kind == CiKind.Object) {
+        if (constant.kind == RiKind.Object) {
             return graph.unique(new ConstantNode(constant, runtime));
         } else {
             return graph.unique(new ConstantNode(constant));
@@ -173,7 +173,7 @@
         return graph.unique(new ConstantNode(RiConstant.forObject(o), runtime));
     }
 
-    public static ConstantNode forIntegerKind(CiKind kind, long value, Graph graph) {
+    public static ConstantNode forIntegerKind(RiKind kind, long value, Graph graph) {
         switch (kind) {
             case Byte:
             case Short:
@@ -186,7 +186,7 @@
         }
     }
 
-    public static ConstantNode forFloatingKind(CiKind kind, double value, Graph graph) {
+    public static ConstantNode forFloatingKind(RiKind kind, double value, Graph graph) {
         switch (kind) {
             case Float:
                 return ConstantNode.forFloat((float) value, graph);
@@ -197,7 +197,7 @@
         }
     }
 
-    public static ConstantNode defaultForKind(CiKind kind, Graph graph) {
+    public static ConstantNode defaultForKind(RiKind kind, Graph graph) {
         switch(kind) {
             case Boolean:
                 return ConstantNode.forBoolean(false, graph);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java	Thu Jun 07 17:08:33 2012 +0200
@@ -208,9 +208,9 @@
      * values in pushedValues pushed on the stack. The pushedValues are expected to be in slot encoding: a long
      * or double is followed by a null slot.
      */
-    public FrameState duplicateModified(int newBci, boolean newRethrowException, CiKind popKind, ValueNode... pushedValues) {
+    public FrameState duplicateModified(int newBci, boolean newRethrowException, RiKind popKind, ValueNode... pushedValues) {
         int popSlots = 0;
-        if (popKind != CiKind.Void) {
+        if (popKind != RiKind.Void) {
             if (stackAt(stackSize() - 1) == null) {
                 popSlots = 2;
             } else {
@@ -344,7 +344,7 @@
     public boolean verify() {
         for (ValueNode value : values) {
             assert assertTrue(value == null || !value.isDeleted(), "frame state must not contain deleted nodes");
-            assert assertTrue(value == null || value instanceof VirtualObjectNode || (value.kind() != CiKind.Void && value.kind() != CiKind.Illegal), "unexpected value: %s", value);
+            assert assertTrue(value == null || value instanceof VirtualObjectNode || (value.kind() != RiKind.Void && value.kind() != RiKind.Illegal), "unexpected value: %s", value);
         }
         return super.verify();
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -135,7 +135,7 @@
                             if (trueValue.kind() != falseValue.kind()) {
                                 return;
                             }
-                            if (trueValue.kind() != CiKind.Int && trueValue.kind() != CiKind.Long) {
+                            if (trueValue.kind() != RiKind.Int && trueValue.kind() != RiKind.Long) {
                                 return;
                             }
                             if (trueValue.isConstant() && falseValue.isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -141,7 +141,7 @@
             stateSplit.setStateAfter(stateAfter);
         }
         if (node == null) {
-            assert kind() == CiKind.Void && usages().isEmpty();
+            assert kind() == RiKind.Void && usages().isEmpty();
             ((StructuredGraph) graph()).removeFixed(this);
         } else {
             if (node instanceof FixedWithNextNode) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -182,7 +182,7 @@
             stateSplit.setStateAfter(state);
         }
         if (node == null) {
-            assert kind() == CiKind.Void && usages().isEmpty();
+            assert kind() == RiKind.Void && usages().isEmpty();
             ((StructuredGraph) graph()).removeSplit(this, NORMAL_EDGE);
         } else if (node instanceof DeoptimizeNode) {
             this.replaceAtPredecessor(node);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -55,7 +55,7 @@
      * @param kind the kind of the value
      * @param merge the merge that the new phi belongs to
      */
-    public PhiNode(CiKind kind, MergeNode merge) {
+    public PhiNode(RiKind kind, MergeNode merge) {
         super(StampFactory.forKind(kind));
         this.type = PhiType.Value;
         this.merge = merge;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnwindNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnwindNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -40,7 +40,7 @@
 
     public UnwindNode(ValueNode exception) {
         super(StampFactory.forVoid());
-        assert exception == null || exception.kind() == CiKind.Object;
+        assert exception == null || exception.kind() == RiKind.Object;
         this.exception = exception;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -37,8 +37,8 @@
 public abstract class ValueNode extends ScheduledNode implements StampProvider {
 
     /**
-     * The kind of this value. This is {@link CiKind#Void} for instructions that produce no value.
-     * This kind is guaranteed to be a {@linkplain CiKind#stackKind() stack kind}.
+     * The kind of this value. This is {@link RiKind#Void} for instructions that produce no value.
+     * This kind is guaranteed to be a {@linkplain RiKind#stackKind() stack kind}.
      */
     private Stamp stamp;
 
@@ -77,7 +77,7 @@
         this.stamp = stamp;
     }
 
-    public CiKind kind() {
+    public RiKind kind() {
         return stamp.kind();
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueUtil.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueUtil.java	Thu Jun 07 17:08:33 2012 +0200
@@ -31,8 +31,8 @@
 
 public class ValueUtil {
 
-    public static ValueNode assertKind(CiKind kind, ValueNode x) {
-        assert x != null && ((x.kind() == kind) || (x.kind() == CiKind.Jsr && kind == CiKind.Object)) : "kind=" + kind + ", value=" + x + ((x == null) ? "" : ", value.kind=" + x.kind());
+    public static ValueNode assertKind(RiKind kind, ValueNode x) {
+        assert x != null && ((x.kind() == kind) || (x.kind() == RiKind.Jsr && kind == RiKind.Object)) : "kind=" + kind + ", value=" + x + ((x == null) ? "" : ", value.kind=" + x.kind());
         return x;
     }
 
@@ -45,32 +45,32 @@
     }
 
     public static ValueNode assertLong(ValueNode x) {
-        assert x != null && (x.kind() == CiKind.Long);
+        assert x != null && (x.kind() == RiKind.Long);
         return x;
     }
 
     public static ValueNode assertJsr(ValueNode x) {
-        assert x != null && (x.kind() == CiKind.Jsr);
+        assert x != null && (x.kind() == RiKind.Jsr);
         return x;
     }
 
     public static ValueNode assertInt(ValueNode x) {
-        assert x != null && (x.kind() == CiKind.Int);
+        assert x != null && (x.kind() == RiKind.Int);
         return x;
     }
 
     public static ValueNode assertFloat(ValueNode x) {
-        assert x != null && (x.kind() == CiKind.Float);
+        assert x != null && (x.kind() == RiKind.Float);
         return x;
     }
 
     public static ValueNode assertObject(ValueNode x) {
-        assert x != null && (x.kind() == CiKind.Object);
+        assert x != null && (x.kind() == RiKind.Object);
         return x;
     }
 
     public static ValueNode assertDouble(ValueNode x) {
-        assert x != null && (x.kind() == CiKind.Double);
+        assert x != null && (x.kind() == RiKind.Double);
         return x;
     }
 
@@ -96,7 +96,7 @@
 
     /**
      * Converts a given instruction to a value string. The representation of an node as
-     * a value is formed by concatenating the {@linkplain com.oracle.max.cri.ci.CiKind#typeChar character} denoting its
+     * a value is formed by concatenating the {@linkplain com.oracle.max.cri.ci.RiKind#typeChar character} denoting its
      * {@linkplain ValueNode#kind kind} and its {@linkplain Node#id()}. For example, {@code "i13"}.
      *
      * @param value the instruction to convert to a value string. If {@code value == null}, then "-" is returned.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "&")
 public final class AndNode extends LogicNode implements Canonicalizable, LIRLowerable {
 
-    public AndNode(CiKind kind, ValueNode x, ValueNode y) {
+    public AndNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -43,14 +43,14 @@
             return graph().unique(new AndNode(kind(), y(), x()));
         }
         if (x().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() & y().asConstant().asInt(), graph());
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() & y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 int c = y().asConstant().asInt();
                 if (c == -1) {
                     return x();
@@ -59,7 +59,7 @@
                     return ConstantNode.forInt(0, graph());
                 }
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 long c = y().asConstant().asLong();
                 if (c == -1) {
                     return x();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ArithmeticNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ArithmeticNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -39,7 +39,7 @@
      * @param y the second input instruction
      * @param isStrictFP indicates this operation has strict rounding semantics
      */
-    public ArithmeticNode(CiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public ArithmeticNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
         super(kind, x, y);
         this.isStrictFP = isStrictFP;
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -48,7 +48,7 @@
      * @param x the first input instruction
      * @param y the second input instruction
      */
-    public BinaryNode(CiKind kind, ValueNode x, ValueNode y) {
+    public BinaryNode(RiKind kind, ValueNode x, ValueNode y) {
         super(StampFactory.forKind(kind));
         this.x = x;
         this.y = y;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import static com.oracle.max.cri.ci.CiKind.*;
+import static com.oracle.max.cri.ci.RiKind.*;
 
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ri.*;
@@ -56,10 +56,10 @@
         MOV_F2I(Float, Int),
         MOV_D2L(Double, Long);
 
-        public final CiKind from;
-        public final CiKind to;
+        public final RiKind from;
+        public final RiKind to;
 
-        private Op(CiKind from, CiKind to) {
+        private Op(RiKind from, RiKind to) {
             this.from = from;
             this.to = to;
         }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "+")
 public final class FloatAddNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatAddNode(CiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatAddNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
         super(kind, x, y, isStrictFP);
     }
 
@@ -40,20 +40,20 @@
             return graph().unique(new FloatAddNode(kind(), y(), x(), isStrictFP()));
         }
         if (x().isConstant()) {
-            if (kind() == CiKind.Float) {
+            if (kind() == RiKind.Float) {
                 return ConstantNode.forFloat(x().asConstant().asFloat() + y().asConstant().asFloat(), graph());
             } else {
-                assert kind() == CiKind.Double;
+                assert kind() == RiKind.Double;
                 return ConstantNode.forDouble(x().asConstant().asDouble() + y().asConstant().asDouble(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == CiKind.Float) {
+            if (kind() == RiKind.Float) {
                 float c = y().asConstant().asFloat();
                 if (c == 0.0f) {
                     return x();
                 }
             } else {
-                assert kind() == CiKind.Double;
+                assert kind() == RiKind.Double;
                 double c = y().asConstant().asDouble();
                 if (c == 0.0) {
                     return x();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatArithmeticNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatArithmeticNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -27,7 +27,7 @@
 
 public abstract class FloatArithmeticNode extends ArithmeticNode {
 
-    public FloatArithmeticNode(CiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatArithmeticNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
         super(kind, x, y, isStrictFP);
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,19 +30,19 @@
 @NodeInfo(shortName = "/")
 public final class FloatDivNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatDivNode(CiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatDivNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
         super(kind, x, y, isStrictFP);
     }
 
     @Override
     public ValueNode canonical(CanonicalizerTool tool) {
         if (x().isConstant() && y().isConstant()) {
-            if (kind() == CiKind.Float) {
+            if (kind() == RiKind.Float) {
                 if (y().asConstant().asFloat() != 0) {
                     return ConstantNode.forFloat(x().asConstant().asFloat() / y().asConstant().asFloat(), graph());
                 }
             } else {
-                assert kind() == CiKind.Double;
+                assert kind() == RiKind.Double;
                 if (y().asConstant().asDouble() != 0) {
                     return ConstantNode.forDouble(x().asConstant().asDouble() / y().asConstant().asDouble(), graph());
                 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "*")
 public final class FloatMulNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatMulNode(CiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatMulNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
         super(kind, x, y, isStrictFP);
     }
 
@@ -40,10 +40,10 @@
             return graph().unique(new FloatMulNode(kind(), y(), x(), isStrictFP()));
         }
         if (x().isConstant()) {
-            if (kind() == CiKind.Float) {
+            if (kind() == RiKind.Float) {
                 return ConstantNode.forFloat(x().asConstant().asFloat() * y().asConstant().asFloat(), graph());
             } else {
-                assert kind() == CiKind.Double;
+                assert kind() == RiKind.Double;
                 return ConstantNode.forDouble(x().asConstant().asDouble() * y().asConstant().asDouble(), graph());
             }
         }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,17 +30,17 @@
 @NodeInfo(shortName = "%")
 public final class FloatRemNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatRemNode(CiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatRemNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
         super(kind, x, y, isStrictFP);
     }
 
     @Override
     public ValueNode canonical(CanonicalizerTool tool) {
         if (x().isConstant() && y().isConstant()) {
-            if (kind() == CiKind.Float) {
+            if (kind() == RiKind.Float) {
                 return ConstantNode.forFloat(x().asConstant().asFloat() % y().asConstant().asFloat(), graph());
             } else {
-                assert kind() == CiKind.Double;
+                assert kind() == RiKind.Double;
                 return ConstantNode.forDouble(x().asConstant().asDouble() % y().asConstant().asDouble(), graph());
             }
         }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "-")
 public final class FloatSubNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatSubNode(CiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatSubNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
         super(kind, x, y, isStrictFP);
     }
 
@@ -40,21 +40,21 @@
             return ConstantNode.forFloatingKind(kind(), 0.0f, graph());
         }
         if (x().isConstant() && y().isConstant()) {
-            if (kind() == CiKind.Float) {
+            if (kind() == RiKind.Float) {
                 return ConstantNode.forFloat(x().asConstant().asFloat() - y().asConstant().asFloat(), graph());
             } else {
-                assert kind() == CiKind.Double;
+                assert kind() == RiKind.Double;
                 return ConstantNode.forDouble(x().asConstant().asDouble() - y().asConstant().asDouble(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == CiKind.Float) {
+            if (kind() == RiKind.Float) {
                 float c = y().asConstant().asFloat();
                 if (c == 0.0f) {
                     return x();
                 }
                 return graph().unique(new FloatAddNode(kind(), x(), ConstantNode.forFloat(-c, graph()), isStrictFP()));
             } else {
-                assert kind() == CiKind.Double;
+                assert kind() == RiKind.Double;
                 double c = y().asConstant().asDouble();
                 if (c == 0.0) {
                     return x();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -31,7 +31,7 @@
 @NodeInfo(shortName = "+")
 public class IntegerAddNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable, TypeFeedbackProvider {
 
-    public IntegerAddNode(CiKind kind, ValueNode x, ValueNode y) {
+    public IntegerAddNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -41,20 +41,20 @@
             return graph().unique(new IntegerAddNode(kind(), y(), x()));
         }
         if (x().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() + y().asConstant().asInt(), graph());
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() + y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 int c = y().asConstant().asInt();
                 if (c == 0) {
                     return x();
                 }
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 long c = y().asConstant().asLong();
                 if (c == 0) {
                     return x();
@@ -65,10 +65,10 @@
                 IntegerAddNode other = (IntegerAddNode) x();
                 if (other.y().isConstant()) {
                     ConstantNode sum;
-                    if (kind() == CiKind.Int) {
+                    if (kind() == RiKind.Int) {
                         sum = ConstantNode.forInt(y().asConstant().asInt() + other.y().asConstant().asInt(), graph());
                     } else {
-                        assert kind() == CiKind.Long;
+                        assert kind() == RiKind.Long;
                         sum = ConstantNode.forLong(y().asConstant().asLong() + other.y().asConstant().asLong(), graph());
                     }
                     return graph().unique(new IntegerAddNode(kind(), other.x(), sum));
@@ -79,7 +79,7 @@
     }
 
     public static boolean isIntegerAddition(ValueNode result, ValueNode a, ValueNode b) {
-        CiKind kind = result.kind();
+        RiKind kind = result.kind();
         if (kind != a.kind() || kind != b.kind() || !(kind.isInt() || kind.isLong())) {
             return false;
         }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerArithmeticNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerArithmeticNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -29,9 +29,9 @@
 
 public abstract class IntegerArithmeticNode extends ArithmeticNode {
 
-    public IntegerArithmeticNode(CiKind kind, ValueNode x, ValueNode y) {
+    public IntegerArithmeticNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y, false);
-        assert kind == CiKind.Int || kind == CiKind.Long;
+        assert kind == RiKind.Int || kind == RiKind.Long;
     }
 
     public static IntegerAddNode add(ValueNode v1, ValueNode v2) {
@@ -39,9 +39,9 @@
         Graph graph = v1.graph();
         switch(v1.kind()) {
             case Int:
-                return graph.unique(new IntegerAddNode(CiKind.Int, v1, v2));
+                return graph.unique(new IntegerAddNode(RiKind.Int, v1, v2));
             case Long:
-                return graph.unique(new IntegerAddNode(CiKind.Long, v1, v2));
+                return graph.unique(new IntegerAddNode(RiKind.Long, v1, v2));
             default:
                 throw ValueUtil.shouldNotReachHere();
         }
@@ -52,9 +52,9 @@
         Graph graph = v1.graph();
         switch(v1.kind()) {
             case Int:
-                return graph.unique(new IntegerMulNode(CiKind.Int, v1, v2));
+                return graph.unique(new IntegerMulNode(RiKind.Int, v1, v2));
             case Long:
-                return graph.unique(new IntegerMulNode(CiKind.Long, v1, v2));
+                return graph.unique(new IntegerMulNode(RiKind.Long, v1, v2));
             default:
                 throw ValueUtil.shouldNotReachHere();
         }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -39,8 +39,8 @@
      */
     public IntegerBelowThanNode(ValueNode x, ValueNode y) {
         super(x, y);
-        assert !x.kind().isFloatOrDouble() && x.kind() != CiKind.Object;
-        assert !y.kind().isFloatOrDouble() && y.kind() != CiKind.Object;
+        assert !x.kind().isFloatOrDouble() && x.kind() != RiKind.Object;
+        assert !y.kind().isFloatOrDouble() && y.kind() != RiKind.Object;
     }
 
     @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "/")
 public final class IntegerDivNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public IntegerDivNode(CiKind kind, ValueNode x, ValueNode y) {
+    public IntegerDivNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -41,10 +41,10 @@
             if (yConst == 0) {
                 return this; // this will trap, can not canonicalize
             }
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() / (int) yConst, graph());
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() / yConst, graph());
             }
         } else if (y().isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -39,8 +39,8 @@
      */
     public IntegerEqualsNode(ValueNode x, ValueNode y) {
         super(x, y);
-        assert !x.kind().isFloatOrDouble() && x.kind() != CiKind.Object;
-        assert !y.kind().isFloatOrDouble() && y.kind() != CiKind.Object;
+        assert !x.kind().isFloatOrDouble() && x.kind() != RiKind.Object;
+        assert !y.kind().isFloatOrDouble() && y.kind() != RiKind.Object;
     }
 
     @Override
@@ -55,7 +55,7 @@
 
     @Override
     protected ValueNode optimizeNormalizeCmp(RiConstant constant, NormalizeCompareNode normalizeNode, boolean mirrored) {
-        if (constant.kind == CiKind.Int && constant.asInt() == 0) {
+        if (constant.kind == RiKind.Int && constant.asInt() == 0) {
             ValueNode a = mirrored ? normalizeNode.y() : normalizeNode.x();
             ValueNode b = mirrored ? normalizeNode.x() : normalizeNode.y();
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -39,8 +39,8 @@
      */
     public IntegerLessThanNode(ValueNode x, ValueNode y) {
         super(x, y);
-        assert !x.kind().isFloatOrDouble() && x.kind() != CiKind.Object;
-        assert !y.kind().isFloatOrDouble() && y.kind() != CiKind.Object;
+        assert !x.kind().isFloatOrDouble() && x.kind() != RiKind.Object;
+        assert !y.kind().isFloatOrDouble() && y.kind() != RiKind.Object;
     }
 
     @Override
@@ -56,7 +56,7 @@
     @Override
     protected ValueNode optimizeNormalizeCmp(RiConstant constant, NormalizeCompareNode normalizeNode, boolean mirrored) {
         assert condition() == Condition.LT;
-        if (constant.kind == CiKind.Int && constant.asInt() == 0) {
+        if (constant.kind == RiKind.Int && constant.asInt() == 0) {
             ValueNode a = mirrored ? normalizeNode.y() : normalizeNode.x();
             ValueNode b = mirrored ? normalizeNode.x() : normalizeNode.y();
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "*")
 public final class IntegerMulNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public IntegerMulNode(CiKind kind, ValueNode x, ValueNode y) {
+    public IntegerMulNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -40,10 +40,10 @@
             return graph().unique(new IntegerMulNode(kind(), y(), x()));
         }
         if (x().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() * y().asConstant().asInt(), graph());
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() * y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
@@ -62,10 +62,10 @@
                 IntegerMulNode other = (IntegerMulNode) x();
                 if (other.y().isConstant()) {
                     ConstantNode sum;
-                    if (kind() == CiKind.Int) {
+                    if (kind() == RiKind.Int) {
                         sum = ConstantNode.forInt(y().asConstant().asInt() * other.y().asConstant().asInt(), graph());
                     } else {
-                        assert kind() == CiKind.Long;
+                        assert kind() == RiKind.Long;
                         sum = ConstantNode.forLong(y().asConstant().asLong() * other.y().asConstant().asLong(), graph());
                     }
                     return graph().unique(new IntegerMulNode(kind(), other.x(), sum));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerRemNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerRemNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "%")
 public final class IntegerRemNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public IntegerRemNode(CiKind kind, ValueNode x, ValueNode y) {
+    public IntegerRemNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -41,10 +41,10 @@
             if (yConst == 0) {
                 return this; // this will trap, can not canonicalize
             }
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() % (int) yConst, graph());
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() % yConst, graph());
             }
         } else if (y().isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "-")
 public final class IntegerSubNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public IntegerSubNode(CiKind kind, ValueNode x, ValueNode y) {
+    public IntegerSubNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -40,10 +40,10 @@
             return ConstantNode.forIntegerKind(kind(), 0, graph());
         }
         if (x().isConstant() && y().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() - y().asConstant().asInt(), graph());
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() - y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
@@ -51,10 +51,10 @@
             if (c == 0) {
                 return x();
             }
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return graph().unique(new IntegerAddNode(kind(), x(), ConstantNode.forInt((int) -c, graph())));
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return graph().unique(new IntegerAddNode(kind(), x(), ConstantNode.forLong(-c, graph())));
             }
         } else if (x().isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -46,7 +46,7 @@
      */
     public IsNullNode(ValueNode object) {
         super(StampFactory.condition());
-        assert object.kind() == CiKind.Object : object.kind();
+        assert object.kind() == RiKind.Object : object.kind();
         this.object = object;
     }
 
@@ -66,7 +66,7 @@
     public ValueNode canonical(CanonicalizerTool tool) {
         RiConstant constant = object().asConstant();
         if (constant != null) {
-            assert constant.kind == CiKind.Object;
+            assert constant.kind == RiKind.Object;
             return ConstantNode.forBoolean(constant.isNull(), graph());
         }
         if (object.objectStamp().nonNull()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "<<")
 public final class LeftShiftNode extends ShiftNode implements Canonicalizable, LIRLowerable {
 
-    public LeftShiftNode(CiKind kind, ValueNode x, ValueNode y) {
+    public LeftShiftNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -40,18 +40,18 @@
             int amount = y().asConstant().asInt();
             int originalAmout = amount;
             int mask;
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 mask = 0x1f;
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 mask = 0x3f;
             }
             amount &= mask;
             if (x().isConstant()) {
-                if (kind() == CiKind.Int) {
+                if (kind() == RiKind.Int) {
                     return ConstantNode.forInt(x().asConstant().asInt() << amount, graph());
                 } else {
-                    assert kind() == CiKind.Long;
+                    assert kind() == RiKind.Long;
                     return ConstantNode.forLong(x().asConstant().asLong() << amount, graph());
                 }
             }
@@ -69,10 +69,10 @@
                         }
                         return graph().unique(new LeftShiftNode(kind(), other.x(), ConstantNode.forInt(total, graph())));
                     } else if ((other instanceof RightShiftNode || other instanceof UnsignedRightShiftNode) && otherAmount == amount) {
-                        if (kind() == CiKind.Long) {
+                        if (kind() == RiKind.Long) {
                             return graph().unique(new AndNode(kind(), other.x(), ConstantNode.forLong(-1L << amount, graph())));
                         } else {
-                            assert kind() == CiKind.Int;
+                            assert kind() == RiKind.Int;
                             return graph().unique(new AndNode(kind(), other.x(), ConstantNode.forInt(-1 << amount, graph())));
                         }
                     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LogicNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LogicNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -35,7 +35,7 @@
      * @param x the first input into this node
      * @param y the second input into this node
      */
-    public LogicNode(CiKind kind, ValueNode x, ValueNode y) {
+    public LogicNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -41,7 +41,7 @@
      * @param isUnorderedLess true when an unordered floating point comparison is interpreted as less, false when greater.
      */
     public NormalizeCompareNode(ValueNode x, ValueNode y, boolean isUnorderedLess) {
-        super(CiKind.Int, x, y);
+        super(RiKind.Int, x, y);
         this.isUnorderedLess = isUnorderedLess;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -38,8 +38,8 @@
      */
     public ObjectEqualsNode(ValueNode x, ValueNode y) {
         super(x, y);
-        assert x.kind() == CiKind.Object;
-        assert y.kind() == CiKind.Object;
+        assert x.kind() == RiKind.Object;
+        assert y.kind() == RiKind.Object;
     }
 
     @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "|")
 public final class OrNode extends LogicNode implements Canonicalizable, LIRLowerable {
 
-    public OrNode(CiKind kind, ValueNode x, ValueNode y) {
+    public OrNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -43,14 +43,14 @@
             return graph().unique(new OrNode(kind(), y(), x()));
         }
         if (x().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() | y().asConstant().asInt(), graph());
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() | y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 int c = y().asConstant().asInt();
                 if (c == -1) {
                     return ConstantNode.forInt(-1, graph());
@@ -59,7 +59,7 @@
                     return x();
                 }
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 long c = y().asConstant().asLong();
                 if (c == -1) {
                     return ConstantNode.forLong(-1, graph());
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = ">>")
 public final class RightShiftNode extends ShiftNode implements Canonicalizable, LIRLowerable {
 
-    public RightShiftNode(CiKind kind, ValueNode x, ValueNode y) {
+    public RightShiftNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -40,18 +40,18 @@
             int amount = y().asConstant().asInt();
             int originalAmout = amount;
             int mask;
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 mask = 0x1f;
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 mask = 0x3f;
             }
             amount &= mask;
             if (x().isConstant()) {
-                if (kind() == CiKind.Int) {
+                if (kind() == RiKind.Int) {
                     return ConstantNode.forInt(x().asConstant().asInt() >> amount, graph());
                 } else {
-                    assert kind() == CiKind.Long;
+                    assert kind() == RiKind.Long;
                     return ConstantNode.forLong(x().asConstant().asLong() >> amount, graph());
                 }
             }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ShiftNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ShiftNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -35,7 +35,7 @@
      * @param x the first input value
      * @param s the second input value
      */
-    public ShiftNode(CiKind kind, ValueNode x, ValueNode s) {
+    public ShiftNode(RiKind kind, ValueNode x, ValueNode s) {
         super(kind, x, s);
         // TODO (cwimmer) Why check for null here - what is a shift with no left operand?
         assert x == null || x.kind() == kind;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = ">>>")
 public final class UnsignedRightShiftNode extends ShiftNode implements Canonicalizable, LIRLowerable {
 
-    public UnsignedRightShiftNode(CiKind kind, ValueNode x, ValueNode y) {
+    public UnsignedRightShiftNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -40,18 +40,18 @@
             int amount = y().asConstant().asInt();
             int originalAmout = amount;
             int mask;
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 mask = 0x1f;
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 mask = 0x3f;
             }
             amount &= mask;
             if (x().isConstant()) {
-                if (kind() == CiKind.Int) {
+                if (kind() == RiKind.Int) {
                     return ConstantNode.forInt(x().asConstant().asInt() >>> amount, graph());
                 } else {
-                    assert kind() == CiKind.Long;
+                    assert kind() == RiKind.Long;
                     return ConstantNode.forLong(x().asConstant().asLong() >>> amount, graph());
                 }
             }
@@ -69,10 +69,10 @@
                         }
                         return graph().unique(new UnsignedRightShiftNode(kind(), other.x(), ConstantNode.forInt(total, graph())));
                     } else if (other instanceof LeftShiftNode && otherAmount == amount) {
-                        if (kind() == CiKind.Long) {
+                        if (kind() == RiKind.Long) {
                             return graph().unique(new AndNode(kind(), other.x(), ConstantNode.forLong(-1L >>> amount, graph())));
                         } else {
-                            assert kind() == CiKind.Int;
+                            assert kind() == RiKind.Int;
                             return graph().unique(new AndNode(kind(), other.x(), ConstantNode.forInt(-1 >>> amount, graph())));
                         }
                     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "^")
 public final class XorNode extends LogicNode implements Canonicalizable, LIRLowerable {
 
-    public XorNode(CiKind kind, ValueNode x, ValueNode y) {
+    public XorNode(RiKind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -43,20 +43,20 @@
             return graph().unique(new XorNode(kind(), y(), x()));
         }
         if (x().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() ^ y().asConstant().asInt(), graph());
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() ^ y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == CiKind.Int) {
+            if (kind() == RiKind.Int) {
                 int c = y().asConstant().asInt();
                 if (c == 0) {
                     return x();
                 }
             } else {
-                assert kind() == CiKind.Long;
+                assert kind() == RiKind.Long;
                 long c = y().asConstant().asLong();
                 if (c == 0) {
                     return x();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -35,14 +35,14 @@
 
     @Input private ValueNode source;
     private int bci;
-    private CiKind sourceKind;
+    private RiKind sourceKind;
 
-    public BoxNode(ValueNode value, RiResolvedType type, CiKind sourceKind, int bci) {
+    public BoxNode(ValueNode value, RiResolvedType type, RiKind sourceKind, int bci) {
         super(StampFactory.exactNonNull(type));
         this.source = value;
         this.bci = bci;
         this.sourceKind = sourceKind;
-        assert value.kind() != CiKind.Object : "can only box from primitive type";
+        assert value.kind() != RiKind.Object : "can only box from primitive type";
     }
 
     public ValueNode source() {
@@ -50,7 +50,7 @@
     }
 
 
-    public CiKind getSourceKind() {
+    public RiKind getSourceKind() {
         return sourceKind;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxingMethodPool.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxingMethodPool.java	Thu Jun 07 17:08:33 2012 +0200
@@ -31,9 +31,9 @@
 
     private final Set<RiMethod> specialMethods = new HashSet<>();
     private final RiRuntime runtime;
-    private final RiResolvedMethod[] boxingMethods = new RiResolvedMethod[CiKind.values().length];
-    private final RiResolvedMethod[] unboxingMethods = new RiResolvedMethod[CiKind.values().length];
-    private final RiResolvedField[] boxFields = new RiResolvedField[CiKind.values().length];
+    private final RiResolvedMethod[] boxingMethods = new RiResolvedMethod[RiKind.values().length];
+    private final RiResolvedMethod[] unboxingMethods = new RiResolvedMethod[RiKind.values().length];
+    private final RiResolvedField[] boxFields = new RiResolvedField[RiKind.values().length];
 
     public BoxingMethodPool(RiRuntime runtime) {
         this.runtime = runtime;
@@ -42,14 +42,14 @@
 
     private void initialize() {
         try {
-            initialize(CiKind.Boolean, Boolean.class, "booleanValue");
-            initialize(CiKind.Byte, Byte.class, "byteValue");
-            initialize(CiKind.Char, Character.class, "charValue");
-            initialize(CiKind.Short, Short.class, "shortValue");
-            initialize(CiKind.Int, Integer.class, "intValue");
-            initialize(CiKind.Long, Long.class, "longValue");
-            initialize(CiKind.Float, Float.class, "floatValue");
-            initialize(CiKind.Double, Double.class, "doubleValue");
+            initialize(RiKind.Boolean, Boolean.class, "booleanValue");
+            initialize(RiKind.Byte, Byte.class, "byteValue");
+            initialize(RiKind.Char, Character.class, "charValue");
+            initialize(RiKind.Short, Short.class, "shortValue");
+            initialize(RiKind.Int, Integer.class, "intValue");
+            initialize(RiKind.Long, Long.class, "longValue");
+            initialize(RiKind.Float, Float.class, "floatValue");
+            initialize(RiKind.Double, Double.class, "doubleValue");
         } catch (SecurityException e) {
             throw new RuntimeException(e);
         } catch (NoSuchMethodException e) {
@@ -57,7 +57,7 @@
         }
     }
 
-    private void initialize(CiKind kind, Class<?> type, String unboxMethod) throws SecurityException, NoSuchMethodException {
+    private void initialize(RiKind kind, Class<?> type, String unboxMethod) throws SecurityException, NoSuchMethodException {
 
         // Get boxing method from runtime.
         RiResolvedMethod boxingMethod = runtime.getRiMethod(type.getDeclaredMethod("valueOf", kind.toJavaClass()));
@@ -81,22 +81,22 @@
     }
 
     public boolean isBoxingMethod(RiResolvedMethod method) {
-        return isSpecialMethod(method) && method.signature().returnKind(false) == CiKind.Object;
+        return isSpecialMethod(method) && method.signature().returnKind(false) == RiKind.Object;
     }
 
     public boolean isUnboxingMethod(RiResolvedMethod method) {
-        return isSpecialMethod(method) && method.signature().returnKind(false) != CiKind.Object;
+        return isSpecialMethod(method) && method.signature().returnKind(false) != RiKind.Object;
     }
 
-    public RiResolvedMethod getBoxingMethod(CiKind kind) {
+    public RiResolvedMethod getBoxingMethod(RiKind kind) {
         return boxingMethods[kind.ordinal()];
     }
 
-    public RiResolvedMethod getUnboxingMethod(CiKind kind) {
+    public RiResolvedMethod getUnboxingMethod(RiKind kind) {
         return unboxingMethods[kind.ordinal()];
     }
 
-    public RiResolvedField getBoxField(CiKind kind) {
+    public RiResolvedField getBoxField(RiKind kind) {
         return boxFields[kind.ordinal()];
     }
 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -61,11 +61,11 @@
     @Override
     public ValueNode canonical(CanonicalizerTool tool) {
         RiRuntime runtime = tool.runtime();
-        if (runtime != null && object() != null && object().isConstant() && object().kind() == CiKind.Object) {
+        if (runtime != null && object() != null && object().isConstant() && object().kind() == RiKind.Object) {
             if (this.location() == LocationNode.FINAL_LOCATION && location().getClass() == LocationNode.class) {
                 Object value = object().asConstant().asObject();
                 long displacement = location().displacement();
-                CiKind kind = location().kind();
+                RiKind kind = location().kind();
                 RiConstant constant = kind.readUnsafeConstant(value, displacement);
                 if (constant != null) {
                     return ConstantNode.forCiConstant(constant, runtime, graph());
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -46,7 +46,7 @@
         return index;
     }
 
-    public static Object getArrayLocation(CiKind elementKind) {
+    public static Object getArrayLocation(RiKind elementKind) {
         return elementKind;
     }
 
@@ -57,11 +57,11 @@
         return indexScalingEnabled;
     }
 
-    public static IndexedLocationNode create(Object identity, CiKind kind, int displacement, ValueNode index, Graph graph, boolean indexScalingEnabled) {
+    public static IndexedLocationNode create(Object identity, RiKind kind, int displacement, ValueNode index, Graph graph, boolean indexScalingEnabled) {
         return graph.unique(new IndexedLocationNode(identity, kind, index, displacement, indexScalingEnabled));
     }
 
-    private IndexedLocationNode(Object identity, CiKind kind, ValueNode index, int displacement, boolean indexScalingEnabled) {
+    private IndexedLocationNode(Object identity, RiKind kind, ValueNode index, int displacement, boolean indexScalingEnabled) {
         super(identity, kind, displacement);
         this.index = index;
         this.indexScalingEnabled = indexScalingEnabled;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LocationNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LocationNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -36,7 +36,7 @@
 public class LocationNode extends FloatingNode implements LIRLowerable, ValueNumberable {
 
     private int displacement;
-    private CiKind valueKind;
+    private RiKind valueKind;
     private Object locationIdentity;
 
     public static final Object ANY_LOCATION = new Object() {
@@ -52,7 +52,7 @@
         }
     };
 
-    public static Object getArrayLocation(CiKind elementKind) {
+    public static Object getArrayLocation(RiKind elementKind) {
         return elementKind;
     }
 
@@ -60,19 +60,19 @@
         return displacement;
     }
 
-    public static LocationNode create(Object identity, CiKind kind, int displacement, Graph graph) {
+    public static LocationNode create(Object identity, RiKind kind, int displacement, Graph graph) {
         return graph.unique(new LocationNode(identity, kind, displacement));
     }
 
-    protected LocationNode(Object identity, CiKind kind, int displacement) {
+    protected LocationNode(Object identity, RiKind kind, int displacement) {
         super(StampFactory.extension());
-        assert kind != CiKind.Illegal && kind != CiKind.Void;
+        assert kind != RiKind.Illegal && kind != RiKind.Void;
         this.displacement = displacement;
         this.valueKind = kind;
         this.locationIdentity = identity;
     }
 
-    public CiKind getValueKind() {
+    public RiKind getValueKind() {
         return valueKind;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -44,11 +44,11 @@
     @Override
     public ValueNode canonical(CanonicalizerTool tool) {
         RiRuntime runtime = tool.runtime();
-        if (runtime != null && object() != null && object().isConstant() && object().kind() == CiKind.Object) {
+        if (runtime != null && object() != null && object().isConstant() && object().kind() == RiKind.Object) {
             if (location() == LocationNode.FINAL_LOCATION && location().getClass() == LocationNode.class) {
                 Object value = object().asConstant().asObject();
                 long displacement = location().displacement();
-                CiKind kind = location().kind();
+                RiKind kind = location().kind();
                 RiConstant constant = kind.readUnsafeConstant(value, displacement);
                 if (constant != null) {
                     return ConstantNode.forCiConstant(constant, runtime, graph());
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -34,21 +34,21 @@
 public final class UnboxNode extends FixedWithNextNode implements Node.IterableNodeType, Canonicalizable {
 
     @Input private ValueNode source;
-    private CiKind destinationKind;
+    private RiKind destinationKind;
 
-    public UnboxNode(CiKind kind, ValueNode source) {
+    public UnboxNode(RiKind kind, ValueNode source) {
         super(StampFactory.forKind(kind));
         this.source = source;
         this.destinationKind = kind;
-        assert kind != CiKind.Object : "can only unbox to primitive";
-        assert source.kind() == CiKind.Object : "can only unbox objects";
+        assert kind != RiKind.Object : "can only unbox to primitive";
+        assert source.kind() == RiKind.Object : "can only unbox objects";
     }
 
     public ValueNode source() {
         return source;
     }
 
-    public CiKind destinationKind() {
+    public RiKind destinationKind() {
         return destinationKind;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -36,7 +36,7 @@
     @Input private ValueNode object;
     @Input private ValueNode offset;
     private final int displacement;
-    private final CiKind loadKind;
+    private final RiKind loadKind;
 
     public ValueNode object() {
         return object;
@@ -55,10 +55,10 @@
         this.object = object;
         this.displacement = displacement;
         this.offset = offset;
-        this.loadKind = CiKind.Object;
+        this.loadKind = RiKind.Object;
     }
 
-    public UnsafeLoadNode(ValueNode object, int displacement, ValueNode offset, CiKind kind) {
+    public UnsafeLoadNode(ValueNode object, int displacement, ValueNode offset, RiKind kind) {
         super(StampFactory.forKind(kind.stackKind()));
         this.object = object;
         this.displacement = displacement;
@@ -66,7 +66,7 @@
         this.loadKind = kind;
     }
 
-    public CiKind loadKind() {
+    public RiKind loadKind() {
         return loadKind;
     }
 
@@ -77,7 +77,7 @@
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static <T> T load(Object object, @ConstantNodeParameter int displacement, long offset, @ConstantNodeParameter CiKind kind) {
+    public static <T> T load(Object object, @ConstantNodeParameter int displacement, long offset, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException("This method may only be compiled with the Graal compiler");
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -37,7 +37,7 @@
     @Input private ValueNode offset;
     @Input private ValueNode value;
     private final int displacement;
-    private final CiKind storeKind;
+    private final RiKind storeKind;
     @Input(notDataflow = true) private FrameState stateAfter;
 
     public FrameState stateAfter() {
@@ -54,9 +54,9 @@
         return true;
     }
 
-    public UnsafeStoreNode(ValueNode object, int displacement, ValueNode offset, ValueNode value, CiKind kind) {
+    public UnsafeStoreNode(ValueNode object, int displacement, ValueNode offset, ValueNode value, RiKind kind) {
         super(StampFactory.forVoid());
-        assert kind != CiKind.Void && kind != CiKind.Illegal;
+        assert kind != RiKind.Void && kind != RiKind.Illegal;
         this.object = object;
         this.displacement = displacement;
         this.offset = offset;
@@ -80,7 +80,7 @@
         return value;
     }
 
-    public CiKind storeKind() {
+    public RiKind storeKind() {
         return storeKind;
     }
 
@@ -92,55 +92,55 @@
     // specialized on value type until boxing/unboxing is sorted out in intrinsification
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, Object value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, Object value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, boolean value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, boolean value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, byte value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, byte value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, char value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, char value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, double value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, double value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, float value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, float value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, int value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, int value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, long value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, long value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, short value, @ConstantNodeParameter CiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, short value, @ConstantNodeParameter RiKind kind) {
         throw new UnsupportedOperationException();
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessIndexedNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessIndexedNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -36,7 +36,7 @@
 public abstract class AccessIndexedNode extends AccessArrayNode implements TypeFeedbackProvider {
 
     @Input private ValueNode index;
-    private final CiKind elementType;
+    private final RiKind elementType;
     private final long leafGraphId;
 
     public ValueNode index() {
@@ -50,7 +50,7 @@
      * @param index the instruction producing the index
      * @param elementKind the type of the elements of the array
      */
-    protected AccessIndexedNode(Stamp stamp, ValueNode array, ValueNode index, CiKind elementKind, long leafGraphId) {
+    protected AccessIndexedNode(Stamp stamp, ValueNode array, ValueNode index, RiKind elementKind, long leafGraphId) {
         super(stamp, array);
         this.index = index;
         this.elementType = elementKind;
@@ -61,7 +61,7 @@
      * Gets the element type of the array.
      * @return the element type
      */
-    public CiKind elementKind() {
+    public RiKind elementKind() {
         return elementType;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -53,7 +53,7 @@
     }
 
     public CheckCastNode(ValueNode targetClassInstruction, RiResolvedType targetClass, ValueNode object, RiTypeProfile profile) {
-        super(targetClass == null ? StampFactory.forKind(CiKind.Object) : StampFactory.declared(targetClass));
+        super(targetClass == null ? StampFactory.forKind(RiKind.Object) : StampFactory.declared(targetClass));
         this.targetClassInstruction = targetClassInstruction;
         this.targetClass = targetClass;
         this.object = object;
@@ -84,7 +84,7 @@
 
         RiConstant constant = object().asConstant();
         if (constant != null) {
-            assert constant.kind == CiKind.Object;
+            assert constant.kind == RiKind.Object;
             if (constant.isNull()) {
                 return object();
             }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -62,7 +62,7 @@
     }
 
     public CompareAndSwapNode(ValueNode object, int displacement, ValueNode offset, ValueNode expected, ValueNode newValue) {
-        super(StampFactory.forKind(CiKind.Boolean.stackKind()));
+        super(StampFactory.forKind(RiKind.Boolean.stackKind()));
         assert expected.kind() == newValue.kind();
         this.object = object;
         this.offset = offset;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -107,7 +107,7 @@
 
         RiConstant constant = object().asConstant();
         if (constant != null) {
-            assert constant.kind == CiKind.Object;
+            assert constant.kind == RiKind.Object;
             if (constant.isNull()) {
                 return ConstantNode.forBoolean(false, graph());
             } else {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/IsTypeNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/IsTypeNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -47,7 +47,7 @@
      */
     public IsTypeNode(ValueNode objectClass, RiResolvedType type) {
         super(StampFactory.condition());
-        assert objectClass == null || objectClass.kind() == CiKind.Object;
+        assert objectClass == null || objectClass.kind() == RiKind.Object;
         this.type = type;
         this.objectClass = objectClass;
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -45,8 +45,8 @@
     }
 
     private static Stamp createStamp(RiResolvedField field) {
-        CiKind kind = field.kind(false);
-        if (kind == CiKind.Object && field.type() instanceof RiResolvedType) {
+        RiKind kind = field.kind(false);
+        if (kind == RiKind.Object && field.type() instanceof RiResolvedType) {
             return StampFactory.declared((RiResolvedType) field.type());
         } else {
             return StampFactory.forKind(kind);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -43,12 +43,12 @@
      * @param index the instruction producing the index
      * @param elementKind the element type
      */
-    public LoadIndexedNode(ValueNode array, ValueNode index, CiKind elementKind, long leafGraphId) {
+    public LoadIndexedNode(ValueNode array, ValueNode index, RiKind elementKind, long leafGraphId) {
         super(createStamp(array, elementKind), array, index, elementKind, leafGraphId);
     }
 
-    private static Stamp createStamp(ValueNode array, CiKind kind) {
-        if (kind == CiKind.Object && array.objectStamp().type() != null) {
+    private static Stamp createStamp(ValueNode array, RiKind kind) {
+        if (kind == RiKind.Object && array.objectStamp().type() != null) {
             return StampFactory.declared(array.objectStamp().type().componentType());
         } else {
             return StampFactory.forKind(kind);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -94,7 +94,7 @@
     }
 
     @Override
-    public CiKind returnKind() {
+    public RiKind returnKind() {
         return targetMethod().signature().returnKind(false);
     }
 
@@ -139,8 +139,8 @@
     }
 
     public Stamp returnStamp() {
-        CiKind returnKind = targetMethod.signature().returnKind(false);
-        if (returnKind == CiKind.Object && returnType instanceof RiResolvedType) {
+        RiKind returnKind = targetMethod.signature().returnKind(false);
+        if (returnKind == RiKind.Object && returnType instanceof RiResolvedType) {
             return StampFactory.declared((RiResolvedType) returnType);
         } else {
             return StampFactory.forKind(returnKind);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -79,7 +79,7 @@
 
     @Override
     public void typeFeedback(TypeFeedbackTool tool) {
-        assert length.kind() == CiKind.Int;
+        assert length.kind() == RiKind.Int;
         tool.addScalar(length).constantBound(Condition.GE, RiConstant.INT_0);
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewMultiArrayNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewMultiArrayNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -74,7 +74,7 @@
     @Override
     public void typeFeedback(TypeFeedbackTool tool) {
         for (ValueNode length : dimensions) {
-            assert length.kind() == CiKind.Int;
+            assert length.kind() == RiKind.Int;
             tool.addScalar(length).constantBound(Condition.GE, RiConstant.INT_0);
         }
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -61,7 +61,7 @@
      * @param elementKind the element type
      * @param value the value to store into the array
      */
-    public StoreIndexedNode(ValueNode array, ValueNode index, CiKind elementKind, ValueNode value, long leafGraphId) {
+    public StoreIndexedNode(ValueNode array, ValueNode index, RiKind elementKind, ValueNode value, long leafGraphId) {
         super(StampFactory.forVoid(), array, index, elementKind, leafGraphId);
         this.value = value;
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java	Thu Jun 07 17:08:33 2012 +0200
@@ -49,7 +49,7 @@
     public abstract boolean canStoreConstant(RiConstant c);
 
     public abstract CiValue operand(ValueNode object);
-    public abstract CiValue newVariable(CiKind kind);
+    public abstract CiValue newVariable(RiKind kind);
     public abstract CiValue setResult(ValueNode x, CiValue operand);
 
     public abstract CiAddress makeAddress(LocationNode location, ValueNode object);
@@ -81,7 +81,7 @@
     public abstract void emitMembar(int barriers);
     public abstract void emitDeoptimizeOnOverflow(RiDeoptAction action, RiDeoptReason reason, Object deoptInfo);
     public abstract void emitDeoptimize(RiDeoptAction action, RiDeoptReason reason, Object deoptInfo, long leafGraphId);
-    public abstract CiValue emitCall(Object target, CiKind result, CiKind[] arguments, boolean canTrap, CiValue... args);
+    public abstract CiValue emitCall(Object target, RiKind result, RiKind[] arguments, boolean canTrap, CiValue... args);
     public final CiValue emitCall(CiRuntimeCall runtimeCall, boolean canTrap, CiValue... args) {
         return emitCall(runtimeCall, runtimeCall.resultKind, runtimeCall.arguments, canTrap, args);
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeFeedbackStore.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeFeedbackStore.java	Thu Jun 07 17:08:33 2012 +0200
@@ -41,7 +41,7 @@
 
         @Override
         public boolean constantBound(Condition condition, RiConstant constant) {
-            if (constant.kind == CiKind.Int || constant.kind == CiKind.Long) {
+            if (constant.kind == RiKind.Int || constant.kind == RiKind.Long) {
                 switch (condition) {
                     case EQ:
                         return store.constantBounds.lowerBound == constant.asLong() && store.constantBounds.upperBound == constant.asLong();
@@ -118,7 +118,7 @@
         }
     }
 
-    private final CiKind kind;
+    private final RiKind kind;
     private final ConstantBound constantBounds;
     private final TypeFeedbackChanged changed;
     private ValueNode dependency;
@@ -128,11 +128,11 @@
         dependency = changed.node;
     }
 
-    public ScalarTypeFeedbackStore(CiKind kind, TypeFeedbackChanged changed) {
+    public ScalarTypeFeedbackStore(RiKind kind, TypeFeedbackChanged changed) {
         this.kind = kind;
-        if (kind == CiKind.Int) {
+        if (kind == RiKind.Int) {
             constantBounds = new ConstantBound(Integer.MIN_VALUE, Integer.MAX_VALUE);
-        } else if (kind == CiKind.Long) {
+        } else if (kind == RiKind.Long) {
             constantBounds = new ConstantBound(Long.MIN_VALUE, Long.MAX_VALUE);
         } else {
             constantBounds = null;
@@ -168,7 +168,7 @@
 
     private static ConstantBound createBounds(Condition condition, RiConstant constant) {
         ConstantBound newBound;
-        if (constant.kind == CiKind.Int || constant.kind == CiKind.Long) {
+        if (constant.kind == RiKind.Int || constant.kind == RiKind.Long) {
             switch (condition) {
                 case EQ:
                     newBound = new ConstantBound(constant.asLong(), constant.asLong());
@@ -364,14 +364,14 @@
         assert other.kind == kind;
         long lower = other.constantBounds.lowerBound;
         long upper = other.constantBounds.upperBound;
-        if (kind == CiKind.Int) {
+        if (kind == RiKind.Int) {
             int delta = deltaConstant.asInt();
             int newLower = (int) lower + delta;
             int newUpper = (int) upper + delta;
             if ((newLower <= lower && newUpper <= upper) || (newLower > lower && newUpper > upper)) {
                 constantBounds.join(new ConstantBound(newLower, newUpper));
             }
-        } else if (kind == CiKind.Long) {
+        } else if (kind == RiKind.Long) {
             long delta = deltaConstant.asLong();
             long newLower = lower + delta;
             long newUpper = upper + delta;
@@ -387,20 +387,20 @@
         return constantBounds.lowerBound == minValue(kind) && constantBounds.upperBound == maxValue(kind) && (valueBounds == null || valueBounds.isEmpty());
     }
 
-    private static long minValue(CiKind kind) {
-        if (kind == CiKind.Int) {
+    private static long minValue(RiKind kind) {
+        if (kind == RiKind.Int) {
             return Integer.MIN_VALUE;
-        } else if (kind == CiKind.Long) {
+        } else if (kind == RiKind.Long) {
             return Long.MIN_VALUE;
         } else {
             throw new UnsupportedOperationException();
         }
     }
 
-    private static long maxValue(CiKind kind) {
-        if (kind == CiKind.Int) {
+    private static long maxValue(RiKind kind) {
+        if (kind == RiKind.Int) {
             return Integer.MAX_VALUE;
-        } else if (kind == CiKind.Long) {
+        } else if (kind == RiKind.Long) {
             return Long.MAX_VALUE;
         } else {
             throw new UnsupportedOperationException();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java	Thu Jun 07 17:08:33 2012 +0200
@@ -27,9 +27,9 @@
 
 public class FloatStamp extends Stamp {
 
-    protected FloatStamp(CiKind kind) {
+    protected FloatStamp(RiKind kind) {
         super(kind);
-        assert kind == CiKind.Float || kind == CiKind.Double;
+        assert kind == RiKind.Float || kind == RiKind.Double;
     }
 
     @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/GenericStamp.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/GenericStamp.java	Thu Jun 07 17:08:33 2012 +0200
@@ -33,7 +33,7 @@
     private final GenericStampType type;
 
     protected GenericStamp(GenericStampType type) {
-        super(CiKind.Void);
+        super(RiKind.Void);
         this.type = type;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,11 +30,11 @@
     private final long lowerBound;
     private final long upperBound;
 
-    public IntegerStamp(CiKind kind) {
+    public IntegerStamp(RiKind kind) {
         this(kind, kind.minValue(), kind.maxValue());
     }
 
-    public IntegerStamp(CiKind kind, long lowerBound, long upperBound) {
+    public IntegerStamp(RiKind kind, long lowerBound, long upperBound) {
         super(kind);
         assert lowerBound <= upperBound;
         this.lowerBound = lowerBound;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/ObjectStamp.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/ObjectStamp.java	Thu Jun 07 17:08:33 2012 +0200
@@ -33,7 +33,7 @@
     private final boolean nonNull;
 
     public ObjectStamp(RiResolvedType type, boolean exactType, boolean nonNull) {
-        super(CiKind.Object);
+        super(RiKind.Object);
         assert !exactType || type != null;
         this.type = type;
         this.exactType = exactType;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/Stamp.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/Stamp.java	Thu Jun 07 17:08:33 2012 +0200
@@ -29,13 +29,13 @@
 
 public abstract class Stamp {
 
-    private final CiKind kind;
+    private final RiKind kind;
 
-    protected Stamp(CiKind kind) {
+    protected Stamp(RiKind kind) {
         this.kind = kind;
     }
 
-    public CiKind kind() {
+    public RiKind kind() {
         return kind;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampFactory.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampFactory.java	Thu Jun 07 17:08:33 2012 +0200
@@ -32,7 +32,7 @@
 
 public class StampFactory {
 
-    private static final Stamp[] stampCache = new Stamp[CiKind.values().length];
+    private static final Stamp[] stampCache = new Stamp[RiKind.values().length];
     private static final Stamp objectStamp = new ObjectStamp(null, false, false);
     private static final Stamp objectNonNullStamp = new ObjectStamp(null, false, true);
     private static final Stamp dependencyStamp = new GenericStamp(GenericStampType.Dependency);
@@ -43,28 +43,28 @@
 
     private static final Stamp positiveInt = forInt(0, Integer.MAX_VALUE);
 
-    private static void setCache(CiKind kind, Stamp stamp) {
+    private static void setCache(RiKind kind, Stamp stamp) {
         stampCache[kind.ordinal()] = stamp;
     }
 
     static {
-        setCache(CiKind.Boolean, new IntegerStamp(CiKind.Boolean));
-        setCache(CiKind.Byte, new IntegerStamp(CiKind.Byte));
-        setCache(CiKind.Short, new IntegerStamp(CiKind.Short));
-        setCache(CiKind.Char, new IntegerStamp(CiKind.Char));
-        setCache(CiKind.Int, new IntegerStamp(CiKind.Int));
-        setCache(CiKind.Long, new IntegerStamp(CiKind.Long));
+        setCache(RiKind.Boolean, new IntegerStamp(RiKind.Boolean));
+        setCache(RiKind.Byte, new IntegerStamp(RiKind.Byte));
+        setCache(RiKind.Short, new IntegerStamp(RiKind.Short));
+        setCache(RiKind.Char, new IntegerStamp(RiKind.Char));
+        setCache(RiKind.Int, new IntegerStamp(RiKind.Int));
+        setCache(RiKind.Long, new IntegerStamp(RiKind.Long));
 
-        setCache(CiKind.Float, new FloatStamp(CiKind.Float));
-        setCache(CiKind.Double, new FloatStamp(CiKind.Double));
+        setCache(RiKind.Float, new FloatStamp(RiKind.Float));
+        setCache(RiKind.Double, new FloatStamp(RiKind.Double));
 
-        setCache(CiKind.Jsr, new IntegerStamp(CiKind.Jsr));
+        setCache(RiKind.Jsr, new IntegerStamp(RiKind.Jsr));
 
-        setCache(CiKind.Object, objectStamp);
-        setCache(CiKind.Void, voidStamp);
+        setCache(RiKind.Object, objectStamp);
+        setCache(RiKind.Void, voidStamp);
     }
 
-    public static Stamp forKind(CiKind kind) {
+    public static Stamp forKind(RiKind kind) {
         assert stampCache[kind.stackKind().ordinal()] != null : "unexpected forKind(" + kind + ")";
         return stampCache[kind.stackKind().ordinal()];
     }
@@ -74,7 +74,7 @@
     }
 
     public static Stamp intValue() {
-        return forKind(CiKind.Int);
+        return forKind(RiKind.Int);
     }
 
     public static Stamp dependency() {
@@ -98,21 +98,21 @@
     }
 
     public static Stamp forInt(int lowerBound, int upperBound) {
-        return new IntegerStamp(CiKind.Int, lowerBound, upperBound);
+        return new IntegerStamp(RiKind.Int, lowerBound, upperBound);
     }
 
     public static Stamp forLong(long lowerBound, long upperBound) {
-        return new IntegerStamp(CiKind.Long, lowerBound, upperBound);
+        return new IntegerStamp(RiKind.Long, lowerBound, upperBound);
     }
 
     public static Stamp forConstant(RiConstant value) {
-        assert value.kind != CiKind.Object;
-        if (value.kind == CiKind.Object) {
+        assert value.kind != RiKind.Object;
+        if (value.kind == RiKind.Object) {
             throw new GraalInternalError("unexpected kind: %s", value.kind);
         } else {
-            if (value.kind == CiKind.Int) {
+            if (value.kind == RiKind.Int) {
                 return forInt(value.asInt(), value.asInt());
-            } else if (value.kind == CiKind.Long) {
+            } else if (value.kind == RiKind.Long) {
                 return forLong(value.asLong(), value.asLong());
             }
             return forKind(value.kind.stackKind());
@@ -120,8 +120,8 @@
     }
 
     public static Stamp forConstant(RiConstant value, RiRuntime runtime) {
-        assert value.kind == CiKind.Object;
-        if (value.kind == CiKind.Object) {
+        assert value.kind == RiKind.Object;
+        if (value.kind == RiKind.Object) {
             RiResolvedType type = value.isNull() ? null : runtime.getTypeOf(value);
             return new ObjectStamp(type, value.isNonNull(), value.isNonNull());
         } else {
@@ -147,7 +147,7 @@
 
     private static Stamp declared(RiResolvedType type, boolean nonNull) {
         assert type != null;
-        assert type.kind(false) == CiKind.Object;
+        assert type.kind(false) == RiKind.Object;
         RiResolvedType exact = type.exactType();
         if (exact != null) {
             return new ObjectStamp(exact, true, nonNull);
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Thu Jun 07 17:08:33 2012 +0200
@@ -462,7 +462,7 @@
             prefix = "B";
         } else if (node instanceof ValueNode) {
             ValueNode value = (ValueNode) node;
-            if (value.kind() == CiKind.Illegal) {
+            if (value.kind() == RiKind.Illegal) {
                 prefix = "v";
             } else {
                 prefix = String.valueOf(value.kind().typeChar);
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java	Thu Jun 07 17:08:33 2012 +0200
@@ -38,19 +38,19 @@
 public class NodeClassSnippets implements SnippetsInterface {
 
     private static Node getNode(Node node, long offset) {
-        return UnsafeCastNode.cast(UnsafeLoadNode.load(node, 0, offset, CiKind.Object), Node.class);
+        return UnsafeCastNode.cast(UnsafeLoadNode.load(node, 0, offset, RiKind.Object), Node.class);
     }
 
     private static NodeList<Node> getNodeList(Node node, long offset) {
-        return UnsafeCastNode.cast(UnsafeLoadNode.load(node, 0, offset, CiKind.Object), NodeList.class);
+        return UnsafeCastNode.cast(UnsafeLoadNode.load(node, 0, offset, RiKind.Object), NodeList.class);
     }
 
     private static void putNode(Node node, long offset, Node value) {
-        UnsafeStoreNode.store(node, 0, offset, value, CiKind.Object);
+        UnsafeStoreNode.store(node, 0, offset, value, RiKind.Object);
     }
 
     private static void putNodeList(Node node, long offset, NodeList value) {
-        UnsafeStoreNode.store(node, 0, offset, value, CiKind.Object);
+        UnsafeStoreNode.store(node, 0, offset, value, RiKind.Object);
     }
 
 }
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java	Thu Jun 07 17:08:33 2012 +0200
@@ -195,7 +195,7 @@
                 String name = c.value();
                 Object arg = key.get(name);
                 assert arg != null : method + ": requires a constant named " + name;
-                CiKind kind = signature.argumentKindAt(i, false);
+                RiKind kind = signature.argumentKindAt(i, false);
                 assert checkConstantArgument(method, signature, i, name, arg, kind);
                 replacements.put(snippetGraph.getLocal(i), ConstantNode.forCiConstant(RiConstant.forBoxed(kind, arg), runtime, snippetCopy));
             } else {
@@ -324,7 +324,7 @@
         return true;
     }
 
-    private static boolean checkConstantArgument(final RiResolvedMethod method, RiSignature signature, int i, String name, Object arg, CiKind kind) {
+    private static boolean checkConstantArgument(final RiResolvedMethod method, RiSignature signature, int i, String name, Object arg, RiKind kind) {
         if (kind.isObject()) {
             Class<?> type = signature.argumentTypeAt(i, method.holder()).resolve(method.holder()).toJava();
             assert type.isInstance(arg) :
@@ -384,7 +384,7 @@
                 if (argument instanceof ValueNode) {
                     replacements.put((LocalNode) parameter, (ValueNode) argument);
                 } else {
-                    CiKind kind = ((LocalNode) parameter).kind();
+                    RiKind kind = ((LocalNode) parameter).kind();
                     RiConstant constant = RiConstant.forBoxed(kind, argument);
                     replacements.put((LocalNode) parameter, ConstantNode.forCiConstant(constant, runtime, replaceeGraph));
                 }
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/nodes/MathIntrinsicNode.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/nodes/MathIntrinsicNode.java	Thu Jun 07 17:08:33 2012 +0200
@@ -56,7 +56,7 @@
 
     public MathIntrinsicNode(ValueNode x, Operation op) {
         super(StampFactory.forKind(x.kind()));
-        assert x.kind() == CiKind.Double;
+        assert x.kind() == RiKind.Double;
         this.x = x;
         this.operation = op;
     }
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java	Thu Jun 07 17:08:33 2012 +0200
@@ -61,7 +61,7 @@
         for (Node node : graph.getNodes()) {
             if (node instanceof ConstantNode) {
                 ConstantNode constant = (ConstantNode) node;
-                if (constant.kind() == CiKind.Object && " ".equals(constant.value.asObject())) {
+                if (constant.kind() == RiKind.Object && " ".equals(constant.value.asObject())) {
                     graph.replaceFloating(constant, ConstantNode.forObject("-", runtime, graph));
                 }
             }
@@ -118,7 +118,7 @@
         for (Node node : graph.getNodes()) {
             if (node instanceof ConstantNode) {
                 ConstantNode constant = (ConstantNode) node;
-                if (constant.kind() == CiKind.Object && "1 ".equals(constant.value.asObject())) {
+                if (constant.kind() == RiKind.Object && "1 ".equals(constant.value.asObject())) {
                     graph.replaceFloating(constant, ConstantNode.forObject("1-", runtime, graph));
                 }
             }
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64.java	Thu Jun 07 17:08:33 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.asm.target.amd64;
 
-import static com.oracle.max.cri.ci.CiKind.*;
+import static com.oracle.max.cri.ci.RiKind.*;
 import static com.oracle.max.cri.ci.CiRegister.RegisterFlag.*;
 import static com.oracle.max.cri.util.MemoryBarriers.*;
 
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java	Thu Jun 07 17:08:33 2012 +0200
@@ -38,7 +38,7 @@
     /**
      * The kind for pointers and raw registers.  Since we know we are 64 bit here, we can hardcode it.
      */
-    private static final CiKind Word = CiKind.Long;
+    private static final RiKind Word = RiKind.Long;
 
     private static final int MinEncodingNeedsRex = 8;
 
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64MacroAssembler.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64MacroAssembler.java	Thu Jun 07 17:08:33 2012 +0200
@@ -317,7 +317,7 @@
     public void flog(CiRegister dest, CiRegister value, boolean base10) {
         assert value.spillSlotSize == dest.spillSlotSize;
 
-        CiAddress tmp = new CiAddress(CiKind.Double, AMD64.RSP);
+        CiAddress tmp = new CiAddress(RiKind.Double, AMD64.RSP);
         if (base10) {
             fldlg2();
         } else {
@@ -347,7 +347,7 @@
     private void ftrig(CiRegister dest, CiRegister value, char op) {
         assert value.spillSlotSize == dest.spillSlotSize;
 
-        CiAddress tmp = new CiAddress(CiKind.Double, AMD64.RSP);
+        CiAddress tmp = new CiAddress(RiKind.Double, AMD64.RSP);
         subq(AMD64.rsp, value.spillSlotSize);
         movsd(tmp, value);
         fld(tmp);
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAddress.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAddress.java	Thu Jun 07 17:08:33 2012 +0200
@@ -35,7 +35,7 @@
     /**
      * A sentinel value used as a place holder in an instruction stream for an address that will be patched.
      */
-    public static final CiAddress Placeholder = new CiAddress(CiKind.Illegal, CiValue.IllegalValue);
+    public static final CiAddress Placeholder = new CiAddress(RiKind.Illegal, CiValue.IllegalValue);
 
     /**
      * Base register that defines the start of the address computation.
@@ -64,7 +64,7 @@
      * @param kind the kind of the value being addressed
      * @param base the base register
      */
-    public CiAddress(CiKind kind, CiValue base) {
+    public CiAddress(RiKind kind, CiValue base) {
         this(kind, base, IllegalValue, Scale.Times1, 0);
     }
 
@@ -74,7 +74,7 @@
      * @param base the base register
      * @param displacement the displacement
      */
-    public CiAddress(CiKind kind, CiValue base, int displacement) {
+    public CiAddress(RiKind kind, CiValue base, int displacement) {
         this(kind, base, IllegalValue, Scale.Times1, displacement);
     }
 
@@ -87,7 +87,7 @@
      * @param scale the scaling factor
      * @param displacement the displacement
      */
-    public CiAddress(CiKind kind, CiValue base, CiValue index, Scale scale, int displacement) {
+    public CiAddress(RiKind kind, CiValue base, CiValue index, Scale scale, int displacement) {
         super(kind);
         this.base = base;
         this.index = index;
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiKind.java	Thu Jun 07 17:07:42 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ci;
-
-import static com.oracle.max.cri.ci.CiKind.Flags.*;
-
-import java.lang.reflect.*;
-
-import sun.misc.*;
-
-import com.oracle.max.cri.ri.*;
-
-/**
- * Denotes the basic kinds of types in CRI, including the all the Java primitive types,
- * for example, {@link CiKind#Int} for {@code int} and {@link CiKind#Object}
- * for all object types.
- * A kind has a single character short name, a Java name, and a set of flags
- * further describing its behavior.
- */
-public enum CiKind {
-    Boolean('z', "boolean", FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Byte   ('b', "byte",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Short  ('s', "short",   FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Char   ('c', "char",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Int    ('i', "int",     FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Float  ('f', "float",   FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
-    Long   ('j', "long",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
-    Double ('d', "double",  FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
-    Object ('a', "Object",  FIELD_TYPE | RETURN_TYPE),
-    Void   ('v', "void",    RETURN_TYPE),
-    /** Denote a bytecode address in a {@code JSR} bytecode. */
-    Jsr    ('r', "jsr",     0),
-    /** The non-type. */
-    Illegal('-', "illegal", 0);
-
-    public static final CiKind[] VALUES = values();
-    public static final CiKind[] JAVA_VALUES = new CiKind[] {CiKind.Boolean, CiKind.Byte, CiKind.Short, CiKind.Char, CiKind.Int, CiKind.Float, CiKind.Long, CiKind.Double, CiKind.Object};
-
-    CiKind(char ch, String name, int flags) {
-        this.typeChar = ch;
-        this.javaName = name;
-        this.flags = flags;
-    }
-
-    static class Flags {
-        /**
-         * Can be an object field type.
-         */
-        public static final int FIELD_TYPE  = 0x0001;
-        /**
-         * Can be result type of a method.
-         */
-        public static final int RETURN_TYPE = 0x0002;
-        /**
-         * Behaves as an integer when on Java evaluation stack.
-         */
-        public static final int STACK_INT   = 0x0004;
-        /**
-         * Represents a Java primitive type.
-         */
-        public static final int PRIMITIVE   = 0x0008;
-    }
-
-    /**
-     * The flags for this kind.
-     */
-    private final int flags;
-
-    /**
-     * The name of the kind as a single character.
-     */
-    public final char typeChar;
-
-    /**
-     * The name of this kind which will also be it Java programming language name if
-     * it is {@linkplain #isPrimitive() primitive} or {@code void}.
-     */
-    public final String javaName;
-
-    /**
-     * Checks whether this kind is valid as the type of a field.
-     * @return {@code true} if this kind is valid as the type of a Java field
-     */
-    public boolean isValidFieldType() {
-        return (flags & FIELD_TYPE) != 0;
-    }
-
-    /**
-     * Checks whether this kind is valid as the return type of a method.
-     * @return {@code true} if this kind is valid as the return type of a Java method
-     */
-    public boolean isValidReturnType() {
-        return (flags & RETURN_TYPE) != 0;
-    }
-
-    /**
-     * Checks whether this type is valid as an {@code int} on the Java operand stack.
-     * @return {@code true} if this type is represented by an {@code int} on the operand stack
-     */
-    public boolean isInt() {
-        return (flags & STACK_INT) != 0;
-    }
-
-    /**
-     * Checks whether this type is a Java primitive type.
-     * @return {@code true} if this is {@link #Boolean}, {@link #Byte}, {@link #Char}, {@link #Short},
-     *                                 {@link #Int}, {@link #Long}, {@link #Float} or {@link #Double}.
-     */
-    public boolean isPrimitive() {
-        return (flags & PRIMITIVE) != 0;
-    }
-
-    /**
-     * Gets the kind that represents this kind when on the Java operand stack.
-     * @return the kind used on the operand stack
-     */
-    public CiKind stackKind() {
-        if (isInt()) {
-            return Int;
-        }
-        return this;
-    }
-
-    public static CiKind fromTypeString(String typeString) {
-        assert typeString.length() > 0;
-        final char first = typeString.charAt(0);
-        if (first == '[' || first == 'L') {
-            return CiKind.Object;
-        }
-        return CiKind.fromPrimitiveOrVoidTypeChar(first);
-    }
-
-    /**
-     * Gets the kind from the character describing a primitive or void.
-     * @param ch the character
-     * @return the kind
-     */
-    public static CiKind fromPrimitiveOrVoidTypeChar(char ch) {
-        // Checkstyle: stop
-        switch (ch) {
-            case 'Z': return Boolean;
-            case 'C': return Char;
-            case 'F': return Float;
-            case 'D': return Double;
-            case 'B': return Byte;
-            case 'S': return Short;
-            case 'I': return Int;
-            case 'J': return Long;
-            case 'V': return Void;
-        }
-        // Checkstyle: resume
-        throw new IllegalArgumentException("unknown primitive or void type character: " + ch);
-    }
-
-    public Class< ? > toJavaClass() {
-        // Checkstyle: stop
-        switch(this) {
-            case Void:      return java.lang.Void.TYPE;
-            case Long:      return java.lang.Long.TYPE;
-            case Int:       return java.lang.Integer.TYPE;
-            case Byte:      return java.lang.Byte.TYPE;
-            case Char:      return java.lang.Character.TYPE;
-            case Double:    return java.lang.Double.TYPE;
-            case Float:     return java.lang.Float.TYPE;
-            case Short:     return java.lang.Short.TYPE;
-            case Boolean:   return java.lang.Boolean.TYPE;
-            default:        return null;
-        }
-        // Checkstyle: resume
-    }
-
-    public Class< ? > toBoxedJavaClass() {
-        // Checkstyle: stop
-        switch(this) {
-            case Void:      return null;
-            case Long:      return java.lang.Long.class;
-            case Int:       return java.lang.Integer.class;
-            case Byte:      return java.lang.Byte.class;
-            case Char:      return java.lang.Character.class;
-            case Double:    return java.lang.Double.class;
-            case Float:     return java.lang.Float.class;
-            case Short:     return java.lang.Short.class;
-            case Boolean:   return java.lang.Boolean.class;
-            default:        return null;
-        }
-        // Checkstyle: resume
-    }
-
-    /**
-     * Checks whether this value type is void.
-     * @return {@code true} if this type is void
-     */
-    public final boolean isVoid() {
-        return this == CiKind.Void;
-    }
-
-    /**
-     * Checks whether this value type is long.
-     * @return {@code true} if this type is long
-     */
-    public final boolean isLong() {
-        return this == CiKind.Long;
-    }
-
-    /**
-     * Checks whether this value type is float.
-     * @return {@code true} if this type is float
-     */
-    public final boolean isFloat() {
-        return this == CiKind.Float;
-    }
-
-    /**
-     * Checks whether this value type is double.
-     * @return {@code true} if this type is double
-     */
-    public final boolean isDouble() {
-        return this == CiKind.Double;
-    }
-
-    /**
-     * Checks whether this value type is float or double.
-     * @return {@code true} if this type is float or double
-     */
-    public final boolean isFloatOrDouble() {
-        return this == CiKind.Double || this == CiKind.Float;
-    }
-
-   /**
-     * Checks whether this value type is an object type.
-     * @return {@code true} if this type is an object
-     */
-    public final boolean isObject() {
-        return this == CiKind.Object;
-    }
-
-    /**
-     * Checks whether this value type is an address type.
-     * @return {@code true} if this type is an address
-     */
-    public boolean isJsr() {
-        return this == CiKind.Jsr;
-    }
-
-    /**
-     * Converts this value type to a string.
-     */
-    @Override
-    public String toString() {
-        return javaName;
-    }
-
-    /**
-     * Marker interface for types that should be {@linkplain CiKind#format(Object) formatted}
-     * with their {@link Object#toString()} value.
-     */
-    public interface FormatWithToString {}
-
-    /**
-     * Gets a formatted string for a given value of this kind.
-     *
-     * @param value a value of this kind
-     * @return a formatted string for {@code value} based on this kind
-     */
-    public String format(Object value) {
-        if (isObject()) {
-            if (value == null) {
-                return "null";
-            } else {
-                if (value instanceof String) {
-                    String s = (String) value;
-                    if (s.length() > 50) {
-                        return "\"" + s.substring(0, 30) + "...\"";
-                    } else {
-                        return " \"" + s + '"';
-                    }
-                } else if (value instanceof RiType) {
-                    return "class " + CiUtil.toJavaName((RiType) value);
-                } else if (value instanceof Enum || value instanceof FormatWithToString) {
-                    return String.valueOf(value);
-                } else if (value instanceof Class< ? >) {
-                    return ((Class< ? >) value).getName() + ".class";
-                } else if (value.getClass().isArray()) {
-                    return formatArray(value);
-                } else {
-                    return CiUtil.getSimpleName(value.getClass(), true) + "@" + System.identityHashCode(value);
-                }
-            }
-        } else {
-            return value.toString();
-        }
-    }
-
-    private static final int MAX_FORMAT_ARRAY_LENGTH = Integer.getInteger("maxFormatArrayLength", 5);
-
-    private static String formatArray(Object array) {
-        Class< ? > componentType = array.getClass().getComponentType();
-        assert componentType != null;
-        int arrayLength = Array.getLength(array);
-        StringBuilder buf = new StringBuilder(CiUtil.getSimpleName(componentType, true)).
-                        append('[').
-                        append(arrayLength).
-                        append("]{");
-        int length = Math.min(MAX_FORMAT_ARRAY_LENGTH, arrayLength);
-        boolean primitive = componentType.isPrimitive();
-        for (int i = 0; i < length; i++) {
-            if (primitive) {
-                buf.append(Array.get(array, i));
-            } else {
-                Object o = ((Object[]) array)[i];
-                buf.append(CiKind.Object.format(o));
-            }
-            if (i != length - 1) {
-                buf.append(", ");
-            }
-        }
-        if (arrayLength != length) {
-            buf.append(", ...");
-        }
-        return buf.append('}').toString();
-    }
-
-    public final char signatureChar() {
-        return Character.toUpperCase(typeChar);
-    }
-
-    public final int arrayBaseOffset() {
-        switch(this) {
-            case Boolean:
-                return Unsafe.ARRAY_BOOLEAN_BASE_OFFSET;
-            case Byte:
-                return Unsafe.ARRAY_BYTE_BASE_OFFSET;
-            case Char:
-                return Unsafe.ARRAY_CHAR_BASE_OFFSET;
-            case Short:
-                return Unsafe.ARRAY_SHORT_BASE_OFFSET;
-            case Int:
-                return Unsafe.ARRAY_INT_BASE_OFFSET;
-            case Long:
-                return Unsafe.ARRAY_LONG_BASE_OFFSET;
-            case Float:
-                return Unsafe.ARRAY_FLOAT_BASE_OFFSET;
-            case Double:
-                return Unsafe.ARRAY_DOUBLE_BASE_OFFSET;
-            case Object:
-                return Unsafe.ARRAY_OBJECT_BASE_OFFSET;
-            default:
-                assert false : "unexpected kind: " + this;
-                return -1;
-        }
-    }
-
-    public final int arrayIndexScale() {
-        switch(this) {
-            case Boolean:
-                return Unsafe.ARRAY_BOOLEAN_INDEX_SCALE;
-            case Byte:
-                return Unsafe.ARRAY_BYTE_INDEX_SCALE;
-            case Char:
-                return Unsafe.ARRAY_CHAR_INDEX_SCALE;
-            case Short:
-                return Unsafe.ARRAY_SHORT_INDEX_SCALE;
-            case Int:
-                return Unsafe.ARRAY_INT_INDEX_SCALE;
-            case Long:
-                return Unsafe.ARRAY_LONG_INDEX_SCALE;
-            case Float:
-                return Unsafe.ARRAY_FLOAT_INDEX_SCALE;
-            case Double:
-                return Unsafe.ARRAY_DOUBLE_INDEX_SCALE;
-            case Object:
-                return Unsafe.ARRAY_OBJECT_INDEX_SCALE;
-            default:
-                assert false : "unexpected kind: " + this;
-                return -1;
-        }
-    }
-
-    public RiConstant readUnsafeConstant(Object value, long displacement) {
-        assert value != null;
-        Unsafe u = Unsafe.getUnsafe();
-        switch(this) {
-            case Boolean:
-                return RiConstant.forBoolean(u.getBoolean(value, displacement));
-            case Byte:
-                return RiConstant.forByte(u.getByte(value, displacement));
-            case Char:
-                return RiConstant.forChar(u.getChar(value, displacement));
-            case Short:
-                return RiConstant.forShort(u.getShort(value, displacement));
-            case Int:
-                return RiConstant.forInt(u.getInt(value, displacement));
-            case Long:
-                return RiConstant.forLong(u.getLong(value, displacement));
-            case Float:
-                return RiConstant.forFloat(u.getFloat(value, displacement));
-            case Double:
-                return RiConstant.forDouble(u.getDouble(value, displacement));
-            case Object:
-                return RiConstant.forObject(u.getObject(value, displacement));
-            default:
-                assert false : "unexpected kind: " + this;
-                return null;
-        }
-    }
-
-    public long minValue() {
-        switch (this) {
-            case Boolean:
-                return 0;
-            case Byte:
-                return java.lang.Byte.MIN_VALUE;
-            case Char:
-                return java.lang.Character.MIN_VALUE;
-            case Short:
-                return java.lang.Short.MIN_VALUE;
-            case Jsr:
-            case Int:
-                return java.lang.Integer.MIN_VALUE;
-            case Long:
-                return java.lang.Long.MIN_VALUE;
-            default:
-                throw new IllegalArgumentException("illegal call to minValue on " + this);
-        }
-    }
-
-    public long maxValue() {
-        switch (this) {
-            case Boolean:
-                return 1;
-            case Byte:
-                return java.lang.Byte.MAX_VALUE;
-            case Char:
-                return java.lang.Character.MAX_VALUE;
-            case Short:
-                return java.lang.Short.MAX_VALUE;
-            case Jsr:
-            case Int:
-                return java.lang.Integer.MAX_VALUE;
-            case Long:
-                return java.lang.Long.MAX_VALUE;
-            default:
-                throw new IllegalArgumentException("illegal call to maxValue on " + this);
-        }
-    }
-
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiMonitorValue.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiMonitorValue.java	Thu Jun 07 17:08:33 2012 +0200
@@ -30,7 +30,7 @@
     public final boolean eliminated;
 
     public CiMonitorValue(CiValue owner, CiValue lockData, boolean eliminated) {
-        super(CiKind.Illegal);
+        super(RiKind.Illegal);
         this.owner = owner;
         this.lockData = lockData;
         this.eliminated = eliminated;
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegister.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegister.java	Thu Jun 07 17:08:33 2012 +0200
@@ -74,7 +74,7 @@
 
     /**
      * An array of {@link CiRegisterValue} objects, for this register, with one entry
-     * per {@link CiKind}, indexed by {@link CiKind#ordinal}.
+     * per {@link RiKind}, indexed by {@link RiKind#ordinal}.
      */
     private final CiRegisterValue[] values;
 
@@ -117,8 +117,8 @@
         this.flags = createMask(flags);
         this.encoding = encoding;
 
-        values = new CiRegisterValue[CiKind.VALUES.length];
-        for (CiKind kind : CiKind.VALUES) {
+        values = new CiRegisterValue[RiKind.VALUES.length];
+        for (RiKind kind : RiKind.VALUES) {
             values[kind.ordinal()] = new CiRegisterValue(kind, this);
         }
     }
@@ -140,16 +140,16 @@
      * @param kind the specified kind
      * @return the {@link CiRegisterValue}
      */
-    public CiRegisterValue asValue(CiKind kind) {
+    public CiRegisterValue asValue(RiKind kind) {
         return values[kind.ordinal()];
     }
 
     /**
      * Gets this register as a {@linkplain CiRegisterValue value} with no particular kind.
-     * @return a {@link CiRegisterValue} with {@link CiKind#Illegal} kind.
+     * @return a {@link CiRegisterValue} with {@link RiKind#Illegal} kind.
      */
     public CiRegisterValue asValue() {
-        return asValue(CiKind.Illegal);
+        return asValue(RiKind.Illegal);
     }
 
     /**
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfig.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfig.java	Thu Jun 07 17:08:33 2012 +0200
@@ -167,7 +167,7 @@
         System.arraycopy(src.stackArg0Offsets, 0, stackArg0Offsets, 0, stackArg0Offsets.length);
     }
 
-    public CiRegister getReturnRegister(CiKind kind) {
+    public CiRegister getReturnRegister(RiKind kind) {
         if (kind.isDouble() || kind.isFloat()) {
             return floatingPointReturn;
         }
@@ -188,7 +188,7 @@
      * This implementation assigns all available registers to parameters before assigning
      * any stack slots to parameters.
      */
-    public CiCallingConvention getCallingConvention(Type type, CiKind[] parameters, CiTarget target, boolean stackOnly) {
+    public CiCallingConvention getCallingConvention(Type type, RiKind[] parameters, CiTarget target, boolean stackOnly) {
         CiValue[] locations = new CiValue[parameters.length];
 
         int currentGeneral = 0;
@@ -196,7 +196,7 @@
         int currentStackOffset = stackArg0Offsets[type.ordinal()];
 
         for (int i = 0; i < parameters.length; i++) {
-            final CiKind kind = parameters[i];
+            final RiKind kind = parameters[i];
 
             switch (kind) {
                 case Byte:
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterValue.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterValue.java	Thu Jun 07 17:08:33 2012 +0200
@@ -24,7 +24,7 @@
 
 /**
  * Denotes a register that stores a value of a fixed kind. There is exactly one (canonical) instance of {@code
- * CiRegisterValue} for each ({@link CiRegister}, {@link CiKind}) pair. Use {@link CiRegister#asValue(CiKind)} to
+ * CiRegisterValue} for each ({@link CiRegister}, {@link RiKind}) pair. Use {@link CiRegister#asValue(RiKind)} to
  * retrieve the canonical {@link CiRegisterValue} instance for a given (register,kind) pair.
  */
 public final class CiRegisterValue extends CiValue {
@@ -38,7 +38,7 @@
     /**
      * Should only be called from {@link CiRegister#CiRegister} to ensure canonicalization.
      */
-    protected CiRegisterValue(CiKind kind, CiRegister register) {
+    protected CiRegisterValue(RiKind kind, CiRegister register) {
         super(kind);
         this.reg = register;
     }
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java	Thu Jun 07 17:08:33 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.cri.ci;
 
-import static com.oracle.max.cri.ci.CiKind.*;
+import static com.oracle.max.cri.ci.RiKind.*;
 
 /**
  * Enumerates the calls that must be provided by the runtime system. The compiler
@@ -46,10 +46,10 @@
     ArithmeticSin(Double, Double),
     GenericCallback(Object, Object, Object);
 
-    public final CiKind resultKind;
-    public final CiKind[] arguments;
+    public final RiKind resultKind;
+    public final RiKind[] arguments;
 
-    private CiRuntimeCall(CiKind resultKind, CiKind... args) {
+    private CiRuntimeCall(RiKind resultKind, RiKind... args) {
         this.resultKind = resultKind;
         this.arguments = args;
     }
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiStackSlot.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiStackSlot.java	Thu Jun 07 17:08:33 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.cri.ci;
 
-import static com.oracle.max.cri.ci.CiKind.*;
+import static com.oracle.max.cri.ci.RiKind.*;
 
 /**
  * Represents a compiler spill slot or an outgoing stack-based argument in a method's frame
@@ -43,7 +43,7 @@
      * @param inCallerFrame Specifies if the offset is relative to the stack pointer,
      *        or the beginning of the frame (stack pointer + total frame size).
      */
-    public static CiStackSlot get(CiKind kind, int offset, boolean addFrameSize) {
+    public static CiStackSlot get(RiKind kind, int offset, boolean addFrameSize) {
         assert kind.stackKind() == kind;
         assert addFrameSize || offset >= 0;
 
@@ -71,7 +71,7 @@
     /**
      * Private constructor to enforce use of {@link #get()} so that a cache can be used.
      */
-    private CiStackSlot(CiKind kind, int offset, boolean addFrameSize) {
+    private CiStackSlot(RiKind kind, int offset, boolean addFrameSize) {
         super(kind);
         this.offset = offset;
         this.addFrameSize = addFrameSize;
@@ -160,8 +160,8 @@
     private static final CiStackSlot[][] OUT_CACHE = makeCache(PARAM_CACHE_PER_KIND_SIZE, 1, false);
 
     private static CiStackSlot[][] makeCache(int cachePerKindSize, int sign, boolean addFrameSize) {
-        CiStackSlot[][] cache = new CiStackSlot[CiKind.VALUES.length][];
-        for (CiKind kind : new CiKind[] {Illegal, Int, Long, Float, Double, Object, Jsr}) {
+        CiStackSlot[][] cache = new CiStackSlot[RiKind.VALUES.length][];
+        for (RiKind kind : new RiKind[] {Illegal, Int, Long, Float, Double, Object, Jsr}) {
             CiStackSlot[] slots = new CiStackSlot[cachePerKindSize];
             for (int i = 0; i < cachePerKindSize; i++) {
                 slots[i] = new CiStackSlot(kind, sign * i * CACHE_GRANULARITY, addFrameSize);
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTarget.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTarget.java	Thu Jun 07 17:08:33 2012 +0200
@@ -53,7 +53,7 @@
     /**
      * The CiKind to be used for representing raw pointers and CPU registers.
      */
-    public final CiKind wordKind;
+    public final RiKind wordKind;
 
     /**
      * The stack alignment requirement of the platform. For example,
@@ -108,9 +108,9 @@
         this.isMP = isMP;
         this.wordSize = arch.wordSize;
         if (wordSize == 8) {
-            this.wordKind = CiKind.Long;
+            this.wordKind = RiKind.Long;
         } else {
-            this.wordKind = CiKind.Int;
+            this.wordKind = RiKind.Int;
         }
         this.stackAlignment = stackAlignment;
         this.stackBias = 0; // TODO: configure with param once SPARC port exists
@@ -126,7 +126,7 @@
      * @param kind the kind for which to get the size
      * @return the size in bytes of {@code kind}
      */
-    public int sizeInBytes(CiKind kind) {
+    public int sizeInBytes(RiKind kind) {
         // Checkstyle: stop
         switch (kind) {
             case Boolean: return 1;
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiUtil.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiUtil.java	Thu Jun 07 17:08:33 2012 +0200
@@ -193,8 +193,8 @@
      * @return the Java name corresponding to {@code riType}
      */
     public static String toJavaName(RiType riType, boolean qualified) {
-        CiKind kind = riType.kind(false);
-        if (kind.isPrimitive() || kind == CiKind.Void) {
+        RiKind kind = riType.kind(false);
+        if (kind.isPrimitive() || kind == RiKind.Void) {
             return kind.javaName;
         }
         return internalNameToJava(riType.name(), qualified);
@@ -236,7 +236,7 @@
                 if (name.length() != 1) {
                     throw new IllegalArgumentException("Illegal internal name: " + name);
                 }
-                return CiKind.fromPrimitiveOrVoidTypeChar(name.charAt(0)).javaName;
+                return RiKind.fromPrimitiveOrVoidTypeChar(name.charAt(0)).javaName;
         }
     }
 
@@ -263,7 +263,7 @@
      * @param format a format specification
      * @param method the method to be formatted
      * @param kinds if {@code true} then the types in {@code method}'s signature are printed in the
-     *            {@linkplain CiKind#jniName JNI} form of their {@linkplain CiKind kind}
+     *            {@linkplain RiKind#jniName JNI} form of their {@linkplain RiKind kind}
      * @return the result of formatting this method according to {@code format}
      * @throws IllegalFormatException if an illegal specifier is encountered in {@code format}
      */
@@ -355,8 +355,8 @@
      *
      * @param format a format specification
      * @param field the field to be formatted
-     * @param kinds if {@code true} then {@code field}'s type is printed in the {@linkplain CiKind#jniName JNI} form of
-     *            its {@linkplain CiKind kind}
+     * @param kinds if {@code true} then {@code field}'s type is printed in the {@linkplain RiKind#jniName JNI} form of
+     *            its {@linkplain RiKind kind}
      * @return the result of formatting this field according to {@code format}
      * @throws IllegalFormatException if an illegal specifier is encountered in {@code format}
      */
@@ -707,21 +707,21 @@
         return sb;
     }
 
-    public static CiKind[] signatureToKinds(RiResolvedMethod method) {
-        CiKind receiver = isStatic(method.accessFlags()) ? null : method.holder().kind(true);
+    public static RiKind[] signatureToKinds(RiResolvedMethod method) {
+        RiKind receiver = isStatic(method.accessFlags()) ? null : method.holder().kind(true);
         return signatureToKinds(method.signature(), receiver);
     }
 
-    public static CiKind[] signatureToKinds(RiSignature signature, CiKind receiverKind) {
+    public static RiKind[] signatureToKinds(RiSignature signature, RiKind receiverKind) {
         int args = signature.argumentCount(false);
-        CiKind[] result;
+        RiKind[] result;
         int i = 0;
         if (receiverKind != null) {
-            result = new CiKind[args + 1];
+            result = new RiKind[args + 1];
             result[0] = receiverKind;
             i = 1;
         } else {
-            result = new CiKind[args];
+            result = new RiKind[args];
         }
         for (int j = 0; j < args; j++) {
             result[i + j] = signature.argumentKindAt(j, true);
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValue.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValue.java	Thu Jun 07 17:08:33 2012 +0200
@@ -25,13 +25,13 @@
 import java.io.*;
 
 /**
- * Abstract base class for values manipulated by the compiler. All values have a {@linkplain CiKind kind} and are immutable.
+ * Abstract base class for values manipulated by the compiler. All values have a {@linkplain RiKind kind} and are immutable.
  */
 public abstract class CiValue implements Serializable {
     private static final long serialVersionUID = -6909397188697766469L;
 
     @SuppressWarnings("serial")
-    public static CiValue IllegalValue = new CiValue(CiKind.Illegal) {
+    public static CiValue IllegalValue = new CiValue(RiKind.Illegal) {
         @Override
         public String toString() {
             return "-";
@@ -41,13 +41,13 @@
     /**
      * The kind of this value.
      */
-    public final CiKind kind;
+    public final RiKind kind;
 
     /**
      * Initializes a new value of the specified kind.
      * @param kind the kind
      */
-    protected CiValue(CiKind kind) {
+    protected CiValue(RiKind kind) {
         this.kind = kind;
     }
 
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java	Thu Jun 07 17:08:33 2012 +0200
@@ -87,27 +87,27 @@
     }
 
     public static CiRegister asIntReg(CiValue value) {
-        assert value.kind == CiKind.Int || value.kind == CiKind.Jsr;
+        assert value.kind == RiKind.Int || value.kind == RiKind.Jsr;
         return asRegister(value);
     }
 
     public static CiRegister asLongReg(CiValue value) {
-        assert value.kind == CiKind.Long : value.kind;
+        assert value.kind == RiKind.Long : value.kind;
         return asRegister(value);
     }
 
     public static CiRegister asObjectReg(CiValue value) {
-        assert value.kind == CiKind.Object;
+        assert value.kind == RiKind.Object;
         return asRegister(value);
     }
 
     public static CiRegister asFloatReg(CiValue value) {
-        assert value.kind == CiKind.Float;
+        assert value.kind == RiKind.Float;
         return asRegister(value);
     }
 
     public static CiRegister asDoubleReg(CiValue value) {
-        assert value.kind == CiKind.Double;
+        assert value.kind == RiKind.Double;
         return asRegister(value);
     }
 
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiVirtualObject.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiVirtualObject.java	Thu Jun 07 17:08:33 2012 +0200
@@ -48,7 +48,7 @@
     }
 
     private CiVirtualObject(RiType type, CiValue[] values, int id) {
-        super(CiKind.Object);
+        super(RiKind.Object);
         this.type = type;
         this.values = values;
         this.id = id;
@@ -124,7 +124,7 @@
             this.runtime = runtime;
         }
 
-        public CiVirtualObject constantProxy(CiKind kind, CiValue objectValue, CiValue primitiveValue) {
+        public CiVirtualObject constantProxy(RiKind kind, CiValue objectValue, CiValue primitiveValue) {
             RiConstant cKind = RiConstant.forObject(kind);
             // TODO: here the ordering is hard coded... we should query RiType.fields() and act accordingly
             return new CiVirtualObject(runtime.getType(RiConstant.class), new CiValue[] {cKind, primitiveValue, CiValue.IllegalValue, objectValue}, nextId++);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/RiKind.java	Thu Jun 07 17:08:33 2012 +0200
@@ -0,0 +1,467 @@
+/*
+ * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.max.cri.ci;
+
+import static com.oracle.max.cri.ci.RiKind.Flags.*;
+
+import java.lang.reflect.*;
+
+import sun.misc.*;
+
+import com.oracle.max.cri.ri.*;
+
+/**
+ * Denotes the basic kinds of types in CRI, including the all the Java primitive types,
+ * for example, {@link RiKind#Int} for {@code int} and {@link RiKind#Object}
+ * for all object types.
+ * A kind has a single character short name, a Java name, and a set of flags
+ * further describing its behavior.
+ */
+public enum RiKind {
+    Boolean('z', "boolean", FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
+    Byte   ('b', "byte",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
+    Short  ('s', "short",   FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
+    Char   ('c', "char",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
+    Int    ('i', "int",     FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
+    Float  ('f', "float",   FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
+    Long   ('j', "long",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
+    Double ('d', "double",  FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
+    Object ('a', "Object",  FIELD_TYPE | RETURN_TYPE),
+    Void   ('v', "void",    RETURN_TYPE),
+    /** Denote a bytecode address in a {@code JSR} bytecode. */
+    Jsr    ('r', "jsr",     0),
+    /** The non-type. */
+    Illegal('-', "illegal", 0);
+
+    public static final RiKind[] VALUES = values();
+    public static final RiKind[] JAVA_VALUES = new RiKind[] {RiKind.Boolean, RiKind.Byte, RiKind.Short, RiKind.Char, RiKind.Int, RiKind.Float, RiKind.Long, RiKind.Double, RiKind.Object};
+
+    RiKind(char ch, String name, int flags) {
+        this.typeChar = ch;
+        this.javaName = name;
+        this.flags = flags;
+    }
+
+    static class Flags {
+        /**
+         * Can be an object field type.
+         */
+        public static final int FIELD_TYPE  = 0x0001;
+        /**
+         * Can be result type of a method.
+         */
+        public static final int RETURN_TYPE = 0x0002;
+        /**
+         * Behaves as an integer when on Java evaluation stack.
+         */
+        public static final int STACK_INT   = 0x0004;
+        /**
+         * Represents a Java primitive type.
+         */
+        public static final int PRIMITIVE   = 0x0008;
+    }
+
+    /**
+     * The flags for this kind.
+     */
+    private final int flags;
+
+    /**
+     * The name of the kind as a single character.
+     */
+    public final char typeChar;
+
+    /**
+     * The name of this kind which will also be it Java programming language name if
+     * it is {@linkplain #isPrimitive() primitive} or {@code void}.
+     */
+    public final String javaName;
+
+    /**
+     * Checks whether this kind is valid as the type of a field.
+     * @return {@code true} if this kind is valid as the type of a Java field
+     */
+    public boolean isValidFieldType() {
+        return (flags & FIELD_TYPE) != 0;
+    }
+
+    /**
+     * Checks whether this kind is valid as the return type of a method.
+     * @return {@code true} if this kind is valid as the return type of a Java method
+     */
+    public boolean isValidReturnType() {
+        return (flags & RETURN_TYPE) != 0;
+    }
+
+    /**
+     * Checks whether this type is valid as an {@code int} on the Java operand stack.
+     * @return {@code true} if this type is represented by an {@code int} on the operand stack
+     */
+    public boolean isInt() {
+        return (flags & STACK_INT) != 0;
+    }
+
+    /**
+     * Checks whether this type is a Java primitive type.
+     * @return {@code true} if this is {@link #Boolean}, {@link #Byte}, {@link #Char}, {@link #Short},
+     *                                 {@link #Int}, {@link #Long}, {@link #Float} or {@link #Double}.
+     */
+    public boolean isPrimitive() {
+        return (flags & PRIMITIVE) != 0;
+    }
+
+    /**
+     * Gets the kind that represents this kind when on the Java operand stack.
+     * @return the kind used on the operand stack
+     */
+    public RiKind stackKind() {
+        if (isInt()) {
+            return Int;
+        }
+        return this;
+    }
+
+    public static RiKind fromTypeString(String typeString) {
+        assert typeString.length() > 0;
+        final char first = typeString.charAt(0);
+        if (first == '[' || first == 'L') {
+            return RiKind.Object;
+        }
+        return RiKind.fromPrimitiveOrVoidTypeChar(first);
+    }
+
+    /**
+     * Gets the kind from the character describing a primitive or void.
+     * @param ch the character
+     * @return the kind
+     */
+    public static RiKind fromPrimitiveOrVoidTypeChar(char ch) {
+        // Checkstyle: stop
+        switch (ch) {
+            case 'Z': return Boolean;
+            case 'C': return Char;
+            case 'F': return Float;
+            case 'D': return Double;
+            case 'B': return Byte;
+            case 'S': return Short;
+            case 'I': return Int;
+            case 'J': return Long;
+            case 'V': return Void;
+        }
+        // Checkstyle: resume
+        throw new IllegalArgumentException("unknown primitive or void type character: " + ch);
+    }
+
+    public Class< ? > toJavaClass() {
+        // Checkstyle: stop
+        switch(this) {
+            case Void:      return java.lang.Void.TYPE;
+            case Long:      return java.lang.Long.TYPE;
+            case Int:       return java.lang.Integer.TYPE;
+            case Byte:      return java.lang.Byte.TYPE;
+            case Char:      return java.lang.Character.TYPE;
+            case Double:    return java.lang.Double.TYPE;
+            case Float:     return java.lang.Float.TYPE;
+            case Short:     return java.lang.Short.TYPE;
+            case Boolean:   return java.lang.Boolean.TYPE;
+            default:        return null;
+        }
+        // Checkstyle: resume
+    }
+
+    public Class< ? > toBoxedJavaClass() {
+        // Checkstyle: stop
+        switch(this) {
+            case Void:      return null;
+            case Long:      return java.lang.Long.class;
+            case Int:       return java.lang.Integer.class;
+            case Byte:      return java.lang.Byte.class;
+            case Char:      return java.lang.Character.class;
+            case Double:    return java.lang.Double.class;
+            case Float:     return java.lang.Float.class;
+            case Short:     return java.lang.Short.class;
+            case Boolean:   return java.lang.Boolean.class;
+            default:        return null;
+        }
+        // Checkstyle: resume
+    }
+
+    /**
+     * Checks whether this value type is void.
+     * @return {@code true} if this type is void
+     */
+    public final boolean isVoid() {
+        return this == RiKind.Void;
+    }
+
+    /**
+     * Checks whether this value type is long.
+     * @return {@code true} if this type is long
+     */
+    public final boolean isLong() {
+        return this == RiKind.Long;
+    }
+
+    /**
+     * Checks whether this value type is float.
+     * @return {@code true} if this type is float
+     */
+    public final boolean isFloat() {
+        return this == RiKind.Float;
+    }
+
+    /**
+     * Checks whether this value type is double.
+     * @return {@code true} if this type is double
+     */
+    public final boolean isDouble() {
+        return this == RiKind.Double;
+    }
+
+    /**
+     * Checks whether this value type is float or double.
+     * @return {@code true} if this type is float or double
+     */
+    public final boolean isFloatOrDouble() {
+        return this == RiKind.Double || this == RiKind.Float;
+    }
+
+   /**
+     * Checks whether this value type is an object type.
+     * @return {@code true} if this type is an object
+     */
+    public final boolean isObject() {
+        return this == RiKind.Object;
+    }
+
+    /**
+     * Checks whether this value type is an address type.
+     * @return {@code true} if this type is an address
+     */
+    public boolean isJsr() {
+        return this == RiKind.Jsr;
+    }
+
+    /**
+     * Converts this value type to a string.
+     */
+    @Override
+    public String toString() {
+        return javaName;
+    }
+
+    /**
+     * Marker interface for types that should be {@linkplain RiKind#format(Object) formatted}
+     * with their {@link Object#toString()} value.
+     */
+    public interface FormatWithToString {}
+
+    /**
+     * Gets a formatted string for a given value of this kind.
+     *
+     * @param value a value of this kind
+     * @return a formatted string for {@code value} based on this kind
+     */
+    public String format(Object value) {
+        if (isObject()) {
+            if (value == null) {
+                return "null";
+            } else {
+                if (value instanceof String) {
+                    String s = (String) value;
+                    if (s.length() > 50) {
+                        return "\"" + s.substring(0, 30) + "...\"";
+                    } else {
+                        return " \"" + s + '"';
+                    }
+                } else if (value instanceof RiType) {
+                    return "class " + CiUtil.toJavaName((RiType) value);
+                } else if (value instanceof Enum || value instanceof FormatWithToString) {
+                    return String.valueOf(value);
+                } else if (value instanceof Class< ? >) {
+                    return ((Class< ? >) value).getName() + ".class";
+                } else if (value.getClass().isArray()) {
+                    return formatArray(value);
+                } else {
+                    return CiUtil.getSimpleName(value.getClass(), true) + "@" + System.identityHashCode(value);
+                }
+            }
+        } else {
+            return value.toString();
+        }
+    }
+
+    private static final int MAX_FORMAT_ARRAY_LENGTH = Integer.getInteger("maxFormatArrayLength", 5);
+
+    private static String formatArray(Object array) {
+        Class< ? > componentType = array.getClass().getComponentType();
+        assert componentType != null;
+        int arrayLength = Array.getLength(array);
+        StringBuilder buf = new StringBuilder(CiUtil.getSimpleName(componentType, true)).
+                        append('[').
+                        append(arrayLength).
+                        append("]{");
+        int length = Math.min(MAX_FORMAT_ARRAY_LENGTH, arrayLength);
+        boolean primitive = componentType.isPrimitive();
+        for (int i = 0; i < length; i++) {
+            if (primitive) {
+                buf.append(Array.get(array, i));
+            } else {
+                Object o = ((Object[]) array)[i];
+                buf.append(RiKind.Object.format(o));
+            }
+            if (i != length - 1) {
+                buf.append(", ");
+            }
+        }
+        if (arrayLength != length) {
+            buf.append(", ...");
+        }
+        return buf.append('}').toString();
+    }
+
+    public final char signatureChar() {
+        return Character.toUpperCase(typeChar);
+    }
+
+    public final int arrayBaseOffset() {
+        switch(this) {
+            case Boolean:
+                return Unsafe.ARRAY_BOOLEAN_BASE_OFFSET;
+            case Byte:
+                return Unsafe.ARRAY_BYTE_BASE_OFFSET;
+            case Char:
+                return Unsafe.ARRAY_CHAR_BASE_OFFSET;
+            case Short:
+                return Unsafe.ARRAY_SHORT_BASE_OFFSET;
+            case Int:
+                return Unsafe.ARRAY_INT_BASE_OFFSET;
+            case Long:
+                return Unsafe.ARRAY_LONG_BASE_OFFSET;
+            case Float:
+                return Unsafe.ARRAY_FLOAT_BASE_OFFSET;
+            case Double:
+                return Unsafe.ARRAY_DOUBLE_BASE_OFFSET;
+            case Object:
+                return Unsafe.ARRAY_OBJECT_BASE_OFFSET;
+            default:
+                assert false : "unexpected kind: " + this;
+                return -1;
+        }
+    }
+
+    public final int arrayIndexScale() {
+        switch(this) {
+            case Boolean:
+                return Unsafe.ARRAY_BOOLEAN_INDEX_SCALE;
+            case Byte:
+                return Unsafe.ARRAY_BYTE_INDEX_SCALE;
+            case Char:
+                return Unsafe.ARRAY_CHAR_INDEX_SCALE;
+            case Short:
+                return Unsafe.ARRAY_SHORT_INDEX_SCALE;
+            case Int:
+                return Unsafe.ARRAY_INT_INDEX_SCALE;
+            case Long:
+                return Unsafe.ARRAY_LONG_INDEX_SCALE;
+            case Float:
+                return Unsafe.ARRAY_FLOAT_INDEX_SCALE;
+            case Double:
+                return Unsafe.ARRAY_DOUBLE_INDEX_SCALE;
+            case Object:
+                return Unsafe.ARRAY_OBJECT_INDEX_SCALE;
+            default:
+                assert false : "unexpected kind: " + this;
+                return -1;
+        }
+    }
+
+    public RiConstant readUnsafeConstant(Object value, long displacement) {
+        assert value != null;
+        Unsafe u = Unsafe.getUnsafe();
+        switch(this) {
+            case Boolean:
+                return RiConstant.forBoolean(u.getBoolean(value, displacement));
+            case Byte:
+                return RiConstant.forByte(u.getByte(value, displacement));
+            case Char:
+                return RiConstant.forChar(u.getChar(value, displacement));
+            case Short:
+                return RiConstant.forShort(u.getShort(value, displacement));
+            case Int:
+                return RiConstant.forInt(u.getInt(value, displacement));
+            case Long:
+                return RiConstant.forLong(u.getLong(value, displacement));
+            case Float:
+                return RiConstant.forFloat(u.getFloat(value, displacement));
+            case Double:
+                return RiConstant.forDouble(u.getDouble(value, displacement));
+            case Object:
+                return RiConstant.forObject(u.getObject(value, displacement));
+            default:
+                assert false : "unexpected kind: " + this;
+                return null;
+        }
+    }
+
+    public long minValue() {
+        switch (this) {
+            case Boolean:
+                return 0;
+            case Byte:
+                return java.lang.Byte.MIN_VALUE;
+            case Char:
+                return java.lang.Character.MIN_VALUE;
+            case Short:
+                return java.lang.Short.MIN_VALUE;
+            case Jsr:
+            case Int:
+                return java.lang.Integer.MIN_VALUE;
+            case Long:
+                return java.lang.Long.MIN_VALUE;
+            default:
+                throw new IllegalArgumentException("illegal call to minValue on " + this);
+        }
+    }
+
+    public long maxValue() {
+        switch (this) {
+            case Boolean:
+                return 1;
+            case Byte:
+                return java.lang.Byte.MAX_VALUE;
+            case Char:
+                return java.lang.Character.MAX_VALUE;
+            case Short:
+                return java.lang.Short.MAX_VALUE;
+            case Jsr:
+            case Int:
+                return java.lang.Integer.MAX_VALUE;
+            case Long:
+                return java.lang.Long.MAX_VALUE;
+            default:
+                throw new IllegalArgumentException("illegal call to maxValue on " + this);
+        }
+    }
+
+}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/package-info.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/package-info.java	Thu Jun 07 17:08:33 2012 +0200
@@ -33,7 +33,7 @@
  * {@link com.oracle.max.cri.ci.CiCodePos} and {@link com.oracle.max.cri.ci.CiDebugInfo} provide detailed information to the
  * runtime to support debugging and deoptimization of the compiled code.
  * <p>
- * The compiler manipulates {@link com.oracle.max.cri.ci.CiValue} instances that have a {@link com.oracle.max.cri.ci.CiKind}, and are
+ * The compiler manipulates {@link com.oracle.max.cri.ci.CiValue} instances that have a {@link com.oracle.max.cri.ci.RiKind}, and are
  * immutable. A concrete {@link com.oracle.max.cri.ci.CiValue value} is one of the following subclasses:
  * <ul>
  * <li>{@link com.oracle.max.cri.ri.RiConstant}: a constant value.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiConstant.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiConstant.java	Thu Jun 07 17:08:33 2012 +0200
@@ -35,27 +35,27 @@
     private static final RiConstant[] INT_CONSTANT_CACHE = new RiConstant[100];
     static {
         for (int i = 0; i < INT_CONSTANT_CACHE.length; ++i) {
-            INT_CONSTANT_CACHE[i] = new RiConstant(CiKind.Int, i);
+            INT_CONSTANT_CACHE[i] = new RiConstant(RiKind.Int, i);
         }
     }
 
-    public static final RiConstant NULL_OBJECT = new RiConstant(CiKind.Object, null);
-    public static final RiConstant INT_MINUS_1 = new RiConstant(CiKind.Int, -1);
+    public static final RiConstant NULL_OBJECT = new RiConstant(RiKind.Object, null);
+    public static final RiConstant INT_MINUS_1 = new RiConstant(RiKind.Int, -1);
     public static final RiConstant INT_0 = forInt(0);
     public static final RiConstant INT_1 = forInt(1);
     public static final RiConstant INT_2 = forInt(2);
     public static final RiConstant INT_3 = forInt(3);
     public static final RiConstant INT_4 = forInt(4);
     public static final RiConstant INT_5 = forInt(5);
-    public static final RiConstant LONG_0 = new RiConstant(CiKind.Long, 0L);
-    public static final RiConstant LONG_1 = new RiConstant(CiKind.Long, 1L);
-    public static final RiConstant FLOAT_0 = new RiConstant(CiKind.Float, Float.floatToRawIntBits(0.0F));
-    public static final RiConstant FLOAT_1 = new RiConstant(CiKind.Float, Float.floatToRawIntBits(1.0F));
-    public static final RiConstant FLOAT_2 = new RiConstant(CiKind.Float, Float.floatToRawIntBits(2.0F));
-    public static final RiConstant DOUBLE_0 = new RiConstant(CiKind.Double, Double.doubleToRawLongBits(0.0D));
-    public static final RiConstant DOUBLE_1 = new RiConstant(CiKind.Double, Double.doubleToRawLongBits(1.0D));
-    public static final RiConstant TRUE = new RiConstant(CiKind.Boolean, 1L);
-    public static final RiConstant FALSE = new RiConstant(CiKind.Boolean, 0L);
+    public static final RiConstant LONG_0 = new RiConstant(RiKind.Long, 0L);
+    public static final RiConstant LONG_1 = new RiConstant(RiKind.Long, 1L);
+    public static final RiConstant FLOAT_0 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(0.0F));
+    public static final RiConstant FLOAT_1 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(1.0F));
+    public static final RiConstant FLOAT_2 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(2.0F));
+    public static final RiConstant DOUBLE_0 = new RiConstant(RiKind.Double, Double.doubleToRawLongBits(0.0D));
+    public static final RiConstant DOUBLE_1 = new RiConstant(RiKind.Double, Double.doubleToRawLongBits(1.0D));
+    public static final RiConstant TRUE = new RiConstant(RiKind.Boolean, 1L);
+    public static final RiConstant FALSE = new RiConstant(RiKind.Boolean, 0L);
 
     static {
         assert NULL_OBJECT.isDefaultValue();
@@ -93,7 +93,7 @@
      * @param kind the type of this constant
      * @param object the value of this constant
      */
-    private RiConstant(CiKind kind, Object object) {
+    private RiConstant(RiKind kind, Object object) {
         super(kind);
         this.object = object;
         this.primitive = 0L;
@@ -105,7 +105,7 @@
      * @param kind the type of this constant
      * @param primitive the value of this constant
      */
-    public RiConstant(CiKind kind, long primitive) {
+    public RiConstant(RiKind kind, long primitive) {
         super(kind);
         this.object = null;
         this.primitive = primitive;
@@ -129,7 +129,7 @@
 
     @Override
     public String toString() {
-        return kind.javaName + "[" + kind.format(boxedValue()) + (kind != CiKind.Object ? "|0x" + Long.toHexString(primitive) : "") + "]";
+        return kind.javaName + "[" + kind.format(boxedValue()) + (kind != RiKind.Object ? "|0x" + Long.toHexString(primitive) : "") + "]";
     }
 
     /**
@@ -204,7 +204,7 @@
      * @return the boolean value of this constant
      */
     public boolean asBoolean() {
-        if (kind == CiKind.Boolean) {
+        if (kind == RiKind.Boolean) {
             return primitive != 0L;
         }
         throw new Error("Constant is not boolean: " + this);
@@ -337,9 +337,9 @@
     /**
      * Gets the default value for a given kind.
      *
-     * @return the default value for {@code kind}'s {@linkplain CiKind#stackKind() stack kind}
+     * @return the default value for {@code kind}'s {@linkplain RiKind#stackKind() stack kind}
      */
-    public static RiConstant defaultValue(CiKind kind) {
+    public static RiConstant defaultValue(RiKind kind) {
         // Checkstyle: stop
         switch (kind.stackKind()) {
             case Int: return INT_0;
@@ -364,7 +364,7 @@
         if (Double.compare(d, 1.0D) == 0) {
             return DOUBLE_1;
         }
-        return new RiConstant(CiKind.Double, Double.doubleToRawLongBits(d));
+        return new RiConstant(RiKind.Double, Double.doubleToRawLongBits(d));
     }
 
     /**
@@ -382,7 +382,7 @@
         if (Float.compare(f, 2.0F) == 0) {
             return FLOAT_2;
         }
-        return new RiConstant(CiKind.Float, Float.floatToRawIntBits(f));
+        return new RiConstant(RiKind.Float, Float.floatToRawIntBits(f));
     }
 
     /**
@@ -391,7 +391,7 @@
      * @return a boxed copy of {@code value}
      */
     public static RiConstant forLong(long i) {
-        return i == 0 ? LONG_0 : i == 1 ? LONG_1 : new RiConstant(CiKind.Long, i);
+        return i == 0 ? LONG_0 : i == 1 ? LONG_1 : new RiConstant(RiKind.Long, i);
     }
 
     /**
@@ -406,7 +406,7 @@
         if (i >= 0 && i < INT_CONSTANT_CACHE.length) {
             return INT_CONSTANT_CACHE[i];
         }
-        return new RiConstant(CiKind.Int, i);
+        return new RiConstant(RiKind.Int, i);
     }
 
     /**
@@ -415,7 +415,7 @@
      * @return a boxed copy of {@code value}
      */
     public static RiConstant forByte(byte i) {
-        return new RiConstant(CiKind.Byte, i);
+        return new RiConstant(RiKind.Byte, i);
     }
 
     /**
@@ -433,7 +433,7 @@
      * @return a boxed copy of {@code value}
      */
     public static RiConstant forChar(char i) {
-        return new RiConstant(CiKind.Char, i);
+        return new RiConstant(RiKind.Char, i);
     }
 
     /**
@@ -442,7 +442,7 @@
      * @return a boxed copy of {@code value}
      */
     public static RiConstant forShort(short i) {
-        return new RiConstant(CiKind.Short, i);
+        return new RiConstant(RiKind.Short, i);
     }
 
     /**
@@ -451,7 +451,7 @@
      * @return a boxed copy of {@code value}
      */
     public static RiConstant forJsr(int i) {
-        return new RiConstant(CiKind.Jsr, i);
+        return new RiConstant(RiKind.Jsr, i);
     }
 
     /**
@@ -463,7 +463,7 @@
         if (o == null) {
             return NULL_OBJECT;
         }
-        return new RiConstant(CiKind.Object, o);
+        return new RiConstant(RiKind.Object, o);
     }
 
     /**
@@ -473,7 +473,7 @@
      * @param value the Java boxed value: a Byte instance for CiKind Byte, etc.
      * @return the boxed copy of {@code value}
      */
-    public static RiConstant forBoxed(CiKind kind, Object value) {
+    public static RiConstant forBoxed(RiKind kind, Object value) {
         switch (kind) {
             case Boolean:
                 return forBoolean((Boolean) value);
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiField.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiField.java	Thu Jun 07 17:08:33 2012 +0200
@@ -49,7 +49,7 @@
      *        When false, the kind according to the Java specification is returned.
      * @return the kind
      */
-    CiKind kind(boolean architecture);
+    RiKind kind(boolean architecture);
 
     /**
      * Gets the holder of this field as a compiler-runtime interface type.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRegisterConfig.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRegisterConfig.java	Thu Jun 07 17:08:33 2012 +0200
@@ -37,7 +37,7 @@
     /**
      * Gets the register to be used for returning a value of a given kind.
      */
-    CiRegister getReturnRegister(CiKind kind);
+    CiRegister getReturnRegister(RiKind kind);
 
     /**
      * Gets the register to which {@link CiRegister#Frame} and {@link CiRegister#CallerFrame} are bound.
@@ -54,7 +54,7 @@
      * @param target the target platform
      * @param stackOnly ignore registers
      */
-    CiCallingConvention getCallingConvention(Type type, CiKind[] parameters, CiTarget target, boolean stackOnly);
+    CiCallingConvention getCallingConvention(Type type, RiKind[] parameters, CiTarget target, boolean stackOnly);
 
     /**
      * Gets the ordered set of registers that are can be used to pass parameters
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java	Thu Jun 07 17:08:33 2012 +0200
@@ -56,7 +56,7 @@
     /**
      * Returns the RiType object representing the base type for the given kind.
      */
-    RiResolvedType asRiType(CiKind kind);
+    RiResolvedType asRiType(RiKind kind);
 
     /**
      * Returns the type of the given constant object.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiSignature.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiSignature.java	Thu Jun 07 17:08:33 2012 +0200
@@ -58,7 +58,7 @@
      *        When false, the kind according to the Java specification is returned.
      * @return the kind of the argument at the specified position
      */
-    CiKind argumentKindAt(int index, boolean architecture);
+    RiKind argumentKindAt(int index, boolean architecture);
 
     /**
      * Gets the return type of this signature. This method will return a
@@ -78,7 +78,7 @@
      *        When false, the kind according to the Java specification is returned.
      * @return the return kind
      */
-    CiKind returnKind(boolean architectureSpecific);
+    RiKind returnKind(boolean architectureSpecific);
 
     /**
      * Converts this signature to a string.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiType.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiType.java	Thu Jun 07 17:08:33 2012 +0200
@@ -83,14 +83,14 @@
      *        When false, the kind according to the Java specification is returned.
      * @return the kind
      */
-    CiKind kind(boolean architecture);
+    RiKind kind(boolean architecture);
 
     /**
      * Gets the kind used to represent the specified part of this type.
      * @param r the part of the this type
      * @return the kind of constants for the specified part of the type
      */
-    CiKind getRepresentationKind(Representation r);
+    RiKind getRepresentationKind(Representation r);
 
     RiResolvedType resolve(RiResolvedType accessingClass);
 }
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java	Thu Jun 07 17:08:33 2012 +0200
@@ -153,7 +153,7 @@
      */
     public abstract static class XirOperand {
 
-        public final CiKind kind;
+        public final RiKind kind;
 
         /**
          * Unique id in range {@code 0} to {@link #variableCount variableCount - 1}.
@@ -165,7 +165,7 @@
          */
         public final Object name;
 
-        public XirOperand(CiXirAssembler asm, Object name, CiKind kind) {
+        public XirOperand(CiXirAssembler asm, Object name, RiKind kind) {
             this.kind = kind;
             this.name = name;
             this.index = asm.variableCount++;
@@ -198,7 +198,7 @@
 
         public final boolean canBeConstant;
 
-        XirParameter(CiXirAssembler asm, String name, CiKind kind, boolean canBeConstant) {
+        XirParameter(CiXirAssembler asm, String name, RiKind kind, boolean canBeConstant) {
             super(asm, name, kind);
             this.parameterIndex = asm.parameters.size();
             this.canBeConstant = canBeConstant;
@@ -208,7 +208,7 @@
     }
 
     public static class XirConstantParameter extends XirParameter implements XirConstantOperand {
-        XirConstantParameter(CiXirAssembler asm, String name, CiKind kind) {
+        XirConstantParameter(CiXirAssembler asm, String name, RiKind kind) {
             super(asm, name, kind, true);
         }
 
@@ -218,7 +218,7 @@
     }
 
     public static class XirVariableParameter extends XirParameter {
-        XirVariableParameter(CiXirAssembler asm, String name, CiKind kind, boolean canBeConstant) {
+        XirVariableParameter(CiXirAssembler asm, String name, RiKind kind, boolean canBeConstant) {
             super(asm, name, kind, canBeConstant);
         }
     }
@@ -239,7 +239,7 @@
     public static class XirTemp extends XirOperand {
         public final boolean reserve;
 
-        XirTemp(CiXirAssembler asm, String name, CiKind kind, boolean reserve) {
+        XirTemp(CiXirAssembler asm, String name, RiKind kind, boolean reserve) {
             super(asm, name, kind);
             this.reserve = reserve;
         }
@@ -267,7 +267,7 @@
      * @param kind the result kind
      * @return an {@code XirOperand} for the result operand
      */
-    public XirOperand restart(CiKind kind) {
+    public XirOperand restart(RiKind kind) {
         reset();
         resultOperand = new XirTemp(this, "result", kind, true);
         allocateResultOperand = true;
@@ -292,16 +292,16 @@
     }
 
     /**
-     * Represents an XIR instruction, characterized by an {@link XirOp operation}, a {@link CiKind kind}, an optional {@link XirOperand result}, a variable number of {@link XirOperand arguments},
+     * Represents an XIR instruction, characterized by an {@link XirOp operation}, a {@link RiKind kind}, an optional {@link XirOperand result}, a variable number of {@link XirOperand arguments},
      * and some optional instruction-specific state. The {@link #x}, {@link #y} and {@link #z} methods are convenient ways to access the first, second and third
      * arguments, respectively. Only the {@link XirOp#CallStub} and {@link XirOp#CallRuntime} instructions can have more than three arguments.
      *
      */
     public static final class XirInstruction {
         /**
-         * The {@link CiKind kind} of values the instruction operates on.
+         * The {@link RiKind kind} of values the instruction operates on.
          */
-        public final CiKind kind;
+        public final RiKind kind;
         /**
          * The {@link XirOp operation}.
          */
@@ -319,11 +319,11 @@
          */
         public final Object extra;
 
-        public XirInstruction(CiKind kind, XirOp op, XirOperand result, XirOperand... arguments) {
+        public XirInstruction(RiKind kind, XirOp op, XirOperand result, XirOperand... arguments) {
             this(kind, null, op, result, arguments);
         }
 
-        public XirInstruction(CiKind kind, Object extra, XirOp op, XirOperand result, XirOperand... arguments) {
+        public XirInstruction(RiKind kind, Object extra, XirOp op, XirOperand result, XirOperand... arguments) {
             this.extra = extra;
             this.kind = kind;
             this.op = op;
@@ -357,7 +357,7 @@
 
             sb.append(op.name());
 
-            if (kind != CiKind.Void) {
+            if (kind != RiKind.Void) {
                 sb.append('$');
                 sb.append(kind.typeChar);
             }
@@ -640,26 +640,26 @@
     }
 
     public void nullCheck(XirOperand pointer) {
-        append(new XirInstruction(CiKind.Object, NullCheck, VOID, pointer));
+        append(new XirInstruction(RiKind.Object, NullCheck, VOID, pointer));
     }
 
-    public void pload(CiKind kind, XirOperand result, XirOperand pointer, boolean canTrap) {
+    public void pload(RiKind kind, XirOperand result, XirOperand pointer, boolean canTrap) {
         append(new XirInstruction(kind, canTrap, PointerLoad, result, pointer));
     }
 
-    public void pstore(CiKind kind, XirOperand pointer, XirOperand value, boolean canTrap) {
+    public void pstore(RiKind kind, XirOperand pointer, XirOperand value, boolean canTrap) {
         append(new XirInstruction(kind, canTrap, PointerStore, null, pointer, value));
     }
 
-    public void pload(CiKind kind, XirOperand result, XirOperand pointer, XirOperand offset, boolean canTrap) {
+    public void pload(RiKind kind, XirOperand result, XirOperand pointer, XirOperand offset, boolean canTrap) {
         append(new XirInstruction(kind, new AddressAccessInformation(canTrap), PointerLoadDisp, result, pointer, offset));
     }
 
-    public void pstore(CiKind kind, XirOperand pointer, XirOperand offset, XirOperand value, boolean canTrap) {
+    public void pstore(RiKind kind, XirOperand pointer, XirOperand offset, XirOperand value, boolean canTrap) {
         append(new XirInstruction(kind, new AddressAccessInformation(canTrap), PointerStoreDisp, VOID, pointer, offset, value));
     }
 
-    public void pload(CiKind kind, XirOperand result, XirOperand pointer, XirOperand index, int disp, Scale scale,  boolean canTrap) {
+    public void pload(RiKind kind, XirOperand result, XirOperand pointer, XirOperand index, int disp, Scale scale,  boolean canTrap) {
         append(new XirInstruction(kind, new AddressAccessInformation(canTrap, disp, scale), PointerLoadDisp, result, pointer, index));
     }
 
@@ -679,24 +679,24 @@
         append(new XirInstruction(target.wordKind, null, RepeatMoveBytes, null, src, dest, length));
     }
 
-    public void pstore(CiKind kind, XirOperand pointer, XirOperand index, XirOperand value, int disp, Scale scale, boolean canTrap) {
+    public void pstore(RiKind kind, XirOperand pointer, XirOperand index, XirOperand value, int disp, Scale scale, boolean canTrap) {
         append(new XirInstruction(kind, new AddressAccessInformation(canTrap, disp, scale), PointerStoreDisp, VOID, pointer, index, value));
     }
 
-    public void pcas(CiKind kind, XirOperand result, XirOperand pointer, XirOperand newValue, XirOperand oldValue) {
+    public void pcas(RiKind kind, XirOperand result, XirOperand pointer, XirOperand newValue, XirOperand oldValue) {
         append(new XirInstruction(kind, null, PointerCAS, result, pointer, newValue, oldValue));
     }
 
     public void jmp(XirLabel l) {
-        append(new XirInstruction(CiKind.Void, l, Jmp, null));
+        append(new XirInstruction(RiKind.Void, l, Jmp, null));
     }
 
     public void decAndJumpNotZero(XirLabel l, XirOperand val) {
-        append(new XirInstruction(CiKind.Void, l, DecAndJumpNotZero, null, val));
+        append(new XirInstruction(RiKind.Void, l, DecAndJumpNotZero, null, val));
     }
 
     public void jmpRuntime(Object rt) {
-        append(new XirInstruction(CiKind.Void, rt, Jmp, null));
+        append(new XirInstruction(RiKind.Void, rt, Jmp, null));
     }
 
     public void jeq(XirLabel l, XirOperand a, XirOperand b) {
@@ -704,7 +704,7 @@
     }
 
     private void jcc(XirOp op, XirLabel l, XirOperand a, XirOperand b) {
-        append(new XirInstruction(CiKind.Void, l, op, null, a, b));
+        append(new XirInstruction(RiKind.Void, l, op, null, a, b));
     }
 
     public void jneq(XirLabel l, XirOperand a, XirOperand b) {
@@ -732,25 +732,25 @@
     }
 
     public void jbset(XirLabel l, XirOperand a, XirOperand b, XirOperand c) {
-        append(new XirInstruction(CiKind.Void, l, Jbset, null, a, b, c));
+        append(new XirInstruction(RiKind.Void, l, Jbset, null, a, b, c));
     }
 
     public void bindInline(XirLabel l) {
         assert l.inline;
-        append(new XirInstruction(CiKind.Void, l, Bind, null));
+        append(new XirInstruction(RiKind.Void, l, Bind, null));
     }
 
     public void bindOutOfLine(XirLabel l) {
         assert !l.inline;
-        append(new XirInstruction(CiKind.Void, l, Bind, null));
+        append(new XirInstruction(RiKind.Void, l, Bind, null));
     }
 
     public void safepoint() {
-        append(new XirInstruction(CiKind.Void, null, Safepoint, null));
+        append(new XirInstruction(RiKind.Void, null, Safepoint, null));
     }
 
     public void push(XirOperand value) {
-        append(new XirInstruction(CiKind.Void, Push, VOID, value));
+        append(new XirInstruction(RiKind.Void, Push, VOID, value));
     }
 
     public void pop(XirOperand result) {
@@ -760,20 +760,20 @@
     public XirMark mark(Object id, XirMark... references) {
         XirMark mark = new XirMark(id, references);
         marks.add(mark);
-        append(new XirInstruction(CiKind.Void, mark, Mark, null));
+        append(new XirInstruction(RiKind.Void, mark, Mark, null));
         return mark;
     }
 
     public void nop(int size) {
-        append(new XirInstruction(CiKind.Void, size, Nop, null));
+        append(new XirInstruction(RiKind.Void, size, Nop, null));
     }
 
     public void shouldNotReachHere() {
-        append(new XirInstruction(CiKind.Void, null, ShouldNotReachHere, null));
+        append(new XirInstruction(RiKind.Void, null, ShouldNotReachHere, null));
     }
 
     public void shouldNotReachHere(String message) {
-        append(new XirInstruction(CiKind.Void, message, ShouldNotReachHere, null));
+        append(new XirInstruction(RiKind.Void, message, ShouldNotReachHere, null));
     }
 
     public void callRuntime(Object rt, XirOperand result, XirOperand... args) {
@@ -781,7 +781,7 @@
     }
 
     public void callRuntime(Object rt, XirOperand result, boolean useInfoAfter, XirOperand... args) {
-        CiKind resultKind = result == null ? CiKind.Void : result.kind;
+        RiKind resultKind = result == null ? RiKind.Void : result.kind;
         append(new XirInstruction(resultKind, new RuntimeCallInformation(rt, useInfoAfter), CallRuntime, result, args));
     }
 
@@ -795,27 +795,27 @@
     }
 
     /**
-     * Creates an {@link XirVariableParameter variable input parameter}  of given name and {@link CiKind kind}.
+     * Creates an {@link XirVariableParameter variable input parameter}  of given name and {@link RiKind kind}.
      * @param name a name for the parameter
      * @param kind the parameter kind
      * @return the  {@link XirVariableParameter}
      */
-    public XirVariableParameter createInputParameter(String name, CiKind kind, boolean canBeConstant) {
+    public XirVariableParameter createInputParameter(String name, RiKind kind, boolean canBeConstant) {
         assert !finished;
         return new XirVariableParameter(this, name, kind, canBeConstant);
     }
 
-    public XirVariableParameter createInputParameter(String name, CiKind kind) {
+    public XirVariableParameter createInputParameter(String name, RiKind kind) {
         return createInputParameter(name, kind, false);
     }
 
     /**
-     * Creates an {@link XirConstantParameter constant input parameter}  of given name and {@link CiKind kind}.
+     * Creates an {@link XirConstantParameter constant input parameter}  of given name and {@link RiKind kind}.
      * @param name a name for the parameter
      * @param kind the parameter kind
      * @return the  {@link XirConstantParameter}
      */
-    public XirConstantParameter createConstantInputParameter(String name, CiKind kind) {
+    public XirConstantParameter createConstantInputParameter(String name, RiKind kind) {
         assert !finished;
         return new XirConstantParameter(this, name, kind);
     }
@@ -827,22 +827,22 @@
         return temp;
     }
 
-    public XirOperand createTemp(String name, CiKind kind) {
+    public XirOperand createTemp(String name, RiKind kind) {
         assert !finished;
         XirTemp temp = new XirTemp(this, name, kind, true);
         temps.add(temp);
         return temp;
     }
 
-    public XirOperand createRegister(String name, CiKind kind, CiRegister register) {
+    public XirOperand createRegister(String name, RiKind kind, CiRegister register) {
         return createRegister(name, kind, register, false);
     }
 
-    public XirOperand createRegisterTemp(String name, CiKind kind, CiRegister register) {
+    public XirOperand createRegisterTemp(String name, RiKind kind, CiRegister register) {
         return createRegister(name, kind, register, true);
     }
 
-    private XirOperand createRegister(String name, CiKind kind, CiRegister register, boolean reserve) {
+    private XirOperand createRegister(String name, RiKind kind, CiRegister register, boolean reserve) {
         assert !finished;
         XirRegister fixed = new XirRegister(this, name, register.asValue(kind), reserve);
         temps.add(fixed);
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/RiXirGenerator.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/RiXirGenerator.java	Thu Jun 07 17:08:33 2012 +0200
@@ -45,7 +45,7 @@
 
     XirSnippet genNewInstance(XirSite site, RiType type);
 
-    XirSnippet genNewArray(XirSite site, XirArgument length, CiKind elementKind, RiType componentType, RiType arrayType);
+    XirSnippet genNewArray(XirSite site, XirArgument length, RiKind elementKind, RiType componentType, RiType arrayType);
 
     XirSnippet genNewMultiArray(XirSite site, XirArgument[] lengths, RiType type);
 
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirSnippet.java	Thu Jun 07 17:07:42 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirSnippet.java	Thu Jun 07 17:08:33 2012 +0200
@@ -58,7 +58,7 @@
     }
 
     private static boolean assertArgumentCorrect(XirParameter param, XirArgument arg) {
-        if (param.kind == CiKind.Illegal || param.kind == CiKind.Void) {
+        if (param.kind == RiKind.Illegal || param.kind == RiKind.Void) {
             if (arg != null) {
                 return false;
             }