changeset 5540:a891c53a295b

Renaming RiKind => Kind.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 08 Jun 2012 23:47:42 +0200
parents bc647d8b0080
children b4c406861c33
files graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegister.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfig.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRuntimeCall.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiTarget.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiUtil.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Constant.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Kind.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessProvider.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiField.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiKind.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiSignature.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiType.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiUtil.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java 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.server/src/com/oracle/graal/hotspot/server/ReplacingStreams.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.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/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/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 graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedField.java src/share/vm/classfile/vmSymbols.hpp src/share/vm/graal/graalCompilerToVM.cpp src/share/vm/graal/graalJavaAccess.hpp
diffstat 151 files changed, 1335 insertions(+), 1335 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java	Fri Jun 08 23:47:42 2012 +0200
@@ -37,7 +37,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(RiKind.Illegal, Value.IllegalValue);
+    public static final CiAddress Placeholder = new CiAddress(Kind.Illegal, Value.IllegalValue);
 
     /**
      * Base register that defines the start of the address computation.
@@ -66,7 +66,7 @@
      * @param kind the kind of the value being addressed
      * @param base the base register
      */
-    public CiAddress(RiKind kind, Value base) {
+    public CiAddress(Kind kind, Value base) {
         this(kind, base, IllegalValue, Scale.Times1, 0);
     }
 
@@ -76,7 +76,7 @@
      * @param base the base register
      * @param displacement the displacement
      */
-    public CiAddress(RiKind kind, Value base, int displacement) {
+    public CiAddress(Kind kind, Value base, int displacement) {
         this(kind, base, IllegalValue, Scale.Times1, displacement);
     }
 
@@ -89,7 +89,7 @@
      * @param scale the scaling factor
      * @param displacement the displacement
      */
-    public CiAddress(RiKind kind, Value base, Value index, Scale scale, int displacement) {
+    public CiAddress(Kind kind, Value base, Value index, Scale scale, int displacement) {
         super(kind);
         this.base = base;
         this.index = index;
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java	Fri Jun 08 23:47:42 2012 +0200
@@ -32,7 +32,7 @@
     public final boolean eliminated;
 
     public CiMonitorValue(Value owner, Value lockData, boolean eliminated) {
-        super(RiKind.Illegal);
+        super(Kind.Illegal);
         this.owner = owner;
         this.lockData = lockData;
         this.eliminated = eliminated;
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegister.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegister.java	Fri Jun 08 23:47:42 2012 +0200
@@ -76,7 +76,7 @@
 
     /**
      * An array of {@link CiRegisterValue} objects, for this register, with one entry
-     * per {@link RiKind}, indexed by {@link RiKind#ordinal}.
+     * per {@link Kind}, indexed by {@link Kind#ordinal}.
      */
     private final CiRegisterValue[] values;
 
@@ -119,8 +119,8 @@
         this.flags = createMask(flags);
         this.encoding = encoding;
 
-        values = new CiRegisterValue[RiKind.VALUES.length];
-        for (RiKind kind : RiKind.VALUES) {
+        values = new CiRegisterValue[Kind.VALUES.length];
+        for (Kind kind : Kind.VALUES) {
             values[kind.ordinal()] = new CiRegisterValue(kind, this);
         }
     }
@@ -142,16 +142,16 @@
      * @param kind the specified kind
      * @return the {@link CiRegisterValue}
      */
-    public CiRegisterValue asValue(RiKind kind) {
+    public CiRegisterValue asValue(Kind kind) {
         return values[kind.ordinal()];
     }
 
     /**
      * Gets this register as a {@linkplain CiRegisterValue value} with no particular kind.
-     * @return a {@link CiRegisterValue} with {@link RiKind#Illegal} kind.
+     * @return a {@link CiRegisterValue} with {@link Kind#Illegal} kind.
      */
     public CiRegisterValue asValue() {
-        return asValue(RiKind.Illegal);
+        return asValue(Kind.Illegal);
     }
 
     /**
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfig.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfig.java	Fri Jun 08 23:47:42 2012 +0200
@@ -37,7 +37,7 @@
     /**
      * Gets the register to be used for returning a value of a given kind.
      */
-    CiRegister getReturnRegister(RiKind kind);
+    CiRegister getReturnRegister(Kind 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, RiKind[] parameters, CiTarget target, boolean stackOnly);
+    CiCallingConvention getCallingConvention(Type type, Kind[] parameters, CiTarget target, boolean stackOnly);
 
     /**
      * Gets the ordered set of registers that are can be used to pass parameters
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java	Fri Jun 08 23:47:42 2012 +0200
@@ -167,7 +167,7 @@
         System.arraycopy(src.stackArg0Offsets, 0, stackArg0Offsets, 0, stackArg0Offsets.length);
     }
 
-    public CiRegister getReturnRegister(RiKind kind) {
+    public CiRegister getReturnRegister(Kind 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, RiKind[] parameters, CiTarget target, boolean stackOnly) {
+    public CiCallingConvention getCallingConvention(Type type, Kind[] parameters, CiTarget target, boolean stackOnly) {
         Value[] locations = new Value[parameters.length];
 
         int currentGeneral = 0;
@@ -196,7 +196,7 @@
         int currentStackOffset = stackArg0Offsets[type.ordinal()];
 
         for (int i = 0; i < parameters.length; i++) {
-            final RiKind kind = parameters[i];
+            final Kind kind = parameters[i];
 
             switch (kind) {
                 case Byte:
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java	Fri Jun 08 23:47:42 2012 +0200
@@ -26,7 +26,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 RiKind}) pair. Use {@link CiRegister#asValue(RiKind)} to
+ * CiRegisterValue} for each ({@link CiRegister}, {@link Kind}) pair. Use {@link CiRegister#asValue(Kind)} to
  * retrieve the canonical {@link CiRegisterValue} instance for a given (register,kind) pair.
  */
 public final class CiRegisterValue extends Value {
@@ -40,7 +40,7 @@
     /**
      * Should only be called from {@link CiRegister#CiRegister} to ensure canonicalization.
      */
-    protected CiRegisterValue(RiKind kind, CiRegister register) {
+    protected CiRegisterValue(Kind kind, CiRegister register) {
         super(kind);
         this.reg = register;
     }
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRuntimeCall.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRuntimeCall.java	Fri Jun 08 23:47:42 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.api.code;
 
-import static com.oracle.graal.api.meta.RiKind.*;
+import static com.oracle.graal.api.meta.Kind.*;
 
 import com.oracle.graal.api.meta.*;
 
@@ -48,10 +48,10 @@
     ArithmeticSin(Double, Double),
     GenericCallback(Object, Object, Object);
 
-    public final RiKind resultKind;
-    public final RiKind[] arguments;
+    public final Kind resultKind;
+    public final Kind[] arguments;
 
-    private CiRuntimeCall(RiKind resultKind, RiKind... args) {
+    private CiRuntimeCall(Kind resultKind, Kind... args) {
         this.resultKind = resultKind;
         this.arguments = args;
     }
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java	Fri Jun 08 23:47:42 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.api.code;
 
-import static com.oracle.graal.api.meta.RiKind.*;
+import static com.oracle.graal.api.meta.Kind.*;
 
 import com.oracle.graal.api.meta.*;
 
@@ -45,7 +45,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(RiKind kind, int offset, boolean addFrameSize) {
+    public static CiStackSlot get(Kind kind, int offset, boolean addFrameSize) {
         assert kind.stackKind() == kind;
         assert addFrameSize || offset >= 0;
 
@@ -73,7 +73,7 @@
     /**
      * Private constructor to enforce use of {@link #get()} so that a cache can be used.
      */
-    private CiStackSlot(RiKind kind, int offset, boolean addFrameSize) {
+    private CiStackSlot(Kind kind, int offset, boolean addFrameSize) {
         super(kind);
         this.offset = offset;
         this.addFrameSize = addFrameSize;
@@ -162,8 +162,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[RiKind.VALUES.length][];
-        for (RiKind kind : new RiKind[] {Illegal, Int, Long, Float, Double, Object, Jsr}) {
+        CiStackSlot[][] cache = new CiStackSlot[Kind.VALUES.length][];
+        for (Kind kind : new Kind[] {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.graal.api.code/src/com/oracle/graal/api/code/CiTarget.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiTarget.java	Fri Jun 08 23:47:42 2012 +0200
@@ -55,7 +55,7 @@
     /**
      * The CiKind to be used for representing raw pointers and CPU registers.
      */
-    public final RiKind wordKind;
+    public final Kind wordKind;
 
     /**
      * The stack alignment requirement of the platform. For example,
@@ -110,9 +110,9 @@
         this.isMP = isMP;
         this.wordSize = arch.wordSize;
         if (wordSize == 8) {
-            this.wordKind = RiKind.Long;
+            this.wordKind = Kind.Long;
         } else {
-            this.wordKind = RiKind.Int;
+            this.wordKind = Kind.Int;
         }
         this.stackAlignment = stackAlignment;
         this.stackBias = 0; // TODO: configure with param once SPARC port exists
@@ -128,7 +128,7 @@
      * @param kind the kind for which to get the size
      * @return the size in bytes of {@code kind}
      */
-    public int sizeInBytes(RiKind kind) {
+    public int sizeInBytes(Kind kind) {
         // Checkstyle: stop
         switch (kind) {
             case Boolean: return 1;
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiUtil.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiUtil.java	Fri Jun 08 23:47:42 2012 +0200
@@ -160,7 +160,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 RiKind#jniName JNI} form of their {@linkplain RiKind kind}
+     *            {@linkplain Kind#jniName JNI} form of their {@linkplain Kind kind}
      * @return the result of formatting this method according to {@code format}
      * @throws IllegalFormatException if an illegal specifier is encountered in {@code format}
      */
@@ -252,8 +252,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 RiKind#jniName JNI} form of
-     *            its {@linkplain RiKind kind}
+     * @param kinds if {@code true} then {@code field}'s type is printed in the {@linkplain Kind#jniName JNI} form of
+     *            its {@linkplain Kind kind}
      * @return the result of formatting this field according to {@code format}
      * @throws IllegalFormatException if an illegal specifier is encountered in {@code format}
      */
@@ -604,21 +604,21 @@
         return sb;
     }
 
-    public static RiKind[] signatureToKinds(RiResolvedMethod method) {
-        RiKind receiver = isStatic(method.accessFlags()) ? null : method.holder().kind();
+    public static Kind[] signatureToKinds(RiResolvedMethod method) {
+        Kind receiver = isStatic(method.accessFlags()) ? null : method.holder().kind();
         return signatureToKinds(method.signature(), receiver);
     }
 
-    public static RiKind[] signatureToKinds(RiSignature signature, RiKind receiverKind) {
+    public static Kind[] signatureToKinds(RiSignature signature, Kind receiverKind) {
         int args = signature.argumentCount(false);
-        RiKind[] result;
+        Kind[] result;
         int i = 0;
         if (receiverKind != null) {
-            result = new RiKind[args + 1];
+            result = new Kind[args + 1];
             result[0] = receiverKind;
             i = 1;
         } else {
-            result = new RiKind[args];
+            result = new Kind[args];
         }
         for (int j = 0; j < args; j++) {
             result[i + j] = signature.argumentKindAt(j);
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java	Fri Jun 08 23:47:42 2012 +0200
@@ -87,27 +87,27 @@
     }
 
     public static CiRegister asIntReg(Value value) {
-        assert value.kind == RiKind.Int || value.kind == RiKind.Jsr;
+        assert value.kind == Kind.Int || value.kind == Kind.Jsr;
         return asRegister(value);
     }
 
     public static CiRegister asLongReg(Value value) {
-        assert value.kind == RiKind.Long : value.kind;
+        assert value.kind == Kind.Long : value.kind;
         return asRegister(value);
     }
 
     public static CiRegister asObjectReg(Value value) {
-        assert value.kind == RiKind.Object;
+        assert value.kind == Kind.Object;
         return asRegister(value);
     }
 
     public static CiRegister asFloatReg(Value value) {
-        assert value.kind == RiKind.Float;
+        assert value.kind == Kind.Float;
         return asRegister(value);
     }
 
     public static CiRegister asDoubleReg(Value value) {
-        assert value.kind == RiKind.Double;
+        assert value.kind == Kind.Double;
         return asRegister(value);
     }
 
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java	Fri Jun 08 23:47:42 2012 +0200
@@ -48,7 +48,7 @@
     }
 
     private CiVirtualObject(RiType type, Value[] values, int id) {
-        super(RiKind.Object);
+        super(Kind.Object);
         this.type = type;
         this.values = values;
         this.id = id;
@@ -124,7 +124,7 @@
             this.runtime = runtime;
         }
 
-        public CiVirtualObject constantProxy(RiKind kind, Value objectValue, Value primitiveValue) {
+        public CiVirtualObject constantProxy(Kind kind, Value objectValue, Value primitiveValue) {
             Constant cKind = Constant.forObject(kind);
             // TODO: here the ordering is hard coded... we should query RiType.fields() and act accordingly
             return new CiVirtualObject(runtime.getType(Constant.class), new Value[] {cKind, primitiveValue, Value.IllegalValue, objectValue}, nextId++);
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java	Fri Jun 08 23:47:42 2012 +0200
@@ -33,7 +33,7 @@
  * {@link com.oracle.graal.api.code.CiCodePos} and {@link com.oracle.graal.api.code.CiDebugInfo} provide detailed information to the
  * runtime to support debugging and deoptimization of the compiled code.
  * <p>
- * The compiler manipulates {@link com.oracle.graal.api.meta.Value} instances that have a {@link com.oracle.graal.api.meta.RiKind}, and are
+ * The compiler manipulates {@link com.oracle.graal.api.meta.Value} instances that have a {@link com.oracle.graal.api.meta.Kind}, and are
  * immutable. A concrete {@link com.oracle.graal.api.meta.Value value} is one of the following subclasses:
  * <ul>
  * <li>{@link com.oracle.graal.api.meta.Constant}: a constant value.
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Constant.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Constant.java	Fri Jun 08 23:47:42 2012 +0200
@@ -33,27 +33,27 @@
     private static final Constant[] INT_CONSTANT_CACHE = new Constant[100];
     static {
         for (int i = 0; i < INT_CONSTANT_CACHE.length; ++i) {
-            INT_CONSTANT_CACHE[i] = new Constant(RiKind.Int, i);
+            INT_CONSTANT_CACHE[i] = new Constant(Kind.Int, i);
         }
     }
 
-    public static final Constant NULL_OBJECT = new Constant(RiKind.Object, null);
-    public static final Constant INT_MINUS_1 = new Constant(RiKind.Int, -1);
+    public static final Constant NULL_OBJECT = new Constant(Kind.Object, null);
+    public static final Constant INT_MINUS_1 = new Constant(Kind.Int, -1);
     public static final Constant INT_0 = forInt(0);
     public static final Constant INT_1 = forInt(1);
     public static final Constant INT_2 = forInt(2);
     public static final Constant INT_3 = forInt(3);
     public static final Constant INT_4 = forInt(4);
     public static final Constant INT_5 = forInt(5);
-    public static final Constant LONG_0 = new Constant(RiKind.Long, 0L);
-    public static final Constant LONG_1 = new Constant(RiKind.Long, 1L);
-    public static final Constant FLOAT_0 = new Constant(RiKind.Float, Float.floatToRawIntBits(0.0F));
-    public static final Constant FLOAT_1 = new Constant(RiKind.Float, Float.floatToRawIntBits(1.0F));
-    public static final Constant FLOAT_2 = new Constant(RiKind.Float, Float.floatToRawIntBits(2.0F));
-    public static final Constant DOUBLE_0 = new Constant(RiKind.Double, Double.doubleToRawLongBits(0.0D));
-    public static final Constant DOUBLE_1 = new Constant(RiKind.Double, Double.doubleToRawLongBits(1.0D));
-    public static final Constant TRUE = new Constant(RiKind.Boolean, 1L);
-    public static final Constant FALSE = new Constant(RiKind.Boolean, 0L);
+    public static final Constant LONG_0 = new Constant(Kind.Long, 0L);
+    public static final Constant LONG_1 = new Constant(Kind.Long, 1L);
+    public static final Constant FLOAT_0 = new Constant(Kind.Float, Float.floatToRawIntBits(0.0F));
+    public static final Constant FLOAT_1 = new Constant(Kind.Float, Float.floatToRawIntBits(1.0F));
+    public static final Constant FLOAT_2 = new Constant(Kind.Float, Float.floatToRawIntBits(2.0F));
+    public static final Constant DOUBLE_0 = new Constant(Kind.Double, Double.doubleToRawLongBits(0.0D));
+    public static final Constant DOUBLE_1 = new Constant(Kind.Double, Double.doubleToRawLongBits(1.0D));
+    public static final Constant TRUE = new Constant(Kind.Boolean, 1L);
+    public static final Constant FALSE = new Constant(Kind.Boolean, 0L);
 
     static {
         assert NULL_OBJECT.isDefaultValue();
@@ -91,7 +91,7 @@
      * @param kind the type of this constant
      * @param object the value of this constant
      */
-    private Constant(RiKind kind, Object object) {
+    private Constant(Kind kind, Object object) {
         super(kind);
         this.object = object;
         this.primitive = 0L;
@@ -103,7 +103,7 @@
      * @param kind the type of this constant
      * @param primitive the value of this constant
      */
-    public Constant(RiKind kind, long primitive) {
+    public Constant(Kind kind, long primitive) {
         super(kind);
         this.object = null;
         this.primitive = primitive;
@@ -127,7 +127,7 @@
 
     @Override
     public String toString() {
-        return kind.javaName + "[" + kind.format(boxedValue()) + (kind != RiKind.Object ? "|0x" + Long.toHexString(primitive) : "") + "]";
+        return kind.javaName + "[" + kind.format(boxedValue()) + (kind != Kind.Object ? "|0x" + Long.toHexString(primitive) : "") + "]";
     }
 
     /**
@@ -202,7 +202,7 @@
      * @return the boolean value of this constant
      */
     public boolean asBoolean() {
-        if (kind == RiKind.Boolean) {
+        if (kind == Kind.Boolean) {
             return primitive != 0L;
         }
         throw new Error("Constant is not boolean: " + this);
@@ -335,9 +335,9 @@
     /**
      * Gets the default value for a given kind.
      *
-     * @return the default value for {@code kind}'s {@linkplain RiKind#stackKind() stack kind}
+     * @return the default value for {@code kind}'s {@linkplain Kind#stackKind() stack kind}
      */
-    public static Constant defaultValue(RiKind kind) {
+    public static Constant defaultValue(Kind kind) {
         // Checkstyle: stop
         switch (kind.stackKind()) {
             case Int: return INT_0;
@@ -362,7 +362,7 @@
         if (Double.compare(d, 1.0D) == 0) {
             return DOUBLE_1;
         }
-        return new Constant(RiKind.Double, Double.doubleToRawLongBits(d));
+        return new Constant(Kind.Double, Double.doubleToRawLongBits(d));
     }
 
     /**
@@ -380,7 +380,7 @@
         if (Float.compare(f, 2.0F) == 0) {
             return FLOAT_2;
         }
-        return new Constant(RiKind.Float, Float.floatToRawIntBits(f));
+        return new Constant(Kind.Float, Float.floatToRawIntBits(f));
     }
 
     /**
@@ -389,7 +389,7 @@
      * @return a boxed copy of {@code value}
      */
     public static Constant forLong(long i) {
-        return i == 0 ? LONG_0 : i == 1 ? LONG_1 : new Constant(RiKind.Long, i);
+        return i == 0 ? LONG_0 : i == 1 ? LONG_1 : new Constant(Kind.Long, i);
     }
 
     /**
@@ -404,7 +404,7 @@
         if (i >= 0 && i < INT_CONSTANT_CACHE.length) {
             return INT_CONSTANT_CACHE[i];
         }
-        return new Constant(RiKind.Int, i);
+        return new Constant(Kind.Int, i);
     }
 
     /**
@@ -413,7 +413,7 @@
      * @return a boxed copy of {@code value}
      */
     public static Constant forByte(byte i) {
-        return new Constant(RiKind.Byte, i);
+        return new Constant(Kind.Byte, i);
     }
 
     /**
@@ -431,7 +431,7 @@
      * @return a boxed copy of {@code value}
      */
     public static Constant forChar(char i) {
-        return new Constant(RiKind.Char, i);
+        return new Constant(Kind.Char, i);
     }
 
     /**
@@ -440,7 +440,7 @@
      * @return a boxed copy of {@code value}
      */
     public static Constant forShort(short i) {
-        return new Constant(RiKind.Short, i);
+        return new Constant(Kind.Short, i);
     }
 
     /**
@@ -449,7 +449,7 @@
      * @return a boxed copy of {@code value}
      */
     public static Constant forJsr(int i) {
-        return new Constant(RiKind.Jsr, i);
+        return new Constant(Kind.Jsr, i);
     }
 
     /**
@@ -461,7 +461,7 @@
         if (o == null) {
             return NULL_OBJECT;
         }
-        return new Constant(RiKind.Object, o);
+        return new Constant(Kind.Object, o);
     }
 
     /**
@@ -471,7 +471,7 @@
      * @param value the Java boxed value: a Byte instance for CiKind Byte, etc.
      * @return the boxed copy of {@code value}
      */
-    public static Constant forBoxed(RiKind kind, Object value) {
+    public static Constant forBoxed(Kind kind, Object value) {
         switch (kind) {
             case Boolean:
                 return forBoolean((Boolean) value);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Kind.java	Fri Jun 08 23:47:42 2012 +0200
@@ -0,0 +1,465 @@
+/*
+ * 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.graal.api.meta;
+
+import static com.oracle.graal.api.meta.Kind.Flags.*;
+
+import java.lang.reflect.*;
+
+import sun.misc.*;
+
+/**
+ * Denotes the basic kinds of types in CRI, including the all the Java primitive types,
+ * for example, {@link Kind#Int} for {@code int} and {@link Kind#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 Kind {
+    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 Kind[] VALUES = values();
+    public static final Kind[] JAVA_VALUES = new Kind[] {Kind.Boolean, Kind.Byte, Kind.Short, Kind.Char, Kind.Int, Kind.Float, Kind.Long, Kind.Double, Kind.Object};
+
+    Kind(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 Kind stackKind() {
+        if (isInt()) {
+            return Int;
+        }
+        return this;
+    }
+
+    public static Kind fromTypeString(String typeString) {
+        assert typeString.length() > 0;
+        final char first = typeString.charAt(0);
+        if (first == '[' || first == 'L') {
+            return Kind.Object;
+        }
+        return Kind.fromPrimitiveOrVoidTypeChar(first);
+    }
+
+    /**
+     * Gets the kind from the character describing a primitive or void.
+     * @param ch the character
+     * @return the kind
+     */
+    public static Kind 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 == Kind.Void;
+    }
+
+    /**
+     * Checks whether this value type is long.
+     * @return {@code true} if this type is long
+     */
+    public final boolean isLong() {
+        return this == Kind.Long;
+    }
+
+    /**
+     * Checks whether this value type is float.
+     * @return {@code true} if this type is float
+     */
+    public final boolean isFloat() {
+        return this == Kind.Float;
+    }
+
+    /**
+     * Checks whether this value type is double.
+     * @return {@code true} if this type is double
+     */
+    public final boolean isDouble() {
+        return this == Kind.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 == Kind.Double || this == Kind.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 == Kind.Object;
+    }
+
+    /**
+     * Checks whether this value type is an address type.
+     * @return {@code true} if this type is an address
+     */
+    public boolean isJsr() {
+        return this == Kind.Jsr;
+    }
+
+    /**
+     * Converts this value type to a string.
+     */
+    @Override
+    public String toString() {
+        return javaName;
+    }
+
+    /**
+     * Marker interface for types that should be {@linkplain Kind#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 " + RiUtil.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 RiUtil.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(RiUtil.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(Kind.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 Constant readUnsafeConstant(Object value, long displacement) {
+        assert value != null;
+        Unsafe u = Unsafe.getUnsafe();
+        switch(this) {
+            case Boolean:
+                return Constant.forBoolean(u.getBoolean(value, displacement));
+            case Byte:
+                return Constant.forByte(u.getByte(value, displacement));
+            case Char:
+                return Constant.forChar(u.getChar(value, displacement));
+            case Short:
+                return Constant.forShort(u.getShort(value, displacement));
+            case Int:
+                return Constant.forInt(u.getInt(value, displacement));
+            case Long:
+                return Constant.forLong(u.getLong(value, displacement));
+            case Float:
+                return Constant.forFloat(u.getFloat(value, displacement));
+            case Double:
+                return Constant.forDouble(u.getDouble(value, displacement));
+            case Object:
+                return Constant.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.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessProvider.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessProvider.java	Fri Jun 08 23:47:42 2012 +0200
@@ -31,7 +31,7 @@
     /**
      * Returns the RiType object representing the base type for the given kind.
      */
-    RiResolvedType asRiType(RiKind kind);
+    RiResolvedType asRiType(Kind kind);
 
     /**
      * Returns the type of the given constant object.
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiField.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiField.java	Fri Jun 08 23:47:42 2012 +0200
@@ -44,7 +44,7 @@
      * Gets the kind of this field.
      * @return the kind
      */
-    RiKind kind();
+    Kind kind();
 
     /**
      * Gets the holder of this field as a compiler-runtime interface type.
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiKind.java	Fri Jun 08 23:44:20 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,465 +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.graal.api.meta;
-
-import static com.oracle.graal.api.meta.RiKind.Flags.*;
-
-import java.lang.reflect.*;
-
-import sun.misc.*;
-
-/**
- * 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 " + RiUtil.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 RiUtil.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(RiUtil.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 Constant readUnsafeConstant(Object value, long displacement) {
-        assert value != null;
-        Unsafe u = Unsafe.getUnsafe();
-        switch(this) {
-            case Boolean:
-                return Constant.forBoolean(u.getBoolean(value, displacement));
-            case Byte:
-                return Constant.forByte(u.getByte(value, displacement));
-            case Char:
-                return Constant.forChar(u.getChar(value, displacement));
-            case Short:
-                return Constant.forShort(u.getShort(value, displacement));
-            case Int:
-                return Constant.forInt(u.getInt(value, displacement));
-            case Long:
-                return Constant.forLong(u.getLong(value, displacement));
-            case Float:
-                return Constant.forFloat(u.getFloat(value, displacement));
-            case Double:
-                return Constant.forDouble(u.getDouble(value, displacement));
-            case Object:
-                return Constant.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.graal.api.meta/src/com/oracle/graal/api/meta/RiSignature.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiSignature.java	Fri Jun 08 23:47:42 2012 +0200
@@ -54,7 +54,7 @@
      * @param index the index into the parameters, with {@code 0} indicating the first parameter
      * @return the kind of the argument at the specified position
      */
-    RiKind argumentKindAt(int index);
+    Kind argumentKindAt(int index);
 
     /**
      * Gets the return type of this signature. This method will return a
@@ -72,7 +72,7 @@
      * Gets the return kind of this signature.
      * @return the return kind
      */
-    RiKind returnKind();
+    Kind returnKind();
 
     /**
      * Converts this signature to a string.
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiType.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiType.java	Fri Jun 08 23:47:42 2012 +0200
@@ -79,14 +79,14 @@
      * Gets the kind of this compiler interface type.
      * @return the kind
      */
-    RiKind kind();
+    Kind kind();
 
     /**
      * 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
      */
-    RiKind getRepresentationKind(Representation r);
+    Kind getRepresentationKind(Representation r);
 
     RiResolvedType resolve(RiResolvedType accessingClass);
 }
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiUtil.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiUtil.java	Fri Jun 08 23:47:42 2012 +0200
@@ -84,8 +84,8 @@
      * @return the Java name corresponding to {@code riType}
      */
     public static String toJavaName(RiType riType, boolean qualified) {
-        RiKind kind = riType.kind();
-        if (kind.isPrimitive() || kind == RiKind.Void) {
+        Kind kind = riType.kind();
+        if (kind.isPrimitive() || kind == Kind.Void) {
             return kind.javaName;
         }
         return internalNameToJava(riType.name(), qualified);
@@ -127,7 +127,7 @@
                 if (name.length() != 1) {
                     throw new IllegalArgumentException("Illegal internal name: " + name);
                 }
-                return RiKind.fromPrimitiveOrVoidTypeChar(name.charAt(0)).javaName;
+                return Kind.fromPrimitiveOrVoidTypeChar(name.charAt(0)).javaName;
         }
     }
 }
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java	Fri Jun 08 23:47:42 2012 +0200
@@ -25,13 +25,13 @@
 import java.io.*;
 
 /**
- * Abstract base class for values manipulated by the compiler. All values have a {@linkplain RiKind kind} and are immutable.
+ * Abstract base class for values manipulated by the compiler. All values have a {@linkplain Kind kind} and are immutable.
  */
 public abstract class Value implements Serializable {
     private static final long serialVersionUID = -6909397188697766469L;
 
     @SuppressWarnings("serial")
-    public static Value IllegalValue = new Value(RiKind.Illegal) {
+    public static Value IllegalValue = new Value(Kind.Illegal) {
         @Override
         public String toString() {
             return "-";
@@ -41,13 +41,13 @@
     /**
      * The kind of this value.
      */
-    public final RiKind kind;
+    public final Kind kind;
 
     /**
      * Initializes a new value of the specified kind.
      * @param kind the kind
      */
-    protected Value(RiKind kind) {
+    protected Value(Kind kind) {
         this.kind = kind;
     }
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Fri Jun 08 23:47:42 2012 +0200
@@ -423,7 +423,7 @@
      * The kind of this interval.
      * Only valid if this is a {@linkplain #xxisVariable() variable}.
      */
-    private RiKind kind;
+    private Kind kind;
 
     /**
      * The head of the list of ranges describing this interval. This list is sorted by {@linkplain LIRInstruction#id instruction ids}.
@@ -490,14 +490,14 @@
     void assignLocation(Value newLocation) {
         if (isRegister(newLocation)) {
             assert this.location == null : "cannot re-assign location for " + this;
-            if (newLocation.kind == RiKind.Illegal && kind != RiKind.Illegal) {
+            if (newLocation.kind == Kind.Illegal && kind != Kind.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 != RiKind.Illegal;
+            assert newLocation.kind != Kind.Illegal;
             assert newLocation.kind == this.kind;
         }
         this.location = newLocation;
@@ -510,14 +510,14 @@
         return location;
     }
 
-    public RiKind kind() {
+    public Kind kind() {
         assert !isRegister(operand) : "cannot access type for fixed interval";
         return kind;
     }
 
-    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";
+    void setKind(Kind kind) {
+        assert isRegister(operand) || this.kind() == Kind.Illegal || this.kind() == kind : "overwriting existing type";
+        assert kind == kind.stackKind() || kind == Kind.Short : "these kinds should have int type registers";
         this.kind = kind;
     }
 
@@ -670,7 +670,7 @@
         } else {
             assert isIllegal(operand) || isVariable(operand);
         }
-        this.kind = RiKind.Illegal;
+        this.kind = Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Fri Jun 08 23:47:42 2012 +0200
@@ -145,7 +145,7 @@
 
     /**
      * The {@linkplain #operandNumber(Value) number} of the first variable operand
-     * {@linkplain #newVariable(RiKind) allocated} from this pool.
+     * {@linkplain #newVariable(Kind) allocated} from this pool.
      */
     private final int firstVariableNumber;
 
@@ -231,7 +231,7 @@
     static final IntervalPredicate IS_OOP_INTERVAL = new IntervalPredicate() {
         @Override
         public boolean apply(Interval i) {
-            return !isRegister(i.operand) && i.kind()  == RiKind.Object;
+            return !isRegister(i.operand) && i.kind()  == Kind.Object;
         }
     };
 
@@ -910,7 +910,7 @@
         TTY.println(blockData.get(block).liveOut.toString());
     }
 
-    void addUse(Value operand, int from, int to, RegisterPriority registerPriority, RiKind kind) {
+    void addUse(Value operand, int from, int to, RegisterPriority registerPriority, Kind kind) {
         if (!isProcessed(operand)) {
             return;
         }
@@ -923,7 +923,7 @@
             interval = createInterval(operand);
         }
 
-        if (kind != RiKind.Illegal) {
+        if (kind != Kind.Illegal) {
             interval.setKind(kind);
         }
 
@@ -933,7 +933,7 @@
         interval.addUsePos(to & ~1, registerPriority);
     }
 
-    void addTemp(Value operand, int tempPos, RegisterPriority registerPriority, RiKind kind) {
+    void addTemp(Value operand, int tempPos, RegisterPriority registerPriority, Kind kind) {
         if (!isProcessed(operand)) {
             return;
         }
@@ -945,7 +945,7 @@
             interval = createInterval(operand);
         }
 
-        if (kind != RiKind.Illegal) {
+        if (kind != Kind.Illegal) {
             interval.setKind(kind);
         }
 
@@ -957,7 +957,7 @@
         return !isRegister(operand) || attributes(asRegister(operand)).isAllocatable;
     }
 
-    void addDef(Value operand, int defPos, RegisterPriority registerPriority, RiKind kind) {
+    void addDef(Value operand, int defPos, RegisterPriority registerPriority, Kind kind) {
         if (!isProcessed(operand)) {
             return;
         }
@@ -967,7 +967,7 @@
         Interval interval = intervalFor(operand);
         if (interval != null) {
 
-            if (kind != RiKind.Illegal) {
+            if (kind != Kind.Illegal) {
                 interval.setKind(kind);
             }
 
@@ -992,7 +992,7 @@
             // Dead value - make vacuous interval
             // also add register priority for dead intervals
             interval = createInterval(operand);
-            if (kind != RiKind.Illegal) {
+            if (kind != Kind.Illegal) {
                 interval.setKind(kind);
             }
 
@@ -1017,7 +1017,7 @@
     static RegisterPriority registerPriorityOfOutputOperand(LIRInstruction op) {
         if (op instanceof MoveOp) {
             MoveOp move = (MoveOp) op;
-            if (isStackSlot(move.getInput()) && move.getInput().kind != RiKind.Object) {
+            if (isStackSlot(move.getInput()) && move.getInput().kind != Kind.Object) {
                 // method argument (condition must be equal to handleMethodArguments)
                 return RegisterPriority.None;
             }
@@ -1047,7 +1047,7 @@
     void handleMethodArguments(LIRInstruction op) {
         if (op instanceof MoveOp) {
             MoveOp move = (MoveOp) op;
-            if (isStackSlot(move.getInput()) && move.getInput().kind != RiKind.Object) {
+            if (isStackSlot(move.getInput()) && move.getInput().kind != Kind.Object) {
                 CiStackSlot slot = (CiStackSlot) move.getInput();
                 if (GraalOptions.DetailedAsserts) {
                     assert op.id() > 0 : "invalid id";
@@ -1115,7 +1115,7 @@
                     TTY.println("live in %s to %d", operand, blockTo + 2);
                 }
 
-                addUse(operand, blockFrom, blockTo + 2, RegisterPriority.None, RiKind.Illegal);
+                addUse(operand, blockFrom, blockTo + 2, RegisterPriority.None, Kind.Illegal);
 
                 // add special use positions for loop-end blocks when the
                 // interval is used anywhere inside this loop. It's possible
@@ -1138,7 +1138,7 @@
                 if (op.hasCall()) {
                     for (CiRegister r : callerSaveRegs) {
                         if (attributes(r).isAllocatable) {
-                            addTemp(r.asValue(), opId, RegisterPriority.None, RiKind.Illegal);
+                            addTemp(r.asValue(), opId, RegisterPriority.None, Kind.Illegal);
                         }
                     }
                     if (GraalOptions.TraceLinearScanLevel >= 4) {
@@ -1550,7 +1550,7 @@
     // (includes computation of debug information and oop maps)
 
     boolean verifyAssignedLocation(Interval interval, Value location) {
-        RiKind kind = interval.kind();
+        Kind kind = interval.kind();
 
         assert isRegister(location) || isStackSlot(location);
 
@@ -1952,7 +1952,7 @@
                 throw new GraalInternalError("");
             }
 
-            if (isVariable(i1.operand) && i1.kind()  == RiKind.Illegal) {
+            if (isVariable(i1.operand) && i1.kind()  == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Fri Jun 08 23:47:42 2012 +0200
@@ -190,8 +190,8 @@
      * @return a new variable
      */
     @Override
-    public Variable newVariable(RiKind kind) {
-        RiKind stackKind = kind.stackKind();
+    public Variable newVariable(Kind kind) {
+        Kind stackKind = kind.stackKind();
         switch (stackKind) {
             case Jsr:
             case Int:
@@ -235,11 +235,11 @@
         return value;
     }
 
-    public Value loadForStore(Value value, RiKind storeKind) {
+    public Value loadForStore(Value value, Kind storeKind) {
         if (isConstant(value) && canStoreConstant((Constant) value)) {
             return value;
         }
-        if (storeKind == RiKind.Byte || storeKind == RiKind.Boolean) {
+        if (storeKind == Kind.Byte || storeKind == Kind.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 Value resultOperandFor(RiKind kind) {
-        if (kind == RiKind.Void) {
+    public Value resultOperandFor(Kind kind) {
+        if (kind == Kind.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, RiKind.Object, x.elementType(), x.elementType().arrayOf());
+        XirSnippet snippet = xir.genNewArray(site(x), length, Kind.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(RiKind.Object);
+                stackIndex += stackSlots(Kind.Object);
             } else {
                 stackIndex += stackSlots(signature.argumentKindAt(argumentIndex));
                 argumentIndex++;
@@ -837,13 +837,13 @@
     }
 
 
-    public static int stackSlots(RiKind kind) {
+    public static int stackSlots(Kind kind) {
         return isTwoSlot(kind) ? 2 : 1;
     }
 
-    public static boolean isTwoSlot(RiKind kind) {
-        assert kind != RiKind.Void && kind != RiKind.Illegal;
-        return kind == RiKind.Long || kind == RiKind.Double;
+    public static boolean isTwoSlot(Kind kind) {
+        assert kind != Kind.Void && kind != Kind.Illegal;
+        return kind == Kind.Long || kind == Kind.Double;
     }
 
     @Override
@@ -862,12 +862,12 @@
                 snippet = xir.genInvokeSpecial(site(x.node(), callTarget.receiver()), receiver, targetMethod);
                 break;
             case Virtual:
-                assert callTarget.receiver().kind() == RiKind.Object : callTarget + ": " + callTarget.targetMethod().toString();
+                assert callTarget.receiver().kind() == Kind.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() == RiKind.Object : callTarget;
+                assert callTarget.receiver().kind() == Kind.Object : callTarget;
                 receiver = toXirArgument(callTarget.receiver());
                 snippet = xir.genInvokeInterface(site(x.node(), callTarget.receiver()), receiver, targetMethod);
                 break;
@@ -883,7 +883,7 @@
 
         Value resultOperand = resultOperandFor(x.node().kind());
 
-        RiKind[] signature = CiUtil.signatureToKinds(callTarget.targetMethod().signature(), callTarget.isStatic() ? null : callTarget.targetMethod().holder().kind());
+        Kind[] signature = CiUtil.signatureToKinds(callTarget.targetMethod().signature(), callTarget.isStatic() ? null : callTarget.targetMethod().holder().kind());
         CiCallingConvention cc = frameMap.registerConfig.getCallingConvention(JavaCall, signature, target(), false);
         frameMap.callsMethod(cc, JavaCall);
         List<Value> argList = visitInvokeArguments(cc, callTarget.arguments());
@@ -940,7 +940,7 @@
     protected abstract LabelRef createDeoptStub(CiDeoptAction action, RiDeoptReason reason, LIRDebugInfo info, Object deoptInfo);
 
     @Override
-    public Variable emitCall(@SuppressWarnings("hiding") Object target, RiKind result, RiKind[] arguments, boolean canTrap, Value... args) {
+    public Variable emitCall(@SuppressWarnings("hiding") Object target, Kind result, Kind[] arguments, boolean canTrap, Value... args) {
         LIRDebugInfo info = canTrap ? state() : null;
 
         Value physReg = resultOperandFor(result);
@@ -1155,7 +1155,7 @@
             return value;
         }
         Variable variable = load(value);
-        if (var.kind == RiKind.Byte || var.kind == RiKind.Boolean) {
+        if (var.kind == Kind.Byte || var.kind == Kind.Boolean) {
             Variable tempVar = new Variable(value.kind, lir.nextVariable(), CiRegister.RegisterFlag.Byte);
             emitMove(variable, tempVar);
             variable = tempVar;
@@ -1182,7 +1182,7 @@
             Value 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 != RiKind.Void && resultOperand.kind != RiKind.Illegal) {
+            if (resultOperand.kind != Kind.Void && resultOperand.kind != Kind.Illegal) {
                 if (setInstructionResult) {
                     outputOperand = newVariable(instruction.kind());
                 } else {
@@ -1279,8 +1279,8 @@
 
     protected final Value callRuntime(CiRuntimeCall runtimeCall, LIRDebugInfo info, Value... args) {
         // get a result register
-        RiKind result = runtimeCall.resultKind;
-        RiKind[] arguments = runtimeCall.arguments;
+        Kind result = runtimeCall.resultKind;
+        Kind[] arguments = runtimeCall.arguments;
 
         Value physReg = result.isVoid() ? IllegalValue : resultOperandFor(result);
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BoxingEliminationPhase.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BoxingEliminationPhase.java	Fri Jun 08 23:47:42 2012 +0200
@@ -62,7 +62,7 @@
         }
     }
 
-    private PhiNode getReplacementPhi(PhiNode phiNode, RiKind kind, Map<PhiNode, PhiNode> phiReplacements) {
+    private PhiNode getReplacementPhi(PhiNode phiNode, Kind kind, Map<PhiNode, PhiNode> phiReplacements) {
         if (!phiReplacements.containsKey(phiNode)) {
             PhiNode result = null;
             ObjectStamp stamp = phiNode.objectStamp();
@@ -93,7 +93,7 @@
         return phiReplacements.get(phiNode);
     }
 
-    private ValueNode unboxedValue(ValueNode n, RiKind kind, Map<PhiNode, PhiNode> phiReplacements) {
+    private ValueNode unboxedValue(ValueNode n, Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/IdentifyBoxingPhase.java	Fri Jun 08 23:47:42 2012 +0200
@@ -50,15 +50,15 @@
         RiResolvedMethod targetMethod = callTarget.targetMethod();
         if (pool.isSpecialMethod(targetMethod)) {
             assert callTarget.arguments().size() == 1 : "boxing/unboxing method must have exactly one argument";
-            RiKind returnKind = callTarget.returnKind();
+            Kind returnKind = callTarget.returnKind();
             ValueNode sourceValue = callTarget.arguments().get(0);
 
             // Check whether this is a boxing or an unboxing.
             Node newNode = null;
-            if (returnKind == RiKind.Object) {
+            if (returnKind == Kind.Object) {
                 // We have a boxing method here.
                 assert Modifier.isStatic(targetMethod.accessFlags()) : "boxing method must be static";
-                RiKind sourceKind = targetMethod.signature().argumentKindAt(0);
+                Kind sourceKind = targetMethod.signature().argumentKindAt(0);
                 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Fri Jun 08 23:47:42 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() != RiKind.Void) {
+                if (signature.returnKind() != Kind.Void) {
                     transferredValues++;
                 }
                 maxSize += transferredValues * GraalOptions.InliningBonusPerTransferredValue;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/SnippetIntrinsificationPhase.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/SnippetIntrinsificationPhase.java	Fri Jun 08 23:47:42 2012 +0200
@@ -214,7 +214,7 @@
     /**
      * Calls a Java method via reflection.
      */
-    private static Constant callMethod(RiKind returnKind, Class< ? > holder, String name, Class< ? >[] parameterTypes, Object receiver, Object[] arguments) {
+    private static Constant callMethod(Kind 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() != RiKind.Object) {
+        if (newInstance instanceof ValueNode && ((ValueNode) newInstance).kind() != Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java	Fri Jun 08 23:47:42 2012 +0200
@@ -79,11 +79,11 @@
  */
 public abstract class AMD64LIRGenerator extends LIRGenerator {
 
-    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);
+    private static final CiRegisterValue RAX_I = AMD64.rax.asValue(Kind.Int);
+    private static final CiRegisterValue RAX_L = AMD64.rax.asValue(Kind.Long);
+    private static final CiRegisterValue RDX_I = AMD64.rdx.asValue(Kind.Int);
+    private static final CiRegisterValue RDX_L = AMD64.rdx.asValue(Kind.Long);
+    private static final CiRegisterValue RCX_I = AMD64.rcx.asValue(Kind.Int);
 
     public static class AMD64SpillMoveFactory implements LIR.SpillMoveFactory {
         @Override
@@ -161,7 +161,7 @@
                     index = Value.IllegalValue;
                 } else {
                     // create a temporary variable for the index, the pointer load cannot handle a constant index
-                    Value newIndex = newVariable(RiKind.Long);
+                    Value newIndex = newVariable(Kind.Long);
                     emitMove(index, newIndex);
                     index = newIndex;
                 }
@@ -586,7 +586,7 @@
 
     @Override
     public void visitCompareAndSwap(CompareAndSwapNode node) {
-        RiKind kind = node.newValue().kind();
+        Kind kind = node.newValue().kind();
         assert kind == node.expected().kind();
 
         Value expected = loadNonConst(operand(node.expected()));
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirAssembler.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirAssembler.java	Fri Jun 08 23:47:42 2012 +0200
@@ -80,11 +80,11 @@
                     XirOperand xOp = i.x();
                     if (i.op == XirOp.Div || i.op == XirOp.Mod) {
                         if (fixedRDX == null) {
-                            fixedRDX = createRegisterTemp("divModTemp", RiKind.Int, AMD64.rdx);
+                            fixedRDX = createRegisterTemp("divModTemp", Kind.Int, AMD64.rdx);
                         }
                         // Special treatment to make sure that the left input of % and / is in RAX
                         if (fixedRAX == null) {
-                            fixedRAX = createRegisterTemp("divModLeftInput", RiKind.Int, AMD64.rax);
+                            fixedRAX = createRegisterTemp("divModLeftInput", Kind.Int, AMD64.rax);
                         }
                         currentList.add(new XirInstruction(i.x().kind, XirOp.Mov, fixedRAX, i.x()));
                         xOp = fixedRAX;
@@ -142,7 +142,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(RiKind.Illegal, i.op, i.result, fixedRSI, fixedRDI, fixedRCX));
+                    currentList.add(new XirInstruction(Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java	Fri Jun 08 23:47:42 2012 +0200
@@ -194,7 +194,7 @@
 
                     CiAddress src;
                     if (isConstant(index)) {
-                        assert index.kind == RiKind.Int;
+                        assert index.kind == Kind.Int;
                         Constant constantIndex = (Constant) 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(RiKind.Illegal, pointer, index, scale, displacement);
+                    CiAddress src = new CiAddress(Kind.Illegal, pointer, index, scale, displacement);
                     masm.leaq(asRegister(result), src);
                     break;
                 }
@@ -238,7 +238,7 @@
 
                     CiAddress dst;
                     if (isConstant(index)) {
-                        assert index.kind == RiKind.Int;
+                        assert index.kind == Kind.Int;
                         Constant constantIndex = (Constant) index;
                         dst = new CiAddress(inst.kind, pointer, IllegalValue, scale, constantIndex.asInt() * scale.value + displacement);
                     } else {
@@ -279,7 +279,7 @@
                     break;
 
                 case CallRuntime: {
-                    RiKind[] signature = new RiKind[inst.arguments.length];
+                    Kind[] signature = new Kind[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 != RiKind.Illegal && inst.result.kind != RiKind.Void) {
+                    if (inst.result != null && inst.result.kind != Kind.Illegal && inst.result.kind != Kind.Void) {
                         CiRegister returnRegister = tasm.frameMap.registerConfig.getReturnRegister(inst.result.kind);
                         Value 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];
                     Value value = operands[inst.x().index];
-                    if (value.kind == RiKind.Long) {
+                    if (value.kind == Kind.Long) {
                         masm.decq(asRegister(value));
                     } else {
-                        assert value.kind == RiKind.Int;
+                        assert value.kind == Kind.Int;
                         masm.decl(asRegister(value));
                     }
                     masm.jcc(ConditionFlag.notZero, label);
@@ -475,7 +475,7 @@
     }
 
     private static Value assureNot64BitConstant(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value value) {
-        if (isConstant(value) && (value.kind == RiKind.Long || value.kind == RiKind.Object)) {
+        if (isConstant(value) && (value.kind == Kind.Long || value.kind == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/TypeFeedbackCache.java	Fri Jun 08 23:47:42 2012 +0200
@@ -62,7 +62,7 @@
 
     @Override
     public ScalarTypeFeedbackTool addScalar(ValueNode value) {
-        assert value.kind() == RiKind.Int || value.kind() == RiKind.Long || value.kind() == RiKind.Float || value.kind() == RiKind.Double;
+        assert value.kind() == Kind.Int || value.kind() == Kind.Long || value.kind() == Kind.Float || value.kind() == Kind.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() == RiKind.Object;
+        assert value.kind() == Kind.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() == RiKind.Int || phi.kind() == RiKind.Long) {
+            if (phi.kind() == Kind.Int || phi.kind() == Kind.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() == RiKind.Object) {
+            } else if (phi.kind() == Kind.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() == RiKind.Int || value.kind() == RiKind.Long || value.kind() == RiKind.Float || value.kind() == RiKind.Double;
+        assert value.kind() == Kind.Int || value.kind() == Kind.Long || value.kind() == Kind.Float || value.kind() == Kind.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() == RiKind.Object;
+        assert value.kind() == Kind.Object;
         if (NO_OBJECT_TYPES) {
             return new ObjectTypeFeedbackStore(changed).query();
         }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java	Fri Jun 08 23:47:42 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() != RiKind.Void;
+            boolean hasReturnValue = invoke.node().kind() != Kind.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(RiKind.Object, exceptionMerge));
-                exceptionMerge.setStateAfter(exceptionEdge.stateAfter().duplicateModified(invoke.stateAfter().bci, true, RiKind.Void, exceptionObjectPhi));
+                exceptionObjectPhi = graph.unique(new PhiNode(Kind.Object, exceptionMerge));
+                exceptionMerge.setStateAfter(exceptionEdge.stateAfter().duplicateModified(invoke.stateAfter().bci, true, Kind.Void, exceptionObjectPhi));
             }
 
             // create one separate block for each invoked method
@@ -460,7 +460,7 @@
             result.setUseForInlining(useForInlining);
             result.setProbability(probability);
 
-            RiKind kind = invoke.node().kind();
+            Kind 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(), RiKind.Object, newExceptionObject));
+                newExceptionObject.setStateAfter(stateAfterException.duplicateModified(stateAfterException.bci, stateAfterException.rethrowException(), Kind.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() == RiKind.Object && !firstParam.objectStamp().nonNull()) {
+        if (!callTarget.isStatic() && firstParam.kind() == Kind.Object && !firstParam.objectStamp().nonNull()) {
             graph.addBeforeFixed(invoke.node(), graph.add(new FixedGuardNode(graph.unique(new IsNullNode(firstParam)), RiDeoptReason.ClassCastException, CiDeoptAction.InvalidateReprofile, true, invoke.leafGraphId())));
         }
     }
--- a/graal/com.oracle.graal.hotspot.server/src/com/oracle/graal/hotspot/server/ReplacingStreams.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot.server/src/com/oracle/graal/hotspot/server/ReplacingStreams.java	Fri Jun 08 23:47:42 2012 +0200
@@ -168,7 +168,7 @@
             // is the object a constant of object type?
             if (obj.getClass() == Constant.class) {
                 Constant constant = (Constant) obj;
-                if (constant.kind != RiKind.Object) {
+                if (constant.kind != Kind.Object) {
                     return obj;
                 }
                 Object contents = constant.asObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java	Fri Jun 08 23:47:42 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.io.*;
 
-import com.oracle.graal.api.meta.RiKind.*;
+import com.oracle.graal.api.meta.Kind.*;
 
 
 /**
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java	Fri Jun 08 23:47:42 2012 +0200
@@ -145,7 +145,7 @@
     public RiType lookupType(String returnType, HotSpotTypeResolved accessingClass, boolean eagerResolve) {
         if (returnType.length() == 1 && vmToCompiler instanceof VMToCompilerImpl) {
             VMToCompilerImpl exitsNative = (VMToCompilerImpl) vmToCompiler;
-            RiKind kind = RiKind.fromPrimitiveOrVoidTypeChar(returnType.charAt(0));
+            Kind kind = Kind.fromPrimitiveOrVoidTypeChar(returnType.charAt(0));
             switch(kind) {
                 case Boolean:
                     return exitsNative.typeBoolean;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java	Fri Jun 08 23:47:42 2012 +0200
@@ -111,7 +111,7 @@
         assert stackShadowPages > 0;
     }
 
-    public int getArrayOffset(RiKind kind) {
+    public int getArrayOffset(Kind kind) {
         return arrayOffsets[kind.ordinal()];
     }
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java	Fri Jun 08 23:47:42 2012 +0200
@@ -73,7 +73,7 @@
 
     RiType RiType_leastCommonAncestor(HotSpotTypeResolved thisType, HotSpotTypeResolved otherType);
 
-    RiType getPrimitiveArrayType(RiKind kind);
+    RiType getPrimitiveArrayType(Kind kind);
 
     RiType RiType_arrayOf(HotSpotTypeResolved klass);
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java	Fri Jun 08 23:47:42 2012 +0200
@@ -92,7 +92,7 @@
     public native RiType RiType_leastCommonAncestor(HotSpotTypeResolved thisType, HotSpotTypeResolved otherType);
 
     @Override
-    public native RiType getPrimitiveArrayType(RiKind kind);
+    public native RiType getPrimitiveArrayType(Kind kind);
 
     @Override
     public native RiType RiType_arrayOf(HotSpotTypeResolved klass);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java	Fri Jun 08 23:47:42 2012 +0200
@@ -57,7 +57,7 @@
 
     RiType createRiTypeUnresolved(String name);
 
-    Constant createCiConstant(RiKind kind, long value);
+    Constant createCiConstant(Kind kind, long value);
 
     Constant createCiConstantFloat(float value);
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Fri Jun 08 23:47:42 2012 +0200
@@ -71,15 +71,15 @@
     public VMToCompilerImpl(HotSpotGraalRuntime compiler) {
         this.compiler = compiler;
 
-        typeBoolean = new HotSpotTypePrimitive(RiKind.Boolean);
-        typeChar = new HotSpotTypePrimitive(RiKind.Char);
-        typeFloat = new HotSpotTypePrimitive(RiKind.Float);
-        typeDouble = new HotSpotTypePrimitive(RiKind.Double);
-        typeByte = new HotSpotTypePrimitive(RiKind.Byte);
-        typeShort = new HotSpotTypePrimitive(RiKind.Short);
-        typeInt = new HotSpotTypePrimitive(RiKind.Int);
-        typeLong = new HotSpotTypePrimitive(RiKind.Long);
-        typeVoid = new HotSpotTypePrimitive(RiKind.Void);
+        typeBoolean = new HotSpotTypePrimitive(Kind.Boolean);
+        typeChar = new HotSpotTypePrimitive(Kind.Char);
+        typeFloat = new HotSpotTypePrimitive(Kind.Float);
+        typeDouble = new HotSpotTypePrimitive(Kind.Double);
+        typeByte = new HotSpotTypePrimitive(Kind.Byte);
+        typeShort = new HotSpotTypePrimitive(Kind.Short);
+        typeInt = new HotSpotTypePrimitive(Kind.Int);
+        typeLong = new HotSpotTypePrimitive(Kind.Long);
+        typeVoid = new HotSpotTypePrimitive(Kind.Void);
     }
 
     public void startCompiler() throws Throwable {
@@ -452,18 +452,18 @@
     }
 
     @Override
-    public Constant createCiConstant(RiKind kind, long value) {
-        if (kind == RiKind.Long) {
+    public Constant createCiConstant(Kind kind, long value) {
+        if (kind == Kind.Long) {
             return Constant.forLong(value);
-        } else if (kind == RiKind.Int) {
+        } else if (kind == Kind.Int) {
             return Constant.forInt((int) value);
-        } else if (kind == RiKind.Short) {
+        } else if (kind == Kind.Short) {
             return Constant.forShort((short) value);
-        } else if (kind == RiKind.Char) {
+        } else if (kind == Kind.Char) {
             return Constant.forChar((char) value);
-        } else if (kind == RiKind.Byte) {
+        } else if (kind == Kind.Byte) {
             return Constant.forByte((byte) value);
-        } else if (kind == RiKind.Boolean) {
+        } else if (kind == Kind.Boolean) {
             return (value == 0) ? Constant.FALSE : Constant.TRUE;
         } else {
             throw new IllegalArgumentException();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java	Fri Jun 08 23:47:42 2012 +0200
@@ -85,12 +85,12 @@
             int scale = Unsafe.getUnsafe().arrayIndexScale(long[].class);
 
             AMD64Move.move(tasm, masm, counterArr, Constant.forObject(counter.counts));
-            AMD64Move.load(tasm, masm, callerPc, new CiAddress(RiKind.Long, AMD64.rbp.asValue(RiKind.Long), 8), null);
+            AMD64Move.load(tasm, masm, callerPc, new CiAddress(Kind.Long, AMD64.rbp.asValue(Kind.Long), 8), null);
 
             Label done = new Label();
             for (int i = 0; i < counter.counts.length - 2; i += 2) {
-                CiAddress counterPcAddr = new CiAddress(RiKind.Long, counterArr, i * scale + off);
-                CiAddress counterValueAddr = new CiAddress(RiKind.Long, counterArr, (i + 1) * scale + off);
+                CiAddress counterPcAddr = new CiAddress(Kind.Long, counterArr, i * scale + off);
+                CiAddress counterValueAddr = new CiAddress(Kind.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(RiKind.Long, counterArr, (counter.counts.length - 1) * scale + off);
+            CiAddress counterValueAddr = new CiAddress(Kind.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(RiKind.Long), gen.newVariable(RiKind.Long)));
+        gen.append(new AMD64MethodEntryOp(new Counter(method), gen.newVariable(Kind.Long), gen.newVariable(Kind.Long)));
     }
 
     public static int getCodeSize() {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentThread.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentThread.java	Fri Jun 08 23:47:42 2012 +0200
@@ -40,7 +40,7 @@
 
     @Override
     public void generate(LIRGeneratorTool generator) {
-        generator.setResult(this, generator.emitLoad(new CiAddress(RiKind.Object, AMD64.r15.asValue(generator.target().wordKind), threadObjectOffset), false));
+        generator.setResult(this, generator.emitLoad(new CiAddress(Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -61,7 +61,7 @@
         RiResolvedMethod method = frameState.method();
         boolean isStatic = Modifier.isStatic(method.accessFlags());
 
-        RiKind[] signature = CiUtil.signatureToKinds(method.signature(), isStatic ? null : method.holder().kind());
+        Kind[] signature = CiUtil.signatureToKinds(method.signature(), isStatic ? null : method.holder().kind());
         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<Value> argList = gen.visitInvokeArguments(cc, parameters);
 
-        Value entry = gen.emitLoad(new CiAddress(RiKind.Long, gen.operand(target), config.nmethodEntryOffset), false);
+        Value entry = gen.emitLoad(new CiAddress(Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java	Fri Jun 08 23:47:42 2012 +0200
@@ -46,6 +46,6 @@
         } else {
             base = gen.emitAdd(base, Constant.forLong(config.cardtableStartAddress));
         }
-        gen.emitStore(new CiAddress(RiKind.Boolean, base, displacement), Constant.FALSE, false);
+        gen.emitStore(new CiAddress(Kind.Boolean, base, displacement), Constant.FALSE, false);
     }
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCompiledMethod.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCompiledMethod.java	Fri Jun 08 23:47:42 2012 +0200
@@ -63,14 +63,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) == RiKind.Object;
-        assert method.signature().argumentKindAt(1) == RiKind.Object;
-        assert !Modifier.isStatic(method.accessFlags()) || method.signature().argumentKindAt(2) == RiKind.Object;
+        assert method.signature().argumentKindAt(0) == Kind.Object;
+        assert method.signature().argumentKindAt(1) == Kind.Object;
+        assert !Modifier.isStatic(method.accessFlags()) || method.signature().argumentKindAt(2) == Kind.Object;
         return HotSpotGraalRuntime.getInstance().getCompilerToVM().executeCompiledMethod(this, arg1, arg2, arg3);
     }
 
     private boolean checkArgs(Object... args) {
-        RiKind[] sig = CiUtil.signatureToKinds(method);
+        Kind[] 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotField.java	Fri Jun 08 23:47:42 2012 +0200
@@ -92,7 +92,7 @@
     }
 
     @Override
-    public RiKind kind() {
+    public Kind kind() {
         return type().kind();
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java	Fri Jun 08 23:47:42 2012 +0200
@@ -108,7 +108,7 @@
     }
 
     @Override
-    public CiCallingConvention getCallingConvention(Type type, RiKind[] parameters, CiTarget target, boolean stackOnly) {
+    public CiCallingConvention getCallingConvention(Type type, Kind[] parameters, CiTarget target, boolean stackOnly) {
         if (type == Type.NativeCall) {
             throw new UnsupportedOperationException();
         }
@@ -119,7 +119,7 @@
         return allParameterRegisters;
     }
 
-    private CiCallingConvention callingConvention(RiKind[] types, Type type, CiTarget target, boolean stackOnly) {
+    private CiCallingConvention callingConvention(Kind[] types, Type type, CiTarget target, boolean stackOnly) {
         Value[] locations = new Value[types.length];
 
         int currentGeneral = 0;
@@ -127,7 +127,7 @@
         int currentStackOffset = 0;
 
         for (int i = 0; i < types.length; i++) {
-            final RiKind kind = types[i];
+            final Kind kind = types[i];
 
             switch (kind) {
                 case Byte:
@@ -163,7 +163,7 @@
     }
 
     @Override
-    public CiRegister getReturnRegister(RiKind kind) {
+    public CiRegister getReturnRegister(Kind kind) {
         switch (kind) {
             case Boolean:
             case Byte:
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java	Fri Jun 08 23:47:42 2012 +0200
@@ -179,7 +179,7 @@
     }
 
     @Override
-    public RiResolvedType asRiType(RiKind kind) {
+    public RiResolvedType asRiType(Kind kind) {
         return (RiResolvedType) compiler.getCompilerToVM().getType(kind.toJavaClass());
     }
 
@@ -234,7 +234,7 @@
         } else if (n instanceof LoadFieldNode) {
             LoadFieldNode field = (LoadFieldNode) n;
             int displacement = ((HotSpotField) field.field()).offset();
-            assert field.kind() != RiKind.Illegal;
+            assert field.kind() != Kind.Illegal;
             ReadNode memoryRead = graph.add(new ReadNode(field.object(), LocationNode.create(field.field(), field.field().kind(), displacement, graph), field.stamp()));
             memoryRead.dependencies().add(tool.createNullCheckGuard(field.object(), field.leafGraphId()));
             graph.replaceFixedWithFixed(field, memoryRead);
@@ -253,7 +253,7 @@
             graph.replaceFixedWithFixed(storeField, memoryWrite);
 
             FixedWithNextNode last = memoryWrite;
-            if (field.kind() == RiKind.Object && !memoryWrite.value().isNullConstant()) {
+            if (field.kind() == Kind.Object && !memoryWrite.value().isNullConstant()) {
                 FieldWriteBarrier writeBarrier = graph.add(new FieldWriteBarrier(memoryWrite.object()));
                 graph.addAfterFixed(memoryWrite, writeBarrier);
                 last = writeBarrier;
@@ -268,7 +268,7 @@
             // Separate out GC barrier semantics
             CompareAndSwapNode cas = (CompareAndSwapNode) n;
             ValueNode expected = cas.expected();
-            if (expected.kind() == RiKind.Object && !cas.newValue().isNullConstant()) {
+            if (expected.kind() == Kind.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
@@ -285,7 +285,7 @@
 
             ValueNode boundsCheck = createBoundsCheck(loadIndexed, tool);
 
-            RiKind elementKind = loadIndexed.elementKind();
+            Kind 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);
@@ -294,12 +294,12 @@
             StoreIndexedNode storeIndexed = (StoreIndexedNode) n;
             ValueNode boundsCheck = createBoundsCheck(storeIndexed, tool);
 
-            RiKind elementKind = storeIndexed.elementKind();
+            Kind elementKind = storeIndexed.elementKind();
             LocationNode arrayLocation = createArrayLocation(graph, elementKind, storeIndexed.index());
             ValueNode value = storeIndexed.value();
             CheckCastNode checkcast = null;
             ValueNode array = storeIndexed.array();
-            if (elementKind == RiKind.Object && !value.isNullConstant()) {
+            if (elementKind == Kind.Object && !value.isNullConstant()) {
                 // Store check!
                 RiResolvedType arrayType = array.objectStamp().type();
                 if (arrayType != null && array.objectStamp().isExactType()) {
@@ -314,9 +314,9 @@
                     }
                 } else {
                     ValueNode guard = tool.createNullCheckGuard(array, StructuredGraph.INVALID_GRAPH_ID);
-                    FloatingReadNode arrayClass = graph.unique(new FloatingReadNode(array, LocationNode.create(LocationNode.FINAL_LOCATION, RiKind.Object, config.hubOffset, graph), null, StampFactory.objectNonNull()));
+                    FloatingReadNode arrayClass = graph.unique(new FloatingReadNode(array, LocationNode.create(LocationNode.FINAL_LOCATION, Kind.Object, config.hubOffset, graph), null, StampFactory.objectNonNull()));
                     arrayClass.dependencies().add(guard);
-                    FloatingReadNode arrayElementKlass = graph.unique(new FloatingReadNode(arrayClass, LocationNode.create(LocationNode.FINAL_LOCATION, RiKind.Object, config.arrayClassElementOffset, graph), null, StampFactory.objectNonNull()));
+                    FloatingReadNode arrayElementKlass = graph.unique(new FloatingReadNode(arrayClass, LocationNode.create(LocationNode.FINAL_LOCATION, Kind.Object, config.arrayClassElementOffset, graph), null, StampFactory.objectNonNull()));
                     checkcast = graph.add(new CheckCastNode(arrayElementKlass, null, value));
                     graph.addBeforeFixed(storeIndexed, checkcast);
                     value = checkcast;
@@ -328,12 +328,12 @@
 
             graph.replaceFixedWithFixed(storeIndexed, memoryWrite);
 
-            if (elementKind == RiKind.Object && !value.isNullConstant()) {
+            if (elementKind == Kind.Object && !value.isNullConstant()) {
                 graph.addAfterFixed(memoryWrite, graph.add(new ArrayWriteBarrier(array, arrayLocation)));
             }
         } else if (n instanceof UnsafeLoadNode) {
             UnsafeLoadNode load = (UnsafeLoadNode) n;
-            assert load.kind() != RiKind.Illegal;
+            assert load.kind() != Kind.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));
@@ -344,13 +344,13 @@
             WriteNode write = graph.add(new WriteNode(store.object(), store.value(), location));
             write.setStateAfter(store.stateAfter());
             graph.replaceFixedWithFixed(store, write);
-            if (write.value().kind() == RiKind.Object && !write.value().isNullConstant()) {
+            if (write.value().kind() == Kind.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, RiKind.Object, config.hubOffset, graph);
+            LocationNode location = LocationNode.create(LocationNode.FINAL_LOCATION, Kind.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);
@@ -375,12 +375,12 @@
         return false;
     }
 
-    private IndexedLocationNode createArrayLocation(Graph graph, RiKind elementKind, ValueNode index) {
+    private IndexedLocationNode createArrayLocation(Graph graph, Kind 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(), RiKind.Int, array, config.arrayLengthOffset, StampFactory.positiveInt(), leafGraphId);
+        return safeRead(array.graph(), Kind.Int, array, config.arrayLengthOffset, StampFactory.positiveInt(), leafGraphId);
     }
 
     private static ValueNode createBoundsCheck(AccessIndexedNode n, CiLoweringTool tool) {
@@ -412,7 +412,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, RiKind.Object, config.classMirrorOffset, graph), null, resultStamp));
+                FloatingReadNode result = graph.unique(new FloatingReadNode(klassOop, LocationNode.create(LocationNode.FINAL_LOCATION, Kind.Object, config.classMirrorOffset, graph), null, resultStamp));
                 ReturnNode ret = graph.add(new ReturnNode(result));
                 graph.start().setNext(klassOop);
                 klassOop.setNext(ret);
@@ -422,10 +422,10 @@
             if (fullName.equals("getModifiers()I")) {
                 StructuredGraph graph = new StructuredGraph();
                 LocalNode receiver = graph.unique(new LocalNode(0, StampFactory.objectNonNull()));
-                SafeReadNode klassOop = safeRead(graph, RiKind.Object, receiver, config.klassOopOffset, StampFactory.objectNonNull(), StructuredGraph.INVALID_GRAPH_ID);
+                SafeReadNode klassOop = safeRead(graph, Kind.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, RiKind.Int, config.klassModifierFlagsOffset, graph), null, StampFactory.intValue()));
+                FloatingReadNode result = graph.unique(new FloatingReadNode(klassOop, LocationNode.create(LocationNode.FINAL_LOCATION, Kind.Int, config.klassModifierFlagsOffset, graph), null, StampFactory.intValue()));
                 ReturnNode ret = graph.add(new ReturnNode(result));
                 klassOop.setNext(ret);
                 return graph;
@@ -442,10 +442,10 @@
     }
 
     private SafeReadNode safeReadHub(Graph graph, ValueNode value, long leafGraphId) {
-        return safeRead(graph, RiKind.Object, value, config.hubOffset, StampFactory.objectNonNull(), leafGraphId);
+        return safeRead(graph, Kind.Object, value, config.hubOffset, StampFactory.objectNonNull(), leafGraphId);
     }
 
-    private static SafeReadNode safeRead(Graph graph, RiKind kind, ValueNode value, int offset, Stamp stamp, long leafGraphId) {
+    private static SafeReadNode safeRead(Graph graph, Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotSignature.java	Fri Jun 08 23:47:42 2012 +0200
@@ -97,8 +97,8 @@
     }
 
     @Override
-    public RiKind argumentKindAt(int index) {
-        return RiKind.fromTypeString(arguments.get(index));
+    public Kind argumentKindAt(int index) {
+        return Kind.fromTypeString(arguments.get(index));
     }
 
     @Override
@@ -129,8 +129,8 @@
     }
 
     @Override
-    public RiKind returnKind() {
-        return RiKind.fromTypeString(returnType);
+    public Kind returnKind() {
+        return Kind.fromTypeString(returnType);
     }
 
     @Override
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypePrimitive.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypePrimitive.java	Fri Jun 08 23:47:42 2012 +0200
@@ -35,10 +35,10 @@
 public final class HotSpotTypePrimitive extends HotSpotType implements RiResolvedType {
 
     private static final long serialVersionUID = -6208552348908071473L;
-    private RiKind kind;
+    private Kind kind;
     private final HotSpotKlassOop klassOop;
 
-    public HotSpotTypePrimitive(RiKind kind) {
+    public HotSpotTypePrimitive(Kind kind) {
         this.kind = kind;
         this.name = String.valueOf(Character.toUpperCase(kind.typeChar));
         this.klassOop = new HotSpotKlassOop(kind.toJavaClass());
@@ -81,7 +81,7 @@
     }
 
     @Override
-    public RiKind getRepresentationKind(Representation r) {
+    public Kind getRepresentationKind(Representation r) {
         return kind;
     }
 
@@ -131,7 +131,7 @@
     }
 
     @Override
-    public RiKind kind() {
+    public Kind kind() {
         return kind;
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java	Fri Jun 08 23:47:42 2012 +0200
@@ -127,8 +127,8 @@
     }
 
     @Override
-    public RiKind getRepresentationKind(Representation r) {
-        return RiKind.Object;
+    public Kind getRepresentationKind(Representation r) {
+        return Kind.Object;
     }
 
     @Override
@@ -184,8 +184,8 @@
     }
 
     @Override
-    public RiKind kind() {
-        return RiKind.Object;
+    public Kind kind() {
+        return Kind.Object;
     }
 
     @Override
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeUnresolved.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeUnresolved.java	Fri Jun 08 23:47:42 2012 +0200
@@ -89,8 +89,8 @@
     }
 
     @Override
-    public RiKind kind() {
-        return RiKind.Object;
+    public Kind kind() {
+        return Kind.Object;
     }
 
     @Override
@@ -109,8 +109,8 @@
     }
 
     @Override
-    public RiKind getRepresentationKind(RiType.Representation r) {
-        return RiKind.Object;
+    public Kind getRepresentationKind(RiType.Representation r) {
+        return Kind.Object;
     }
 
     @Override
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotXirGenerator.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotXirGenerator.java	Fri Jun 08 23:47:42 2012 +0200
@@ -88,19 +88,19 @@
     }
 
     private XirConstant wordConst(CiXirAssembler asm, long value) {
-        if (target.wordKind == RiKind.Long) {
+        if (target.wordKind == Kind.Long) {
             return asm.createConstant(Constant.forLong(value));
         } else {
-            assert target.wordKind == RiKind.Int;
+            assert target.wordKind == Kind.Int;
             return asm.createConstant(Constant.forInt((int) value));
         }
     }
 
     private XirArgument wordArg(long value) {
-        if (target.wordKind == RiKind.Long) {
+        if (target.wordKind == Kind.Long) {
             return XirArgument.forLong(value);
         } else {
-            assert target.wordKind == RiKind.Int;
+            assert target.wordKind == Kind.Int;
             return XirArgument.forInt((int) value);
         }
     }
@@ -110,10 +110,10 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
             asm.restart();
-            XirParameter receiver = asm.createInputParameter("receiver", RiKind.Object);
+            XirParameter receiver = asm.createInputParameter("receiver", Kind.Object);
             XirParameter addr = asm.createConstantInputParameter("addr", target.wordKind);
             XirOperand temp = asm.createRegisterTemp("temp", target.wordKind, AMD64.rax);
-            XirOperand tempO = asm.createRegister("tempO", RiKind.Object, AMD64.rax);
+            XirOperand tempO = asm.createRegister("tempO", Kind.Object, AMD64.rax);
 
             if (is(NULL_CHECK, flags)) {
                 asm.mark(MARK_IMPLICIT_NULL);
@@ -131,10 +131,10 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
             asm.restart();
-            XirParameter receiver = asm.createInputParameter("receiver", RiKind.Object);
+            XirParameter receiver = asm.createInputParameter("receiver", Kind.Object);
             XirParameter addr = asm.createConstantInputParameter("addr", target.wordKind);
             XirOperand temp = asm.createRegisterTemp("temp", target.wordKind, AMD64.rax);
-            XirOperand tempO = asm.createRegister("tempO", RiKind.Object, AMD64.rax);
+            XirOperand tempO = asm.createRegister("tempO", Kind.Object, AMD64.rax);
 
             if (is(NULL_CHECK, flags)) {
                 asm.mark(MARK_IMPLICIT_NULL);
@@ -152,9 +152,9 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int vtableEntryOffset) {
             asm.restart();
-            XirParameter receiver = asm.createInputParameter("receiver", RiKind.Object);
+            XirParameter receiver = asm.createInputParameter("receiver", Kind.Object);
             XirOperand temp = asm.createRegisterTemp("temp", target.wordKind, AMD64.rax);
-            XirOperand method = asm.createRegisterTemp("method", RiKind.Object, AMD64.rbx);
+            XirOperand method = asm.createRegisterTemp("method", Kind.Object, AMD64.rbx);
 
             // load class from receiver
             if (is(NULL_CHECK, flags)) {
@@ -177,7 +177,7 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
             asm.restart();
-            XirParameter receiver = asm.createInputParameter("receiver", RiKind.Object);
+            XirParameter receiver = asm.createInputParameter("receiver", Kind.Object);
             XirParameter addr = asm.createConstantInputParameter("addr", target.wordKind);
             XirOperand temp = asm.createRegisterTemp("temp", target.wordKind, AMD64.rax);
             XirLabel stub = asm.createOutOfLineLabel("call stub");
@@ -228,8 +228,8 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
-            asm.restart(RiKind.Void);
-            XirParameter object = asm.createInputParameter("object", RiKind.Object);
+            asm.restart(Kind.Void);
+            XirParameter object = asm.createInputParameter("object", Kind.Object);
             XirParameter lock = asm.createInputParameter("lock", target.wordKind);
 
             if (is(NULL_CHECK, flags)) {
@@ -250,7 +250,7 @@
             } else {
                 asm.reserveOutgoingStack(target.wordSize * 2);
                 XirOperand rsp = asm.createRegister("rsp", target.wordKind, asRegister(AMD64.RSP));
-                asm.pstore(RiKind.Object, rsp, asm.i(target.wordSize), object, false);
+                asm.pstore(Kind.Object, rsp, asm.i(target.wordSize), object, false);
                 asm.pstore(target.wordKind, rsp, asm.i(0), lock, false);
                 asm.callRuntime(config.monitorEnterStub, null, useInfoAfter);
             }
@@ -267,8 +267,8 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
-            asm.restart(RiKind.Void);
-            XirParameter object = asm.createInputParameter("object", RiKind.Object);
+            asm.restart(Kind.Void);
+            XirParameter object = asm.createInputParameter("object", Kind.Object);
             XirParameter lock = asm.createInputParameter("lock", target.wordKind);
 
             if (config.useFastLocking) {
@@ -291,18 +291,18 @@
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int size) {
             XirOperand result = asm.restart(target.wordKind);
-            XirOperand hub = asm.createInputParameter("hub", RiKind.Object);
+            XirOperand hub = asm.createInputParameter("hub", Kind.Object);
 
             XirOperand temp1 = asm.createRegisterTemp("temp1", target.wordKind, AMD64.rcx);
-            XirOperand temp1o = asm.createRegister("temp1o", RiKind.Object, AMD64.rcx);
+            XirOperand temp1o = asm.createRegister("temp1o", Kind.Object, AMD64.rcx);
             XirOperand temp2 = asm.createRegisterTemp("temp2", target.wordKind, AMD64.rbx);
-            XirOperand temp2i = asm.createRegister("temp2i", RiKind.Int, AMD64.rbx);
+            XirOperand temp2i = asm.createRegister("temp2i", Kind.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(RiKind.Int, temp2i, hub, asm.i(config.klassStateOffset), false);
+            asm.pload(Kind.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);
@@ -318,7 +318,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(RiKind.Object, result, asm.i(config.hubOffset), temp1o, false);
+            asm.pstore(Kind.Object, result, asm.i(config.hubOffset), temp1o, false);
 
             if (size > 2 * target.wordSize) {
                 asm.mov(temp1, wordConst(asm, 0));
@@ -329,7 +329,7 @@
 
             // -- out of line -------------------------------------------------------
             asm.bindOutOfLine(tlabFull);
-            XirOperand arg = asm.createRegisterTemp("runtime call argument", RiKind.Object, AMD64.rdx);
+            XirOperand arg = asm.createRegisterTemp("runtime call argument", Kind.Object, AMD64.rdx);
             asm.mov(arg, hub);
             useRegisters(asm, AMD64.rax);
             asm.callRuntime(config.newInstanceStub, result);
@@ -343,28 +343,28 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags) {
-            emitNewTypeArray(asm, RiKind.Object, config.useFastNewObjectArray, config.newObjectArrayStub);
+            emitNewTypeArray(asm, Kind.Object, config.useFastNewObjectArray, config.newObjectArrayStub);
             return asm.finishTemplate("newObjectArray");
         }
     };
 
-    private void emitNewTypeArray(CiXirAssembler asm, RiKind kind, boolean useFast, long slowPathStub) {
+    private void emitNewTypeArray(CiXirAssembler asm, Kind kind, boolean useFast, long slowPathStub) {
         XirOperand result = asm.restart(target.wordKind);
 
-        XirParameter lengthParam = asm.createInputParameter("length", RiKind.Int, true);
+        XirParameter lengthParam = asm.createInputParameter("length", Kind.Int, true);
 
-        XirOperand length = asm.createRegisterTemp("length", RiKind.Int, AMD64.rbx);
-        XirOperand hub = asm.createRegisterTemp("hub", RiKind.Object, AMD64.rdx);
+        XirOperand length = asm.createRegisterTemp("length", Kind.Int, AMD64.rbx);
+        XirOperand hub = asm.createRegisterTemp("hub", Kind.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", RiKind.Object, AMD64.rcx);
+        XirOperand temp1o = asm.createRegister("temp1o", Kind.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", RiKind.Int, AMD64.rsi);
+        XirOperand size = asm.createRegisterTemp("size", Kind.Int, AMD64.rsi);
 
-        asm.mov(hub, asm.createConstantInputParameter("hub", RiKind.Object));
+        asm.mov(hub, asm.createConstantInputParameter("hub", Kind.Object));
         asm.mov(length, lengthParam);
 
         if (useFast) {
@@ -404,10 +404,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(RiKind.Object, result, asm.i(config.hubOffset), temp1o, false);
+            asm.pstore(Kind.Object, result, asm.i(config.hubOffset), temp1o, false);
 
             // Store array length
-            asm.pstore(RiKind.Int, result, asm.i(arrayLengthOffset), length, false);
+            asm.pstore(Kind.Int, result, asm.i(arrayLengthOffset), length, false);
 
             // Initialize with 0
             XirLabel top = asm.createInlineLabel("top");
@@ -432,7 +432,7 @@
 
     private KindTemplates newTypeArrayTemplates = new KindTemplates() {
         @Override
-        protected XirTemplate create(CiXirAssembler asm, long flags, RiKind kind) {
+        protected XirTemplate create(CiXirAssembler asm, long flags, Kind kind) {
             emitNewTypeArray(asm, kind, config.useFastNewTypeArray, config.newTypeArrayStub);
             return asm.finishTemplate("newTypeArray<" + kind.toString() + ">");
         }
@@ -442,19 +442,19 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int dimensions) {
-            XirOperand result = asm.restart(RiKind.Object);
+            XirOperand result = asm.restart(Kind.Object);
 
-            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);
+            XirOperand hub = asm.createRegisterTemp("hub", Kind.Object, AMD64.rax);
+            XirOperand rank = asm.createRegisterTemp("rank", Kind.Int, AMD64.rbx);
+            XirOperand sizes = asm.createRegisterTemp("sizes", Kind.Long, AMD64.rcx);
+            XirOperand thread = asm.createRegisterTemp("thread", Kind.Long, AMD64.r15);
             asm.add(sizes, thread, asm.l(config.threadMultiNewArrayStorage));
             for (int i = 0; i < dimensions; i++) {
-                XirParameter length = asm.createInputParameter("length" + i, RiKind.Int, true);
-                asm.pstore(RiKind.Int, sizes, asm.i(i * target.sizeInBytes(RiKind.Int)), length, false);
+                XirParameter length = asm.createInputParameter("length" + i, Kind.Int, true);
+                asm.pstore(Kind.Int, sizes, asm.i(i * target.sizeInBytes(Kind.Int)), length, false);
             }
 
-            asm.mov(hub, asm.createConstantInputParameter("hub", RiKind.Object));
+            asm.mov(hub, asm.createConstantInputParameter("hub", Kind.Object));
 
             asm.mov(rank, asm.i(dimensions));
             // not necessary because we already have a temp in rax:  useRegisters(asm, AMD64.rax);
@@ -490,21 +490,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(RiKind.Long, counter, counters, index, disp, scale, false);
+            asm.pload(Kind.Long, counter, counters, index, disp, scale, false);
             asm.add(counter, counter, asm.i(1));
-            asm.pstore(RiKind.Long, counters, index, counter, disp, scale, false);
+            asm.pstore(Kind.Long, counters, index, counter, disp, scale, false);
         }
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int hintCount) {
-            asm.restart(RiKind.Void);
+            asm.restart(Kind.Void);
             boolean exact = is(EXACT_HINTS, flags);
-            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);
+            XirParameter counters = GraalOptions.CheckcastCounters ? asm.createConstantInputParameter("counters", Kind.Object) : null;
+            XirParameter object = asm.createInputParameter("object", Kind.Object);
+            final XirOperand hub = exact ? null : asm.createConstantInputParameter("hub", Kind.Object);
 
-            XirOperand objHub = asm.createTemp("objHub", RiKind.Object);
-            XirOperand counter = counters != null ? asm.createTemp("counter", RiKind.Long) : null;
+            XirOperand objHub = asm.createTemp("objHub", Kind.Object);
+            XirOperand counter = counters != null ? asm.createTemp("counter", Kind.Long) : null;
 
             XirLabel success = asm.createInlineLabel("success");
             XirLabel slowPath = asm.createOutOfLineLabel("slow path");
@@ -523,7 +523,7 @@
 
             }
 
-            asm.pload(RiKind.Object, objHub, object, asm.i(config.hubOffset), false);
+            asm.pload(Kind.Object, objHub, object, asm.i(config.hubOffset), false);
             if (hintCount == 0) {
                 assert !exact;
                 if (counters != null) {
@@ -546,10 +546,10 @@
                 asm.bindOutOfLine(slowPath);
             } else {
                 XirLabel hintsSuccess = counters == null ? success : asm.createInlineLabel("hintsSuccess");
-                XirOperand scratchObject = asm.createRegisterTemp("scratch", RiKind.Object, AMD64.r10);
+                XirOperand scratchObject = asm.createRegisterTemp("scratch", Kind.Object, AMD64.r10);
                 // if we get an exact match: succeed immediately
                 for (int i = 0; i < hintCount; i++) {
-                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, RiKind.Object);
+                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, Kind.Object);
                     asm.mov(scratchObject, hintHub);
                     if (i < hintCount - 1) {
                         asm.jeq(hintsSuccess, objHub, scratchObject);
@@ -593,11 +593,11 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int hintCount) {
-            asm.restart(RiKind.Void);
-            XirParameter object = asm.createInputParameter("object", RiKind.Object);
-            final XirOperand hub = is(EXACT_HINTS, flags) ? null : asm.createConstantInputParameter("hub", RiKind.Object);
+            asm.restart(Kind.Void);
+            XirParameter object = asm.createInputParameter("object", Kind.Object);
+            final XirOperand hub = is(EXACT_HINTS, flags) ? null : asm.createConstantInputParameter("hub", Kind.Object);
 
-            XirOperand objHub = asm.createTemp("objHub", RiKind.Object);
+            XirOperand objHub = asm.createTemp("objHub", Kind.Object);
 
             XirLabel trueSucc = asm.createInlineLabel(XirLabel.TrueSuccessor);
             XirLabel falseSucc = asm.createInlineLabel(XirLabel.FalseSuccessor);
@@ -607,7 +607,7 @@
                 asm.jeq(falseSucc, object, asm.o(null));
             }
 
-            asm.pload(RiKind.Object, objHub, object, asm.i(config.hubOffset), false);
+            asm.pload(Kind.Object, objHub, object, asm.i(config.hubOffset), false);
             if (hintCount == 0) {
                 assert !is(EXACT_HINTS, flags);
                 checkSubtype(asm, objHub, objHub, hub);
@@ -615,11 +615,11 @@
                 asm.jmp(trueSucc);
             } else {
                 XirLabel slowPath = null;
-                XirOperand scratchObject = asm.createRegisterTemp("scratch", RiKind.Object, AMD64.r10);
+                XirOperand scratchObject = asm.createRegisterTemp("scratch", Kind.Object, AMD64.r10);
 
                 // if we get an exact match: succeed immediately
                 for (int i = 0; i < hintCount; i++) {
-                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, RiKind.Object);
+                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, Kind.Object);
                     asm.mov(scratchObject, hintHub);
                     if (i < hintCount - 1) {
                         asm.jeq(trueSucc, objHub, scratchObject);
@@ -652,13 +652,13 @@
 
         @Override
         protected XirTemplate create(CiXirAssembler asm, long flags, int hintCount) {
-            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 result = asm.restart(Kind.Int);
+            XirParameter object = asm.createInputParameter("object", Kind.Object);
+            final XirOperand hub = is(EXACT_HINTS, flags) ? null : asm.createConstantInputParameter("hub", Kind.Object);
+            XirOperand trueValue = asm.createInputParameter("trueValue", Kind.Int);
+            XirOperand falseValue = asm.createInputParameter("falseValue", Kind.Int);
 
-            XirOperand objHub = asm.createTemp("objHub", RiKind.Object);
+            XirOperand objHub = asm.createTemp("objHub", Kind.Object);
 
             XirLabel end = asm.createInlineLabel("end");
             XirLabel falseSucc = asm.createInlineLabel("ko");
@@ -668,7 +668,7 @@
                 asm.jeq(falseSucc, object, asm.o(null));
             }
 
-            asm.pload(RiKind.Object, objHub, object, asm.i(config.hubOffset), false);
+            asm.pload(Kind.Object, objHub, object, asm.i(config.hubOffset), false);
             asm.mov(result, trueValue);
 
             if (hintCount == 0) {
@@ -680,11 +680,11 @@
                 asm.bindInline(end);
             } else {
                 XirLabel slowPath = null;
-                XirOperand scratchObject = asm.createRegisterTemp("scratch", RiKind.Object, AMD64.r10);
+                XirOperand scratchObject = asm.createRegisterTemp("scratch", Kind.Object, AMD64.r10);
 
                 // if we get an exact match: succeed immediately
                 for (int i = 0; i < hintCount; i++) {
-                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, RiKind.Object);
+                    XirParameter hintHub = asm.createConstantInputParameter("hintHub" + i, Kind.Object);
                     asm.mov(scratchObject, hintHub);
                     if (i < hintCount - 1) {
                         asm.jeq(end, objHub, scratchObject);
@@ -718,12 +718,12 @@
     private SimpleTemplates typeCheckTemplates = new SimpleTemplates(NULL_CHECK) {
        @Override
        protected XirTemplate create(CiXirAssembler asm, long flags) {
-           asm.restart(RiKind.Void);
-           XirParameter objHub = asm.createInputParameter("objectHub", RiKind.Object);
-           XirOperand hub = asm.createConstantInputParameter("hub", RiKind.Object);
+           asm.restart(Kind.Void);
+           XirParameter objHub = asm.createInputParameter("objectHub", Kind.Object);
+           XirOperand hub = asm.createConstantInputParameter("hub", Kind.Object);
            XirLabel falseSucc = asm.createInlineLabel(XirLabel.FalseSuccessor);
 
-           XirOperand checkHub = asm.createTemp("checkHub", RiKind.Object);
+           XirOperand checkHub = asm.createTemp("checkHub", Kind.Object);
 
            if (is(NULL_CHECK, flags)) {
                asm.mark(MARK_IMPLICIT_NULL);
@@ -787,8 +787,8 @@
     }
 
     @Override
-    public XirSnippet genNewArray(XirSite site, XirArgument length, RiKind elementKind, RiType componentType, RiType arrayType) {
-        if (elementKind == RiKind.Object) {
+    public XirSnippet genNewArray(XirSite site, XirArgument length, Kind elementKind, RiType componentType, RiType arrayType) {
+        if (elementKind == Kind.Object) {
             assert arrayType instanceof RiResolvedType;
             return new XirSnippet(newObjectArrayTemplates.get(site), length, XirArgument.forObject(((HotSpotType) arrayType).klassOop()));
         } else {
@@ -906,7 +906,7 @@
     private static void useRegisters(CiXirAssembler asm, CiRegister... registers) {
         if (registers != null) {
             for (CiRegister register : registers) {
-                asm.createRegisterTemp("reg", RiKind.Illegal, register);
+                asm.createRegisterTemp("reg", Kind.Illegal, register);
             }
         }
     }
@@ -998,12 +998,12 @@
 
         @Override
         protected final XirTemplate create(CiXirAssembler asm, long flags) {
-            return create(asm, flags & FLAGS_MASK, RiKind.VALUES[(int) (flags & INDEX_MASK)]);
+            return create(asm, flags & FLAGS_MASK, Kind.VALUES[(int) (flags & INDEX_MASK)]);
         }
 
-        protected abstract XirTemplate create(CiXirAssembler asm, long flags, RiKind kind);
+        protected abstract XirTemplate create(CiXirAssembler asm, long flags, Kind kind);
 
-        public XirTemplate get(XirSite site, RiKind kind, TemplateFlag... flags) {
+        public XirTemplate get(XirSite site, Kind kind, TemplateFlag... flags) {
             return getInternal(getBits(kind.ordinal(), site, flags));
         }
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java	Fri Jun 08 23:47:42 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(RiKind.Object);
+        final int scale = arrayIndexScale(Kind.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(RiKind.Object);
+            int header = arrayBaseOffset(Kind.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(RiKind.Byte);
+        int header = arrayBaseOffset(Kind.Byte);
         for (long i = length - 1; i >= 0; i--) {
-            Byte a = UnsafeLoadNode.load(src, header, i + srcPos, RiKind.Byte);
-            UnsafeStoreNode.store(dest, header, i + destPos, a.byteValue(), RiKind.Byte);
+            Byte a = UnsafeLoadNode.load(src, header, i + srcPos, Kind.Byte);
+            UnsafeStoreNode.store(dest, header, i + destPos, a.byteValue(), Kind.Byte);
         }
     }
 
     @Snippet
     public static void copyShortsDown(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(RiKind.Short);
+        int header = arrayBaseOffset(Kind.Short);
         for (long i = (length - 1) * 2; i >= 0; i -= 2) {
-            Character a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Short);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.charValue(), RiKind.Short);
+            Character a = UnsafeLoadNode.load(src, header, i + srcOffset, Kind.Short);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.charValue(), Kind.Short);
         }
     }
 
     @Snippet
     public static void copyIntsDown(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(RiKind.Int);
+        int header = arrayBaseOffset(Kind.Int);
         for (long i = (length - 1) * 4; i >= 0; i -= 4) {
-            Integer a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Int);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.intValue(), RiKind.Int);
+            Integer a = UnsafeLoadNode.load(src, header, i + srcOffset, Kind.Int);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.intValue(), Kind.Int);
         }
     }
 
     @Snippet
     public static void copyLongsDown(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(RiKind.Long);
+        int header = arrayBaseOffset(Kind.Long);
         for (long i = (length - 1) * 8; i >= 0; i -= 8) {
-            Long a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Long);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.longValue(), RiKind.Long);
+            Long a = UnsafeLoadNode.load(src, header, i + srcOffset, Kind.Long);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.longValue(), Kind.Long);
         }
     }
 
     // Does NOT perform store checks
     @Snippet
     public static void copyObjectsDown(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(RiKind.Object);
-        final int scale = arrayIndexScale(RiKind.Object);
+        int header = arrayBaseOffset(Kind.Object);
+        final int scale = arrayIndexScale(Kind.Object);
         for (long i = (length - 1) * scale; i >= 0; i -= scale) {
-            Object a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Object);
+            Object a = UnsafeLoadNode.load(src, header, i + srcOffset, Kind.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(RiKind.Byte);
+        int header = arrayBaseOffset(Kind.Byte);
         for (long i = 0; i < length; i++) {
-            Byte a = UnsafeLoadNode.load(src, header, i + srcPos, RiKind.Byte);
-            UnsafeStoreNode.store(dest, header, i + destPos, a.byteValue(), RiKind.Byte);
+            Byte a = UnsafeLoadNode.load(src, header, i + srcPos, Kind.Byte);
+            UnsafeStoreNode.store(dest, header, i + destPos, a.byteValue(), Kind.Byte);
         }
     }
 
@@ -314,61 +314,61 @@
      */
     @Snippet
     public static void copyShortsUp(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(RiKind.Short);
+        int header = arrayBaseOffset(Kind.Short);
         for (long i = 0; i < length * 2L; i += 2) {
-            Character a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Short);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.charValue(), RiKind.Short);
+            Character a = UnsafeLoadNode.load(src, header, i + srcOffset, Kind.Short);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.charValue(), Kind.Short);
         }
     }
 
     @Snippet
     public static void copyIntsUp(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(RiKind.Int);
+        int header = arrayBaseOffset(Kind.Int);
         for (long i = 0; i < length * 4L; i += 4) {
-            Integer a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Int);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.intValue(), RiKind.Int);
+            Integer a = UnsafeLoadNode.load(src, header, i + srcOffset, Kind.Int);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.intValue(), Kind.Int);
         }
     }
 
     @Snippet
     public static void copyLongsUp(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(RiKind.Long);
+        int header = arrayBaseOffset(Kind.Long);
         for (long i = 0; i < length * 8L; i += 8) {
-            Long a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Long);
-            UnsafeStoreNode.store(dest, header, i + destOffset, a.longValue(), RiKind.Long);
+            Long a = UnsafeLoadNode.load(src, header, i + srcOffset, Kind.Long);
+            UnsafeStoreNode.store(dest, header, i + destOffset, a.longValue(), Kind.Long);
         }
     }
 
     // Does NOT perform store checks
     @Snippet
     public static void copyObjectsUp(Object src, long srcOffset, Object dest, long destOffset, int length)  {
-        int header = arrayBaseOffset(RiKind.Object);
-        final int scale = arrayIndexScale(RiKind.Object);
+        int header = arrayBaseOffset(Kind.Object);
+        final int scale = arrayIndexScale(Kind.Object);
         for (long i = 0; i < length * scale; i += scale) {
-            Object a = UnsafeLoadNode.load(src, header, i + srcOffset, RiKind.Object);
+            Object a = UnsafeLoadNode.load(src, header, i + srcOffset, Kind.Object);
             DirectObjectStoreNode.store(dest, header, i + destOffset, a);
         }
     }
 
     @Fold
-    static int arrayBaseOffset(RiKind elementKind) {
+    static int arrayBaseOffset(Kind elementKind) {
         return elementKind.arrayBaseOffset();
     }
 
     @Fold
-    static int arrayIndexScale(RiKind elementKind) {
+    static int arrayIndexScale(Kind elementKind) {
         return elementKind.arrayIndexScale();
     }
 
     static {
-        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;
+        assert arrayIndexScale(Kind.Byte) == 1;
+        assert arrayIndexScale(Kind.Boolean) == 1;
+        assert arrayIndexScale(Kind.Char) == 2;
+        assert arrayIndexScale(Kind.Short) == 2;
+        assert arrayIndexScale(Kind.Int) == 4;
+        assert arrayIndexScale(Kind.Long) == 8;
+        assert arrayIndexScale(Kind.Float) == 4;
+        assert arrayIndexScale(Kind.Double) == 8;
     }
 
     @Fold
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java	Fri Jun 08 23:47:42 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(RiKind.Object), index * arrayIndexScale(RiKind.Object), true);
+        return UnsafeLoadNode.loadObject(array, arrayBaseOffset(Kind.Object), index * arrayIndexScale(Kind.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(), RiKind.Int);
+        int superCheckOffset = UnsafeLoadNode.load(t, 0, superCheckOffsetOffset(), Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -37,7 +37,7 @@
     @Input private ValueNode object;
 
     public GetObjectAddressNode(ValueNode obj) {
-        super(StampFactory.forKind(RiKind.Long));
+        super(StampFactory.forKind(Kind.Long));
         this.object = obj;
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java	Fri Jun 08 23:47:42 2012 +0200
@@ -87,26 +87,26 @@
                                 && srcType.isArrayClass()
                                 && destType != null
                                 && destType.isArrayClass()) {
-                    RiKind componentKind = srcType.componentType().kind();
+                    Kind componentKind = srcType.componentType().kind();
                     if (srcType.componentType() == destType.componentType()) {
-                        if (componentKind == RiKind.Int) {
+                        if (componentKind == Kind.Int) {
                             snippetMethod = intArrayCopy;
-                        } else if (componentKind == RiKind.Char) {
+                        } else if (componentKind == Kind.Char) {
                             snippetMethod = charArrayCopy;
-                        } else if (componentKind == RiKind.Long) {
+                        } else if (componentKind == Kind.Long) {
                             snippetMethod = longArrayCopy;
-                        } else if (componentKind == RiKind.Byte) {
+                        } else if (componentKind == Kind.Byte) {
                             snippetMethod = byteArrayCopy;
-                        } else if (componentKind == RiKind.Short) {
+                        } else if (componentKind == Kind.Short) {
                             snippetMethod = shortArrayCopy;
-                        } else if (componentKind == RiKind.Float) {
+                        } else if (componentKind == Kind.Float) {
                             snippetMethod = floatArrayCopy;
-                        } else if (componentKind == RiKind.Double) {
+                        } else if (componentKind == Kind.Double) {
                             snippetMethod = doubleArrayCopy;
-                        } else if (componentKind == RiKind.Object) {
+                        } else if (componentKind == Kind.Object) {
                             snippetMethod = objectArrayCopy;
                         }
-                    } else if (componentKind == RiKind.Object
+                    } else if (componentKind == Kind.Object
                                     && srcType.componentType().isSubtypeOf(destType.componentType())) {
                         snippetMethod = objectArrayCopy;
                     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/UnsafeSnippets.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/UnsafeSnippets.java	Fri Jun 08 23:47:42 2012 +0200
@@ -47,7 +47,7 @@
     }
 
     public Object getObject(Object o, long offset) {
-        return UnsafeLoadNode.load(o, 0, offset, RiKind.Object);
+        return UnsafeLoadNode.load(o, 0, offset, Kind.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, RiKind.Object);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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, RiKind.Int);
+        Integer value = UnsafeLoadNode.load(o, 0, offset, Kind.Int);
         return value;
     }
 
@@ -80,7 +80,7 @@
     }
 
     public void putInt(Object o, long offset, int x) {
-        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Int);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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, RiKind.Boolean);
+        Boolean result = UnsafeLoadNode.load(o, 0, offset, Kind.Boolean);
         return result;
     }
 
@@ -103,7 +103,7 @@
     }
 
     public void putBoolean(Object o, long offset, boolean x) {
-        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Boolean);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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, RiKind.Byte);
+        Byte result = UnsafeLoadNode.load(o, 0, offset, Kind.Byte);
         return result;
     }
 
@@ -126,7 +126,7 @@
     }
 
     public void putByte(Object o, long offset, byte x) {
-        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Byte);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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, RiKind.Short);
+        Short result = UnsafeLoadNode.load(o, 0, offset, Kind.Short);
         return result;
     }
 
@@ -149,7 +149,7 @@
     }
 
     public void putShort(Object o, long offset, short x) {
-        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Short);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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, RiKind.Char);
+        Character result = UnsafeLoadNode.load(o, 0, offset, Kind.Char);
         return result;
     }
 
@@ -172,7 +172,7 @@
     }
 
     public void putChar(Object o, long offset, char x) {
-        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Char);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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, RiKind.Long);
+        Long result = UnsafeLoadNode.load(o, 0, offset, Kind.Long);
         return result;
     }
 
@@ -195,7 +195,7 @@
     }
 
     public void putLong(Object o, long offset, long x) {
-        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Long);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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, RiKind.Float);
+        Float result = UnsafeLoadNode.load(o, 0, offset, Kind.Float);
         return result;
     }
 
@@ -218,7 +218,7 @@
     }
 
     public void putFloat(Object o, long offset, float x) {
-        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Float);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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, RiKind.Double);
+        Double result = UnsafeLoadNode.load(o, 0, offset, Kind.Double);
         return result;
     }
 
@@ -241,7 +241,7 @@
     }
 
     public void putDouble(Object o, long offset, double x) {
-        UnsafeStoreNode.store(o, 0, offset, x, RiKind.Double);
+        UnsafeStoreNode.store(o, 0, offset, x, Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java	Fri Jun 08 23:47:42 2012 +0200
@@ -69,8 +69,8 @@
             public void visitExceptionObject(ExceptionObjectNode x) {
                 HotSpotVMConfig config = ((HotSpotRuntime) runtime).config;
                 CiRegisterValue thread = r15.asValue();
-                CiAddress exceptionAddress = new CiAddress(RiKind.Object, thread, config.threadExceptionOopOffset);
-                CiAddress pcAddress = new CiAddress(RiKind.Long, thread, config.threadExceptionPcOffset);
+                CiAddress exceptionAddress = new CiAddress(Kind.Object, thread, config.threadExceptionOopOffset);
+                CiAddress pcAddress = new CiAddress(Kind.Long, thread, config.threadExceptionPcOffset);
                 Value exception = emitLoad(exceptionAddress, false);
                 emitStore(exceptionAddress, Constant.NULL_OBJECT, false);
                 emitStore(pcAddress, Constant.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(RiKind.Int, rsp.asValue(), i * intSize), 0xC1C1C1C1);
+                    asm.movl(new CiAddress(Kind.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 RiKind[] {RiKind.Object}, target, false);
+            CiCallingConvention cc = regConfig.getCallingConvention(JavaCallee, new Kind[] {Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java	Fri Jun 08 23:47:42 2012 +0200
@@ -70,9 +70,9 @@
             if (eagerResolve) {
                 type = type.resolve(accessingClass);
             }
-            RiKind kind = type.kind().stackKind();
+            Kind kind = type.kind().stackKind();
             Stamp stamp;
-            if (kind == RiKind.Object && type instanceof RiResolvedType) {
+            if (kind == Kind.Object && type instanceof RiResolvedType) {
                 stamp = StampFactory.declared((RiResolvedType) type);
             } else {
                 stamp = StampFactory.forKind(kind);
@@ -342,14 +342,14 @@
     }
 
     /**
-     * Stores a given local variable at the specified index. If the value is a {@linkplain RiKind#isDoubleWord() double word},
+     * Stores a given local variable at the specified index. If the value is a {@linkplain Kind#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() != RiKind.Void && x.kind() != RiKind.Illegal : "unexpected value: " + x;
+        assert x == null || x.kind() != Kind.Void && x.kind() != Kind.Illegal : "unexpected value: " + x;
         locals[i] = x;
         if (x != null && isTwoSlot(x.kind())) {
             // if this is a double word, then kill i+1
@@ -374,8 +374,8 @@
      * @param kind the type expected for this instruction
      * @param x the instruction to push onto the stack
      */
-    public void push(RiKind kind, ValueNode x) {
-        assert !x.isDeleted() && x.kind() != RiKind.Void && x.kind() != RiKind.Illegal;
+    public void push(Kind kind, ValueNode x) {
+        assert !x.isDeleted() && x.kind() != Kind.Void && x.kind() != Kind.Illegal;
         xpush(assertKind(kind, x));
         if (isTwoSlot(kind)) {
             xpush(null);
@@ -387,7 +387,7 @@
      * @param x the instruction to push onto the stack
      */
     public void xpush(ValueNode x) {
-        assert x == null || (!x.isDeleted() && x.kind() != RiKind.Void && x.kind() != RiKind.Illegal);
+        assert x == null || (!x.isDeleted() && x.kind() != Kind.Void && x.kind() != Kind.Illegal);
         stack[stackSize++] = x;
     }
 
@@ -442,8 +442,8 @@
         xpush(null);
     }
 
-    public void pushReturn(RiKind kind, ValueNode x) {
-        if (kind != RiKind.Void) {
+    public void pushReturn(Kind kind, ValueNode x) {
+        if (kind != Kind.Void) {
             push(kind.stackKind(), x);
         }
     }
@@ -453,8 +453,8 @@
      * @param kind the expected type
      * @return the instruction on the top of the stack
      */
-    public ValueNode pop(RiKind kind) {
-        assert kind != RiKind.Void;
+    public ValueNode pop(Kind kind) {
+        assert kind != Kind.Void;
         if (isTwoSlot(kind)) {
             xpop();
         }
@@ -566,13 +566,13 @@
         stackSize = 0;
     }
 
-    public static int stackSlots(RiKind kind) {
+    public static int stackSlots(Kind kind) {
         return isTwoSlot(kind) ? 2 : 1;
     }
 
-    public static boolean isTwoSlot(RiKind kind) {
-        assert kind != RiKind.Void && kind != RiKind.Illegal;
-        return kind == RiKind.Long || kind == RiKind.Double;
+    public static boolean isTwoSlot(Kind kind) {
+        assert kind != Kind.Void && kind != Kind.Illegal;
+        return kind == Kind.Long || kind == Kind.Double;
     }
 
     public boolean contains(ValueNode value) {
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Fri Jun 08 23:47:42 2012 +0200
@@ -225,11 +225,11 @@
         return stream.currentBCI();
     }
 
-    private void loadLocal(int index, RiKind kind) {
+    private void loadLocal(int index, Kind kind) {
         frameState.push(kind, frameState.loadLocal(index));
     }
 
-    private void storeLocal(RiKind kind, int index) {
+    private void storeLocal(Kind 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(RiKind.Object, append(ConstantNode.forCiConstant(((RiResolvedType) riType).getEncoding(Representation.JavaClass), runtime, currentGraph)));
+                frameState.push(Kind.Object, append(ConstantNode.forCiConstant(((RiResolvedType) riType).getEncoding(Representation.JavaClass), runtime, currentGraph)));
             } else {
                 append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
-                frameState.push(RiKind.Object, append(ConstantNode.forObject(null, runtime, currentGraph)));
+                frameState.push(Kind.Object, append(ConstantNode.forObject(null, runtime, currentGraph)));
             }
         } else if (con instanceof Constant) {
             Constant constant = (Constant) con;
@@ -297,7 +297,7 @@
         }
     }
 
-    private void genLoadIndexed(RiKind kind) {
+    private void genLoadIndexed(Kind kind) {
         emitExplicitExceptions(frameState.peek(1), frameState.peek(0));
 
         ValueNode index = frameState.ipop();
@@ -306,7 +306,7 @@
         frameState.push(kind.stackKind(), v);
     }
 
-    private void genStoreIndexed(RiKind kind) {
+    private void genStoreIndexed(Kind kind) {
         emitExplicitExceptions(frameState.peek(2), frameState.peek(1));
 
         ValueNode value = frameState.pop(kind.stackKind());
@@ -397,7 +397,7 @@
 
     }
 
-    private void genArithmeticOp(RiKind result, int opcode, boolean canTrap) {
+    private void genArithmeticOp(Kind 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(RiKind kind) {
+    private void genNegateOp(Kind kind) {
         frameState.push(kind, append(currentGraph.unique(new NegateNode(frameState.pop(kind)))));
     }
 
-    private void genShiftOp(RiKind kind, int opcode) {
+    private void genShiftOp(Kind 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(RiKind kind, int opcode) {
+    private void genLogicOp(Kind 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(RiKind kind, boolean isUnorderedLess) {
+    private void genCompareOp(Kind 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(RiKind.Int, x, y))));
+        frameState.storeLocal(index, append(currentGraph.unique(new IntegerAddNode(Kind.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() == RiKind.Object) {
+            if (a.kind() == Kind.Object) {
                 condition = new ObjectEqualsNode(a, b);
             } else {
                 condition = new IntegerEqualsNode(a, b);
             }
         } else {
-            assert a.kind() != RiKind.Object && !cond.isUnsigned();
+            assert a.kind() != Kind.Object && !cond.isUnsigned();
             condition = new IntegerLessThanNode(a, b);
         }
         condition = currentGraph.unique(condition);
@@ -556,7 +556,7 @@
         ifNode(x, cond, y);
     }
 
-    private void genIfSame(RiKind kind, Condition cond) {
+    private void genIfSame(Kind 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 RiKind arrayTypeCodeToKind(int code) {
+    public static Kind arrayTypeCodeToKind(int code) {
         // Checkstyle: stop
         switch (code) {
-            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;
+            case 4:  return Kind.Boolean;
+            case 5:  return Kind.Char;
+            case 6:  return Kind.Float;
+            case 7:  return Kind.Double;
+            case 8:  return Kind.Byte;
+            case 9:  return Kind.Short;
+            case 10: return Kind.Int;
+            case 11: return Kind.Long;
             default: throw new IllegalArgumentException("unknown array type code: " + code);
         }
         // Checkstyle: resume
     }
 
     private void genNewTypeArray(int typeCode) {
-        RiKind kind = arrayTypeCodeToKind(typeCode);
+        Kind 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);
 
-        RiKind kind = field.kind();
+        Kind kind = field.kind();
         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);
-            RiKind kind = field.kind();
+            Kind kind = field.kind();
             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(RiKind kind, LoadFieldNode load) {
+    private void appendOptimizedLoadField(Kind 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(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
         frameState.popArguments(unresolvedTarget.signature().argumentSlots(withReceiver), unresolvedTarget.signature().argumentCount(withReceiver));
-        RiKind kind = unresolvedTarget.signature().returnKind();
-        if (kind != RiKind.Void) {
+        Kind kind = unresolvedTarget.signature().returnKind();
+        if (kind != Kind.Void) {
             frameState.push(kind.stackKind(), append(ConstantNode.defaultForKind(kind, currentGraph)));
         }
     }
@@ -955,7 +955,7 @@
     }
 
     private void appendInvoke(InvokeKind invokeKind, RiResolvedMethod targetMethod, ValueNode[] args) {
-        RiKind resultType = targetMethod.signature().returnKind();
+        Kind resultType = targetMethod.signature().returnKind();
         if (GraalOptions.DeoptALot) {
             DeoptimizeNode deoptimize = currentGraph.add(new DeoptimizeNode(CiDeoptAction.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(RiKind.Jsr, ConstantNode.forJsr(stream().nextBCI(), currentGraph));
+        frameState.push(Kind.Jsr, ConstantNode.forJsr(stream().nextBCI(), currentGraph));
         appendGoto(createTarget(successor, frameState));
     }
 
@@ -1345,8 +1345,8 @@
         if (method.isConstructor() && method.holder().superType() == null) {
             callRegisterFinalizer();
         }
-        RiKind returnKind = method.signature().returnKind().stackKind();
-        ValueNode x = returnKind == RiKind.Void ? null : frameState.pop(returnKind);
+        Kind returnKind = method.signature().returnKind().stackKind();
+        ValueNode x = returnKind == Kind.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(), 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          : loadLocal(stream.readLocalIndex(), Kind.Int); break;
+            case LLOAD          : loadLocal(stream.readLocalIndex(), Kind.Long); break;
+            case FLOAD          : loadLocal(stream.readLocalIndex(), Kind.Float); break;
+            case DLOAD          : loadLocal(stream.readLocalIndex(), Kind.Double); break;
+            case ALOAD          : loadLocal(stream.readLocalIndex(), Kind.Object); break;
             case ILOAD_0        : // fall through
             case ILOAD_1        : // fall through
             case ILOAD_2        : // fall through
-            case ILOAD_3        : loadLocal(opcode - ILOAD_0, RiKind.Int); break;
+            case ILOAD_3        : loadLocal(opcode - ILOAD_0, Kind.Int); break;
             case LLOAD_0        : // fall through
             case LLOAD_1        : // fall through
             case LLOAD_2        : // fall through
-            case LLOAD_3        : loadLocal(opcode - LLOAD_0, RiKind.Long); break;
+            case LLOAD_3        : loadLocal(opcode - LLOAD_0, Kind.Long); break;
             case FLOAD_0        : // fall through
             case FLOAD_1        : // fall through
             case FLOAD_2        : // fall through
-            case FLOAD_3        : loadLocal(opcode - FLOAD_0, RiKind.Float); break;
+            case FLOAD_3        : loadLocal(opcode - FLOAD_0, Kind.Float); break;
             case DLOAD_0        : // fall through
             case DLOAD_1        : // fall through
             case DLOAD_2        : // fall through
-            case DLOAD_3        : loadLocal(opcode - DLOAD_0, RiKind.Double); break;
+            case DLOAD_3        : loadLocal(opcode - DLOAD_0, Kind.Double); break;
             case ALOAD_0        : // fall through
             case ALOAD_1        : // fall through
             case ALOAD_2        : // fall through
-            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 ALOAD_3        : loadLocal(opcode - ALOAD_0, Kind.Object); break;
+            case IALOAD         : genLoadIndexed(Kind.Int   ); break;
+            case LALOAD         : genLoadIndexed(Kind.Long  ); break;
+            case FALOAD         : genLoadIndexed(Kind.Float ); break;
+            case DALOAD         : genLoadIndexed(Kind.Double); break;
+            case AALOAD         : genLoadIndexed(Kind.Object); break;
+            case BALOAD         : genLoadIndexed(Kind.Byte  ); break;
+            case CALOAD         : genLoadIndexed(Kind.Char  ); break;
+            case SALOAD         : genLoadIndexed(Kind.Short ); break;
+            case ISTORE         : storeLocal(Kind.Int, stream.readLocalIndex()); break;
+            case LSTORE         : storeLocal(Kind.Long, stream.readLocalIndex()); break;
+            case FSTORE         : storeLocal(Kind.Float, stream.readLocalIndex()); break;
+            case DSTORE         : storeLocal(Kind.Double, stream.readLocalIndex()); break;
+            case ASTORE         : storeLocal(Kind.Object, stream.readLocalIndex()); break;
             case ISTORE_0       : // fall through
             case ISTORE_1       : // fall through
             case ISTORE_2       : // fall through
-            case ISTORE_3       : storeLocal(RiKind.Int, opcode - ISTORE_0); break;
+            case ISTORE_3       : storeLocal(Kind.Int, opcode - ISTORE_0); break;
             case LSTORE_0       : // fall through
             case LSTORE_1       : // fall through
             case LSTORE_2       : // fall through
-            case LSTORE_3       : storeLocal(RiKind.Long, opcode - LSTORE_0); break;
+            case LSTORE_3       : storeLocal(Kind.Long, opcode - LSTORE_0); break;
             case FSTORE_0       : // fall through
             case FSTORE_1       : // fall through
             case FSTORE_2       : // fall through
-            case FSTORE_3       : storeLocal(RiKind.Float, opcode - FSTORE_0); break;
+            case FSTORE_3       : storeLocal(Kind.Float, opcode - FSTORE_0); break;
             case DSTORE_0       : // fall through
             case DSTORE_1       : // fall through
             case DSTORE_2       : // fall through
-            case DSTORE_3       : storeLocal(RiKind.Double, opcode - DSTORE_0); break;
+            case DSTORE_3       : storeLocal(Kind.Double, opcode - DSTORE_0); break;
             case ASTORE_0       : // fall through
             case ASTORE_1       : // fall through
             case ASTORE_2       : // fall through
-            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 ASTORE_3       : storeLocal(Kind.Object, opcode - ASTORE_0); break;
+            case IASTORE        : genStoreIndexed(Kind.Int   ); break;
+            case LASTORE        : genStoreIndexed(Kind.Long  ); break;
+            case FASTORE        : genStoreIndexed(Kind.Float ); break;
+            case DASTORE        : genStoreIndexed(Kind.Double); break;
+            case AASTORE        : genStoreIndexed(Kind.Object); break;
+            case BASTORE        : genStoreIndexed(Kind.Byte  ); break;
+            case CASTORE        : genStoreIndexed(Kind.Char  ); break;
+            case SASTORE        : genStoreIndexed(Kind.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(RiKind.Int, opcode, false); break;
+            case IMUL           : genArithmeticOp(Kind.Int, opcode, false); break;
             case IDIV           : // fall through
-            case IREM           : genArithmeticOp(RiKind.Int, opcode, true); break;
+            case IREM           : genArithmeticOp(Kind.Int, opcode, true); break;
             case LADD           : // fall through
             case LSUB           : // fall through
-            case LMUL           : genArithmeticOp(RiKind.Long, opcode, false); break;
+            case LMUL           : genArithmeticOp(Kind.Long, opcode, false); break;
             case LDIV           : // fall through
-            case LREM           : genArithmeticOp(RiKind.Long, opcode, true); break;
+            case LREM           : genArithmeticOp(Kind.Long, opcode, true); break;
             case FADD           : // fall through
             case FSUB           : // fall through
             case FMUL           : // fall through
             case FDIV           : // fall through
-            case FREM           : genArithmeticOp(RiKind.Float, opcode, false); break;
+            case FREM           : genArithmeticOp(Kind.Float, opcode, false); break;
             case DADD           : // fall through
             case DSUB           : // fall through
             case DMUL           : // fall through
             case DDIV           : // fall through
-            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 DREM           : genArithmeticOp(Kind.Double, opcode, false); break;
+            case INEG           : genNegateOp(Kind.Int); break;
+            case LNEG           : genNegateOp(Kind.Long); break;
+            case FNEG           : genNegateOp(Kind.Float); break;
+            case DNEG           : genNegateOp(Kind.Double); break;
             case ISHL           : // fall through
             case ISHR           : // fall through
-            case IUSHR          : genShiftOp(RiKind.Int, opcode); break;
+            case IUSHR          : genShiftOp(Kind.Int, opcode); break;
             case IAND           : // fall through
             case IOR            : // fall through
-            case IXOR           : genLogicOp(RiKind.Int, opcode); break;
+            case IXOR           : genLogicOp(Kind.Int, opcode); break;
             case LSHL           : // fall through
             case LSHR           : // fall through
-            case LUSHR          : genShiftOp(RiKind.Long, opcode); break;
+            case LUSHR          : genShiftOp(Kind.Long, opcode); break;
             case LAND           : // fall through
             case LOR            : // fall through
-            case LXOR           : genLogicOp(RiKind.Long, opcode); break;
+            case LXOR           : genLogicOp(Kind.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(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 LCMP           : genCompareOp(Kind.Long, false); break;
+            case FCMPL          : genCompareOp(Kind.Float, true); break;
+            case FCMPG          : genCompareOp(Kind.Float, false); break;
+            case DCMPL          : genCompareOp(Kind.Double, true); break;
+            case DCMPG          : genCompareOp(Kind.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(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 IF_ICMPEQ      : genIfSame(Kind.Int, Condition.EQ); break;
+            case IF_ICMPNE      : genIfSame(Kind.Int, Condition.NE); break;
+            case IF_ICMPLT      : genIfSame(Kind.Int, Condition.LT); break;
+            case IF_ICMPGE      : genIfSame(Kind.Int, Condition.GE); break;
+            case IF_ICMPGT      : genIfSame(Kind.Int, Condition.GT); break;
+            case IF_ICMPLE      : genIfSame(Kind.Int, Condition.LE); break;
+            case IF_ACMPEQ      : genIfSame(Kind.Object, Condition.EQ); break;
+            case IF_ACMPNE      : genIfSame(Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java	Fri Jun 08 23:47:42 2012 +0200
@@ -253,7 +253,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() == RiKind.Int;
+            assert y.kind.stackKind() == Kind.Int;
         }
     }
 
@@ -556,9 +556,9 @@
 
 
     private static void verifyKind(AMD64Arithmetic opcode, Value result, Value x, Value y) {
-        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);
+        assert (opcode.name().startsWith("I") && result.kind == Kind.Int && x.kind.stackKind() == Kind.Int && y.kind.stackKind() == Kind.Int)
+            || (opcode.name().startsWith("L") && result.kind == Kind.Long && x.kind == Kind.Long && y.kind == Kind.Long)
+            || (opcode.name().startsWith("F") && result.kind == Kind.Float && x.kind == Kind.Float && y.kind == Kind.Float)
+            || (opcode.name().startsWith("D") && result.kind == Kind.Double && x.kind == Kind.Double && y.kind == Kind.Double);
     }
 }
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java	Fri Jun 08 23:47:42 2012 +0200
@@ -63,12 +63,12 @@
             Value y = input(1);
 
             super.verify();
-            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);
+            assert (name().startsWith("I") && x.kind == Kind.Int && y.kind.stackKind() == Kind.Int)
+                || (name().startsWith("I") && x.kind == Kind.Jsr && y.kind == Kind.Jsr)
+                || (name().startsWith("L") && x.kind == Kind.Long && y.kind == Kind.Long)
+                || (name().startsWith("A") && x.kind == Kind.Object && y.kind == Kind.Object)
+                || (name().startsWith("F") && x.kind == Kind.Float && y.kind == Kind.Float)
+                || (name().startsWith("D") && x.kind == Kind.Double && y.kind == Kind.Double);
         }
     }
 
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java	Fri Jun 08 23:47:42 2012 +0200
@@ -259,7 +259,7 @@
         int afterLea = buf.position();
 
         // Load jump table entry into scratch and jump to it
-        masm.movslq(value, new CiAddress(RiKind.Int, scratch.asValue(), value.asValue(), Scale.Times4, 0));
+        masm.movslq(value, new CiAddress(Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Fri Jun 08 23:47:42 2012 +0200
@@ -241,7 +241,7 @@
         outgoingSize = Math.max(outgoingSize, argsSize);
     }
 
-    private CiStackSlot getSlot(RiKind kind, int additionalOffset) {
+    private CiStackSlot getSlot(Kind 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(RiKind kind) {
+    public CiStackSlot allocateSpillSlot(Kind 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(RiKind.Object, 0);
+            CiStackSlot result = getSlot(Kind.Object, 0);
             objectStackBlocks.add(result);
             for (int i = target.wordSize; i < size; i += target.wordSize) {
-                objectStackBlocks.add(getSlot(RiKind.Object, i));
+                objectStackBlocks.add(getSlot(Kind.Object, i));
             }
             return result;
 
@@ -324,7 +324,7 @@
      * @param frameRefMap A frame reference map, as created by {@link #initFrameRefMap()}.
      */
     public void setReference(Value location, CiBitMap registerRefMap, CiBitMap frameRefMap) {
-        if (location.kind == RiKind.Object) {
+        if (location.kind == Kind.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(Value location, CiBitMap registerRefMap, CiBitMap frameRefMap) {
-        if (location.kind == RiKind.Object) {
+        if (location.kind == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java	Fri Jun 08 23:47:42 2012 +0200
@@ -47,7 +47,7 @@
      * @param kind
      * @param index
      */
-    public Variable(RiKind kind, int index, CiRegister.RegisterFlag flag) {
+    public Variable(Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java	Fri Jun 08 23:47:42 2012 +0200
@@ -220,7 +220,7 @@
      * including long constants that fit into the 32-bit range.
      */
     public int asIntConst(Value value) {
-        assert (value.kind.stackKind() == RiKind.Int || value.kind == RiKind.Jsr || value.kind == RiKind.Long) && isConstant(value);
+        assert (value.kind.stackKind() == Kind.Int || value.kind == Kind.Jsr || value.kind == Kind.Long) && isConstant(value);
         long c = ((Constant) value).asLong();
         if (!(NumUtil.isInt(c))) {
             throw GraalInternalError.shouldNotReachHere();
@@ -236,7 +236,7 @@
     }
 
     public CiAddress asFloatConstRef(Value value, int alignment) {
-        assert value.kind == RiKind.Float && isConstant(value);
+        assert value.kind == Kind.Float && isConstant(value);
         return recordDataReferenceInCode((Constant) value, alignment);
     }
 
@@ -248,7 +248,7 @@
     }
 
     public CiAddress asDoubleConstRef(Value value, int alignment) {
-        assert value.kind == RiKind.Double && isConstant(value);
+        assert value.kind == Kind.Double && isConstant(value);
         return recordDataReferenceInCode((Constant) 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(Value value) {
-        assert value.kind == RiKind.Long && isConstant(value);
+        assert value.kind == Kind.Long && isConstant(value);
         return recordDataReferenceInCode((Constant) value, 8);
     }
 
     public CiAddress asIntAddr(Value value) {
-        assert value.kind == RiKind.Int;
+        assert value.kind == Kind.Int;
         return asAddress(value);
     }
 
     public CiAddress asLongAddr(Value value) {
-        assert value.kind == RiKind.Long;
+        assert value.kind == Kind.Long;
         return asAddress(value);
     }
 
     public CiAddress asObjectAddr(Value value) {
-        assert value.kind == RiKind.Object;
+        assert value.kind == Kind.Object;
         return asAddress(value);
     }
 
     public CiAddress asFloatAddr(Value value) {
-        assert value.kind == RiKind.Float;
+        assert value.kind == Kind.Float;
         return asAddress(value);
     }
 
     public CiAddress asDoubleAddr(Value value) {
-        assert value.kind == RiKind.Double;
+        assert value.kind == Kind.Double;
         return asAddress(value);
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -41,7 +41,7 @@
 
     public abstract RiType returnType();
 
-    public abstract RiKind returnKind();
+    public abstract Kind returnKind();
 
     @Override
     public void generate(LIRGeneratorTool gen) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -66,7 +66,7 @@
     }
 
     public static ConstantNode forCiConstant(Constant constant, RiRuntime runtime, Graph graph) {
-        if (constant.kind == RiKind.Object) {
+        if (constant.kind == Kind.Object) {
             return graph.unique(new ConstantNode(constant, runtime));
         } else {
             return graph.unique(new ConstantNode(constant));
@@ -173,7 +173,7 @@
         return graph.unique(new ConstantNode(Constant.forObject(o), runtime));
     }
 
-    public static ConstantNode forIntegerKind(RiKind kind, long value, Graph graph) {
+    public static ConstantNode forIntegerKind(Kind kind, long value, Graph graph) {
         switch (kind) {
             case Byte:
             case Short:
@@ -186,7 +186,7 @@
         }
     }
 
-    public static ConstantNode forFloatingKind(RiKind kind, double value, Graph graph) {
+    public static ConstantNode forFloatingKind(Kind kind, double value, Graph graph) {
         switch (kind) {
             case Float:
                 return ConstantNode.forFloat((float) value, graph);
@@ -197,7 +197,7 @@
         }
     }
 
-    public static ConstantNode defaultForKind(RiKind kind, Graph graph) {
+    public static ConstantNode defaultForKind(Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java	Fri Jun 08 23:47:42 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, RiKind popKind, ValueNode... pushedValues) {
+    public FrameState duplicateModified(int newBci, boolean newRethrowException, Kind popKind, ValueNode... pushedValues) {
         int popSlots = 0;
-        if (popKind != RiKind.Void) {
+        if (popKind != Kind.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() != RiKind.Void && value.kind() != RiKind.Illegal), "unexpected value: %s", value);
+            assert assertTrue(value == null || value instanceof VirtualObjectNode || (value.kind() != Kind.Void && value.kind() != Kind.Illegal), "unexpected value: %s", value);
         }
         return super.verify();
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -135,7 +135,7 @@
                             if (trueValue.kind() != falseValue.kind()) {
                                 return;
                             }
-                            if (trueValue.kind() != RiKind.Int && trueValue.kind() != RiKind.Long) {
+                            if (trueValue.kind() != Kind.Int && trueValue.kind() != Kind.Long) {
                                 return;
                             }
                             if (trueValue.isConstant() && falseValue.isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -142,7 +142,7 @@
             stateSplit.setStateAfter(stateAfter);
         }
         if (node == null) {
-            assert kind() == RiKind.Void && usages().isEmpty();
+            assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -183,7 +183,7 @@
             stateSplit.setStateAfter(state);
         }
         if (node == null) {
-            assert kind() == RiKind.Void && usages().isEmpty();
+            assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java	Fri Jun 08 23:47:42 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(RiKind kind, MergeNode merge) {
+    public PhiNode(Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnwindNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -41,7 +41,7 @@
 
     public UnwindNode(ValueNode exception) {
         super(StampFactory.forVoid());
-        assert exception == null || exception.kind() == RiKind.Object;
+        assert exception == null || exception.kind() == Kind.Object;
         this.exception = exception;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -36,8 +36,8 @@
 public abstract class ValueNode extends ScheduledNode implements StampProvider {
 
     /**
-     * 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}.
+     * The kind of this value. This is {@link Kind#Void} for instructions that produce no value.
+     * This kind is guaranteed to be a {@linkplain Kind#stackKind() stack kind}.
      */
     private Stamp stamp;
 
@@ -76,7 +76,7 @@
         this.stamp = stamp;
     }
 
-    public RiKind kind() {
+    public Kind kind() {
         return stamp.kind();
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueUtil.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueUtil.java	Fri Jun 08 23:47:42 2012 +0200
@@ -31,8 +31,8 @@
 
 public class ValueUtil {
 
-    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());
+    public static ValueNode assertKind(Kind kind, ValueNode x) {
+        assert x != null && ((x.kind() == kind) || (x.kind() == Kind.Jsr && kind == Kind.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() == RiKind.Long);
+        assert x != null && (x.kind() == Kind.Long);
         return x;
     }
 
     public static ValueNode assertJsr(ValueNode x) {
-        assert x != null && (x.kind() == RiKind.Jsr);
+        assert x != null && (x.kind() == Kind.Jsr);
         return x;
     }
 
     public static ValueNode assertInt(ValueNode x) {
-        assert x != null && (x.kind() == RiKind.Int);
+        assert x != null && (x.kind() == Kind.Int);
         return x;
     }
 
     public static ValueNode assertFloat(ValueNode x) {
-        assert x != null && (x.kind() == RiKind.Float);
+        assert x != null && (x.kind() == Kind.Float);
         return x;
     }
 
     public static ValueNode assertObject(ValueNode x) {
-        assert x != null && (x.kind() == RiKind.Object);
+        assert x != null && (x.kind() == Kind.Object);
         return x;
     }
 
     public static ValueNode assertDouble(ValueNode x) {
-        assert x != null && (x.kind() == RiKind.Double);
+        assert x != null && (x.kind() == Kind.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.graal.api.meta.RiKind#typeChar character} denoting its
+     * a value is formed by concatenating the {@linkplain com.oracle.graal.api.meta.Kind#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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "&")
 public final class AndNode extends LogicNode implements Canonicalizable, LIRLowerable {
 
-    public AndNode(RiKind kind, ValueNode x, ValueNode y) {
+    public AndNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() & y().asConstant().asInt(), graph());
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() & y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 int c = y().asConstant().asInt();
                 if (c == -1) {
                     return x();
@@ -59,7 +59,7 @@
                     return ConstantNode.forInt(0, graph());
                 }
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ArithmeticNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -39,7 +39,7 @@
      * @param y the second input instruction
      * @param isStrictFP indicates this operation has strict rounding semantics
      */
-    public ArithmeticNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public ArithmeticNode(Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -48,7 +48,7 @@
      * @param x the first input instruction
      * @param y the second input instruction
      */
-    public BinaryNode(RiKind kind, ValueNode x, ValueNode y) {
+    public BinaryNode(Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import static com.oracle.graal.api.meta.RiKind.*;
+import static com.oracle.graal.api.meta.Kind.*;
 
 import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
@@ -55,10 +55,10 @@
         MOV_F2I(Float, Int),
         MOV_D2L(Double, Long);
 
-        public final RiKind from;
-        public final RiKind to;
+        public final Kind from;
+        public final Kind to;
 
-        private Op(RiKind from, RiKind to) {
+        private Op(Kind from, Kind to) {
             this.from = from;
             this.to = to;
         }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "+")
 public final class FloatAddNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatAddNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatAddNode(Kind 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() == RiKind.Float) {
+            if (kind() == Kind.Float) {
                 return ConstantNode.forFloat(x().asConstant().asFloat() + y().asConstant().asFloat(), graph());
             } else {
-                assert kind() == RiKind.Double;
+                assert kind() == Kind.Double;
                 return ConstantNode.forDouble(x().asConstant().asDouble() + y().asConstant().asDouble(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == RiKind.Float) {
+            if (kind() == Kind.Float) {
                 float c = y().asConstant().asFloat();
                 if (c == 0.0f) {
                     return x();
                 }
             } else {
-                assert kind() == RiKind.Double;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatArithmeticNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -27,7 +27,7 @@
 
 public abstract class FloatArithmeticNode extends ArithmeticNode {
 
-    public FloatArithmeticNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatArithmeticNode(Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,19 +30,19 @@
 @NodeInfo(shortName = "/")
 public final class FloatDivNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatDivNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatDivNode(Kind 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() == RiKind.Float) {
+            if (kind() == Kind.Float) {
                 if (y().asConstant().asFloat() != 0) {
                     return ConstantNode.forFloat(x().asConstant().asFloat() / y().asConstant().asFloat(), graph());
                 }
             } else {
-                assert kind() == RiKind.Double;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "*")
 public final class FloatMulNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatMulNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatMulNode(Kind 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() == RiKind.Float) {
+            if (kind() == Kind.Float) {
                 return ConstantNode.forFloat(x().asConstant().asFloat() * y().asConstant().asFloat(), graph());
             } else {
-                assert kind() == RiKind.Double;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,17 +30,17 @@
 @NodeInfo(shortName = "%")
 public final class FloatRemNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatRemNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatRemNode(Kind 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() == RiKind.Float) {
+            if (kind() == Kind.Float) {
                 return ConstantNode.forFloat(x().asConstant().asFloat() % y().asConstant().asFloat(), graph());
             } else {
-                assert kind() == RiKind.Double;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "-")
 public final class FloatSubNode extends FloatArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public FloatSubNode(RiKind kind, ValueNode x, ValueNode y, boolean isStrictFP) {
+    public FloatSubNode(Kind 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() == RiKind.Float) {
+            if (kind() == Kind.Float) {
                 return ConstantNode.forFloat(x().asConstant().asFloat() - y().asConstant().asFloat(), graph());
             } else {
-                assert kind() == RiKind.Double;
+                assert kind() == Kind.Double;
                 return ConstantNode.forDouble(x().asConstant().asDouble() - y().asConstant().asDouble(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == RiKind.Float) {
+            if (kind() == Kind.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() == RiKind.Double;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -31,7 +31,7 @@
 @NodeInfo(shortName = "+")
 public class IntegerAddNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable, TypeFeedbackProvider {
 
-    public IntegerAddNode(RiKind kind, ValueNode x, ValueNode y) {
+    public IntegerAddNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() + y().asConstant().asInt(), graph());
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() + y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 int c = y().asConstant().asInt();
                 if (c == 0) {
                     return x();
                 }
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.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() == RiKind.Int) {
+                    if (kind() == Kind.Int) {
                         sum = ConstantNode.forInt(y().asConstant().asInt() + other.y().asConstant().asInt(), graph());
                     } else {
-                        assert kind() == RiKind.Long;
+                        assert kind() == Kind.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) {
-        RiKind kind = result.kind();
+        Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerArithmeticNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -29,9 +29,9 @@
 
 public abstract class IntegerArithmeticNode extends ArithmeticNode {
 
-    public IntegerArithmeticNode(RiKind kind, ValueNode x, ValueNode y) {
+    public IntegerArithmeticNode(Kind kind, ValueNode x, ValueNode y) {
         super(kind, x, y, false);
-        assert kind == RiKind.Int || kind == RiKind.Long;
+        assert kind == Kind.Int || kind == Kind.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(RiKind.Int, v1, v2));
+                return graph.unique(new IntegerAddNode(Kind.Int, v1, v2));
             case Long:
-                return graph.unique(new IntegerAddNode(RiKind.Long, v1, v2));
+                return graph.unique(new IntegerAddNode(Kind.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(RiKind.Int, v1, v2));
+                return graph.unique(new IntegerMulNode(Kind.Int, v1, v2));
             case Long:
-                return graph.unique(new IntegerMulNode(RiKind.Long, v1, v2));
+                return graph.unique(new IntegerMulNode(Kind.Long, v1, v2));
             default:
                 throw ValueUtil.shouldNotReachHere();
         }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -39,8 +39,8 @@
      */
     public IntegerBelowThanNode(ValueNode x, ValueNode y) {
         super(x, y);
-        assert !x.kind().isFloatOrDouble() && x.kind() != RiKind.Object;
-        assert !y.kind().isFloatOrDouble() && y.kind() != RiKind.Object;
+        assert !x.kind().isFloatOrDouble() && x.kind() != Kind.Object;
+        assert !y.kind().isFloatOrDouble() && y.kind() != Kind.Object;
     }
 
     @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "/")
 public final class IntegerDivNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public IntegerDivNode(RiKind kind, ValueNode x, ValueNode y) {
+    public IntegerDivNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() / (int) yConst, graph());
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -38,8 +38,8 @@
      */
     public IntegerEqualsNode(ValueNode x, ValueNode y) {
         super(x, y);
-        assert !x.kind().isFloatOrDouble() && x.kind() != RiKind.Object;
-        assert !y.kind().isFloatOrDouble() && y.kind() != RiKind.Object;
+        assert !x.kind().isFloatOrDouble() && x.kind() != Kind.Object;
+        assert !y.kind().isFloatOrDouble() && y.kind() != Kind.Object;
     }
 
     @Override
@@ -54,7 +54,7 @@
 
     @Override
     protected ValueNode optimizeNormalizeCmp(Constant constant, NormalizeCompareNode normalizeNode, boolean mirrored) {
-        if (constant.kind == RiKind.Int && constant.asInt() == 0) {
+        if (constant.kind == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -38,8 +38,8 @@
      */
     public IntegerLessThanNode(ValueNode x, ValueNode y) {
         super(x, y);
-        assert !x.kind().isFloatOrDouble() && x.kind() != RiKind.Object;
-        assert !y.kind().isFloatOrDouble() && y.kind() != RiKind.Object;
+        assert !x.kind().isFloatOrDouble() && x.kind() != Kind.Object;
+        assert !y.kind().isFloatOrDouble() && y.kind() != Kind.Object;
     }
 
     @Override
@@ -55,7 +55,7 @@
     @Override
     protected ValueNode optimizeNormalizeCmp(Constant constant, NormalizeCompareNode normalizeNode, boolean mirrored) {
         assert condition() == Condition.LT;
-        if (constant.kind == RiKind.Int && constant.asInt() == 0) {
+        if (constant.kind == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -31,7 +31,7 @@
 @NodeInfo(shortName = "*")
 public final class IntegerMulNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public IntegerMulNode(RiKind kind, ValueNode x, ValueNode y) {
+    public IntegerMulNode(Kind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 
@@ -41,10 +41,10 @@
             return graph().unique(new IntegerMulNode(kind(), y(), x()));
         }
         if (x().isConstant()) {
-            if (kind() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() * y().asConstant().asInt(), graph());
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() * y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
@@ -63,10 +63,10 @@
                 IntegerMulNode other = (IntegerMulNode) x();
                 if (other.y().isConstant()) {
                     ConstantNode sum;
-                    if (kind() == RiKind.Int) {
+                    if (kind() == Kind.Int) {
                         sum = ConstantNode.forInt(y().asConstant().asInt() * other.y().asConstant().asInt(), graph());
                     } else {
-                        assert kind() == RiKind.Long;
+                        assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerRemNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "%")
 public final class IntegerRemNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public IntegerRemNode(RiKind kind, ValueNode x, ValueNode y) {
+    public IntegerRemNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() % (int) yConst, graph());
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "-")
 public final class IntegerSubNode extends IntegerArithmeticNode implements Canonicalizable, LIRLowerable {
 
-    public IntegerSubNode(RiKind kind, ValueNode x, ValueNode y) {
+    public IntegerSubNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() - y().asConstant().asInt(), graph());
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return graph().unique(new IntegerAddNode(kind(), x(), ConstantNode.forInt((int) -c, graph())));
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -45,7 +45,7 @@
      */
     public IsNullNode(ValueNode object) {
         super(StampFactory.condition());
-        assert object.kind() == RiKind.Object : object.kind();
+        assert object.kind() == Kind.Object : object.kind();
         this.object = object;
     }
 
@@ -65,7 +65,7 @@
     public ValueNode canonical(CanonicalizerTool tool) {
         Constant constant = object().asConstant();
         if (constant != null) {
-            assert constant.kind == RiKind.Object;
+            assert constant.kind == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "<<")
 public final class LeftShiftNode extends ShiftNode implements Canonicalizable, LIRLowerable {
 
-    public LeftShiftNode(RiKind kind, ValueNode x, ValueNode y) {
+    public LeftShiftNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 mask = 0x1f;
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.Long;
                 mask = 0x3f;
             }
             amount &= mask;
             if (x().isConstant()) {
-                if (kind() == RiKind.Int) {
+                if (kind() == Kind.Int) {
                     return ConstantNode.forInt(x().asConstant().asInt() << amount, graph());
                 } else {
-                    assert kind() == RiKind.Long;
+                    assert kind() == Kind.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() == RiKind.Long) {
+                        if (kind() == Kind.Long) {
                             return graph().unique(new AndNode(kind(), other.x(), ConstantNode.forLong(-1L << amount, graph())));
                         } else {
-                            assert kind() == RiKind.Int;
+                            assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LogicNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -35,7 +35,7 @@
      * @param x the first input into this node
      * @param y the second input into this node
      */
-    public LogicNode(RiKind kind, ValueNode x, ValueNode y) {
+    public LogicNode(Kind kind, ValueNode x, ValueNode y) {
         super(kind, x, y);
     }
 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java	Fri Jun 08 23:47:42 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(RiKind.Int, x, y);
+        super(Kind.Int, x, y);
         this.isUnorderedLess = isUnorderedLess;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -38,8 +38,8 @@
      */
     public ObjectEqualsNode(ValueNode x, ValueNode y) {
         super(x, y);
-        assert x.kind() == RiKind.Object;
-        assert y.kind() == RiKind.Object;
+        assert x.kind() == Kind.Object;
+        assert y.kind() == Kind.Object;
     }
 
     @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "|")
 public final class OrNode extends LogicNode implements Canonicalizable, LIRLowerable {
 
-    public OrNode(RiKind kind, ValueNode x, ValueNode y) {
+    public OrNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() | y().asConstant().asInt(), graph());
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() | y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 int c = y().asConstant().asInt();
                 if (c == -1) {
                     return ConstantNode.forInt(-1, graph());
@@ -59,7 +59,7 @@
                     return x();
                 }
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = ">>")
 public final class RightShiftNode extends ShiftNode implements Canonicalizable, LIRLowerable {
 
-    public RightShiftNode(RiKind kind, ValueNode x, ValueNode y) {
+    public RightShiftNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 mask = 0x1f;
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.Long;
                 mask = 0x3f;
             }
             amount &= mask;
             if (x().isConstant()) {
-                if (kind() == RiKind.Int) {
+                if (kind() == Kind.Int) {
                     return ConstantNode.forInt(x().asConstant().asInt() >> amount, graph());
                 } else {
-                    assert kind() == RiKind.Long;
+                    assert kind() == Kind.Long;
                     return ConstantNode.forLong(x().asConstant().asLong() >> amount, graph());
                 }
             }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ShiftNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ShiftNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -35,7 +35,7 @@
      * @param x the first input value
      * @param s the second input value
      */
-    public ShiftNode(RiKind kind, ValueNode x, ValueNode s) {
+    public ShiftNode(Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = ">>>")
 public final class UnsignedRightShiftNode extends ShiftNode implements Canonicalizable, LIRLowerable {
 
-    public UnsignedRightShiftNode(RiKind kind, ValueNode x, ValueNode y) {
+    public UnsignedRightShiftNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 mask = 0x1f;
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.Long;
                 mask = 0x3f;
             }
             amount &= mask;
             if (x().isConstant()) {
-                if (kind() == RiKind.Int) {
+                if (kind() == Kind.Int) {
                     return ConstantNode.forInt(x().asConstant().asInt() >>> amount, graph());
                 } else {
-                    assert kind() == RiKind.Long;
+                    assert kind() == Kind.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() == RiKind.Long) {
+                        if (kind() == Kind.Long) {
                             return graph().unique(new AndNode(kind(), other.x(), ConstantNode.forLong(-1L >>> amount, graph())));
                         } else {
-                            assert kind() == RiKind.Int;
+                            assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,7 +30,7 @@
 @NodeInfo(shortName = "^")
 public final class XorNode extends LogicNode implements Canonicalizable, LIRLowerable {
 
-    public XorNode(RiKind kind, ValueNode x, ValueNode y) {
+    public XorNode(Kind 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() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 return ConstantNode.forInt(x().asConstant().asInt() ^ y().asConstant().asInt(), graph());
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.Long;
                 return ConstantNode.forLong(x().asConstant().asLong() ^ y().asConstant().asLong(), graph());
             }
         } else if (y().isConstant()) {
-            if (kind() == RiKind.Int) {
+            if (kind() == Kind.Int) {
                 int c = y().asConstant().asInt();
                 if (c == 0) {
                     return x();
                 }
             } else {
-                assert kind() == RiKind.Long;
+                assert kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -34,14 +34,14 @@
 
     @Input private ValueNode source;
     private int bci;
-    private RiKind sourceKind;
+    private Kind sourceKind;
 
-    public BoxNode(ValueNode value, RiResolvedType type, RiKind sourceKind, int bci) {
+    public BoxNode(ValueNode value, RiResolvedType type, Kind sourceKind, int bci) {
         super(StampFactory.exactNonNull(type));
         this.source = value;
         this.bci = bci;
         this.sourceKind = sourceKind;
-        assert value.kind() != RiKind.Object : "can only box from primitive type";
+        assert value.kind() != Kind.Object : "can only box from primitive type";
     }
 
     public ValueNode source() {
@@ -49,7 +49,7 @@
     }
 
 
-    public RiKind getSourceKind() {
+    public Kind getSourceKind() {
         return sourceKind;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxingMethodPool.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxingMethodPool.java	Fri Jun 08 23:47:42 2012 +0200
@@ -31,9 +31,9 @@
 
     private final Set<RiMethod> specialMethods = new HashSet<>();
     private final RiRuntime runtime;
-    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];
+    private final RiResolvedMethod[] boxingMethods = new RiResolvedMethod[Kind.values().length];
+    private final RiResolvedMethod[] unboxingMethods = new RiResolvedMethod[Kind.values().length];
+    private final RiResolvedField[] boxFields = new RiResolvedField[Kind.values().length];
 
     public BoxingMethodPool(RiRuntime runtime) {
         this.runtime = runtime;
@@ -42,14 +42,14 @@
 
     private void initialize() {
         try {
-            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");
+            initialize(Kind.Boolean, Boolean.class, "booleanValue");
+            initialize(Kind.Byte, Byte.class, "byteValue");
+            initialize(Kind.Char, Character.class, "charValue");
+            initialize(Kind.Short, Short.class, "shortValue");
+            initialize(Kind.Int, Integer.class, "intValue");
+            initialize(Kind.Long, Long.class, "longValue");
+            initialize(Kind.Float, Float.class, "floatValue");
+            initialize(Kind.Double, Double.class, "doubleValue");
         } catch (SecurityException e) {
             throw new RuntimeException(e);
         } catch (NoSuchMethodException e) {
@@ -57,7 +57,7 @@
         }
     }
 
-    private void initialize(RiKind kind, Class<?> type, String unboxMethod) throws SecurityException, NoSuchMethodException {
+    private void initialize(Kind 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() == RiKind.Object;
+        return isSpecialMethod(method) && method.signature().returnKind() == Kind.Object;
     }
 
     public boolean isUnboxingMethod(RiResolvedMethod method) {
-        return isSpecialMethod(method) && method.signature().returnKind() != RiKind.Object;
+        return isSpecialMethod(method) && method.signature().returnKind() != Kind.Object;
     }
 
-    public RiResolvedMethod getBoxingMethod(RiKind kind) {
+    public RiResolvedMethod getBoxingMethod(Kind kind) {
         return boxingMethods[kind.ordinal()];
     }
 
-    public RiResolvedMethod getUnboxingMethod(RiKind kind) {
+    public RiResolvedMethod getUnboxingMethod(Kind kind) {
         return unboxingMethods[kind.ordinal()];
     }
 
-    public RiResolvedField getBoxField(RiKind kind) {
+    public RiResolvedField getBoxField(Kind kind) {
         return boxFields[kind.ordinal()];
     }
 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java	Fri Jun 08 23:47:42 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() == RiKind.Object) {
+        if (runtime != null && object() != null && object().isConstant() && object().kind() == Kind.Object) {
             if (this.location() == LocationNode.FINAL_LOCATION && location().getClass() == LocationNode.class) {
                 Object value = object().asConstant().asObject();
                 long displacement = location().displacement();
-                RiKind kind = location().kind();
+                Kind kind = location().kind();
                 Constant 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -45,7 +45,7 @@
         return index;
     }
 
-    public static Object getArrayLocation(RiKind elementKind) {
+    public static Object getArrayLocation(Kind elementKind) {
         return elementKind;
     }
 
@@ -56,11 +56,11 @@
         return indexScalingEnabled;
     }
 
-    public static IndexedLocationNode create(Object identity, RiKind kind, int displacement, ValueNode index, Graph graph, boolean indexScalingEnabled) {
+    public static IndexedLocationNode create(Object identity, Kind kind, int displacement, ValueNode index, Graph graph, boolean indexScalingEnabled) {
         return graph.unique(new IndexedLocationNode(identity, kind, index, displacement, indexScalingEnabled));
     }
 
-    private IndexedLocationNode(Object identity, RiKind kind, ValueNode index, int displacement, boolean indexScalingEnabled) {
+    private IndexedLocationNode(Object identity, Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LocationNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -36,7 +36,7 @@
 public class LocationNode extends FloatingNode implements LIRLowerable, ValueNumberable {
 
     private int displacement;
-    private RiKind valueKind;
+    private Kind valueKind;
     private Object locationIdentity;
 
     public static final Object ANY_LOCATION = new Object() {
@@ -52,7 +52,7 @@
         }
     };
 
-    public static Object getArrayLocation(RiKind elementKind) {
+    public static Object getArrayLocation(Kind elementKind) {
         return elementKind;
     }
 
@@ -60,19 +60,19 @@
         return displacement;
     }
 
-    public static LocationNode create(Object identity, RiKind kind, int displacement, Graph graph) {
+    public static LocationNode create(Object identity, Kind kind, int displacement, Graph graph) {
         return graph.unique(new LocationNode(identity, kind, displacement));
     }
 
-    protected LocationNode(Object identity, RiKind kind, int displacement) {
+    protected LocationNode(Object identity, Kind kind, int displacement) {
         super(StampFactory.extension());
-        assert kind != RiKind.Illegal && kind != RiKind.Void;
+        assert kind != Kind.Illegal && kind != Kind.Void;
         this.displacement = displacement;
         this.valueKind = kind;
         this.locationIdentity = identity;
     }
 
-    public RiKind getValueKind() {
+    public Kind getValueKind() {
         return valueKind;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java	Fri Jun 08 23:47:42 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() == RiKind.Object) {
+        if (runtime != null && object() != null && object().isConstant() && object().kind() == Kind.Object) {
             if (location() == LocationNode.FINAL_LOCATION && location().getClass() == LocationNode.class) {
                 Object value = object().asConstant().asObject();
                 long displacement = location().displacement();
-                RiKind kind = location().kind();
+                Kind kind = location().kind();
                 Constant 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -33,21 +33,21 @@
 public final class UnboxNode extends FixedWithNextNode implements Node.IterableNodeType, Canonicalizable {
 
     @Input private ValueNode source;
-    private RiKind destinationKind;
+    private Kind destinationKind;
 
-    public UnboxNode(RiKind kind, ValueNode source) {
+    public UnboxNode(Kind kind, ValueNode source) {
         super(StampFactory.forKind(kind));
         this.source = source;
         this.destinationKind = kind;
-        assert kind != RiKind.Object : "can only unbox to primitive";
-        assert source.kind() == RiKind.Object : "can only unbox objects";
+        assert kind != Kind.Object : "can only unbox to primitive";
+        assert source.kind() == Kind.Object : "can only unbox objects";
     }
 
     public ValueNode source() {
         return source;
     }
 
-    public RiKind destinationKind() {
+    public Kind destinationKind() {
         return destinationKind;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -36,7 +36,7 @@
     @Input private ValueNode object;
     @Input private ValueNode offset;
     private final int displacement;
-    private final RiKind loadKind;
+    private final Kind loadKind;
 
     public ValueNode object() {
         return object;
@@ -55,10 +55,10 @@
         this.object = object;
         this.displacement = displacement;
         this.offset = offset;
-        this.loadKind = RiKind.Object;
+        this.loadKind = Kind.Object;
     }
 
-    public UnsafeLoadNode(ValueNode object, int displacement, ValueNode offset, RiKind kind) {
+    public UnsafeLoadNode(ValueNode object, int displacement, ValueNode offset, Kind kind) {
         super(StampFactory.forKind(kind.stackKind()));
         this.object = object;
         this.displacement = displacement;
@@ -66,7 +66,7 @@
         this.loadKind = kind;
     }
 
-    public RiKind loadKind() {
+    public Kind loadKind() {
         return loadKind;
     }
 
@@ -77,7 +77,7 @@
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static <T> T load(Object object, @ConstantNodeParameter int displacement, long offset, @ConstantNodeParameter RiKind kind) {
+    public static <T> T load(Object object, @ConstantNodeParameter int displacement, long offset, @ConstantNodeParameter Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -37,7 +37,7 @@
     @Input private ValueNode offset;
     @Input private ValueNode value;
     private final int displacement;
-    private final RiKind storeKind;
+    private final Kind 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, RiKind kind) {
+    public UnsafeStoreNode(ValueNode object, int displacement, ValueNode offset, ValueNode value, Kind kind) {
         super(StampFactory.forVoid());
-        assert kind != RiKind.Void && kind != RiKind.Illegal;
+        assert kind != Kind.Void && kind != Kind.Illegal;
         this.object = object;
         this.displacement = displacement;
         this.offset = offset;
@@ -80,7 +80,7 @@
         return value;
     }
 
-    public RiKind storeKind() {
+    public Kind 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 RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, Object value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, boolean value, @ConstantNodeParameter RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, boolean value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, byte value, @ConstantNodeParameter RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, byte value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, char value, @ConstantNodeParameter RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, char value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, double value, @ConstantNodeParameter RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, double value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, float value, @ConstantNodeParameter RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, float value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, int value, @ConstantNodeParameter RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, int value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, long value, @ConstantNodeParameter RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, long value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, short value, @ConstantNodeParameter RiKind kind) {
+    public static void store(Object object, @ConstantNodeParameter int displacement, long offset, short value, @ConstantNodeParameter Kind kind) {
         throw new UnsupportedOperationException();
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessIndexedNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessIndexedNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -35,7 +35,7 @@
 public abstract class AccessIndexedNode extends AccessArrayNode implements TypeFeedbackProvider {
 
     @Input private ValueNode index;
-    private final RiKind elementType;
+    private final Kind elementType;
     private final long leafGraphId;
 
     public ValueNode index() {
@@ -49,7 +49,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, RiKind elementKind, long leafGraphId) {
+    protected AccessIndexedNode(Stamp stamp, ValueNode array, ValueNode index, Kind elementKind, long leafGraphId) {
         super(stamp, array);
         this.index = index;
         this.elementType = elementKind;
@@ -60,7 +60,7 @@
      * Gets the element type of the array.
      * @return the element type
      */
-    public RiKind elementKind() {
+    public Kind elementKind() {
         return elementType;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -52,7 +52,7 @@
     }
 
     public CheckCastNode(ValueNode targetClassInstruction, RiResolvedType targetClass, ValueNode object, RiTypeProfile profile) {
-        super(targetClass == null ? StampFactory.forKind(RiKind.Object) : StampFactory.declared(targetClass));
+        super(targetClass == null ? StampFactory.forKind(Kind.Object) : StampFactory.declared(targetClass));
         this.targetClassInstruction = targetClassInstruction;
         this.targetClass = targetClass;
         this.object = object;
@@ -83,7 +83,7 @@
 
         Constant constant = object().asConstant();
         if (constant != null) {
-            assert constant.kind == RiKind.Object;
+            assert constant.kind == Kind.Object;
             if (constant.isNull()) {
                 return object();
             }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -62,7 +62,7 @@
     }
 
     public CompareAndSwapNode(ValueNode object, int displacement, ValueNode offset, ValueNode expected, ValueNode newValue) {
-        super(StampFactory.forKind(RiKind.Boolean.stackKind()));
+        super(StampFactory.forKind(Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -106,7 +106,7 @@
 
         Constant constant = object().asConstant();
         if (constant != null) {
-            assert constant.kind == RiKind.Object;
+            assert constant.kind == Kind.Object;
             if (constant.isNull()) {
                 return ConstantNode.forBoolean(false, graph());
             } else {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/IsTypeNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/IsTypeNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -46,7 +46,7 @@
      */
     public IsTypeNode(ValueNode objectClass, RiResolvedType type) {
         super(StampFactory.condition());
-        assert objectClass == null || objectClass.kind() == RiKind.Object;
+        assert objectClass == null || objectClass.kind() == Kind.Object;
         this.type = type;
         this.objectClass = objectClass;
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -45,8 +45,8 @@
     }
 
     private static Stamp createStamp(RiResolvedField field) {
-        RiKind kind = field.kind();
-        if (kind == RiKind.Object && field.type() instanceof RiResolvedType) {
+        Kind kind = field.kind();
+        if (kind == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -43,12 +43,12 @@
      * @param index the instruction producing the index
      * @param elementKind the element type
      */
-    public LoadIndexedNode(ValueNode array, ValueNode index, RiKind elementKind, long leafGraphId) {
+    public LoadIndexedNode(ValueNode array, ValueNode index, Kind elementKind, long leafGraphId) {
         super(createStamp(array, elementKind), array, index, elementKind, leafGraphId);
     }
 
-    private static Stamp createStamp(ValueNode array, RiKind kind) {
-        if (kind == RiKind.Object && array.objectStamp().type() != null) {
+    private static Stamp createStamp(ValueNode array, Kind kind) {
+        if (kind == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -93,7 +93,7 @@
     }
 
     @Override
-    public RiKind returnKind() {
+    public Kind returnKind() {
         return targetMethod().signature().returnKind();
     }
 
@@ -138,8 +138,8 @@
     }
 
     public Stamp returnStamp() {
-        RiKind returnKind = targetMethod.signature().returnKind();
-        if (returnKind == RiKind.Object && returnType instanceof RiResolvedType) {
+        Kind returnKind = targetMethod.signature().returnKind();
+        if (returnKind == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -78,7 +78,7 @@
 
     @Override
     public void typeFeedback(TypeFeedbackTool tool) {
-        assert length.kind() == RiKind.Int;
+        assert length.kind() == Kind.Int;
         tool.addScalar(length).constantBound(Condition.GE, Constant.INT_0);
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewMultiArrayNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewMultiArrayNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -73,7 +73,7 @@
     @Override
     public void typeFeedback(TypeFeedbackTool tool) {
         for (ValueNode length : dimensions) {
-            assert length.kind() == RiKind.Int;
+            assert length.kind() == Kind.Int;
             tool.addScalar(length).constantBound(Condition.GE, Constant.INT_0);
         }
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java	Fri Jun 08 23:47:42 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, RiKind elementKind, ValueNode value, long leafGraphId) {
+    public StoreIndexedNode(ValueNode array, ValueNode index, Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java	Fri Jun 08 23:47:42 2012 +0200
@@ -49,7 +49,7 @@
     public abstract boolean canStoreConstant(Constant c);
 
     public abstract Value operand(ValueNode object);
-    public abstract Value newVariable(RiKind kind);
+    public abstract Value newVariable(Kind kind);
     public abstract Value setResult(ValueNode x, Value operand);
 
     public abstract CiAddress makeAddress(LocationNode location, ValueNode object);
@@ -81,7 +81,7 @@
     public abstract void emitMembar(int barriers);
     public abstract void emitDeoptimizeOnOverflow(CiDeoptAction action, RiDeoptReason reason, Object deoptInfo);
     public abstract void emitDeoptimize(CiDeoptAction action, RiDeoptReason reason, Object deoptInfo, long leafGraphId);
-    public abstract Value emitCall(Object target, RiKind result, RiKind[] arguments, boolean canTrap, Value... args);
+    public abstract Value emitCall(Object target, Kind result, Kind[] arguments, boolean canTrap, Value... args);
     public final Value emitCall(CiRuntimeCall runtimeCall, boolean canTrap, Value... 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeFeedbackStore.java	Fri Jun 08 23:47:42 2012 +0200
@@ -40,7 +40,7 @@
 
         @Override
         public boolean constantBound(Condition condition, Constant constant) {
-            if (constant.kind == RiKind.Int || constant.kind == RiKind.Long) {
+            if (constant.kind == Kind.Int || constant.kind == Kind.Long) {
                 switch (condition) {
                     case EQ:
                         return store.constantBounds.lowerBound == constant.asLong() && store.constantBounds.upperBound == constant.asLong();
@@ -117,7 +117,7 @@
         }
     }
 
-    private final RiKind kind;
+    private final Kind kind;
     private final ConstantBound constantBounds;
     private final TypeFeedbackChanged changed;
     private ValueNode dependency;
@@ -127,11 +127,11 @@
         dependency = changed.node;
     }
 
-    public ScalarTypeFeedbackStore(RiKind kind, TypeFeedbackChanged changed) {
+    public ScalarTypeFeedbackStore(Kind kind, TypeFeedbackChanged changed) {
         this.kind = kind;
-        if (kind == RiKind.Int) {
+        if (kind == Kind.Int) {
             constantBounds = new ConstantBound(Integer.MIN_VALUE, Integer.MAX_VALUE);
-        } else if (kind == RiKind.Long) {
+        } else if (kind == Kind.Long) {
             constantBounds = new ConstantBound(Long.MIN_VALUE, Long.MAX_VALUE);
         } else {
             constantBounds = null;
@@ -167,7 +167,7 @@
 
     private static ConstantBound createBounds(Condition condition, Constant constant) {
         ConstantBound newBound;
-        if (constant.kind == RiKind.Int || constant.kind == RiKind.Long) {
+        if (constant.kind == Kind.Int || constant.kind == Kind.Long) {
             switch (condition) {
                 case EQ:
                     newBound = new ConstantBound(constant.asLong(), constant.asLong());
@@ -363,14 +363,14 @@
         assert other.kind == kind;
         long lower = other.constantBounds.lowerBound;
         long upper = other.constantBounds.upperBound;
-        if (kind == RiKind.Int) {
+        if (kind == Kind.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 == RiKind.Long) {
+        } else if (kind == Kind.Long) {
             long delta = deltaConstant.asLong();
             long newLower = lower + delta;
             long newUpper = upper + delta;
@@ -386,20 +386,20 @@
         return constantBounds.lowerBound == minValue(kind) && constantBounds.upperBound == maxValue(kind) && (valueBounds == null || valueBounds.isEmpty());
     }
 
-    private static long minValue(RiKind kind) {
-        if (kind == RiKind.Int) {
+    private static long minValue(Kind kind) {
+        if (kind == Kind.Int) {
             return Integer.MIN_VALUE;
-        } else if (kind == RiKind.Long) {
+        } else if (kind == Kind.Long) {
             return Long.MIN_VALUE;
         } else {
             throw new UnsupportedOperationException();
         }
     }
 
-    private static long maxValue(RiKind kind) {
-        if (kind == RiKind.Int) {
+    private static long maxValue(Kind kind) {
+        if (kind == Kind.Int) {
             return Integer.MAX_VALUE;
-        } else if (kind == RiKind.Long) {
+        } else if (kind == Kind.Long) {
             return Long.MAX_VALUE;
         } else {
             throw new UnsupportedOperationException();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java	Fri Jun 08 23:47:42 2012 +0200
@@ -27,9 +27,9 @@
 
 public class FloatStamp extends Stamp {
 
-    protected FloatStamp(RiKind kind) {
+    protected FloatStamp(Kind kind) {
         super(kind);
-        assert kind == RiKind.Float || kind == RiKind.Double;
+        assert kind == Kind.Float || kind == Kind.Double;
     }
 
     @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/GenericStamp.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/GenericStamp.java	Fri Jun 08 23:47:42 2012 +0200
@@ -33,7 +33,7 @@
     private final GenericStampType type;
 
     protected GenericStamp(GenericStampType type) {
-        super(RiKind.Void);
+        super(Kind.Void);
         this.type = type;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Fri Jun 08 23:47:42 2012 +0200
@@ -30,11 +30,11 @@
     private final long lowerBound;
     private final long upperBound;
 
-    public IntegerStamp(RiKind kind) {
+    public IntegerStamp(Kind kind) {
         this(kind, kind.minValue(), kind.maxValue());
     }
 
-    public IntegerStamp(RiKind kind, long lowerBound, long upperBound) {
+    public IntegerStamp(Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/ObjectStamp.java	Fri Jun 08 23:47:42 2012 +0200
@@ -32,7 +32,7 @@
     private final boolean nonNull;
 
     public ObjectStamp(RiResolvedType type, boolean exactType, boolean nonNull) {
-        super(RiKind.Object);
+        super(Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/Stamp.java	Fri Jun 08 23:47:42 2012 +0200
@@ -28,13 +28,13 @@
 
 public abstract class Stamp {
 
-    private final RiKind kind;
+    private final Kind kind;
 
-    protected Stamp(RiKind kind) {
+    protected Stamp(Kind kind) {
         this.kind = kind;
     }
 
-    public RiKind kind() {
+    public Kind kind() {
         return kind;
     }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampFactory.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampFactory.java	Fri Jun 08 23:47:42 2012 +0200
@@ -32,7 +32,7 @@
 
 public class StampFactory {
 
-    private static final Stamp[] stampCache = new Stamp[RiKind.values().length];
+    private static final Stamp[] stampCache = new Stamp[Kind.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(RiKind kind, Stamp stamp) {
+    private static void setCache(Kind kind, Stamp stamp) {
         stampCache[kind.ordinal()] = stamp;
     }
 
     static {
-        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(Kind.Boolean, new IntegerStamp(Kind.Boolean));
+        setCache(Kind.Byte, new IntegerStamp(Kind.Byte));
+        setCache(Kind.Short, new IntegerStamp(Kind.Short));
+        setCache(Kind.Char, new IntegerStamp(Kind.Char));
+        setCache(Kind.Int, new IntegerStamp(Kind.Int));
+        setCache(Kind.Long, new IntegerStamp(Kind.Long));
 
-        setCache(RiKind.Float, new FloatStamp(RiKind.Float));
-        setCache(RiKind.Double, new FloatStamp(RiKind.Double));
+        setCache(Kind.Float, new FloatStamp(Kind.Float));
+        setCache(Kind.Double, new FloatStamp(Kind.Double));
 
-        setCache(RiKind.Jsr, new IntegerStamp(RiKind.Jsr));
+        setCache(Kind.Jsr, new IntegerStamp(Kind.Jsr));
 
-        setCache(RiKind.Object, objectStamp);
-        setCache(RiKind.Void, voidStamp);
+        setCache(Kind.Object, objectStamp);
+        setCache(Kind.Void, voidStamp);
     }
 
-    public static Stamp forKind(RiKind kind) {
+    public static Stamp forKind(Kind 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(RiKind.Int);
+        return forKind(Kind.Int);
     }
 
     public static Stamp dependency() {
@@ -98,21 +98,21 @@
     }
 
     public static Stamp forInt(int lowerBound, int upperBound) {
-        return new IntegerStamp(RiKind.Int, lowerBound, upperBound);
+        return new IntegerStamp(Kind.Int, lowerBound, upperBound);
     }
 
     public static Stamp forLong(long lowerBound, long upperBound) {
-        return new IntegerStamp(RiKind.Long, lowerBound, upperBound);
+        return new IntegerStamp(Kind.Long, lowerBound, upperBound);
     }
 
     public static Stamp forConstant(Constant value) {
-        assert value.kind != RiKind.Object;
-        if (value.kind == RiKind.Object) {
+        assert value.kind != Kind.Object;
+        if (value.kind == Kind.Object) {
             throw new GraalInternalError("unexpected kind: %s", value.kind);
         } else {
-            if (value.kind == RiKind.Int) {
+            if (value.kind == Kind.Int) {
                 return forInt(value.asInt(), value.asInt());
-            } else if (value.kind == RiKind.Long) {
+            } else if (value.kind == Kind.Long) {
                 return forLong(value.asLong(), value.asLong());
             }
             return forKind(value.kind.stackKind());
@@ -120,8 +120,8 @@
     }
 
     public static Stamp forConstant(Constant value, RiRuntime runtime) {
-        assert value.kind == RiKind.Object;
-        if (value.kind == RiKind.Object) {
+        assert value.kind == Kind.Object;
+        if (value.kind == Kind.Object) {
             RiResolvedType type = value.isNull() ? null : runtime.getTypeOf(value);
             return new ObjectStamp(type, value.isNonNull(), value.isNonNull());
         } else {
@@ -147,7 +147,7 @@
 
     public static Stamp declared(RiResolvedType type, boolean nonNull) {
         assert type != null;
-        assert type.kind() == RiKind.Object;
+        assert type.kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Fri Jun 08 23:47:42 2012 +0200
@@ -463,7 +463,7 @@
             prefix = "B";
         } else if (node instanceof ValueNode) {
             ValueNode value = (ValueNode) node;
-            if (value.kind() == RiKind.Illegal) {
+            if (value.kind() == Kind.Illegal) {
                 prefix = "v";
             } else {
                 prefix = String.valueOf(value.kind().typeChar);
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java	Fri Jun 08 23:47:42 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, RiKind.Object), Node.class);
+        return UnsafeCastNode.cast(UnsafeLoadNode.load(node, 0, offset, Kind.Object), Node.class);
     }
 
     private static NodeList<Node> getNodeList(Node node, long offset) {
-        return UnsafeCastNode.cast(UnsafeLoadNode.load(node, 0, offset, RiKind.Object), NodeList.class);
+        return UnsafeCastNode.cast(UnsafeLoadNode.load(node, 0, offset, Kind.Object), NodeList.class);
     }
 
     private static void putNode(Node node, long offset, Node value) {
-        UnsafeStoreNode.store(node, 0, offset, value, RiKind.Object);
+        UnsafeStoreNode.store(node, 0, offset, value, Kind.Object);
     }
 
     private static void putNodeList(Node node, long offset, NodeList value) {
-        UnsafeStoreNode.store(node, 0, offset, value, RiKind.Object);
+        UnsafeStoreNode.store(node, 0, offset, value, Kind.Object);
     }
 
 }
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java	Fri Jun 08 23:47:42 2012 +0200
@@ -195,7 +195,7 @@
                 String name = c.value();
                 Object arg = key.get(name);
                 assert arg != null : method + ": requires a constant named " + name;
-                RiKind kind = signature.argumentKindAt(i);
+                Kind kind = signature.argumentKindAt(i);
                 assert checkConstantArgument(method, signature, i, name, arg, kind);
                 replacements.put(snippetGraph.getLocal(i), ConstantNode.forCiConstant(Constant.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, RiKind kind) {
+    private static boolean checkConstantArgument(final RiResolvedMethod method, RiSignature signature, int i, String name, Object arg, Kind 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 {
-                    RiKind kind = ((LocalNode) parameter).kind();
+                    Kind kind = ((LocalNode) parameter).kind();
                     Constant constant = Constant.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/nodes/MathIntrinsicNode.java	Fri Jun 08 23:47:42 2012 +0200
@@ -55,7 +55,7 @@
 
     public MathIntrinsicNode(ValueNode x, Operation op) {
         super(StampFactory.forKind(x.kind()));
-        assert x.kind() == RiKind.Double;
+        assert x.kind() == Kind.Double;
         this.x = x;
         this.operation = op;
     }
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java	Fri Jun 08 23:47:42 2012 +0200
@@ -60,7 +60,7 @@
         for (Node node : graph.getNodes()) {
             if (node instanceof ConstantNode) {
                 ConstantNode constant = (ConstantNode) node;
-                if (constant.kind() == RiKind.Object && " ".equals(constant.value.asObject())) {
+                if (constant.kind() == Kind.Object && " ".equals(constant.value.asObject())) {
                     graph.replaceFloating(constant, ConstantNode.forObject("-", runtime, graph));
                 }
             }
@@ -117,7 +117,7 @@
         for (Node node : graph.getNodes()) {
             if (node instanceof ConstantNode) {
                 ConstantNode constant = (ConstantNode) node;
-                if (constant.kind() == RiKind.Object && "1 ".equals(constant.value.asObject())) {
+                if (constant.kind() == Kind.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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64.java	Fri Jun 08 23:47:42 2012 +0200
@@ -23,7 +23,7 @@
 package com.oracle.max.asm.target.amd64;
 
 import static com.oracle.graal.api.code.CiRegister.RegisterFlag.*;
-import static com.oracle.graal.api.meta.RiKind.*;
+import static com.oracle.graal.api.meta.Kind.*;
 import static com.oracle.max.cri.util.MemoryBarriers.*;
 
 import com.oracle.graal.api.code.*;
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java	Fri Jun 08 23:47:42 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 RiKind Word = RiKind.Long;
+    private static final Kind Word = Kind.Long;
 
     private static final int MinEncodingNeedsRex = 8;
 
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64MacroAssembler.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64MacroAssembler.java	Fri Jun 08 23:47:42 2012 +0200
@@ -317,7 +317,7 @@
     public void flog(CiRegister dest, CiRegister value, boolean base10) {
         assert value.spillSlotSize == dest.spillSlotSize;
 
-        CiAddress tmp = new CiAddress(RiKind.Double, AMD64.RSP);
+        CiAddress tmp = new CiAddress(Kind.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(RiKind.Double, AMD64.RSP);
+        CiAddress tmp = new CiAddress(Kind.Double, AMD64.RSP);
         subq(AMD64.rsp, value.spillSlotSize);
         movsd(tmp, value);
         fld(tmp);
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java	Fri Jun 08 23:47:42 2012 +0200
@@ -153,7 +153,7 @@
      */
     public abstract static class XirOperand {
 
-        public final RiKind kind;
+        public final Kind 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, RiKind kind) {
+        public XirOperand(CiXirAssembler asm, Object name, Kind kind) {
             this.kind = kind;
             this.name = name;
             this.index = asm.variableCount++;
@@ -198,7 +198,7 @@
 
         public final boolean canBeConstant;
 
-        XirParameter(CiXirAssembler asm, String name, RiKind kind, boolean canBeConstant) {
+        XirParameter(CiXirAssembler asm, String name, Kind 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, RiKind kind) {
+        XirConstantParameter(CiXirAssembler asm, String name, Kind kind) {
             super(asm, name, kind, true);
         }
 
@@ -218,7 +218,7 @@
     }
 
     public static class XirVariableParameter extends XirParameter {
-        XirVariableParameter(CiXirAssembler asm, String name, RiKind kind, boolean canBeConstant) {
+        XirVariableParameter(CiXirAssembler asm, String name, Kind 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, RiKind kind, boolean reserve) {
+        XirTemp(CiXirAssembler asm, String name, Kind 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(RiKind kind) {
+    public XirOperand restart(Kind 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 RiKind 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 Kind 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 RiKind kind} of values the instruction operates on.
+         * The {@link Kind kind} of values the instruction operates on.
          */
-        public final RiKind kind;
+        public final Kind kind;
         /**
          * The {@link XirOp operation}.
          */
@@ -319,11 +319,11 @@
          */
         public final Object extra;
 
-        public XirInstruction(RiKind kind, XirOp op, XirOperand result, XirOperand... arguments) {
+        public XirInstruction(Kind kind, XirOp op, XirOperand result, XirOperand... arguments) {
             this(kind, null, op, result, arguments);
         }
 
-        public XirInstruction(RiKind kind, Object extra, XirOp op, XirOperand result, XirOperand... arguments) {
+        public XirInstruction(Kind 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 != RiKind.Void) {
+            if (kind != Kind.Void) {
                 sb.append('$');
                 sb.append(kind.typeChar);
             }
@@ -640,26 +640,26 @@
     }
 
     public void nullCheck(XirOperand pointer) {
-        append(new XirInstruction(RiKind.Object, NullCheck, VOID, pointer));
+        append(new XirInstruction(Kind.Object, NullCheck, VOID, pointer));
     }
 
-    public void pload(RiKind kind, XirOperand result, XirOperand pointer, boolean canTrap) {
+    public void pload(Kind kind, XirOperand result, XirOperand pointer, boolean canTrap) {
         append(new XirInstruction(kind, canTrap, PointerLoad, result, pointer));
     }
 
-    public void pstore(RiKind kind, XirOperand pointer, XirOperand value, boolean canTrap) {
+    public void pstore(Kind kind, XirOperand pointer, XirOperand value, boolean canTrap) {
         append(new XirInstruction(kind, canTrap, PointerStore, null, pointer, value));
     }
 
-    public void pload(RiKind kind, XirOperand result, XirOperand pointer, XirOperand offset, boolean canTrap) {
+    public void pload(Kind kind, XirOperand result, XirOperand pointer, XirOperand offset, boolean canTrap) {
         append(new XirInstruction(kind, new AddressAccessInformation(canTrap), PointerLoadDisp, result, pointer, offset));
     }
 
-    public void pstore(RiKind kind, XirOperand pointer, XirOperand offset, XirOperand value, boolean canTrap) {
+    public void pstore(Kind kind, XirOperand pointer, XirOperand offset, XirOperand value, boolean canTrap) {
         append(new XirInstruction(kind, new AddressAccessInformation(canTrap), PointerStoreDisp, VOID, pointer, offset, value));
     }
 
-    public void pload(RiKind kind, XirOperand result, XirOperand pointer, XirOperand index, int disp, Scale scale,  boolean canTrap) {
+    public void pload(Kind 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(RiKind kind, XirOperand pointer, XirOperand index, XirOperand value, int disp, Scale scale, boolean canTrap) {
+    public void pstore(Kind 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(RiKind kind, XirOperand result, XirOperand pointer, XirOperand newValue, XirOperand oldValue) {
+    public void pcas(Kind 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(RiKind.Void, l, Jmp, null));
+        append(new XirInstruction(Kind.Void, l, Jmp, null));
     }
 
     public void decAndJumpNotZero(XirLabel l, XirOperand val) {
-        append(new XirInstruction(RiKind.Void, l, DecAndJumpNotZero, null, val));
+        append(new XirInstruction(Kind.Void, l, DecAndJumpNotZero, null, val));
     }
 
     public void jmpRuntime(Object rt) {
-        append(new XirInstruction(RiKind.Void, rt, Jmp, null));
+        append(new XirInstruction(Kind.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(RiKind.Void, l, op, null, a, b));
+        append(new XirInstruction(Kind.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(RiKind.Void, l, Jbset, null, a, b, c));
+        append(new XirInstruction(Kind.Void, l, Jbset, null, a, b, c));
     }
 
     public void bindInline(XirLabel l) {
         assert l.inline;
-        append(new XirInstruction(RiKind.Void, l, Bind, null));
+        append(new XirInstruction(Kind.Void, l, Bind, null));
     }
 
     public void bindOutOfLine(XirLabel l) {
         assert !l.inline;
-        append(new XirInstruction(RiKind.Void, l, Bind, null));
+        append(new XirInstruction(Kind.Void, l, Bind, null));
     }
 
     public void safepoint() {
-        append(new XirInstruction(RiKind.Void, null, Safepoint, null));
+        append(new XirInstruction(Kind.Void, null, Safepoint, null));
     }
 
     public void push(XirOperand value) {
-        append(new XirInstruction(RiKind.Void, Push, VOID, value));
+        append(new XirInstruction(Kind.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(RiKind.Void, mark, Mark, null));
+        append(new XirInstruction(Kind.Void, mark, Mark, null));
         return mark;
     }
 
     public void nop(int size) {
-        append(new XirInstruction(RiKind.Void, size, Nop, null));
+        append(new XirInstruction(Kind.Void, size, Nop, null));
     }
 
     public void shouldNotReachHere() {
-        append(new XirInstruction(RiKind.Void, null, ShouldNotReachHere, null));
+        append(new XirInstruction(Kind.Void, null, ShouldNotReachHere, null));
     }
 
     public void shouldNotReachHere(String message) {
-        append(new XirInstruction(RiKind.Void, message, ShouldNotReachHere, null));
+        append(new XirInstruction(Kind.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) {
-        RiKind resultKind = result == null ? RiKind.Void : result.kind;
+        Kind resultKind = result == null ? Kind.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 RiKind kind}.
+     * Creates an {@link XirVariableParameter variable input parameter}  of given name and {@link Kind kind}.
      * @param name a name for the parameter
      * @param kind the parameter kind
      * @return the  {@link XirVariableParameter}
      */
-    public XirVariableParameter createInputParameter(String name, RiKind kind, boolean canBeConstant) {
+    public XirVariableParameter createInputParameter(String name, Kind kind, boolean canBeConstant) {
         assert !finished;
         return new XirVariableParameter(this, name, kind, canBeConstant);
     }
 
-    public XirVariableParameter createInputParameter(String name, RiKind kind) {
+    public XirVariableParameter createInputParameter(String name, Kind kind) {
         return createInputParameter(name, kind, false);
     }
 
     /**
-     * Creates an {@link XirConstantParameter constant input parameter}  of given name and {@link RiKind kind}.
+     * Creates an {@link XirConstantParameter constant input parameter}  of given name and {@link Kind kind}.
      * @param name a name for the parameter
      * @param kind the parameter kind
      * @return the  {@link XirConstantParameter}
      */
-    public XirConstantParameter createConstantInputParameter(String name, RiKind kind) {
+    public XirConstantParameter createConstantInputParameter(String name, Kind kind) {
         assert !finished;
         return new XirConstantParameter(this, name, kind);
     }
@@ -827,22 +827,22 @@
         return temp;
     }
 
-    public XirOperand createTemp(String name, RiKind kind) {
+    public XirOperand createTemp(String name, Kind kind) {
         assert !finished;
         XirTemp temp = new XirTemp(this, name, kind, true);
         temps.add(temp);
         return temp;
     }
 
-    public XirOperand createRegister(String name, RiKind kind, CiRegister register) {
+    public XirOperand createRegister(String name, Kind kind, CiRegister register) {
         return createRegister(name, kind, register, false);
     }
 
-    public XirOperand createRegisterTemp(String name, RiKind kind, CiRegister register) {
+    public XirOperand createRegisterTemp(String name, Kind kind, CiRegister register) {
         return createRegister(name, kind, register, true);
     }
 
-    private XirOperand createRegister(String name, RiKind kind, CiRegister register, boolean reserve) {
+    private XirOperand createRegister(String name, Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/RiXirGenerator.java	Fri Jun 08 23:47:42 2012 +0200
@@ -44,7 +44,7 @@
 
     XirSnippet genNewInstance(XirSite site, RiType type);
 
-    XirSnippet genNewArray(XirSite site, XirArgument length, RiKind elementKind, RiType componentType, RiType arrayType);
+    XirSnippet genNewArray(XirSite site, XirArgument length, Kind 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	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirSnippet.java	Fri Jun 08 23:47:42 2012 +0200
@@ -58,7 +58,7 @@
     }
 
     private static boolean assertArgumentCorrect(XirParameter param, XirArgument arg) {
-        if (param.kind == RiKind.Illegal || param.kind == RiKind.Void) {
+        if (param.kind == Kind.Illegal || param.kind == Kind.Void) {
             if (arg != null) {
                 return false;
             }
--- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedField.java	Fri Jun 08 23:44:20 2012 +0200
+++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedField.java	Fri Jun 08 23:47:42 2012 +0200
@@ -48,7 +48,7 @@
         return type;
     }
 
-    public RiKind kind() {
+    public Kind kind() {
         return type.kind();
     }
 
--- a/src/share/vm/classfile/vmSymbols.hpp	Fri Jun 08 23:44:20 2012 +0200
+++ b/src/share/vm/classfile/vmSymbols.hpp	Fri Jun 08 23:47:42 2012 +0200
@@ -312,7 +312,7 @@
   template(com_oracle_max_cri_ci_CiConstant,                          "com/oracle/graal/api/meta/Constant")                                 \
   template(com_oracle_max_cri_ci_CiVirtualObject,                     "com/oracle/graal/api/code/CiVirtualObject")                            \
   template(com_oracle_max_cri_ci_CiMonitorValue,                      "com/oracle/graal/api/code/CiMonitorValue")                             \
-  template(com_oracle_max_cri_ci_CiKind,                              "com/oracle/graal/api/meta/RiKind")                                     \
+  template(com_oracle_max_cri_ci_CiKind,                              "com/oracle/graal/api/meta/Kind")                                     \
   template(com_oracle_max_cri_ci_CiRuntimeCall,                       "com/oracle/graal/api/code/CiRuntimeCall")                              \
   template(startCompiler_name,                        "startCompiler")                                                  \
   template(bootstrap_name,                            "bootstrap")                                                      \
@@ -337,7 +337,7 @@
   template(createRiTypeUnresolved_name,               "createRiTypeUnresolved")                                         \
   template(createRiTypeUnresolved_signature,          "(Ljava/lang/String;)Lcom/oracle/graal/api/meta/RiType;")             \
   template(createCiConstant_name,                     "createCiConstant")                                               \
-  template(createCiConstant_signature,                "(Lcom/oracle/graal/api/meta/RiKind;J)Lcom/oracle/graal/api/meta/Constant;") \
+  template(createCiConstant_signature,                "(Lcom/oracle/graal/api/meta/Kind;J)Lcom/oracle/graal/api/meta/Constant;") \
   template(createCiConstantFloat_name,                "createCiConstantFloat")                                          \
   template(createCiConstantFloat_signature,           "(F)Lcom/oracle/graal/api/meta/Constant;")                          \
   template(createCiConstantDouble_name,               "createCiConstantDouble")                                         \
--- a/src/share/vm/graal/graalCompilerToVM.cpp	Fri Jun 08 23:44:20 2012 +0200
+++ b/src/share/vm/graal/graalCompilerToVM.cpp	Fri Jun 08 23:47:42 2012 +0200
@@ -1138,7 +1138,7 @@
 #define HS_CODE_INFO    "Lcom/oracle/graal/hotspot/ri/HotSpotCodeInfo;"
 #define METHOD_DATA     "Lcom/oracle/graal/hotspot/ri/HotSpotMethodData;"
 #define CI_CONSTANT     "Lcom/oracle/graal/api/meta/Constant;"
-#define CI_KIND         "Lcom/oracle/graal/api/meta/RiKind;"
+#define CI_KIND         "Lcom/oracle/graal/api/meta/Kind;"
 #define CI_RUNTIME_CALL "Lcom/oracle/graal/api/code/CiRuntimeCall;"
 #define STRING          "Ljava/lang/String;"
 #define OBJECT          "Ljava/lang/Object;"
--- a/src/share/vm/graal/graalJavaAccess.hpp	Fri Jun 08 23:44:20 2012 +0200
+++ b/src/share/vm/graal/graalJavaAccess.hpp	Fri Jun 08 23:47:42 2012 +0200
@@ -177,18 +177,18 @@
     int_field(CiCodePos, bci)                                                           \
   end_class                                                                             \
   start_class(CiConstant)                                                               \
-    oop_field(CiConstant, kind, "Lcom/oracle/graal/api/meta/RiKind;")                       \
+    oop_field(CiConstant, kind, "Lcom/oracle/graal/api/meta/Kind;")                       \
     oop_field(CiConstant, object, "Ljava/lang/Object;")                                 \
     long_field(CiConstant, primitive)                                                   \
   end_class                                                                             \
   start_class(CiKind)                                                                   \
     char_field(CiKind, typeChar)                                                        \
-    static_oop_field(CiKind, Boolean, "Lcom/oracle/graal/api/meta/RiKind;");                \
-    static_oop_field(CiKind, Byte, "Lcom/oracle/graal/api/meta/RiKind;");                   \
-    static_oop_field(CiKind, Char, "Lcom/oracle/graal/api/meta/RiKind;");                   \
-    static_oop_field(CiKind, Short, "Lcom/oracle/graal/api/meta/RiKind;");                  \
-    static_oop_field(CiKind, Int, "Lcom/oracle/graal/api/meta/RiKind;");                    \
-    static_oop_field(CiKind, Long, "Lcom/oracle/graal/api/meta/RiKind;");                   \
+    static_oop_field(CiKind, Boolean, "Lcom/oracle/graal/api/meta/Kind;");                \
+    static_oop_field(CiKind, Byte, "Lcom/oracle/graal/api/meta/Kind;");                   \
+    static_oop_field(CiKind, Char, "Lcom/oracle/graal/api/meta/Kind;");                   \
+    static_oop_field(CiKind, Short, "Lcom/oracle/graal/api/meta/Kind;");                  \
+    static_oop_field(CiKind, Int, "Lcom/oracle/graal/api/meta/Kind;");                    \
+    static_oop_field(CiKind, Long, "Lcom/oracle/graal/api/meta/Kind;");                   \
   end_class                                                                             \
   start_class(CiRuntimeCall)                                                            \
     static_oop_field(CiRuntimeCall, UnwindException, "Lcom/oracle/graal/api/code/CiRuntimeCall;"); \
@@ -210,7 +210,7 @@
   start_class(RiMethod)                                                                 \
   end_class                                                                             \
   start_class(CiValue)                                                                  \
-    oop_field(CiValue, kind, "Lcom/oracle/graal/api/meta/RiKind;")                          \
+    oop_field(CiValue, kind, "Lcom/oracle/graal/api/meta/Kind;")                          \
     static_oop_field(CiValue, IllegalValue, "Lcom/oracle/graal/api/meta/Value;");         \
   end_class                                                                             \
   start_class(CiRegisterValue)                                                          \