changeset 5507:dc71b06d09f8

Moving classes from cri.ri to api.meta.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 07 Jun 2012 18:24:06 +0200
parents 56860d3f9f39
children 22fe762332af
files graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/AssignRegisters.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/DataFlowAnalysis.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/LinearScanAllocator.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/ResolveDataFlow.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/SpillAllAllocator.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/IntervalPrinter.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/Location.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationMap.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationUtil.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/MoveResolver.java graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/RegisterVerifier.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessCapability.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiBitMap.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiCodeInfo.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiCompiledMethod.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiConstant.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiConstantPool.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiDeoptReason.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiExceptionHandler.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiExceptionSeen.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/RiMethod.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiProfilingInfo.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiResolvedField.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiResolvedMethod.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiResolvedType.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/RiTypeProfile.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/RiValue.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/package-info.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/OptimisticOptimizations.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/alloc/LinearScanWalker.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/MoveResolver.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/PhiResolver.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/CanonicalizerPhase.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CheckCastEliminationPhase.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/IntrinsificationPhase.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LoweringPhase.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/Backend.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64DeoptimizationStub.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/NegateObjectTypeFeedback.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/NegateScalarTypeFeedback.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/TypeFeedbackCache.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/Compiler.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotDebugConfig.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/MethodFilter.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/ArrayWriteBarrier.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/FieldWriteBarrier.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/HotSpotCodeInfo.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/HotSpotConstantPool.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotExceptionHandler.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/HotSpotGraphCache.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethod.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodData.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodDataAccessor.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodResolved.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodResolvedImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodUnresolved.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotProfilingInfo.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/HotSpotType.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/HotSpotTypeResolved.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeUnresolved.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotXirGenerator.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/server/ReplacingStreams.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/DirectStoreNode.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/AMD64TailcallOp.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/BciBlockMapping.java graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderConfiguration.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/AMD64Call.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.amd64/src/com/oracle/graal/lir/amd64/AMD64LIRInstruction.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRDebugInfo.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRVerifier.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRXirInstruction.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueUtil.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/cri/CiLoweringTool.java graal/com.oracle.graal.nodes/src/com/oracle/graal/cri/ExtendedRiRuntime.java graal/com.oracle.graal.nodes/src/com/oracle/graal/cri/RiGraphCache.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/DeoptimizeNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.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/StructuredGraph.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/CompareNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/Condition.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/ReadHubNode.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/UnsafeCastNode.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/extended/ValueAnchorNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessFieldNode.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/ArrayLengthNode.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/NewInstanceNode.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/NewObjectArrayNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewTypeArrayNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.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/CanonicalizerTool.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/EscapeField.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/EscapeOp.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/ObjectTypeFeedbackStore.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ObjectTypeFeedbackTool.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ObjectTypeQuery.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/spi/types/ScalarTypeFeedbackTool.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeQuery.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.nodes/src/com/oracle/graal/nodes/virtual/BoxedVirtualObjectNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualObjectNode.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinterObserver.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinterDumpHandler.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/Snippets.java graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/nodes/MathIntrinsicNode.java graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/target/amd64/AMD64MathIntrinsicOp.java graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CheckCastTest.java graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/ConditionTest.java graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/EscapeAnalysisTest.java graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraphTest.java graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InstanceOfTest.java graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeCheckTest.java graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64.java graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64MacroAssembler.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAddress.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAssumptions.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiBitMap.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCallingConvention.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCodePos.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCompilationStatistics.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiDebugInfo.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiDeoptReason.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiExceptionHandler.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiFrame.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiMonitorValue.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegister.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfig.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfigImpl.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterValue.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiStackSlot.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTarget.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTargetMethod.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiUtil.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiVirtualObject.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/package-info.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiCodeInfo.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiCompiledMethod.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiConstant.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiConstantPool.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiExceptionHandler.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiExceptionSeen.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiField.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiKind.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiMethod.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiProfilingInfo.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiResolvedField.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiResolvedMethod.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiResolvedType.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiSignature.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiType.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiTypeProfile.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiValue.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/package-info.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/XirArgument.java graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirSnippet.java graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseProfilingInfo.java graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedField.java graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedMethod.java graal/com.oracle.max.criutils/src/com/oracle/max/criutils/CompilationPrinter.java graal/com.oracle.max.criutils/src/com/oracle/max/criutils/JniMangle.java graal/com.oracle.max.criutils/src/com/oracle/max/criutils/SnapshotProfilingInfo.java graal/com.oracle.max.criutils/src/com/oracle/max/criutils/TypeCheckHints.java
diffstat 295 files changed, 3559 insertions(+), 3469 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/AssignRegisters.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/AssignRegisters.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,9 +24,8 @@
 
 import static com.oracle.graal.alloc.util.LocationUtil.*;
 
-import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.graal.alloc.util.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.LIRInstruction.*;
@@ -41,8 +40,8 @@
         this.frameMap = frameMap;
     }
 
-    private CiBitMap curRegisterRefMap;
-    private CiBitMap curFrameRefMap;
+    private RiBitMap curRegisterRefMap;
+    private RiBitMap curFrameRefMap;
 
     public void execute() {
         ValueProcedure useProc =          new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return use(value); } };
@@ -71,12 +70,12 @@
 
                 if (op.info != null) {
                     Debug.log("    registerRefMap: %s  frameRefMap: %s", curRegisterRefMap, curFrameRefMap);
-                    op.info.finish(new CiBitMap(curRegisterRefMap), new CiBitMap(curFrameRefMap), frameMap);
+                    op.info.finish(new RiBitMap(curRegisterRefMap), new RiBitMap(curFrameRefMap), frameMap);
 
                     if (op instanceof LIRXirInstruction) {
                         LIRXirInstruction xir = (LIRXirInstruction) op;
                         if (xir.infoAfter != null) {
-                            xir.infoAfter.finish(new CiBitMap(curRegisterRefMap), new CiBitMap(curFrameRefMap), frameMap);
+                            xir.infoAfter.finish(new RiBitMap(curRegisterRefMap), new RiBitMap(curFrameRefMap), frameMap);
                         }
                     }
                 }
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/DataFlowAnalysis.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/DataFlowAnalysis.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,7 +28,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.LIRInstruction.*;
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/LinearScanAllocator.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/LinearScanAllocator.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,8 +29,8 @@
 
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiRegister.RegisterFlag;
-import com.oracle.max.cri.ri.*;
 import com.oracle.graal.alloc.util.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/ResolveDataFlow.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/ResolveDataFlow.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,8 +26,8 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
 import com.oracle.graal.alloc.util.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/SpillAllAllocator.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/SpillAllAllocator.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,8 +29,8 @@
 
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiRegister.RegisterFlag;
-import com.oracle.max.cri.ri.*;
 import com.oracle.graal.alloc.util.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/IntervalPrinter.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/IntervalPrinter.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,8 +28,8 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.graal.alloc.simple.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.LIRInstruction.*;
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/Location.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/Location.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.alloc.util;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.lir.*;
 
 public class Location extends RiValue {
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationMap.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationMap.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,7 +26,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.LIRInstruction.*;
 
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationUtil.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationUtil.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.alloc.util;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.lir.*;
 
 public class LocationUtil extends ValueUtil {
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/MoveResolver.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/MoveResolver.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,7 +28,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
--- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/RegisterVerifier.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/RegisterVerifier.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,7 +28,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessCapability.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2012, 2012, 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;
+
+
+public interface MetaAccessCapability {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiBitMap.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,686 @@
+/*
+ * 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 java.io.*;
+import java.util.*;
+
+/**
+ * Implements a bitmap that stores a single bit for a range of integers (0-n).
+ */
+public final class RiBitMap implements Serializable {
+
+    private static final long serialVersionUID = 2471441272241401105L;
+    private static final int ADDRESS_BITS_PER_WORD = 6;
+    private static final int BITS_PER_WORD = 1 << ADDRESS_BITS_PER_WORD;
+    private static final int BIT_INDEX_MASK = BITS_PER_WORD - 1;
+
+    public static final int DEFAULT_LENGTH = BITS_PER_WORD;
+
+    public static int roundUpLength(int length) {
+        return ((length + (BITS_PER_WORD - 1)) >> ADDRESS_BITS_PER_WORD) << ADDRESS_BITS_PER_WORD;
+    }
+
+    private int size;
+    private long low;
+    private long[] extra;
+
+    /**
+     * Constructs a new bit map with the {@linkplain #DEFAULT_LENGTH default length}.
+     */
+    public RiBitMap() {
+        this(DEFAULT_LENGTH);
+    }
+
+    /**
+     * Constructs a new bit map from a byte array encoded bit map.
+     *
+     * @param bitmap the bit map to convert
+     */
+    public RiBitMap(byte[] bitmap) {
+        this(bitmap, 0, bitmap.length);
+    }
+
+    /**
+     * Constructs a copy of the given bit map.
+     *
+     * @param bitmap the bit map to copy.
+     */
+    public RiBitMap(RiBitMap bitmap) {
+        this.size = bitmap.size;
+        this.low = bitmap.low;
+        if (bitmap.extra != null) {
+            this.extra = Arrays.copyOf(bitmap.extra, bitmap.extra.length);
+        }
+    }
+
+    /**
+     * Constructs a new bit map from a byte array encoded bit map.
+     *
+     * @param arr the byte array containing the bit map to convert
+     * @param off the byte index in {@code arr} at which the bit map starts
+     * @param numberOfBytes the number of bytes worth of bits to copy from {@code arr}
+     */
+    public RiBitMap(byte[] arr, int off, int numberOfBytes) {
+        this(numberOfBytes * 8);
+        int byteIndex = off;
+        int end = off + numberOfBytes;
+        assert end <= arr.length;
+        while (byteIndex < end && (byteIndex - off) < 8) {
+            long bite = (long) arr[byteIndex] & 0xff;
+            low |= bite << ((byteIndex - off) * 8);
+            byteIndex++;
+        }
+        if (byteIndex < end) {
+            assert (byteIndex - off) == 8;
+            int remBytes = end - byteIndex;
+            int remWords = (remBytes + 7) / 8;
+            for (int word = 0; word < remWords; word++) {
+                long w = 0L;
+                for (int i = 0; i < 8 && byteIndex < end; i++) {
+                    long bite = (long) arr[byteIndex] & 0xff;
+                    w |= bite << (i * 8);
+                    byteIndex++;
+                }
+                extra[word] = w;
+            }
+        }
+    }
+
+    /**
+     * Converts a {@code long} to a {@link RiBitMap}.
+     */
+    public static RiBitMap fromLong(long bitmap) {
+        RiBitMap bm = new RiBitMap(64);
+        bm.low = bitmap;
+        return bm;
+    }
+
+    /**
+     * Constructs a new bit map with the specified length.
+     *
+     * @param length the length of the bitmap
+     */
+    public RiBitMap(int length) {
+        assert length >= 0;
+        this.size = length;
+        if (length > BITS_PER_WORD) {
+            extra = new long[length >> ADDRESS_BITS_PER_WORD];
+        }
+    }
+
+    /**
+     * Sets the bit at the specified index.
+     *
+     * @param i the index of the bit to set
+     */
+    public void set(int i) {
+        if (checkIndex(i) < BITS_PER_WORD) {
+            low |= 1L << i;
+        } else {
+            int pos = wordIndex(i);
+            int index = bitInWord(i);
+            extra[pos] |= 1L << index;
+        }
+    }
+
+    /**
+     * Grows this bitmap to a new size, appending necessary zero bits.
+     *
+     * @param newLength the new length of the bitmap
+     */
+    public void grow(int newLength) {
+        if (newLength > size) {
+            // grow this bitmap to the new length
+            int newSize = newLength >> ADDRESS_BITS_PER_WORD;
+            if (newLength > 0) {
+                if (extra == null) {
+                    // extra just needs to be allocated now
+                    extra = new long[newSize];
+                } else {
+                    if (extra.length < newSize) {
+                        // extra needs to be copied
+                        long[] newExtra = new long[newSize];
+                        for (int i = 0; i < extra.length; i++) {
+                            newExtra[i] = extra[i];
+                        }
+                        extra = newExtra;
+                    } else {
+                        // nothing to do, extra is already the right size
+                    }
+                }
+            }
+            size = newLength;
+        }
+    }
+
+    private static int bitInWord(int i) {
+        return i & BIT_INDEX_MASK;
+    }
+
+    private static int wordIndex(int i) {
+        return (i >> ADDRESS_BITS_PER_WORD) - 1;
+    }
+
+    /**
+     * Clears the bit at the specified index.
+     * @param i the index of the bit to clear
+     */
+    public void clear(int i) {
+        if (checkIndex(i) < BITS_PER_WORD) {
+            low &= ~(1L << i);
+        } else {
+            int pos = wordIndex(i);
+            int index = bitInWord(i);
+            extra[pos] &= ~(1L << index);
+        }
+    }
+
+    /**
+     * Sets all the bits in this bitmap.
+     */
+    public void setAll() {
+        low = -1;
+        if (extra != null) {
+            for (int i = 0; i < extra.length; i++) {
+                extra[i] = -1;
+            }
+        }
+    }
+
+    /**
+     * Clears all the bits in this bitmap.
+     */
+    public void clearAll() {
+        low = 0;
+        if (extra != null) {
+            for (int i = 0; i < extra.length; i++) {
+                extra[i] = 0;
+            }
+        }
+    }
+
+    /**
+     * Gets the value of the bit at the specified index.
+     *
+     * @param i the index of the bit to get
+     * @return {@code true} if the bit at the specified position is {@code 1}
+     */
+    public boolean get(int i) {
+        if (checkIndex(i) < BITS_PER_WORD) {
+            return ((low >> i) & 1) != 0;
+        }
+        int pos = wordIndex(i);
+        int index = bitInWord(i);
+        long bits = extra[pos];
+        return ((bits >> index) & 1) != 0;
+    }
+
+    /**
+     * Gets the value of the bit at the specified index, returning {@code false} if the
+     * bitmap does not cover the specified index.
+     *
+     * @param i the index of the bit to get
+     * @return {@code true} if the bit at the specified position is {@code 1}
+     */
+    public boolean getDefault(int i) {
+        if (i < 0 || i >= size) {
+            return false;
+        }
+        if (i < BITS_PER_WORD) {
+            return ((low >> i) & 1) != 0;
+        }
+        int pos = wordIndex(i);
+        int index = bitInWord(i);
+        long bits = extra[pos];
+        return ((bits >> index) & 1) != 0;
+    }
+
+    /**
+     * Performs the union operation on this bitmap with the specified bitmap. That is, all bits set in either of the two
+     * bitmaps will be set in this bitmap following this operation.
+     *
+     * @param other the other bitmap for the union operation
+     */
+    public void setUnion(RiBitMap other) {
+        low |= other.low;
+        if (extra != null && other.extra != null) {
+            for (int i = 0; i < extra.length && i < other.extra.length; i++) {
+                extra[i] |= other.extra[i];
+            }
+        }
+    }
+
+    /**
+     * Performs the union operation on this bitmap with the specified bitmap. That is, a bit is set in this
+     * bitmap if and only if it is set in both this bitmap and the specified bitmap.
+     *
+     * @param other the other bitmap for this operation
+     * @return {@code true} if any bits were cleared as a result of this operation
+     */
+    public boolean setIntersect(RiBitMap other) {
+        boolean same = true;
+        long intx = low & other.low;
+        if (low != intx) {
+            same = false;
+            low = intx;
+        }
+        long[] oxtra = other.extra;
+        if (extra != null && oxtra != null) {
+            for (int i = 0; i < extra.length; i++) {
+                long a = extra[i];
+                if (i < oxtra.length) {
+                    // zero bits out of this map
+                    long ax = a & oxtra[i];
+                    if (a != ax) {
+                        same = false;
+                        extra[i] = ax;
+                    }
+                } else {
+                    // this bitmap is larger than the specified bitmap; zero remaining bits
+                    if (a != 0) {
+                        same = false;
+                        extra[i] = 0;
+                    }
+                }
+            }
+        }
+        return !same;
+    }
+
+    /**
+     * Gets the number of addressable bits in this bitmap.
+     *
+     * @return the size of this bitmap
+     */
+    public int size() {
+        return size;
+    }
+
+    private int checkIndex(int i) {
+        if (i < 0 || i >= size) {
+            throw new IndexOutOfBoundsException();
+        }
+        return i;
+    }
+
+    public void setFrom(RiBitMap other) {
+        assert this.size == other.size : "must have same size";
+
+        low = other.low;
+        if (extra != null) {
+            for (int i = 0; i < extra.length; i++) {
+                extra[i] = other.extra[i];
+            }
+        }
+    }
+
+    public void setDifference(RiBitMap other) {
+        assert this.size == other.size : "must have same size";
+
+        low &= ~other.low;
+        if (extra != null) {
+            for (int i = 0; i < extra.length; i++) {
+                extra[i] &= ~other.extra[i];
+            }
+        }
+    }
+
+    public boolean isSame(RiBitMap other) {
+        if (this.size != other.size || this.low != other.low) {
+            return false;
+        }
+
+        if (extra != null) {
+            for (int i = 0; i < extra.length; i++) {
+                if (extra[i] != other.extra[i]) {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Returns the index of the first set bit that occurs on or after a specified start index.
+     * If no such bit exists then -1 is returned.
+     * <p>
+     * To iterate over the set bits in a {@code BitMap}, use the following loop:
+     *
+     * <pre>
+     * for (int i = bitMap.nextSetBit(0); i &gt;= 0; i = bitMap.nextSetBit(i + 1)) {
+     *     // operate on index i here
+     * }
+     * </pre>
+     *
+     * @param fromIndex the index to start checking from (inclusive)
+     * @return the index of the lowest set bit between {@code [fromIndex .. size())} or -1 if there is no set bit in this range
+     * @throws IndexOutOfBoundsException if the specified index is negative.
+     */
+    public int nextSetBit(int fromIndex) {
+        return nextSetBit(fromIndex, size());
+    }
+
+    /**
+     * Returns the index of the first set bit that occurs on or after a specified start index
+     * and before a specified end index. If no such bit exists then -1 is returned.
+     * <p>
+     * To iterate over the set bits in a {@code BitMap}, use the following loop:
+     *
+     * <pre>
+     * for (int i = bitMap.nextSetBit(0, bitMap.size()); i &gt;= 0; i = bitMap.nextSetBit(i + 1, bitMap.size())) {
+     *     // operate on index i here
+     * }
+     * </pre>
+     *
+     * @param fromIndex the index to start checking from (inclusive)
+     * @param toIndex the index at which to stop checking (exclusive)
+     * @return the index of the lowest set bit between {@code [fromIndex .. toIndex)} or -1 if there is no set bit in this range
+     * @throws IndexOutOfBoundsException if the specified index is negative.
+     */
+    public int nextSetBit(int fromIndex, int toIndex) {
+        assert fromIndex <= size() : "index out of bounds";
+        assert toIndex <= size() : "index out of bounds";
+        assert fromIndex <= toIndex : "fromIndex > toIndex";
+
+        if (fromIndex == toIndex) {
+            return -1;
+        }
+        int fromWordIndex = wordIndex(fromIndex);
+        int toWordIndex = wordIndex(toIndex - 1) + 1;
+        int resultIndex = fromIndex;
+
+        // check bits including and to the left_ of offset's position
+        int pos = bitInWord(resultIndex);
+        long res = map(fromWordIndex) >> pos;
+        if (res != 0) {
+            resultIndex += Long.numberOfTrailingZeros(res);
+            assert resultIndex >= fromIndex && resultIndex < toIndex : "just checking";
+            if (resultIndex < toIndex) {
+                return resultIndex;
+            }
+            return -1;
+        }
+        // skip over all word length 0-bit runs
+        for (fromWordIndex++; fromWordIndex < toWordIndex; fromWordIndex++) {
+            res = map(fromWordIndex);
+            if (res != 0) {
+                // found a 1, return the offset
+                resultIndex = bitIndex(fromWordIndex) + Long.numberOfTrailingZeros(res);
+                assert resultIndex >= fromIndex : "just checking";
+                if (resultIndex < toIndex) {
+                    return resultIndex;
+                }
+                return -1;
+            }
+        }
+        return -1;
+    }
+
+    private static int bitIndex(int index) {
+        return (index + 1) << ADDRESS_BITS_PER_WORD;
+    }
+
+    private long map(int index) {
+        if (index == -1) {
+            return low;
+        }
+        return extra[index];
+    }
+
+    private static boolean allZeros(int start, long[] arr) {
+        for (int i = start; i < arr.length; i++) {
+            if (arr[i] != 0) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Compares this object against the specified object.
+     * The result is {@code true} if and only if {@code obj} is
+     * not {@code null} and is a {@code CiBitMap} object that has
+     * exactly the same set of bits set to {@code true} as this bit
+     * set.
+     *
+     * @param   obj   the object to compare with.
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof RiBitMap) {
+            RiBitMap bm = (RiBitMap) obj;
+            if (bm.low == low) {
+                if (bm.extra == null) {
+                    if (extra == null) {
+                        // Common case
+                        return true;
+                    }
+                    return allZeros(0, extra);
+                }
+                if (extra == null) {
+                    return allZeros(0, bm.extra);
+                }
+                // both 'extra' array non null:
+                int i = 0;
+                int length = Math.min(extra.length, bm.extra.length);
+                while (i < length) {
+                    if (extra[i] != bm.extra[i]) {
+                        return false;
+                    }
+                    i++;
+                }
+                if (extra.length > bm.extra.length) {
+                    return allZeros(length, extra);
+                }
+                if (extra.length < bm.extra.length) {
+                    return allZeros(length, bm.extra);
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return (int) low ^ size;
+    }
+
+    /**
+     * Returns a string representation of this bit map
+     * that is the same as the string returned by {@link BitSet#toString()}
+     * for a bit set with the same bits set as this bit map.
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder(size * 2);
+        sb.append('{');
+
+        int bit = nextSetBit(0);
+        if (bit != -1) {
+            sb.append(bit);
+            for (bit = nextSetBit(bit + 1); bit >= 0; bit = nextSetBit(bit + 1)) {
+                sb.append(", ").append(bit);
+            }
+        }
+
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public static int highestOneBitIndex(long value) {
+        int bit = Long.numberOfTrailingZeros(Long.highestOneBit(value));
+        if (bit == 64) {
+            return -1;
+        }
+        return bit;
+    }
+
+    /**
+     * Returns the number of bits set to {@code true} in this bit map.
+     */
+    public int cardinality() {
+        int sum = Long.bitCount(low);
+        if (extra != null) {
+            for (long word : extra) {
+                sum += Long.bitCount(word);
+            }
+        }
+        return sum;
+    }
+
+    /**
+     * Returns the "logical size" of this bit map: the index of
+     * the highest set bit in the bit map plus one. Returns zero
+     * if the bit map contains no set bits.
+     *
+     * @return  the logical size of this bit map
+     */
+    public int length() {
+        if (extra != null) {
+            for (int i = extra.length - 1; i >= 0; i--) {
+                if (extra[i] != 0) {
+                    return (highestOneBitIndex(extra[i]) + ((i + 1) * 64)) + 1;
+                }
+            }
+        }
+        return highestOneBitIndex(low) + 1;
+    }
+
+    /**
+     * Returns a string representation of this bit map with every set bit represented as {@code '1'}
+     * and every unset bit represented as {@code '0'}. The first character in the returned string represents
+     * bit 0 in this bit map.
+     *
+     * @param length the number of bits represented in the returned string. If {@code length < 0 || length > size()},
+     *            then the value of {@link #length()} is used.
+     */
+    public String toBinaryString() {
+        int length = length();
+        if (length == 0) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder(length);
+        for (int i = 0; i < length; ++i) {
+            sb.append(get(i) ? '1' : '0');
+        }
+        return sb.toString();
+    }
+
+    static final char[] hexDigits = {
+        '0', '1', '2', '3', '4', '5', '6', '7',
+        '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
+    };
+
+    private static int align(int size, int align) {
+        return (size + align - 1) & ~(align - 1);
+    }
+
+    /**
+     * Returns a string representation of this bit map in hex.
+     */
+    public String toHexString() {
+        if (size == 0) {
+            return "";
+        }
+        int hexSize = align(this.size, 4);
+        StringBuilder sb = new StringBuilder(hexSize / 4);
+        for (int i = 0; i < hexSize; i += 4) {
+            int nibble = get(i) ? 1 : 0;
+            if (get(i + 1)) {
+                nibble |= 2;
+            }
+            if (get(i + 2)) {
+                nibble |= 4;
+            }
+            if (get(i + 3)) {
+                nibble |= 8;
+            }
+
+            sb.append(hexDigits[nibble]);
+        }
+        return sb.toString();
+    }
+
+    public RiBitMap copy() {
+        RiBitMap n = new RiBitMap(BITS_PER_WORD);
+        n.low = low;
+        if (extra != null) {
+            n.extra = Arrays.copyOf(extra, extra.length);
+        }
+        n.size = size;
+        return n;
+    }
+
+    /**
+     * Copies this bit map into a given byte array.
+     *
+     * @param arr the destination
+     * @param off the byte index in {@code arr} at which to start writing
+     * @param numberOfBytes the number of bytes worth of bits to copy from this bit map.
+     *        The number of bits copied is {@code numberOfBytes * 8}. If {@code numberOfBytes}
+     *        is -1, then {@code ((size() + 7) / 8)} is used instead.
+     * @return the number of bytes written to {@code arr}
+     */
+    public int copyTo(byte[] arr, int off, int numberOfBytes) {
+        for (int i = 0; i < numberOfBytes; ++i) {
+            long word = low;
+            int byteInWord;
+            if (i >= 8) {
+                int wordIndex = (i - 8) / 8;
+                word = extra[wordIndex];
+                byteInWord = i & 0x7;
+            } else {
+                byteInWord = i;
+            }
+            assert byteInWord < 8;
+            byte b = (byte) (word >> (byteInWord * 8));
+            arr[off + i] = b;
+        }
+        return numberOfBytes;
+    }
+
+    /**
+     * Converts this bit map to a byte array. The length of the returned
+     * byte array is {@code ((size() + 7) / 8)}.
+     */
+    public byte[] toByteArray() {
+        byte[] arr = new byte[(size + 7) / 8];
+        copyTo(arr, 0, arr.length);
+        return arr;
+    }
+
+    /**
+     * Converts this bit map to a long.
+     *
+     * @throws IllegalArgumentException if {@code (size() > 64)}
+     */
+    public long toLong() {
+        if (size > 64) {
+            throw new IllegalArgumentException("bit map of size " + size + " cannot be converted to long");
+        }
+        return low;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiCodeInfo.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, 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;
+
+/**
+ * Represents some code installed in the code cache of the runtime.
+ * This encapsulated details are only for informational purposes.
+ * At any time, the runtime may invalidate the underlying code (e.g. due to deopt etc).
+ */
+public interface RiCodeInfo {
+
+    /**
+     * Gets the start address of this installed code.
+     */
+    long start();
+
+    /**
+     * Gets a copy of this installed code.
+     */
+    byte[] code();
+
+    /**
+     * Gets the method (if any) from which this installed code was compiled.
+     */
+    RiResolvedMethod method();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiCompiledMethod.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 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;
+
+/**
+ * Represents a compiled instance of a method. It may have been invalidated or removed in the meantime.
+ */
+public interface RiCompiledMethod {
+
+    public abstract class MethodInvalidatedException extends RuntimeException {
+
+        private static final long serialVersionUID = -3540232440794244844L;
+    }
+
+    /**
+     * Returns the method to which the compiled code belongs.
+     * @return the method to which the compiled code belongs.
+     */
+    RiResolvedMethod method();
+
+    /**
+     * @return true if the code represented by this object is still valid, false otherwise (may happen due to deopt, etc.)
+     */
+    boolean isValid();
+
+    Object execute(Object arg1, Object arg2, Object arg3);
+
+    Object executeVarargs(Object... args);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiConstant.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,498 @@
+/*
+ * Copyright (c) 2009, 2012, 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;
+
+/**
+ * Represents a constant (boxed) value, such as an integer, floating point number, or object reference,
+ * within the compiler and across the compiler/runtime interface. Exports a set of {@code CiConstant}
+ * instances that represent frequently used constant values, such as {@link #ZERO}.
+ */
+public final class RiConstant extends RiValue {
+    private static final long serialVersionUID = -6355452536852663986L;
+
+    private static final RiConstant[] INT_CONSTANT_CACHE = new RiConstant[100];
+    static {
+        for (int i = 0; i < INT_CONSTANT_CACHE.length; ++i) {
+            INT_CONSTANT_CACHE[i] = new RiConstant(RiKind.Int, i);
+        }
+    }
+
+    public static final RiConstant NULL_OBJECT = new RiConstant(RiKind.Object, null);
+    public static final RiConstant INT_MINUS_1 = new RiConstant(RiKind.Int, -1);
+    public static final RiConstant INT_0 = forInt(0);
+    public static final RiConstant INT_1 = forInt(1);
+    public static final RiConstant INT_2 = forInt(2);
+    public static final RiConstant INT_3 = forInt(3);
+    public static final RiConstant INT_4 = forInt(4);
+    public static final RiConstant INT_5 = forInt(5);
+    public static final RiConstant LONG_0 = new RiConstant(RiKind.Long, 0L);
+    public static final RiConstant LONG_1 = new RiConstant(RiKind.Long, 1L);
+    public static final RiConstant FLOAT_0 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(0.0F));
+    public static final RiConstant FLOAT_1 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(1.0F));
+    public static final RiConstant FLOAT_2 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(2.0F));
+    public static final RiConstant DOUBLE_0 = new RiConstant(RiKind.Double, Double.doubleToRawLongBits(0.0D));
+    public static final RiConstant DOUBLE_1 = new RiConstant(RiKind.Double, Double.doubleToRawLongBits(1.0D));
+    public static final RiConstant TRUE = new RiConstant(RiKind.Boolean, 1L);
+    public static final RiConstant FALSE = new RiConstant(RiKind.Boolean, 0L);
+
+    static {
+        assert NULL_OBJECT.isDefaultValue();
+        assert INT_0.isDefaultValue();
+        assert FLOAT_0.isDefaultValue();
+        assert DOUBLE_0.isDefaultValue();
+        assert FALSE.isDefaultValue();
+
+        // Ensure difference between 0.0f and -0.0f is preserved
+        assert FLOAT_0 != forFloat(-0.0F);
+        assert !forFloat(-0.0F).isDefaultValue();
+
+        // Ensure difference between 0.0d and -0.0d is preserved
+        assert DOUBLE_0 != forDouble(-0.0d);
+        assert !forDouble(-0.0D).isDefaultValue();
+
+        assert NULL_OBJECT.isNull();
+    }
+
+    /**
+     * The boxed object value. This is ignored iff {@code !kind.isObject()}.
+     */
+    private final Object object;
+
+    /**
+     * The boxed primitive value as a {@code long}. This is ignored iff {@code kind.isObject()}.
+     * For {@code float} and {@code double} values, this value is the result of
+     * {@link Float#floatToRawIntBits(float)} and {@link Double#doubleToRawLongBits(double)} respectively.
+     */
+    private final long primitive;
+
+    /**
+     * Create a new constant represented by the specified object reference.
+     *
+     * @param kind the type of this constant
+     * @param object the value of this constant
+     */
+    private RiConstant(RiKind kind, Object object) {
+        super(kind);
+        this.object = object;
+        this.primitive = 0L;
+    }
+
+    /**
+     * Create a new constant represented by the specified primitive.
+     *
+     * @param kind the type of this constant
+     * @param primitive the value of this constant
+     */
+    public RiConstant(RiKind kind, long primitive) {
+        super(kind);
+        this.object = null;
+        this.primitive = primitive;
+    }
+
+    /**
+     * Checks whether this constant is non-null.
+     * @return {@code true} if this constant is a primitive, or an object constant that is not null
+     */
+    public boolean isNonNull() {
+        return !kind.isObject() || object != null;
+    }
+
+    /**
+     * Checks whether this constant is null.
+     * @return {@code true} if this constant is the null constant
+     */
+    public boolean isNull() {
+        return kind.isObject() && object == null;
+    }
+
+    @Override
+    public String toString() {
+        return kind.javaName + "[" + kind.format(boxedValue()) + (kind != RiKind.Object ? "|0x" + Long.toHexString(primitive) : "") + "]";
+    }
+
+    /**
+     * Gets this constant's value as a string.
+     *
+     * @return this constant's value as a string
+     */
+    public String valueString() {
+        if (kind.isPrimitive()) {
+            return boxedValue().toString();
+        } else if (kind.isObject()) {
+            if (object == null) {
+                return "null";
+            } else if (object instanceof String) {
+                return "\"" + object + "\"";
+            } else {
+                return "<object: " + kind.format(object) + ">";
+            }
+        } else if (kind.isJsr()) {
+            return "bci:" + boxedValue().toString();
+        } else {
+            return "???";
+        }
+    }
+
+    /**
+     * Returns the value of this constant as a boxed Java value.
+     * @return the value of this constant
+     */
+    public Object boxedValue() {
+        // Checkstyle: stop
+        switch (kind) {
+            case Byte: return (byte) asInt();
+            case Boolean: return asInt() == 0 ? Boolean.FALSE : Boolean.TRUE;
+            case Short: return (short) asInt();
+            case Char: return (char) asInt();
+            case Jsr: return (int) primitive;
+            case Int: return asInt();
+            case Long: return asLong();
+            case Float: return asFloat();
+            case Double: return asDouble();
+            case Object: return object;
+        }
+        // Checkstyle: resume
+        throw new IllegalArgumentException();
+    }
+
+    private boolean valueEqual(RiConstant other, boolean ignoreKind) {
+        // must have equivalent kinds to be equal
+        if (!ignoreKind && kind != other.kind) {
+            return false;
+        }
+        if (kind.isObject()) {
+            return object == other.object;
+        }
+        return primitive == other.primitive;
+    }
+
+    /**
+     * Converts this constant to a primitive int.
+     * @return the int value of this constant
+     */
+    public int asInt() {
+        if (kind.stackKind().isInt() || kind.isJsr()) {
+            return (int) primitive;
+        }
+        throw new Error("Constant is not int: " + this);
+    }
+
+    /**
+     * Converts this constant to a primitive boolean.
+     * @return the boolean value of this constant
+     */
+    public boolean asBoolean() {
+        if (kind == RiKind.Boolean) {
+            return primitive != 0L;
+        }
+        throw new Error("Constant is not boolean: " + this);
+    }
+
+    /**
+     * Converts this constant to a primitive long.
+     * @return the long value of this constant
+     */
+    public long asLong() {
+        // Checkstyle: stop
+        switch (kind.stackKind()) {
+            case Jsr:
+            case Int:
+            case Long: return primitive;
+            case Float: return (long) asFloat();
+            case Double: return (long) asDouble();
+            default: throw new Error("Constant is not long: " + this);
+        }
+        // Checkstyle: resume
+    }
+
+    /**
+     * Converts this constant to a primitive float.
+     * @return the float value of this constant
+     */
+    public float asFloat() {
+        if (kind.isFloat()) {
+            return Float.intBitsToFloat((int) primitive);
+        }
+        throw new Error("Constant is not float: " + this);
+    }
+
+    /**
+     * Converts this constant to a primitive double.
+     * @return the double value of this constant
+     */
+    public double asDouble() {
+        if (kind.isFloat()) {
+            return Float.intBitsToFloat((int) primitive);
+        }
+        if (kind.isDouble()) {
+            return Double.longBitsToDouble(primitive);
+        }
+        throw new Error("Constant is not double: " + this);
+    }
+
+    /**
+     * Converts this constant to the object reference it represents.
+     * @return the object which this constant represents
+     */
+    public Object asObject() {
+        if (kind.isObject()) {
+            return object;
+        }
+        throw new Error("Constant is not object: " + this);
+    }
+
+    /**
+     * Converts this constant to the jsr reference it represents.
+     * @return the object which this constant represents
+     */
+    public int asJsr() {
+        if (kind.isJsr()) {
+            return (int) primitive;
+        }
+        throw new Error("Constant is not jsr: " + this);
+    }
+
+    /**
+     * Unchecked access to a primitive value.
+     * @return
+     */
+    public long asPrimitive() {
+        if (kind.isObject()) {
+            throw new Error("Constant is not primitive: " + this);
+        }
+        return primitive;
+    }
+
+    /**
+     * Computes the hashcode of this constant.
+     * @return a suitable hashcode for this constant
+     */
+    @Override
+    public int hashCode() {
+        if (kind.isObject()) {
+            return System.identityHashCode(object);
+        }
+        return (int) primitive;
+    }
+
+    /**
+     * Checks whether this constant equals another object. This is only
+     * true if the other object is a constant and has the same value.
+     * @param o the object to compare equality
+     * @return {@code true} if this constant is equivalent to the specified object
+     */
+    @Override
+    public boolean equals(Object o) {
+        return o == this || o instanceof RiConstant && valueEqual((RiConstant) o, false);
+    }
+
+    /**
+     * Checks whether this constant is identical to another constant or has the same value as it.
+     * @param other the constant to compare for equality against this constant
+     * @return {@code true} if this constant is equivalent to {@code other}
+     */
+    public boolean equivalent(RiConstant other) {
+        return other == this || valueEqual(other, false);
+    }
+
+    /**
+     * Checks whether this constant is the default value for its type.
+     * @return {@code true} if the value is the default value for its type; {@code false} otherwise
+     */
+    public boolean isDefaultValue() {
+        // Checkstyle: stop
+        switch (kind.stackKind()) {
+            case Int: return asInt() == 0;
+            case Long: return asLong() == 0;
+            case Float: return this == FLOAT_0;
+            case Double: return this == DOUBLE_0;
+            case Object: return object == null;
+        }
+        // Checkstyle: resume
+        throw new IllegalArgumentException("Cannot det default CiConstant for kind " + kind);
+    }
+
+    /**
+     * Gets the default value for a given kind.
+     *
+     * @return the default value for {@code kind}'s {@linkplain RiKind#stackKind() stack kind}
+     */
+    public static RiConstant defaultValue(RiKind kind) {
+        // Checkstyle: stop
+        switch (kind.stackKind()) {
+            case Int: return INT_0;
+            case Long: return LONG_0;
+            case Float: return FLOAT_0;
+            case Double: return DOUBLE_0;
+            case Object: return NULL_OBJECT;
+        }
+        // Checkstyle: resume
+        throw new IllegalArgumentException("Cannot get default CiConstant for kind " + kind);
+    }
+
+    /**
+     * Creates a boxed double constant.
+     * @param d the double value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forDouble(double d) {
+        if (Double.compare(0.0D, d) == 0) {
+            return DOUBLE_0;
+        }
+        if (Double.compare(d, 1.0D) == 0) {
+            return DOUBLE_1;
+        }
+        return new RiConstant(RiKind.Double, Double.doubleToRawLongBits(d));
+    }
+
+    /**
+     * Creates a boxed float constant.
+     * @param f the float value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forFloat(float f) {
+        if (Float.compare(f, 0.0F) == 0) {
+            return FLOAT_0;
+        }
+        if (Float.compare(f, 1.0F) == 0) {
+            return FLOAT_1;
+        }
+        if (Float.compare(f, 2.0F) == 0) {
+            return FLOAT_2;
+        }
+        return new RiConstant(RiKind.Float, Float.floatToRawIntBits(f));
+    }
+
+    /**
+     * Creates a boxed long constant.
+     * @param i the long value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forLong(long i) {
+        return i == 0 ? LONG_0 : i == 1 ? LONG_1 : new RiConstant(RiKind.Long, i);
+    }
+
+    /**
+     * Creates a boxed integer constant.
+     * @param i the integer value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forInt(int i) {
+        if (i == -1) {
+            return INT_MINUS_1;
+        }
+        if (i >= 0 && i < INT_CONSTANT_CACHE.length) {
+            return INT_CONSTANT_CACHE[i];
+        }
+        return new RiConstant(RiKind.Int, i);
+    }
+
+    /**
+     * Creates a boxed byte constant.
+     * @param i the byte value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forByte(byte i) {
+        return new RiConstant(RiKind.Byte, i);
+    }
+
+    /**
+     * Creates a boxed boolean constant.
+     * @param i the boolean value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forBoolean(boolean i) {
+        return i ? TRUE : FALSE;
+    }
+
+    /**
+     * Creates a boxed char constant.
+     * @param i the char value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forChar(char i) {
+        return new RiConstant(RiKind.Char, i);
+    }
+
+    /**
+     * Creates a boxed short constant.
+     * @param i the short value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forShort(short i) {
+        return new RiConstant(RiKind.Short, i);
+    }
+
+    /**
+     * Creates a boxed address (jsr/ret address) constant.
+     * @param i the address value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forJsr(int i) {
+        return new RiConstant(RiKind.Jsr, i);
+    }
+
+    /**
+     * Creates a boxed object constant.
+     * @param o the object value to box
+     * @return a boxed copy of {@code value}
+     */
+    public static RiConstant forObject(Object o) {
+        if (o == null) {
+            return NULL_OBJECT;
+        }
+        return new RiConstant(RiKind.Object, o);
+    }
+
+    /**
+     * Creates a boxed constant for the given kind from an Object.
+     * The object needs to be of the Java boxed type corresponding to the kind.
+     * @param kind the kind of the constant to create
+     * @param value the Java boxed value: a Byte instance for CiKind Byte, etc.
+     * @return the boxed copy of {@code value}
+     */
+    public static RiConstant forBoxed(RiKind kind, Object value) {
+        switch (kind) {
+            case Boolean:
+                return forBoolean((Boolean) value);
+            case Byte:
+                return forByte((Byte) value);
+            case Char:
+                return forChar((Character) value);
+            case Short:
+                return forShort((Short) value);
+            case Int:
+                return forInt((Integer) value);
+            case Long:
+                return forLong((Long) value);
+            case Float:
+                return forFloat((Float) value);
+            case Double:
+                return forDouble((Double) value);
+            case Object:
+                return forObject(value);
+            default:
+                throw new RuntimeException("cannot create CiConstant for boxed " + kind + " value");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiConstantPool.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,93 @@
+/*
+ * 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;
+
+/**
+ * Represents the runtime representation of the constant pool that is
+ * used by the compiler when parsing bytecode. The {@code lookupXXX} methods look up a constant
+ * pool entry without performing resolution, and are used during compilation.
+ */
+public interface RiConstantPool {
+
+    /**
+     * Makes sure that the type referenced by the specified constant pool entry is loaded and
+     * initialized. This can be used to compile time resolve a type. It works for field, method,
+     * or type constant pool entries.
+     * @param cpi the index of the constant pool entry that references the type
+     * @param opcode the opcode of the instruction that references the type
+     */
+    void loadReferencedType(int cpi, int opcode);
+
+    /**
+     * Looks up a reference to a field. If {@code opcode} is non-negative, then resolution checks
+     * specific to the JVM instruction it denotes are performed if the field is already resolved.
+     * Should any of these checks fail, an {@linkplain RiField#isResolved() unresolved}
+     * field reference is returned.
+     *
+     * @param cpi the constant pool index
+     * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1}
+     * @return a reference to the field at {@code cpi} in this pool
+     * @throws ClassFormatError if the entry at {@code cpi} is not a field
+     */
+    RiField lookupField(int cpi, int opcode);
+
+    /**
+     * Looks up a reference to a method. If {@code opcode} is non-negative, then resolution checks
+     * specific to the JVM instruction it denotes are performed if the method is already resolved.
+     * Should any of these checks fail, an {@linkplain RiMethod#isResolved() unresolved}
+     * method reference is returned.
+     *
+     * @param cpi the constant pool index
+     * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1}
+     * @return a reference to the method at {@code cpi} in this pool
+     * @throws ClassFormatError if the entry at {@code cpi} is not a method
+     */
+    RiMethod lookupMethod(int cpi, int opcode);
+
+    /**
+     * Looks up a reference to a type. If {@code opcode} is non-negative, then resolution checks
+     * specific to the JVM instruction it denotes are performed if the type is already resolved.
+     * Should any of these checks fail, an {@linkplain RiType#isResolved() unresolved}
+     * type reference is returned.
+     *
+     * @param cpi the constant pool index
+     * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1}
+     * @return a reference to the compiler interface type
+     */
+    RiType lookupType(int cpi, int opcode);
+
+    /**
+     * Looks up a method signature.
+     *
+     * @param cpi the constant pool index
+     * @return the method signature at index {@code cpi} in this constant pool
+     */
+    RiSignature lookupSignature(int cpi);
+
+    /**
+     * Looks up a constant at the specified index.
+     * @param cpi the constant pool index
+     * @return the {@code CiConstant} instance representing the constant
+     */
+    Object lookupConstant(int cpi);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiDeoptReason.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2012, 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;
+
+
+public enum RiDeoptReason {
+    None,
+    NullCheckException,
+    BoundsCheckException,
+    ClassCastException,
+    ArrayStoreException,
+    UnreachedCode,
+    TypeCheckedInliningViolated,
+    OptimizedTypeCheckViolated,
+    NotCompiledExceptionHandler,
+    Unresolved,
+    JavaSubroutineMismatch,
+    ArithmeticException,
+    RuntimeConstraint;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiExceptionHandler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,67 @@
+/*
+ * 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;
+
+/**
+ * Represents an exception handler within the bytecode.
+ */
+public interface RiExceptionHandler {
+
+    /**
+     * Gets the start bytecode index of the protected range of this handler.
+     * @return the start bytecode index
+     */
+    int startBCI();
+
+    /**
+     * Gets the end bytecode index of the protected range of this handler.
+     * @return the end bytecode index
+     */
+    int endBCI();
+
+    /**
+     * Gets the bytecode index of the handler block of this handler.
+     * @return the handler block bytecode index
+     */
+    int handlerBCI();
+
+    /**
+     * Gets the index into the constant pool representing the type of exception
+     * caught by this handler.
+     * @return the constant pool index of the catch type
+     */
+    int catchTypeCPI();
+
+    /**
+     * Checks whether this handler catches all exceptions.
+     * @return {@code true} if this handler catches all exceptions
+     */
+    boolean isCatchAll();
+
+    /**
+     * The type of exception caught by this exception handler.
+     *
+     * @return the exception type
+     */
+    RiType catchType();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiExceptionSeen.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, 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;
+
+
+/**
+ * Represents the three possibilities that an exception was seen at a specific BCI.
+ */
+public enum RiExceptionSeen {
+    TRUE,
+    FALSE,
+    NOT_SUPPORTED;
+
+    public static RiExceptionSeen get(boolean value) {
+        return value ? TRUE : FALSE;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiField.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,56 @@
+/*
+ * 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;
+
+/**
+ * Represents a reference to a field, including both resolved and unresolved fields. Fields, like methods and types, are
+ * resolved through {@link RiConstantPool constant pools}, and their actual implementation is provided by the
+ * {@link RiRuntime runtime} to the compiler.
+ */
+public interface RiField {
+    /**
+     * Gets the name of this field as a string.
+     * @return the name of this field
+     */
+    String name();
+
+    /**
+     * Gets the type of this field as a compiler-runtime interface type.
+     * @return the type of this field
+     */
+    RiType type();
+
+    /**
+     * Gets the kind of this field.
+     * @param architecture When true, the architecture-specific kind used for emitting machine code is returned.
+     *        When false, the kind according to the Java specification is returned.
+     * @return the kind
+     */
+    RiKind kind(boolean architecture);
+
+    /**
+     * Gets the holder of this field as a compiler-runtime interface type.
+     * @return the holder of this field
+     */
+    RiType holder();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiKind.java	Thu Jun 07 18:24:06 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.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 RiConstant readUnsafeConstant(Object value, long displacement) {
+        assert value != null;
+        Unsafe u = Unsafe.getUnsafe();
+        switch(this) {
+            case Boolean:
+                return RiConstant.forBoolean(u.getBoolean(value, displacement));
+            case Byte:
+                return RiConstant.forByte(u.getByte(value, displacement));
+            case Char:
+                return RiConstant.forChar(u.getChar(value, displacement));
+            case Short:
+                return RiConstant.forShort(u.getShort(value, displacement));
+            case Int:
+                return RiConstant.forInt(u.getInt(value, displacement));
+            case Long:
+                return RiConstant.forLong(u.getLong(value, displacement));
+            case Float:
+                return RiConstant.forFloat(u.getFloat(value, displacement));
+            case Double:
+                return RiConstant.forDouble(u.getDouble(value, displacement));
+            case Object:
+                return RiConstant.forObject(u.getObject(value, displacement));
+            default:
+                assert false : "unexpected kind: " + this;
+                return null;
+        }
+    }
+
+    public long minValue() {
+        switch (this) {
+            case Boolean:
+                return 0;
+            case Byte:
+                return java.lang.Byte.MIN_VALUE;
+            case Char:
+                return java.lang.Character.MIN_VALUE;
+            case Short:
+                return java.lang.Short.MIN_VALUE;
+            case Jsr:
+            case Int:
+                return java.lang.Integer.MIN_VALUE;
+            case Long:
+                return java.lang.Long.MIN_VALUE;
+            default:
+                throw new IllegalArgumentException("illegal call to minValue on " + this);
+        }
+    }
+
+    public long maxValue() {
+        switch (this) {
+            case Boolean:
+                return 1;
+            case Byte:
+                return java.lang.Byte.MAX_VALUE;
+            case Char:
+                return java.lang.Character.MAX_VALUE;
+            case Short:
+                return java.lang.Short.MAX_VALUE;
+            case Jsr:
+            case Int:
+                return java.lang.Integer.MAX_VALUE;
+            case Long:
+                return java.lang.Long.MAX_VALUE;
+            default:
+                throw new IllegalArgumentException("illegal call to maxValue on " + this);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiMethod.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,49 @@
+/*
+ * 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;
+
+/**
+ * Represents resolved and unresolved methods. Methods, like fields and types, are resolved through
+ * {@link RiConstantPool constant pools}, and their actual implementation is provided by the {@link RiRuntime runtime}
+ * to the compiler.
+ */
+public interface RiMethod {
+
+    /**
+     * Gets the name of the method as a string.
+     * @return the name of the method
+     */
+    String name();
+
+    /**
+     * Gets the type in which this method is declared.
+     * @return the type in which this method is declared
+     */
+    RiType holder();
+
+    /**
+     * Gets the signature of the method.
+     * @return the signature of the method
+     */
+    RiSignature signature();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiProfilingInfo.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2012, 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;
+
+/**
+ * Provides access to the profiling information of one specific method.
+ * Every accessor method returns the information that is available at the time of invocation.
+ * If a method is invoked multiple times, it may return significantly different results for every invocation
+ * as the profiling information may be changed by other Java threads at any time.
+ */
+public interface RiProfilingInfo {
+
+    /**
+     * Gets the length of the code associated with this profile.
+     */
+    int codeSize();
+
+    /**
+     * Returns an estimate of how often the branch at the given byte code was taken.
+     * @return The estimated probability, with 0.0 meaning never and 1.0 meaning always, or -1 if this information is not available.
+     */
+    double getBranchTakenProbability(int bci);
+
+    /**
+     * Returns an estimate of how often the switch cases are taken at the given BCI.
+     * The default case is stored as the last entry.
+     * @return A double value that contains the estimated probabilities, with 0.0 meaning never and 1.0 meaning always,
+     * or -1 if this information is not available.
+     */
+    double[] getSwitchProbabilities(int bci);
+
+    /**
+     * Returns the TypeProfile for the given BCI.
+     * @return Returns an RiTypeProfile object, or null if not available.
+     */
+    RiTypeProfile getTypeProfile(int bci);
+
+    /**
+     * Returns information if the given BCI did ever throw an exception.
+     * @return {@link RiExceptionSeen#TRUE} if the instruction has thrown an exception at least once,
+     * {@link RiExceptionSeen#FALSE} if it never threw an exception, and {@link RiExceptionSeen#NOT_SUPPORTED}
+     * if this information was not recorded.
+     */
+    RiExceptionSeen getExceptionSeen(int bci);
+
+    /**
+     * Returns an estimate how often the current BCI was executed. Avoid comparing execution counts to each other,
+     * as the returned value highly depends on the time of invocation.
+     * @return the estimated execution count or -1 if not available.
+     */
+    int getExecutionCount(int bci);
+
+    /**
+     * Returns how frequently a method was deoptimized for the given deoptimization reason. This only indicates how
+     * often the method did fall back to the interpreter for the execution and does not indicate how often it was recompiled.
+     * @param reason the reason for which the number of deoptimizations should be queried
+     * @return the number of times the compiled method deoptimized for the given reason.
+     */
+    int getDeoptimizationCount(RiDeoptReason reason);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiResolvedField.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,63 @@
+/*
+ * 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 java.lang.annotation.*;
+import java.lang.reflect.*;
+
+/**
+ * Represents a reference to a resolved field. Fields, like methods and types, are
+ * resolved through {@link RiConstantPool constant pools}, and their actual implementation is provided by the
+ * {@link RiRuntime runtime} to the compiler.
+ */
+public interface RiResolvedField extends RiField {
+
+    /**
+     * Gets the access flags for this field. Only the flags specified in the JVM specification
+     * will be included in the returned mask. The utility methods in the {@link Modifier} class
+     * should be used to query the returned mask for the presence/absence of individual flags.
+     * @return the mask of JVM defined field access flags defined for this field
+     */
+    int accessFlags();
+
+    /**
+     * Gets the constant value of this field if available.
+     * @param receiver object from which this field's value is to be read. This value is ignored if this field is static.
+     * @return the constant value of this field or {@code null} if the constant value is not available
+     */
+    RiConstant constantValue(RiConstant receiver);
+
+    /**
+     * Gets the holder of this field as a compiler-runtime interface type.
+     * @return the holder of this field
+     */
+    RiResolvedType holder();
+
+    /**
+     * Returns this field's annotation of a specified type.
+     *
+     * @param annotationClass the Class object corresponding to the annotation type
+     * @return the annotation of type {@code annotationClass} for this field if present, else null
+     */
+    <T extends Annotation> T getAnnotation(Class<T> annotationClass);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiResolvedMethod.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,224 @@
+/*
+ * 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 java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+/**
+ * Represents resolved methods. Methods, like fields and types, are resolved through
+ * {@link RiConstantPool constant pools}, and their actual implementation is provided by the {@link RiRuntime runtime}
+ * to the compiler.
+ */
+public interface RiResolvedMethod extends RiMethod {
+
+    /**
+     * Gets the bytecode of the method, if the method {@linkplain #isResolved()} and has code.
+     * The returned byte array does not contain breakpoints or non-Java bytecodes.
+     * @return the bytecode of the method or {@code null} if none is available
+     */
+    byte[] code();
+
+    /**
+     * Gets the size of the bytecode of the method, if the method {@linkplain #isResolved()} and has code.
+     * @return the size of the bytecode in bytes, or 0 if no bytecode is available
+     */
+    int codeSize();
+
+    /**
+     * Gets the size of the compiled machine code.
+     * @return the size of the compiled machine code in bytes, or 0 if no compiled code exists.
+     */
+    int compiledCodeSize();
+
+    /**
+     * Gets an estimate how complex it is to compile this method.
+     * @return A value >= 0, where higher means more complex.
+     */
+    int compilationComplexity();
+
+    /**
+     * Gets the symbol used to link this method if it is native, otherwise {@code null}.
+     */
+    String jniSymbol();
+
+    /**
+     * Gets the type in which this method is declared.
+     * @return the type in which this method is declared
+     */
+    RiResolvedType holder();
+
+    /**
+     * Gets the maximum number of locals used in this method's bytecode.
+     * @return the maximum number of locals
+     */
+    int maxLocals();
+
+    /**
+     * Gets the maximum number of stack slots used in this method's bytecode.
+     * @return the maximum number of stack slots
+     */
+    int maxStackSize();
+
+    /**
+     * Checks whether this method has balanced monitor operations.
+     * @return {@code true} if the method has balanced monitor operations
+     */
+    boolean hasBalancedMonitors();
+
+    /**
+     * Gets the access flags for this method. Only the flags specified in the JVM specification
+     * will be included in the returned mask. The utility methods in the {@link Modifier} class
+     * should be used to query the returned mask for the presence/absence of individual flags.
+     * @return the mask of JVM defined method access flags defined for this method
+     */
+    int accessFlags();
+
+    /**
+     * Checks whether this method is a leaf method.
+     * @return {@code true} if the method is a leaf method (that is, is final or private)
+     */
+    boolean isLeafMethod();
+
+    /**
+     * Checks whether this method is a class initializer.
+     * @return {@code true} if the method is a class initializer
+     */
+    boolean isClassInitializer();
+
+    /**
+     * Checks whether this method is a constructor.
+     * @return {@code true} if the method is a constructor
+     */
+    boolean isConstructor();
+
+    /**
+     * Checks whether this method has been overridden. Decisions made based
+     * on a method being overridden must be registered as dependencies.
+     * @return {@code true} if the method has been overridden
+     */
+    boolean isOverridden();
+
+    /**
+     * Checks whether the compiler can insert safepoint polls in this method.
+     * @return {@code true} if the method cannot have safepoint polls inserted
+     */
+    boolean noSafepointPolls();
+
+    /**
+     * Gets a map from bytecode indexes to bit maps denoting the live locals at that position.
+     * If a non-null array is return, its length is guaranteed to be equal to {@code code().length}.
+     *
+     * @return the liveness map if it is available; {@code null} otherwise
+     */
+    RiBitMap[] livenessMap();
+
+    /**
+     * Checks whether this method can be statically bound (that is, it is final or private or static).
+     * @return {@code true} if this method can be statically bound
+     */
+    boolean canBeStaticallyBound();
+
+    /**
+     * Gets the list of exception handlers for this method.
+     * @return the list of exception handlers
+     */
+    RiExceptionHandler[] exceptionHandlers();
+
+    /**
+     * Gets a stack trace element for this method and a given bytecode index.
+     */
+    StackTraceElement toStackTraceElement(int bci);
+
+    /**
+     * Temporary work-around to support the @ACCESSOR Maxine annotation.
+     * Non-Maxine VMs should just return {@code null}.
+     */
+    RiResolvedType accessor();
+
+    /**
+     * Gets the intrinsic id of this method.
+     */
+    String intrinsic();
+
+    /**
+     * Provides an estimate of how often this method has been executed.
+     * @return The number of invocations, or -1 if this information isn't available.
+     */
+    int invocationCount();
+
+    /**
+     * Returns an object that provides access to the method's profiling information.
+     * @return The profiling information recorded for this method.
+     */
+    RiProfilingInfo profilingInfo();
+
+    /**
+     * Returns a map that the compiler can use to store objects that should survive the current compilation.
+     */
+    Map<Object, Object> compilerStorage();
+
+    /**
+     * Returns a pointer to the method's constant pool.
+     * @return the constant pool
+     */
+    RiConstantPool getConstantPool();
+
+    /**
+     * Returns this method's annotation of a specified type.
+     *
+     * @param annotationClass the Class object corresponding to the annotation type
+     * @return the annotation of type {@code annotationClass} for this method if present, else null
+     */
+    <T extends Annotation> T getAnnotation(Class<T> annotationClass);
+
+    /**
+     * Returns an array of arrays that represent the annotations on the formal
+     * parameters, in declaration order, of this method.
+     *
+     * @see Method#getParameterAnnotations()
+     * @see CiUtil#getParameterAnnotation(int, RiResolvedMethod)
+     */
+    Annotation[][] getParameterAnnotations();
+
+    /**
+     * Returns an array of {@link Type} objects that represent the formal
+     * parameter types, in declaration order, of this method.
+     *
+     * @see Method#getGenericParameterTypes()
+     */
+    Type[] getGenericParameterTypes();
+
+    /**
+     * Returns a {@link Type} object that represents the formal return type of this method.
+     *
+     * @see Method#getGenericReturnType()
+     */
+    Type getGenericReturnType();
+
+    /**
+     * @return {@code true} if this method can be inlined
+     */
+    boolean canBeInlined();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiResolvedType.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,188 @@
+/*
+ * 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 java.lang.annotation.*;
+import java.lang.reflect.*;
+
+/**
+ * Represents a resolved in the compiler-runtime interface. Types include primitives, objects, {@code void},
+ * and arrays thereof. Types, like fields and methods, are resolved through {@link RiConstantPool constant pools}, and
+ * their actual implementation is provided by the {@link RiRuntime runtime} to the compiler.
+ */
+public interface RiResolvedType extends RiType {
+
+    /**
+     * Gets the encoding of (that is, a constant representing the value of) the specified part of this type.
+     * @param r the part of the this type
+     * @return a constant representing a reference to the specified part of this type
+     */
+    RiConstant getEncoding(Representation r);
+
+    /**
+     * Checks whether this type has any subclasses so far. Any decisions
+     * based on this information require the registration of a dependency, since
+     * this information may change.
+     * @return {@code true} if this class has subclasses
+     */
+    boolean hasSubclass();
+
+    /**
+     * Checks whether this type has a finalizer method.
+     * @return {@code true} if this class has a finalizer
+     */
+    boolean hasFinalizer();
+
+    /**
+     * Checks whether this type has any finalizable subclasses so far. Any decisions
+     * based on this information require the registration of a dependency, since
+     * this information may change.
+     * @return {@code true} if this class has any subclasses with finalizers
+     */
+    boolean hasFinalizableSubclass();
+
+    /**
+     * Checks whether this type is an interface.
+     * @return {@code true} if this type is an interface
+     */
+    boolean isInterface();
+
+    /**
+     * Checks whether this type is an instance class.
+     * @return {@code true} if this type is an instance class
+     */
+    boolean isInstanceClass();
+
+    /**
+     * Checks whether this type is an array class.
+     * @return {@code true} if this type is an array class
+     */
+    boolean isArrayClass();
+
+    /**
+     * Gets the access flags for this type. Only the flags specified in the JVM specification
+     * will be included in the returned mask. The utility methods in the {@link Modifier} class
+     * should be used to query the returned mask for the presence/absence of individual flags.
+     * @return the mask of JVM defined class access flags defined for this type
+     */
+    int accessFlags();
+
+    /**
+     * Checks whether this type is initialized.
+     * @return {@code true} if this type is initialized
+     */
+    boolean isInitialized();
+
+    /**
+     * Checks whether this type is a subtype of another type.
+     * @param other the type to test
+     * @return {@code true} if this type a subtype of the specified type
+     */
+    boolean isSubtypeOf(RiResolvedType other);
+
+    /**
+     * Checks whether the specified object is an instance of this type.
+     * @param obj the object to test
+     * @return {@code true} if the object is an instance of this type
+     */
+    boolean isInstance(RiConstant obj);
+
+    /**
+     * Attempts to get an exact type for this type. Final classes,
+     * arrays of final classes, and primitive types all have exact types.
+     * @return the exact type of this type, if it exists; {@code null} otherwise
+     */
+    RiResolvedType exactType();
+
+    /**
+     * Gets the super type of this type or {@code null} if no such type exists.
+     */
+    RiResolvedType superType();
+
+    /**
+     * Walks the class hierarchy upwards and returns the least common type that is a super type of both
+     * the current and the given type.
+     * @return the least common type that is a super type of both the current and the given type, or null if primitive types are involved.
+     */
+    RiResolvedType leastCommonAncestor(RiResolvedType otherType);
+
+    /**
+     * Attempts to get the unique concrete subtype of this type.
+     * @return the exact type of this type, if it exists; {@code null} otherwise
+     */
+    RiResolvedType uniqueConcreteSubtype();
+
+    /**
+     * For array types, gets the type of the components.
+     * @return the component type of this array type
+     */
+    RiResolvedType componentType();
+
+    /**
+     * Gets the type representing an array with elements of this type.
+     * @return a new compiler interface type representing an array of this type
+     */
+    RiResolvedType arrayOf();
+
+    /**
+     * Resolves the method implementation for virtual dispatches on objects
+     * of this dynamic type.
+     * @param method the method to select the implementation of
+     * @return the method implementation that would be selected at runtime
+     */
+    RiResolvedMethod resolveMethodImpl(RiResolvedMethod method);
+
+    /**
+     * Given an RiMethod a, returns a concrete RiMethod b that is the only possible
+     * unique target for a virtual call on a(). Returns {@code null} if either no
+     * such concrete method or more than one such method exists. Returns the method a
+     * if a is a concrete method that is not overridden. If the compiler uses the
+     * result of this method for its compilation, it must register an assumption
+     * (see {@link CiAssumptions}), because dynamic class loading can invalidate
+     * the result of this method.
+     * @param method the method a for which a unique concrete target is searched
+     * @return the unique concrete target or {@code null} if no such target exists
+     *         or assumptions are not supported by this runtime
+     */
+    RiResolvedMethod uniqueConcreteMethod(RiResolvedMethod method);
+
+    /**
+     * Returns the instance fields declared in this class sorted by field offset.
+     * @return an array of instance fields
+     */
+    RiResolvedField[] declaredFields();
+
+    /**
+     * Returns this type's annotation of a specified type.
+     *
+     * @param annotationClass the Class object corresponding to the annotation type
+     * @return the annotation of type {@code annotationClass} for this type if present, else null
+     */
+    <T extends Annotation> T getAnnotation(Class<T> annotationClass);
+
+    /**
+     * Returns the java.lang.Class object representing this RiType instance or {@code null} if none exists.
+     * @return the java.lang.Class object
+     */
+    Class<?> toJava();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiSignature.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,93 @@
+/*
+ * 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;
+
+/**
+ * Represents a method signature provided by the runtime.
+ *
+ * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#7035">Method Descriptors</a>
+ */
+public interface RiSignature {
+    /**
+     * Gets the number of arguments in this signature, adding 1 for a receiver if requested.
+     *
+     * @param receiver true if 1 is to be added to the result for a receiver
+     * @return the number of arguments + 1 iff {@code receiver == true}
+     */
+    int argumentCount(boolean receiver);
+
+    /**
+     * Gets the argument type at the specified position. This method will return a
+     * {@linkplain RiType#isResolved() resolved} type if possible but without
+     * triggering any class loading or resolution.
+     *
+     * @param index the index into the parameters, with {@code 0} indicating the first parameter
+     * @param accessingClass the context of the type lookup. If accessing class is resolved, its class loader
+     *        is used to retrieve an existing resolved type. This value can be {@code null} if the caller does
+     *        not care for a resolved type.
+     * @return the {@code index}'th argument type
+     */
+    RiType argumentTypeAt(int index, RiResolvedType accessingClass);
+
+    /**
+     * Gets the argument kind at the specified position.
+     * @param index the index into the parameters, with {@code 0} indicating the first parameter
+     * @param architecture When true, the architecture-specific kind used for emitting machine code is returned.
+     *        When false, the kind according to the Java specification is returned.
+     * @return the kind of the argument at the specified position
+     */
+    RiKind argumentKindAt(int index, boolean architecture);
+
+    /**
+     * Gets the return type of this signature. This method will return a
+     * {@linkplain RiResolvedType resolved} type if possible but without
+     * triggering any class loading or resolution.
+     *
+     * @param accessingClass the context of the type lookup. If accessing class is resolved, its class loader
+     *        is used to retrieve an existing resolved type. This value can be {@code null} if the caller does
+     *        not care for a resolved type.
+     * @return the compiler interface type representing the return type
+     */
+    RiType returnType(RiType accessingClass);
+
+    /**
+     * Gets the return kind of this signature.
+     * @param architectureSpecific When true, the architecture-specific kind used for emitting machine code is returned.
+     *        When false, the kind according to the Java specification is returned.
+     * @return the return kind
+     */
+    RiKind returnKind(boolean architectureSpecific);
+
+    /**
+     * Converts this signature to a string.
+     * @return the signature as a string
+     */
+    String asString();
+
+    /**
+     * Gets the size, in Java slots, of the arguments to this signature.
+     * @param withReceiver {@code true} if to add a slot for a receiver object; {@code false} not to include the receiver
+     * @return the size of the arguments in slots
+     */
+    int argumentSlots(boolean withReceiver);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiType.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,94 @@
+/*
+ * 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;
+
+/**
+ * Represents a resolved or unresolved type in the compiler-runtime interface. Types include primitives, objects, {@code void},
+ * and arrays thereof.
+ */
+public interface RiType {
+
+    /**
+     * Represents each of the several different parts of the runtime representation of
+     * a type which compiled code may need to reference individually. These may or may not be
+     * different objects or data structures, depending on the runtime system.
+     */
+    public enum Representation {
+        /**
+         * The runtime representation of the data structure containing the static fields of this type.
+         */
+        StaticFields,
+
+        /**
+         * The runtime representation of the Java class object of this type.
+         */
+        JavaClass,
+
+        /**
+         * The runtime representation of the "hub" of this type--that is, the closest part of the type
+         * representation which is typically stored in the object header.
+         */
+        ObjectHub
+    }
+
+    /**
+     * Gets the name of this type in internal form. The following are examples of strings returned by this method:
+     * <pre>
+     *     "Ljava/lang/Object;"
+     *     "I"
+     *     "[[B"
+     * </pre>
+     *
+     * @return the name of this type in internal form
+     */
+    String name();
+
+    /**
+     * For array types, gets the type of the components.
+     * @return the component type of this array type
+     */
+    RiType componentType();
+
+    /**
+     * Gets the type representing an array with elements of this type.
+     * @return a new compiler interface type representing an array of this type
+     */
+    RiType arrayOf();
+
+    /**
+     * Gets the kind of this compiler interface type.
+     * @param architecture When true, the architecture-specific kind used for emitting machine code is returned.
+     *        When false, the kind according to the Java specification is returned.
+     * @return the kind
+     */
+    RiKind kind(boolean architecture);
+
+    /**
+     * Gets the kind used to represent the specified part of this type.
+     * @param r the part of the this type
+     * @return the kind of constants for the specified part of the type
+     */
+    RiKind getRepresentationKind(Representation r);
+
+    RiResolvedType resolve(RiResolvedType accessingClass);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiTypeProfile.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 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 java.io.*;
+
+/**
+ * This profile object represents the type profile at a specific BCI. The precision of the supplied values may vary,
+ * but a runtime that provides this information should be aware that it will be used to guide performance-critical
+ * decisions like speculative inlining, etc.
+ */
+public final class RiTypeProfile implements Serializable {
+
+    private static final long serialVersionUID = -6877016333706838441L;
+
+    /**
+     * A profiled type that has a probability. Profiled types are naturally sorted in
+     * descending order of their probabilities.
+     */
+    public static class ProfiledType implements Comparable<ProfiledType>, Serializable {
+        private static final long serialVersionUID = 7838575753661305744L;
+        public final RiResolvedType type;
+        public final double probability;
+
+        public ProfiledType(RiResolvedType type, double probability) {
+            assert type != null;
+            assert probability >= 0.0D && probability <= 1.0D;
+            this.type = type;
+            this.probability = probability;
+        }
+
+        @Override
+        public int compareTo(ProfiledType o) {
+            if (probability > o.probability) {
+                return -1;
+            } else if (probability < o.probability) {
+                return 1;
+            }
+            return 0;
+        }
+    }
+
+    private final double notRecordedProbability;
+    private final ProfiledType[] ptypes;
+
+    /**
+     * Determines if an array of profiled types are sorted in descending order of their probabilities.
+     */
+    public static boolean isSorted(ProfiledType[] ptypes) {
+        for (int i = 1; i < ptypes.length; i++) {
+            if (ptypes[i - 1].probability < ptypes[i].probability) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public RiTypeProfile(double notRecordedProbability, ProfiledType... ptypes) {
+        this.ptypes = ptypes;
+        this.notRecordedProbability = notRecordedProbability;
+        assert isSorted(ptypes);
+    }
+
+    /**
+     * Returns the estimated probability of all types that could not be recorded due to profiling limitations.
+     * @return double value >= 0.0 and <= 1.0
+     */
+    public double getNotRecordedProbability() {
+        return notRecordedProbability;
+    }
+
+    /**
+     * A list of types for which the runtime has recorded probability information.
+     */
+    public ProfiledType[] getTypes() {
+        return ptypes;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiUtil.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2012, 2012, 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;
+
+
+public class RiUtil {
+
+
+
+    /**
+     * Extends the functionality of {@link Class#getSimpleName()} to include a non-empty string for anonymous and local
+     * classes.
+     *
+     * @param clazz the class for which the simple name is being requested
+     * @param withEnclosingClass specifies if the returned name should be qualified with the name(s) of the enclosing
+     *            class/classes of {@code clazz} (if any). This option is ignored if {@code clazz} denotes an anonymous
+     *            or local class.
+     * @return the simple name
+     */
+    public static String getSimpleName(Class< ? > clazz, boolean withEnclosingClass) {
+        final String simpleName = clazz.getSimpleName();
+        if (simpleName.length() != 0) {
+            if (withEnclosingClass) {
+                String prefix = "";
+                Class< ? > enclosingClass = clazz;
+                while ((enclosingClass = enclosingClass.getEnclosingClass()) != null) {
+                    prefix = prefix + enclosingClass.getSimpleName() + ".";
+                }
+                return prefix + simpleName;
+            }
+            return simpleName;
+        }
+        // Must be an anonymous or local class
+        final String name = clazz.getName();
+        int index = name.indexOf('$');
+        if (index == -1) {
+            return name;
+        }
+        index = name.lastIndexOf('.', index);
+        if (index == -1) {
+            return name;
+        }
+        return name.substring(index + 1);
+    }
+
+
+    /**
+     * Converts a given type to its Java programming language name. The following are examples of strings returned by
+     * this method:
+     *
+     * <pre>
+     *     qualified == true:
+     *         java.lang.Object
+     *         int
+     *         boolean[][]
+     *     qualified == false:
+     *         Object
+     *         int
+     *         boolean[][]
+     * </pre>
+     *
+     * @param riType the type to be converted to a Java name
+     * @param qualified specifies if the package prefix of the type should be included in the returned name
+     * @return the Java name corresponding to {@code riType}
+     */
+    public static String toJavaName(RiType riType, boolean qualified) {
+        RiKind kind = riType.kind(false);
+        if (kind.isPrimitive() || kind == RiKind.Void) {
+            return kind.javaName;
+        }
+        return internalNameToJava(riType.name(), qualified);
+    }
+
+    /**
+     * Converts a given type to its Java programming language name. The following are examples of strings returned by
+     * this method:
+     *
+     * <pre>
+     *      java.lang.Object
+     *      int
+     *      boolean[][]
+     * </pre>
+     *
+     * @param riType the type to be converted to a Java name
+     * @return the Java name corresponding to {@code riType}
+     */
+    public static String toJavaName(RiType riType) {
+        return (riType == null) ? null : internalNameToJava(riType.name(), true);
+    }
+
+    public static String internalNameToJava(String name, boolean qualified) {
+        switch (name.charAt(0)) {
+            case 'L': {
+                String result = name.substring(1, name.length() - 1).replace('/', '.');
+                if (!qualified) {
+                    final int lastDot = result.lastIndexOf('.');
+                    if (lastDot != -1) {
+                        result = result.substring(lastDot + 1);
+                    }
+                }
+                return result;
+
+            }
+            case '[':
+                return internalNameToJava(name.substring(1), qualified) + "[]";
+            default:
+                if (name.length() != 1) {
+                    throw new IllegalArgumentException("Illegal internal name: " + name);
+                }
+                return RiKind.fromPrimitiveOrVoidTypeChar(name.charAt(0)).javaName;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiValue.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2009, 2012, 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 java.io.*;
+
+/**
+ * Abstract base class for values manipulated by the compiler. All values have a {@linkplain RiKind kind} and are immutable.
+ */
+public abstract class RiValue implements Serializable {
+    private static final long serialVersionUID = -6909397188697766469L;
+
+    @SuppressWarnings("serial")
+    public static RiValue IllegalValue = new RiValue(RiKind.Illegal) {
+        @Override
+        public String toString() {
+            return "-";
+        }
+    };
+
+    /**
+     * The kind of this value.
+     */
+    public final RiKind kind;
+
+    /**
+     * Initializes a new value of the specified kind.
+     * @param kind the kind
+     */
+    protected RiValue(RiKind kind) {
+        this.kind = kind;
+    }
+
+    /**
+     * String representation of the kind, which should be the end of all {@link #toString()} implementation of subclasses.
+     */
+    protected final String kindSuffix() {
+        return "|" + kind.typeChar;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/package-info.java	Thu Jun 07 18:24:06 2012 +0200
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+/**
+ * The runtime-provided part of the bi-directional interface between the compiler and the runtime system of a virtual machine for the
+ * instruction set defined in {@link com.oracle.graal.compiler.graphbuilder.Bytecodes}.
+ * <p>
+ * Unlike the {@link com.oracle.max.cri.ci compiler-provided interface}, the runtime-provided interface is specified largely
+ * using interfaces, that must be implemented by classes provided by a specific runtime implementation.
+ * <p>
+ * {@link com.oracle.max.cri.ri.RiRuntime} encapsulates the main functionality of the runtime for the compiler.
+ * <p>
+ * Types (i.e., primitives, classes and interfaces}, fields and methods are represented by {@link com.oracle.graal.api.meta.RiType},
+ * {@link com.oracle.graal.api.meta.RiField} and {@link com.oracle.graal.api.meta.RiMethod}, respectively, with additional support from
+ * {@link com.oracle.graal.api.meta.RiSignature} and {@link com.oracle.graal.api.meta.RiExceptionHandler}. Access to the runtime constant pool
+ * is through {@link com.oracle.graal.api.meta.RiConstantPool}.
+ */
+package com.oracle.graal.api.meta;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,6 +27,7 @@
 import java.util.concurrent.*;
 
 import com.oracle.graal.alloc.simple.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.alloc.*;
 import com.oracle.graal.compiler.gen.*;
 import com.oracle.graal.compiler.phases.*;
@@ -41,7 +42,6 @@
 import com.oracle.graal.lir.cfg.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.*;
 
 public class GraalCompiler {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/OptimisticOptimizations.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/OptimisticOptimizations.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,9 +24,9 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
 
 
@@ -49,16 +49,16 @@
         this.enabledOpts = EnumSet.noneOf(Optimization.class);
 
         RiProfilingInfo profilingInfo = method.profilingInfo();
-        if (checkDeoptimizations(profilingInfo, CiDeoptReason.UnreachedCode)) {
+        if (checkDeoptimizations(profilingInfo, RiDeoptReason.UnreachedCode)) {
             enabledOpts.add(Optimization.RemoveNeverExecutedCode);
         }
-        if (checkDeoptimizations(profilingInfo, CiDeoptReason.TypeCheckedInliningViolated)) {
+        if (checkDeoptimizations(profilingInfo, RiDeoptReason.TypeCheckedInliningViolated)) {
             enabledOpts.add(Optimization.UseTypeCheckedInlining);
         }
-        if (checkDeoptimizations(profilingInfo, CiDeoptReason.OptimizedTypeCheckViolated)) {
+        if (checkDeoptimizations(profilingInfo, RiDeoptReason.OptimizedTypeCheckViolated)) {
             enabledOpts.add(Optimization.UseTypeCheckHints);
         }
-        if (checkDeoptimizations(profilingInfo, CiDeoptReason.NotCompiledExceptionHandler)) {
+        if (checkDeoptimizations(profilingInfo, RiDeoptReason.NotCompiledExceptionHandler)) {
             enabledOpts.add(Optimization.UseExceptionProbability);
         }
     }
@@ -111,7 +111,7 @@
         return false;
     }
 
-    private static boolean checkDeoptimizations(RiProfilingInfo profilingInfo, CiDeoptReason reason) {
+    private static boolean checkDeoptimizations(RiProfilingInfo profilingInfo, RiDeoptReason reason) {
         return profilingInfo.getDeoptimizationCount(reason) < GraalOptions.DeoptsToDisableOptimisticOptimization;
     }
 }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,8 +27,8 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.util.*;
 import com.oracle.graal.graph.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,8 +29,8 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.alloc.Interval.RegisterBinding;
 import com.oracle.graal.compiler.alloc.Interval.RegisterPriority;
@@ -1651,7 +1651,7 @@
         return new IntervalWalker(this, oopIntervals, nonOopIntervals);
     }
 
-    void computeOopMap(IntervalWalker iw, LIRInstruction op, CiBitMap registerRefMap, CiBitMap frameRefMap) {
+    void computeOopMap(IntervalWalker iw, LIRInstruction op, RiBitMap registerRefMap, RiBitMap frameRefMap) {
         if (GraalOptions.TraceLinearScanLevel >= 3) {
             TTY.println("creating oop map at opId %d", op.id());
         }
@@ -1711,8 +1711,8 @@
 
 
     private void computeDebugInfo(IntervalWalker iw, final LIRInstruction op, LIRDebugInfo info) {
-        CiBitMap registerRefMap = op.hasCall() ? null : frameMap.initRegisterRefMap();
-        CiBitMap frameRefMap = frameMap.initFrameRefMap();
+        RiBitMap registerRefMap = op.hasCall() ? null : frameMap.initRegisterRefMap();
+        RiBitMap frameRefMap = frameMap.initFrameRefMap();
         computeOopMap(iw, op, registerRefMap, frameRefMap);
 
         info.forEachState(new ValueProcedure() {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,8 +29,8 @@
 
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiRegister.RegisterFlag;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.alloc.Interval.RegisterBinding;
 import com.oracle.graal.compiler.alloc.Interval.RegisterPriority;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/MoveResolver.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/MoveResolver.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,8 +27,8 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.lir.*;
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,8 +27,8 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.util.*;
 import com.oracle.graal.graph.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,7 +26,7 @@
 import java.util.Map.Entry;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.gen.LIRGenerator.LockScope;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,13 +22,15 @@
  */
 package com.oracle.graal.compiler.gen;
 
+import static com.oracle.graal.api.meta.RiValue.*;
 import static com.oracle.graal.lir.ValueUtil.*;
 import static com.oracle.max.cri.ci.CiCallingConvention.Type.*;
-import static com.oracle.max.cri.ri.RiValue.*;
 
 import java.util.*;
 import java.util.Map.Entry;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiType.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.util.*;
 import com.oracle.graal.debug.*;
@@ -52,7 +54,6 @@
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiTargetMethod.Mark;
 import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiType.Representation;
 import com.oracle.max.cri.xir.CiXirAssembler.XirConstant;
 import com.oracle.max.cri.xir.CiXirAssembler.XirInstruction;
 import com.oracle.max.cri.xir.CiXirAssembler.XirMark;
@@ -685,7 +686,7 @@
     }
 
     @Override
-    public void emitGuardCheck(BooleanNode comp, CiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId) {
+    public void emitGuardCheck(BooleanNode comp, RiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId) {
         if (comp instanceof IsNullNode && negated) {
             emitNullCheckGuard(((IsNullNode) comp).object(), leafGraphId);
         } else if (comp instanceof ConstantNode && (comp.asConstant().asBoolean() != negated)) {
@@ -937,7 +938,7 @@
     }
 
 
-    protected abstract LabelRef createDeoptStub(CiDeoptAction action, CiDeoptReason reason, LIRDebugInfo info, Object deoptInfo);
+    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, RiValue... args) {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/PhiResolver.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/PhiResolver.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,12 @@
  */
 package com.oracle.graal.compiler.gen;
 
-import static com.oracle.max.cri.ri.RiValue.*;
+import static com.oracle.graal.api.meta.RiValue.*;
 import static com.oracle.graal.lir.ValueUtil.*;
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 
 /**
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BoxingEliminationPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BoxingEliminationPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,13 +26,13 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.iterators.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.type.*;
 import com.oracle.graal.nodes.virtual.*;
-import com.oracle.max.cri.ri.*;
 
 public class BoxingEliminationPhase extends Phase {
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CanonicalizerPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CanonicalizerPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.compiler.phases;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.Graph.InputChangedListener;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CheckCastEliminationPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CheckCastEliminationPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.graph.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
@@ -33,7 +34,6 @@
 import com.oracle.graal.nodes.java.*;
 import com.oracle.graal.nodes.type.*;
 import com.oracle.graal.nodes.util.*;
-import com.oracle.max.cri.ri.*;
 
 public class CheckCastEliminationPhase extends Phase {
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/IdentifyBoxingPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/IdentifyBoxingPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.lang.reflect.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.extended.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,6 +26,7 @@
 import java.util.*;
 import java.util.concurrent.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.PhasePlan.PhasePosition;
 import com.oracle.graal.compiler.util.*;
@@ -37,7 +38,6 @@
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 
 public class InliningPhase extends Phase implements InliningCallback {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/IntrinsificationPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/IntrinsificationPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.compiler.phases;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.util.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.debug.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LoweringPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LoweringPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.compiler.phases;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.debug.*;
@@ -51,16 +52,16 @@
 
         @Override
         public ValueNode createNullCheckGuard(ValueNode object, long leafGraphId) {
-            return createGuard(object.graph().unique(new IsNullNode(object)), CiDeoptReason.NullCheckException, CiDeoptAction.InvalidateReprofile, true, leafGraphId);
+            return createGuard(object.graph().unique(new IsNullNode(object)), RiDeoptReason.NullCheckException, CiDeoptAction.InvalidateReprofile, true, leafGraphId);
         }
 
         @Override
-        public ValueNode createGuard(BooleanNode condition, CiDeoptReason deoptReason, CiDeoptAction action, long leafGraphId) {
+        public ValueNode createGuard(BooleanNode condition, RiDeoptReason deoptReason, CiDeoptAction action, long leafGraphId) {
             return createGuard(condition, deoptReason, action, false, leafGraphId);
         }
 
         @Override
-        public ValueNode createGuard(BooleanNode condition, CiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId) {
+        public ValueNode createGuard(BooleanNode condition, RiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId) {
             // TODO (thomaswue): Document why this must not be called on floating nodes.
             throw new UnsupportedOperationException();
         }
@@ -149,7 +150,7 @@
             }
 
             @Override
-            public ValueNode createGuard(BooleanNode condition, CiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId) {
+            public ValueNode createGuard(BooleanNode condition, RiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId) {
                 FixedNode guardAnchor = (FixedNode) getGuardAnchor();
                 if (GraalOptions.OptEliminateGuards) {
                     for (Node usage : condition.usages()) {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/SnippetIntrinsificationPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/SnippetIntrinsificationPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,6 +25,7 @@
 import java.lang.reflect.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.Node.ConstantNodeParameter;
 import com.oracle.graal.graph.Node.Fold;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/Backend.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/Backend.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.lang.reflect.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.gen.*;
 import com.oracle.graal.graph.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64DeoptimizationStub.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64DeoptimizationStub.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.amd64.*;
@@ -31,16 +32,15 @@
 import com.oracle.max.asm.*;
 import com.oracle.max.asm.target.amd64.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 public class AMD64DeoptimizationStub extends AMD64Code {
     public final Label label = new Label();
     public final LIRDebugInfo info;
     public final CiDeoptAction action;
-    public final CiDeoptReason reason;
+    public final RiDeoptReason reason;
     public final Object deoptInfo;
 
-    public AMD64DeoptimizationStub(CiDeoptAction action, CiDeoptReason reason, LIRDebugInfo info, Object deoptInfo) {
+    public AMD64DeoptimizationStub(CiDeoptAction action, RiDeoptReason reason, LIRDebugInfo info, Object deoptInfo) {
         this.action = action;
         this.reason = reason;
         this.info = info;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java	Thu Jun 07 18:24:06 2012 +0200
@@ -37,6 +37,7 @@
 import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.CiXirAssembler.XirMark;
 import com.oracle.max.cri.xir.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.gen.*;
 import com.oracle.graal.compiler.target.*;
 import com.oracle.graal.compiler.util.*;
@@ -519,7 +520,7 @@
 
 
     @Override
-    public void emitDeoptimizeOnOverflow(CiDeoptAction action, CiDeoptReason reason, Object deoptInfo) {
+    public void emitDeoptimizeOnOverflow(CiDeoptAction action, RiDeoptReason reason, Object deoptInfo) {
         LIRDebugInfo info = state();
         LabelRef stubEntry = createDeoptStub(action, reason, info, deoptInfo);
         append(new BranchOp(ConditionFlag.overflow, stubEntry, info));
@@ -527,7 +528,7 @@
 
 
     @Override
-    public void emitDeoptimize(CiDeoptAction action, CiDeoptReason reason, Object deoptInfo, long leafGraphId) {
+    public void emitDeoptimize(CiDeoptAction action, RiDeoptReason reason, Object deoptInfo, long leafGraphId) {
         LIRDebugInfo info = state(leafGraphId);
         LabelRef stubEntry = createDeoptStub(action, reason, info, deoptInfo);
         append(new JumpOp(stubEntry, info));
@@ -570,7 +571,7 @@
     }
 
     @Override
-    protected LabelRef createDeoptStub(CiDeoptAction action, CiDeoptReason reason, LIRDebugInfo info, Object deoptInfo) {
+    protected LabelRef createDeoptStub(CiDeoptAction action, RiDeoptReason reason, LIRDebugInfo info, Object deoptInfo) {
         assert info.topFrame.bci >= 0 : "invalid bci for deopt framestate";
         AMD64DeoptimizationStub stub = new AMD64DeoptimizationStub(action, reason, info, deoptInfo);
         lir.stubs.add(stub);
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirAssembler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirAssembler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,9 +26,9 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.asm.target.amd64.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.*;
 
 /**
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,13 @@
  */
 package com.oracle.graal.compiler.target.amd64;
 
+import static com.oracle.graal.api.meta.RiValue.*;
 import static com.oracle.max.cri.ci.CiCallingConvention.Type.*;
 import static com.oracle.max.cri.ci.CiValueUtil.*;
-import static com.oracle.max.cri.ri.RiValue.*;
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.amd64.*;
@@ -37,7 +38,6 @@
 import com.oracle.max.asm.target.amd64.AMD64Assembler.ConditionFlag;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiTargetMethod.Mark;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.*;
 import com.oracle.max.cri.xir.CiXirAssembler.RuntimeCallInformation;
 import com.oracle.max.cri.xir.CiXirAssembler.XirInstruction;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/NegateObjectTypeFeedback.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/NegateObjectTypeFeedback.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.compiler.types;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.spi.types.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/NegateScalarTypeFeedback.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/NegateScalarTypeFeedback.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.compiler.types;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.spi.types.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/TypeFeedbackCache.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/types/TypeFeedbackCache.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,6 +25,7 @@
 import java.util.*;
 import java.util.Map.Entry;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.types.*;
 import com.oracle.max.cri.ri.*;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,6 +26,8 @@
 import java.util.*;
 import java.util.concurrent.*;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiTypeProfile.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.cri.*;
@@ -39,8 +41,6 @@
 import com.oracle.graal.nodes.type.*;
 import com.oracle.graal.nodes.util.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiTypeProfile.ProfiledType;
 
 public class InliningUtil {
 
@@ -189,7 +189,7 @@
             ValueNode receiver = invoke.callTarget().receiver();
             ReadHubNode objectClass = graph.add(new ReadHubNode(receiver));
             IsTypeNode isTypeNode = graph.unique(new IsTypeNode(objectClass, type));
-            FixedGuardNode guard = graph.add(new FixedGuardNode(isTypeNode, CiDeoptReason.TypeCheckedInliningViolated, CiDeoptAction.InvalidateReprofile, invoke.leafGraphId()));
+            FixedGuardNode guard = graph.add(new FixedGuardNode(isTypeNode, RiDeoptReason.TypeCheckedInliningViolated, CiDeoptAction.InvalidateReprofile, invoke.leafGraphId()));
             AnchorNode anchor = graph.add(new AnchorNode());
             assert invoke.predecessor() != null;
 
@@ -315,7 +315,7 @@
             if (shouldFallbackToInvoke()) {
                 unknownTypeNode = createInvocationBlock(graph, invoke, returnMerge, returnValuePhi, exceptionMerge, exceptionObjectPhi, 1, notRecordedTypeProbability, false);
             } else {
-                unknownTypeNode = graph.add(new DeoptimizeNode(CiDeoptAction.InvalidateReprofile, CiDeoptReason.TypeCheckedInliningViolated, invoke.leafGraphId()));
+                unknownTypeNode = graph.add(new DeoptimizeNode(CiDeoptAction.InvalidateReprofile, RiDeoptReason.TypeCheckedInliningViolated, invoke.leafGraphId()));
             }
 
             // replace the invoke exception edge
@@ -380,7 +380,7 @@
             ReadHubNode objectClassNode = graph.add(new ReadHubNode(invoke.callTarget().receiver()));
             graph.addBeforeFixed(invoke.node(), objectClassNode);
 
-            FixedNode unknownTypeNode = graph.add(new DeoptimizeNode(CiDeoptAction.InvalidateReprofile, CiDeoptReason.TypeCheckedInliningViolated, invoke.leafGraphId()));
+            FixedNode unknownTypeNode = graph.add(new DeoptimizeNode(CiDeoptAction.InvalidateReprofile, RiDeoptReason.TypeCheckedInliningViolated, invoke.leafGraphId()));
             FixedNode dispatchOnType = createDispatchOnType(graph, objectClassNode, new BeginNode[] {calleeEntryNode}, unknownTypeNode);
 
             FixedWithNextNode pred = (FixedWithNextNode) invoke.node().predecessor();
@@ -828,7 +828,7 @@
         } else {
             if (unwindNode != null) {
                 UnwindNode unwindDuplicate = (UnwindNode) duplicates.get(unwindNode);
-                DeoptimizeNode deoptimizeNode = new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.NotCompiledExceptionHandler, invoke.leafGraphId());
+                DeoptimizeNode deoptimizeNode = new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.NotCompiledExceptionHandler, invoke.leafGraphId());
                 unwindDuplicate.replaceAndDelete(graph.add(deoptimizeNode));
                 // move the deopt upwards if there is a monitor exit that tries to use the "after exception" frame state
                 // (because there is no "after exception" frame state!)
@@ -908,7 +908,7 @@
         NodeInputList<ValueNode> parameters = callTarget.arguments();
         ValueNode firstParam = parameters.size() <= 0 ? null : parameters.get(0);
         if (!callTarget.isStatic() && firstParam.kind() == RiKind.Object && !firstParam.objectStamp().nonNull()) {
-            graph.addBeforeFixed(invoke.node(), graph.add(new FixedGuardNode(graph.unique(new IsNullNode(firstParam)), CiDeoptReason.ClassCastException, CiDeoptAction.InvalidateReprofile, true, invoke.leafGraphId())));
+            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/src/com/oracle/graal/hotspot/CompilationTask.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,13 +24,13 @@
 
 import java.util.concurrent.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.hotspot.ri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
 
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/Compiler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/Compiler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,11 +22,11 @@
  */
 package com.oracle.graal.hotspot;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.hotspot.bridge.*;
 import com.oracle.graal.hotspot.ri.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 public interface Compiler {
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerImpl.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerImpl.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,6 +26,7 @@
 import java.lang.reflect.*;
 import java.net.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.target.*;
 import com.oracle.graal.cri.*;
@@ -35,7 +36,6 @@
 import com.oracle.graal.hotspot.server.*;
 import com.oracle.max.asm.target.amd64.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.*;
 
 /**
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilerObject.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.io.*;
 
-import com.oracle.max.cri.ri.RiKind.*;
+import com.oracle.graal.api.meta.RiKind.*;
 
 
 /**
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotDebugConfig.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotDebugConfig.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,12 +25,12 @@
 import java.io.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.printer.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
 
 public class HotSpotDebugConfig implements DebugConfig {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Used to communicate configuration details, runtime offsets, etc. to graal upon compileMethod.
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/MethodFilter.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/MethodFilter.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,8 +25,7 @@
 import java.util.*;
 import java.util.regex.*;
 
-import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * This class implements a method filter that can filter based on class name, method name and parameters.
@@ -112,7 +111,7 @@
         if (methodName != null && !methodName.matcher(o.name()).matches()) {
             return false;
         }
-        if (clazz != null && !clazz.matcher(CiUtil.toJavaName(o.holder())).matches()) {
+        if (clazz != null && !clazz.matcher(RiUtil.toJavaName(o.holder())).matches()) {
             return false;
         }
         if (signature != null) {
@@ -122,7 +121,7 @@
             }
             for (int i = 0; i < signature.length; i++) {
                 RiType type = sig.argumentTypeAt(i, null);
-                String javaName = CiUtil.toJavaName(type);
+                String javaName = RiUtil.toJavaName(type);
                 if (signature[i] != null && !signature[i].matcher(javaName).matches()) {
                     return false;
                 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,7 +26,7 @@
 import java.lang.reflect.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.ri.*;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,7 +26,7 @@
 import java.lang.reflect.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.ri.*;
 import com.oracle.graal.hotspot.server.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,10 +25,10 @@
 
 import java.io.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.hotspot.ri.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Calls from HotSpot into Java.
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,6 +29,7 @@
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.compiler.phases.PhasePlan.PhasePosition;
@@ -43,7 +44,6 @@
 import com.oracle.graal.java.*;
 import com.oracle.graal.snippets.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
 
 /**
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,6 +28,7 @@
 
 import sun.misc.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.gen.*;
 import com.oracle.graal.graph.*;
@@ -39,7 +40,6 @@
 import com.oracle.max.asm.target.amd64.*;
 import com.oracle.max.asm.target.amd64.AMD64Assembler.ConditionFlag;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
 
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ArrayWriteBarrier.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ArrayWriteBarrier.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.nodes;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentThread.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentThread.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,6 +25,7 @@
 import com.oracle.max.asm.target.amd64.*;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/FieldWriteBarrier.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/FieldWriteBarrier.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.nodes;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,7 +26,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.gen.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.target.amd64.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,7 +23,7 @@
 package com.oracle.graal.hotspot.nodes;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCodeInfo.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCodeInfo.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,10 +22,10 @@
  */
 package com.oracle.graal.hotspot.ri;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Implementation of {@link RiCodeInfo} for HotSpot.
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCompiledMethod.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotCompiledMethod.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.lang.reflect.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotConstantPool.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotConstantPool.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotExceptionHandler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotExceptionHandler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotField.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotField.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,8 +27,8 @@
 import java.lang.reflect.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiType.*;
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiType.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotGraphCache.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotGraphCache.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,10 +27,10 @@
 import java.util.*;
 import java.util.Map.Entry;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * This class implements the graph caching system for the HotSpot platform.
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethod.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethod.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodData.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodData.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,12 +26,11 @@
 
 import sun.misc.*;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiTypeProfile.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
-import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiTypeProfile.*;
 
 
 public final class HotSpotMethodData extends CompilerObject {
@@ -79,7 +78,7 @@
         return position >= 0 && position < normalDataSize + extraDataSize;
     }
 
-    public int getDeoptimizationCount(CiDeoptReason reason) {
+    public int getDeoptimizationCount(RiDeoptReason reason) {
         int reasonIndex = compiler.getRuntime().convertDeoptReason(reason);
         return unsafe.getByte(hotspotMirror, (long) config.methodDataOopTrapHistoryOffset + reasonIndex) & 0xFF;
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodDataAccessor.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodDataAccessor.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Interface for accessor objects that encapsulate the logic for accessing the different kinds of data in a HotSpot methodDataOop.
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodResolved.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodResolved.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.server.*;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodResolvedImpl.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodResolvedImpl.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,12 +28,12 @@
 import java.util.*;
 import java.util.concurrent.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.counters.*;
 import com.oracle.graal.java.bytecode.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
 
 /**
@@ -141,7 +141,7 @@
         throw new UnsupportedOperationException("jniSymbol");
     }
 
-    public CiBitMap[] livenessMap() {
+    public RiBitMap[] livenessMap() {
         return null;
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodUnresolved.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotMethodUnresolved.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.Compiler;
 
 /**
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotProfilingInfo.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotProfilingInfo.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,7 +23,7 @@
 package com.oracle.graal.hotspot.ri;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
@@ -85,7 +85,7 @@
     }
 
     @Override
-    public int getDeoptimizationCount(CiDeoptReason reason) {
+    public int getDeoptimizationCount(RiDeoptReason reason) {
         return methodData.getDeoptimizationCount(reason);
     }
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java	Thu Jun 07 18:24:06 2012 +0200
@@ -30,7 +30,7 @@
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiCallingConvention.Type;
 import com.oracle.max.cri.ci.CiRegister.RegisterFlag;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.hotspot.*;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,6 +27,8 @@
 import java.lang.reflect.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiType.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.target.*;
 import com.oracle.graal.cri.*;
@@ -48,8 +50,6 @@
 import com.oracle.max.cri.ci.CiTargetMethod.Mark;
 import com.oracle.max.cri.ci.CiTargetMethod.Safepoint;
 import com.oracle.max.cri.ci.CiUtil.RefMapFormatter;
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiType.Representation;
 import com.oracle.max.criutils.*;
 
 /**
@@ -390,7 +390,7 @@
     private static ValueNode createBoundsCheck(AccessIndexedNode n, CiLoweringTool tool) {
         StructuredGraph graph = (StructuredGraph) n.graph();
         ArrayLengthNode arrayLength = graph.add(new ArrayLengthNode(n.array()));
-        ValueNode guard = tool.createGuard(graph.unique(new IntegerBelowThanNode(n.index(), arrayLength)), CiDeoptReason.BoundsCheckException, CiDeoptAction.InvalidateReprofile, n.leafGraphId());
+        ValueNode guard = tool.createGuard(graph.unique(new IntegerBelowThanNode(n.index(), arrayLength)), RiDeoptReason.BoundsCheckException, CiDeoptAction.InvalidateReprofile, n.leafGraphId());
 
         graph.addBeforeFixed(n, arrayLength);
         return guard;
@@ -501,7 +501,7 @@
     }
 
     @Override
-    public int encodeDeoptActionAndReason(CiDeoptAction action, CiDeoptReason reason) {
+    public int encodeDeoptActionAndReason(CiDeoptAction action, RiDeoptReason reason) {
         final int actionShift = 0;
         final int reasonShift = 3;
 
@@ -523,7 +523,7 @@
     }
 
     @Override
-    public int convertDeoptReason(CiDeoptReason reason) {
+    public int convertDeoptReason(RiDeoptReason reason) {
         switch(reason) {
             case None: return 0;
             case NullCheckException: return 1;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotSignature.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotSignature.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
 import com.oracle.graal.java.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotType.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotType.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypePrimitive.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypePrimitive.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.lang.annotation.*;
 import java.lang.reflect.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.hotspot.Compiler;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolved.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolved.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.server.*;
 
 public interface HotSpotTypeResolved extends RiResolvedType, Remote {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,8 +26,8 @@
 import java.lang.reflect.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Implementation of RiType for resolved non-primitive HotSpot classes.
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeUnresolved.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeUnresolved.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.hotspot.ri;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.hotspot.Compiler;
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotXirGenerator.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotXirGenerator.java	Thu Jun 07 18:24:06 2012 +0200
@@ -31,6 +31,7 @@
 
 import sun.misc.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.hotspot.Compiler;
@@ -38,7 +39,6 @@
 import com.oracle.max.cri.ci.CiAddress.Scale;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiRegister.RegisterFlag;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.*;
 import com.oracle.max.cri.xir.CiXirAssembler.XirConstant;
 import com.oracle.max.cri.xir.CiXirAssembler.XirLabel;
@@ -580,7 +580,7 @@
             if (counters != null) {
                 incCounter(asm, counter, counters, CheckcastCounter.exception);
             }
-            CiDeoptReason deoptReason = exact ? CiDeoptReason.OptimizedTypeCheckViolated : CiDeoptReason.ClassCastException;
+            RiDeoptReason deoptReason = exact ? RiDeoptReason.OptimizedTypeCheckViolated : RiDeoptReason.ClassCastException;
             XirOperand scratch = asm.createRegisterTemp("scratch", target.wordKind, AMD64.r10);
             asm.mov(scratch, wordConst(asm, compiler.getRuntime().encodeDeoptActionAndReason(CiDeoptAction.InvalidateReprofile, deoptReason)));
             asm.callRuntime(CiRuntimeCall.Deoptimize, null);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/server/ReplacingStreams.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/server/ReplacingStreams.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,7 +26,7 @@
 import java.lang.reflect.*;
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.hotspot.*;
 
 public class ReplacingStreams {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java	Thu Jun 07 18:24:06 2012 +0200
@@ -21,6 +21,7 @@
  * questions.
  */
 package com.oracle.graal.hotspot.snippets;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.Node.Fold;
 import com.oracle.graal.hotspot.*;
 import com.oracle.graal.nodes.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java	Thu Jun 07 18:24:06 2012 +0200
@@ -31,6 +31,7 @@
 
 import sun.misc.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.cri.*;
@@ -74,7 +75,7 @@
         Object objectHub = UnsafeLoadNode.loadObject(object, 0, hubOffset(), true);
         if (objectHub != exactHub) {
             exactMiss.inc();
-            DeoptimizeNode.deopt(CiDeoptAction.InvalidateReprofile, CiDeoptReason.ClassCastException);
+            DeoptimizeNode.deopt(CiDeoptAction.InvalidateReprofile, RiDeoptReason.ClassCastException);
         }
         exactHit.inc();
         return object;
@@ -96,7 +97,7 @@
         Object objectHub = UnsafeLoadNode.loadObject(object, 0, hubOffset(), true);
         if (UnsafeLoadNode.loadObject(objectHub, 0, superCheckOffset, true) != hub) {
             displayMiss.inc();
-            DeoptimizeNode.deopt(CiDeoptAction.InvalidateReprofile, CiDeoptReason.ClassCastException);
+            DeoptimizeNode.deopt(CiDeoptAction.InvalidateReprofile, RiDeoptReason.ClassCastException);
         }
         displayHit.inc();
         return object;
@@ -122,7 +123,7 @@
             }
         }
         if (!checkSecondarySubType(hub, objectHub)) {
-            DeoptimizeNode.deopt(CiDeoptAction.InvalidateReprofile, CiDeoptReason.ClassCastException);
+            DeoptimizeNode.deopt(CiDeoptAction.InvalidateReprofile, RiDeoptReason.ClassCastException);
         }
         return object;
     }
@@ -148,7 +149,7 @@
             }
         }
         if (!checkUnknownSubType(hub, objectHub)) {
-            DeoptimizeNode.deopt(CiDeoptAction.InvalidateReprofile, CiDeoptReason.ClassCastException);
+            DeoptimizeNode.deopt(CiDeoptAction.InvalidateReprofile, RiDeoptReason.ClassCastException);
         }
         return object;
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/DirectStoreNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/DirectStoreNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,12 @@
  */
 package com.oracle.graal.hotspot.snippets;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * A special purpose store node that differs from {@link UnsafeStoreNode} in that
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,10 +22,10 @@
  */
 package com.oracle.graal.hotspot.snippets;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Intrinsification for getting the address of an object.
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,6 +25,7 @@
 import java.lang.reflect.*;
 
 import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.compiler.util.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/UnsafeSnippets.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/UnsafeSnippets.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.graal.hotspot.snippets;
 
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.util.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.java.*;
 import com.oracle.graal.snippets.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/AMD64TailcallOp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/AMD64TailcallOp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,7 +27,7 @@
 import java.util.*;
 
 import com.oracle.max.asm.target.amd64.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.amd64.*;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,6 +29,7 @@
 
 import java.lang.reflect.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.gen.*;
 import com.oracle.graal.compiler.target.*;
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/BciBlockMapping.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/BciBlockMapping.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,13 +26,13 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.java.bytecode.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Builds a mapping between bytecodes and basic blocks and builds a conservative control flow graph (CFG).
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,13 +28,13 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.Node.Verbosity;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.PhiNode.PhiType;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 public class FrameStateBuilder {
     private final RiResolvedMethod method;
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderConfiguration.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderConfiguration.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.graal.java;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.phases.*;
-import com.oracle.max.cri.ri.*;
 
 public class GraphBuilderConfiguration {
 
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,6 +28,9 @@
 import java.lang.reflect.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiType.*;
+import com.oracle.graal.api.meta.RiTypeProfile.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.compiler.util.*;
@@ -45,8 +48,6 @@
 import com.oracle.graal.nodes.util.*;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiType.Representation;
-import com.oracle.max.cri.ri.RiTypeProfile.ProfiledType;
 import com.oracle.max.criutils.*;
 
 /**
@@ -286,7 +287,7 @@
             if (riType instanceof RiResolvedType) {
                 frameState.push(RiKind.Object, append(ConstantNode.forCiConstant(((RiResolvedType) riType).getEncoding(Representation.JavaClass), runtime, currentGraph)));
             } else {
-                append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId)));
+                append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
                 frameState.push(RiKind.Object, append(ConstantNode.forObject(null, runtime, currentGraph)));
             }
         } else if (con instanceof RiConstant) {
@@ -565,7 +566,7 @@
 
     private void genThrow() {
         ValueNode exception = frameState.apop();
-        FixedGuardNode node = currentGraph.add(new FixedGuardNode(currentGraph.unique(new IsNullNode(exception)), CiDeoptReason.NullCheckException, CiDeoptAction.InvalidateReprofile, true, graphId));
+        FixedGuardNode node = currentGraph.add(new FixedGuardNode(currentGraph.unique(new IsNullNode(exception)), RiDeoptReason.NullCheckException, CiDeoptAction.InvalidateReprofile, true, graphId));
         append(node);
         append(handleException(exception, bci()));
     }
@@ -635,7 +636,7 @@
             frameState.apush(checkCast);
         } else {
             ValueNode object = frameState.apop();
-            append(currentGraph.add(new FixedGuardNode(currentGraph.unique(new IsNullNode(object)), CiDeoptReason.Unresolved, CiDeoptAction.InvalidateRecompile, graphId)));
+            append(currentGraph.add(new FixedGuardNode(currentGraph.unique(new IsNullNode(object)), RiDeoptReason.Unresolved, CiDeoptAction.InvalidateRecompile, graphId)));
             frameState.apush(appendConstant(RiConstant.NULL_OBJECT));
         }
     }
@@ -651,7 +652,7 @@
             frameState.ipush(append(MaterializeNode.create(currentGraph.unique(instanceOfNode), currentGraph)));
         } else {
             BlockPlaceholderNode successor = currentGraph.add(new BlockPlaceholderNode());
-            DeoptimizeNode deopt = currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId));
+            DeoptimizeNode deopt = currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId));
             IfNode ifNode = currentGraph.add(new IfNode(currentGraph.unique(new IsNullNode(object)), successor, deopt, 0));
             append(ifNode);
             lastInstr = successor;
@@ -665,7 +666,7 @@
             NewInstanceNode n = currentGraph.add(new NewInstanceNode((RiResolvedType) type));
             frameState.apush(append(n));
         } else {
-            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId)));
+            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
             frameState.apush(appendConstant(RiConstant.NULL_OBJECT));
         }
     }
@@ -706,7 +707,7 @@
             NewArrayNode n = currentGraph.add(new NewObjectArrayNode((RiResolvedType) type, length));
             frameState.apush(append(n));
         } else {
-            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId)));
+            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
             frameState.apush(appendConstant(RiConstant.NULL_OBJECT));
         }
 
@@ -723,7 +724,7 @@
             FixedWithNextNode n = currentGraph.add(new NewMultiArrayNode((RiResolvedType) type, dims));
             frameState.apush(append(n));
         } else {
-            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId)));
+            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
             frameState.apush(appendConstant(RiConstant.NULL_OBJECT));
         }
     }
@@ -737,7 +738,7 @@
             LoadFieldNode load = currentGraph.add(new LoadFieldNode(receiver, (RiResolvedField) field, graphId));
             appendOptimizedLoadField(kind, load);
         } else {
-            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId)));
+            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
             frameState.push(kind.stackKind(), append(ConstantNode.defaultForKind(kind, currentGraph)));
         }
     }
@@ -814,7 +815,7 @@
             StoreFieldNode store = currentGraph.add(new StoreFieldNode(receiver, (RiResolvedField) field, value, graphId));
             appendOptimizedStoreField(store);
         } else {
-            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId)));
+            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
         }
     }
 
@@ -856,7 +857,7 @@
         if (initialized) {
             return appendConstant(((RiResolvedType) holder).getEncoding(representation));
         } else {
-            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId)));
+            append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, RiDeoptReason.Unresolved, graphId)));
             return null;
         }
     }
@@ -917,7 +918,7 @@
     }
 
     private void genInvokeDeopt(RiMethod unresolvedTarget, boolean withReceiver) {
-        append(currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateRecompile, CiDeoptReason.Unresolved, graphId)));
+        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(false);
         if (kind != RiKind.Void) {
@@ -957,7 +958,7 @@
     private void appendInvoke(InvokeKind invokeKind, RiResolvedMethod targetMethod, ValueNode[] args) {
         RiKind resultType = targetMethod.signature().returnKind(false);
         if (GraalOptions.DeoptALot) {
-            DeoptimizeNode deoptimize = currentGraph.add(new DeoptimizeNode(CiDeoptAction.None, CiDeoptReason.RuntimeConstraint, graphId));
+            DeoptimizeNode deoptimize = currentGraph.add(new DeoptimizeNode(CiDeoptAction.None, RiDeoptReason.RuntimeConstraint, graphId));
             deoptimize.setMessage("invoke " + targetMethod.name());
             append(deoptimize);
             frameState.pushReturn(resultType, ConstantNode.defaultForKind(resultType, currentGraph));
@@ -1029,7 +1030,7 @@
         ValueNode local = frameState.loadLocal(localIndex);
         JsrScope scope = currentBlock.jsrScope;
         int retAddress = scope.nextReturnAddress();
-        append(currentGraph.add(new FixedGuardNode(currentGraph.unique(new IntegerEqualsNode(local, ConstantNode.forJsr(retAddress, currentGraph))), CiDeoptReason.JavaSubroutineMismatch, CiDeoptAction.InvalidateReprofile, graphId)));
+        append(currentGraph.add(new FixedGuardNode(currentGraph.unique(new IntegerEqualsNode(local, ConstantNode.forJsr(retAddress, currentGraph))), RiDeoptReason.JavaSubroutineMismatch, CiDeoptAction.InvalidateReprofile, graphId)));
         if (!successor.jsrScope.equals(scope.pop())) {
             throw new JsrNotSupportedBailout("unstructured control flow (ret leaves more than one scope)");
         }
@@ -1186,7 +1187,7 @@
     private FixedNode createTarget(double probability, Block block, FrameStateBuilder stateAfter) {
         assert probability >= 0 && probability <= 1;
         if (probability == 0 && optimisticOpts.removeNeverExecutedCode()) {
-            return currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateReprofile, CiDeoptReason.UnreachedCode, graphId));
+            return currentGraph.add(new DeoptimizeNode(CiDeoptAction.InvalidateReprofile, RiDeoptReason.UnreachedCode, graphId));
         } else {
             return createTarget(block, stateAfter);
         }
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,7 +29,7 @@
 import com.oracle.max.asm.*;
 import com.oracle.max.asm.target.amd64.*;
 import com.oracle.max.asm.target.amd64.AMD64Assembler.ConditionFlag;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.asm.*;
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Call.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Call.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,8 +29,8 @@
 import com.oracle.max.asm.target.amd64.*;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiTargetMethod.Mark;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.CiXirAssembler.XirMark;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.asm.*;
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,7 +27,7 @@
 import java.util.*;
 
 import com.oracle.max.asm.target.amd64.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.asm.*;
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java	Thu Jun 07 18:24:06 2012 +0200
@@ -32,7 +32,7 @@
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiAddress.Scale;
 import com.oracle.max.cri.ci.CiTargetMethod.JumpTable;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.asm.*;
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64LIRInstruction.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64LIRInstruction.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,7 +23,7 @@
 package com.oracle.graal.lir.amd64;
 
 import com.oracle.max.asm.target.amd64.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.asm.*;
 
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java	Thu Jun 07 18:24:06 2012 +0200
@@ -31,7 +31,7 @@
 import com.oracle.max.asm.*;
 import com.oracle.max.asm.target.amd64.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.StandardOp.*;
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,6 +26,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.asm.*;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiCallingConvention.Type;
@@ -297,8 +298,8 @@
     /**
      * Initializes a reference map that covers all registers of the target architecture.
      */
-    public CiBitMap initRegisterRefMap() {
-        return new CiBitMap(target.arch.registerReferenceMapBitCount);
+    public RiBitMap initRegisterRefMap() {
+        return new RiBitMap(target.arch.registerReferenceMapBitCount);
     }
 
     /**
@@ -306,8 +307,8 @@
      * slots in the frame. If the method has incoming reference arguments on the stack,
      * the reference map might grow later when such a reference is set.
      */
-    public CiBitMap initFrameRefMap() {
-        CiBitMap frameRefMap = new CiBitMap(frameSize() / target.wordSize);
+    public RiBitMap initFrameRefMap() {
+        RiBitMap frameRefMap = new RiBitMap(frameSize() / target.wordSize);
         for (CiStackSlot slot : objectStackBlocks) {
             setReference(slot, null, frameRefMap);
         }
@@ -323,7 +324,7 @@
      * @param registerRefMap A register reference map, as created by {@link #initRegisterRefMap()}.
      * @param frameRefMap A frame reference map, as created by {@link #initFrameRefMap()}.
      */
-    public void setReference(RiValue location, CiBitMap registerRefMap, CiBitMap frameRefMap) {
+    public void setReference(RiValue location, RiBitMap registerRefMap, RiBitMap frameRefMap) {
         if (location.kind == RiKind.Object) {
             if (isRegister(location)) {
                 assert registerRefMap.size() == target.arch.registerReferenceMapBitCount;
@@ -347,7 +348,7 @@
      * @param registerRefMap A register reference map, as created by {@link #initRegisterRefMap()}.
      * @param frameRefMap A frame reference map, as created by {@link #initFrameRefMap()}.
      */
-    public void clearReference(RiValue location, CiBitMap registerRefMap, CiBitMap frameRefMap) {
+    public void clearReference(RiValue location, RiBitMap registerRefMap, RiBitMap frameRefMap) {
         if (location.kind == RiKind.Object) {
             if (location instanceof CiRegisterValue) {
                 assert registerRefMap.size() == target.arch.registerReferenceMapBitCount;
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.asm.*;
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRDebugInfo.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRDebugInfo.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,7 +27,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.lir.LIRInstruction.OperandFlag;
 import com.oracle.graal.lir.LIRInstruction.OperandMode;
 import com.oracle.graal.lir.LIRInstruction.ValueProcedure;
@@ -110,7 +110,7 @@
     }
 
 
-    public void finish(CiBitMap registerRefMap, CiBitMap frameRefMap, FrameMap frameMap) {
+    public void finish(RiBitMap registerRefMap, RiBitMap frameRefMap, FrameMap frameMap) {
         debugInfo = new CiDebugInfo(topFrame, registerRefMap, frameRefMap);
 
         // Add additional stack slots for outgoing method parameters.
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,7 +27,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.asm.*;
 
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRVerifier.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRVerifier.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,8 +28,8 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.LIRInstruction.*;
 import com.oracle.graal.lir.cfg.*;
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRXirInstruction.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRXirInstruction.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,8 +26,8 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 
 public abstract class LIRXirInstruction extends LIRInstruction {
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.util.*;
 
 import com.oracle.max.asm.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.asm.*;
 
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueUtil.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueUtil.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.graal.lir;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 public class ValueUtil extends CiValueUtil {
 
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.graal.lir;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Represents a value that is yet to be bound to a machine location (such as
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,6 +26,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/cri/CiLoweringTool.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/cri/CiLoweringTool.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.cri;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.max.cri.ci.*;
 
@@ -29,8 +30,8 @@
     ExtendedRiRuntime getRuntime();
     ValueNode getGuardAnchor();
     ValueNode createNullCheckGuard(ValueNode object, long leafGraphId);
-    ValueNode createGuard(BooleanNode condition, CiDeoptReason deoptReason, CiDeoptAction action, long leafGraphId);
-    ValueNode createGuard(BooleanNode condition, CiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId);
+    ValueNode createGuard(BooleanNode condition, RiDeoptReason deoptReason, CiDeoptAction action, long leafGraphId);
+    ValueNode createGuard(BooleanNode condition, RiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId);
     CiAssumptions assumptions();
 }
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/cri/ExtendedRiRuntime.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/cri/ExtendedRiRuntime.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.max.cri.ci.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/cri/RiGraphCache.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/cri/RiGraphCache.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.graal.cri;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
-import com.oracle.max.cri.ri.*;
 
 
 public interface RiGraphCache {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/CallTargetNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ConstantNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,6 +23,7 @@
 package com.oracle.graal.nodes;
 
 import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.iterators.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DeoptimizeNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DeoptimizeNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.nodes;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
@@ -32,15 +33,15 @@
 
     private String message;
     private final CiDeoptAction action;
-    private final CiDeoptReason reason;
+    private final RiDeoptReason reason;
     private final long leafGraphId;
 
 
-    public DeoptimizeNode(CiDeoptAction action, CiDeoptReason reason) {
+    public DeoptimizeNode(CiDeoptAction action, RiDeoptReason reason) {
         this(action, reason, -1);
     }
 
-    public DeoptimizeNode(CiDeoptAction action, CiDeoptReason reason, long leafGraphId) {
+    public DeoptimizeNode(CiDeoptAction action, RiDeoptReason reason, long leafGraphId) {
         super(StampFactory.forVoid());
         this.action = action;
         this.reason = reason;
@@ -59,7 +60,7 @@
         return action;
     }
 
-    public CiDeoptReason reason() {
+    public RiDeoptReason reason() {
         return reason;
     }
 
@@ -74,7 +75,7 @@
 
     @SuppressWarnings("unused")
     @NodeIntrinsic
-    public static void deopt(@ConstantNodeParameter CiDeoptAction action, @ConstantNodeParameter CiDeoptReason reason) {
+    public static void deopt(@ConstantNodeParameter CiDeoptAction action, @ConstantNodeParameter RiDeoptReason reason) {
         throw new UnsupportedOperationException();
     }
 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.nodes;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.spi.*;
@@ -31,7 +32,7 @@
 public final class FixedGuardNode extends FixedWithNextNode implements Simplifiable, Lowerable, LIRLowerable, Node.IterableNodeType, Negatable {
 
     @Input private BooleanNode condition;
-    private final CiDeoptReason deoptReason;
+    private final RiDeoptReason deoptReason;
     private final CiDeoptAction action;
     private boolean negated;
     private final long leafGraphId;
@@ -45,11 +46,11 @@
         condition = x;
     }
 
-    public FixedGuardNode(BooleanNode condition, CiDeoptReason deoptReason, CiDeoptAction action, long leafGraphId) {
+    public FixedGuardNode(BooleanNode condition, RiDeoptReason deoptReason, CiDeoptAction action, long leafGraphId) {
         this(condition, deoptReason, action, false, leafGraphId);
     }
 
-    public FixedGuardNode(BooleanNode condition, CiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId) {
+    public FixedGuardNode(BooleanNode condition, RiDeoptReason deoptReason, CiDeoptAction action, boolean negated, long leafGraphId) {
         super(StampFactory.forVoid());
         this.action = action;
         this.negated = negated;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.iterators.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.nodes;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.spi.*;
@@ -44,7 +45,7 @@
 
     @Input private BooleanNode condition;
     @Input(notDataflow = true) private FixedNode anchor;
-    private final CiDeoptReason reason;
+    private final RiDeoptReason reason;
     private final CiDeoptAction action;
     private boolean negated;
     private final long leafGraphId;
@@ -74,7 +75,7 @@
         return negated;
     }
 
-    public CiDeoptReason reason() {
+    public RiDeoptReason reason() {
         return reason;
     }
 
@@ -82,7 +83,7 @@
         return action;
     }
 
-    public GuardNode(BooleanNode condition, FixedNode anchor, CiDeoptReason reason, CiDeoptAction action, boolean negated, long leafGraphId) {
+    public GuardNode(BooleanNode condition, FixedNode anchor, RiDeoptReason reason, CiDeoptAction action, boolean negated, long leafGraphId) {
         super(StampFactory.dependency());
         this.condition = condition;
         this.anchor = anchor;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.spi.types.*;
 import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.java.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.java.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.util.*;
 import java.util.concurrent.atomic.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.java.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnwindNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnwindNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,7 +23,7 @@
 package com.oracle.graal.nodes;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,10 +24,10 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.type.*;
 import com.oracle.graal.nodes.type.GenericStamp.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * This class represents a value within the graph, including local variables, phis, and
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueUtil.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueUtil.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.Node.Verbosity;
 
@@ -96,7 +96,7 @@
 
     /**
      * Converts a given instruction to a value string. The representation of an node as
-     * a value is formed by concatenating the {@linkplain com.oracle.max.cri.ri.RiKind#typeChar character} denoting its
+     * a value is formed by concatenating the {@linkplain com.oracle.graal.api.meta.RiKind#typeChar character} denoting its
      * {@linkplain ValueNode#kind kind} and its {@linkplain Node#id()}. For example, {@code "i13"}.
      *
      * @param value the instruction to convert to a value string. If {@code value == null}, then "-" is returned.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ArithmeticNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ArithmeticNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 
 /**
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.type.*;
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/Condition.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/Condition.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.util.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,9 +22,9 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import static com.oracle.max.cri.ri.RiKind.*;
+import static com.oracle.graal.api.meta.RiKind.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatArithmeticNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatArithmeticNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 
 public abstract class FloatArithmeticNode extends ArithmeticNode {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerArithmeticNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerArithmeticNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,11 +22,11 @@
  */
 package com.oracle.graal.nodes.calc;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 @NodeInfo(shortName = "|<|")
 public final class IntegerBelowThanNode extends CompareNode {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,10 +22,10 @@
  */
 package com.oracle.graal.nodes.calc;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
-import com.oracle.max.cri.ri.*;
 
 @NodeInfo(shortName = "==")
 public final class IntegerEqualsNode extends CompareNode {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,10 +22,10 @@
  */
 package com.oracle.graal.nodes.calc;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
-import com.oracle.max.cri.ri.*;
 
 @NodeInfo(shortName = "<")
 public final class IntegerLessThanNode extends CompareNode {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,7 +23,7 @@
 package com.oracle.graal.nodes.calc;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerRemNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerRemNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,10 +22,10 @@
  */
 package com.oracle.graal.nodes.calc;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * An IsNullNode will be true if the supplied value is null, and false if it is non-null.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LogicNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LogicNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 
 /**
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,10 +22,10 @@
  */
 package com.oracle.graal.nodes.calc;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
-import com.oracle.max.cri.ri.*;
 
 @NodeInfo(shortName = "==")
 public final class ObjectEqualsNode extends CompareNode {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ShiftNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ShiftNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 
 /**
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.calc;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,12 @@
  */
 package com.oracle.graal.nodes.extended;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.java.*;
 import com.oracle.graal.nodes.java.MethodCallTargetNode.InvokeKind;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 
 public final class BoxNode extends AbstractStateSplit implements StateSplit, Node.IterableNodeType {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxingMethodPool.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxingMethodPool.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ri.*;
 
 public class BoxingMethodPool {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.extended;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LocationNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LocationNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.extended;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.Node.ValueNumberable;
 import com.oracle.graal.nodes.calc.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadHubNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadHubNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,13 @@
  */
 package com.oracle.graal.nodes.extended;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiType.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
 import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiType.*;
 
 // TODO (chaeubl) this should be a FloatingNode but Lowering is not possible in that case
 public final class ReadHubNode extends FixedWithNextNode implements Lowerable, Canonicalizable {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,6 +23,7 @@
 package com.oracle.graal.nodes.extended;
 
 import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.extended;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.java.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.extended;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,11 +22,11 @@
  */
 package com.oracle.graal.nodes.extended;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Load of a value from a location specified as an offset relative to an object.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,11 +22,11 @@
  */
 package com.oracle.graal.nodes.extended;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Store of a value at a location specified as an offset relative to an object.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ValueAnchorNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ValueAnchorNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,12 +24,12 @@
 
 import static com.oracle.graal.graph.iterators.NodePredicates.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * The ValueAnchor instruction keeps non-CFG (floating) nodes above a certain point in the graph.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessFieldNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessFieldNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,12 +25,12 @@
 import java.lang.reflect.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * The base class of all instructions that access fields.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessIndexedNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AccessIndexedNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,11 +22,11 @@
  */
 package com.oracle.graal.nodes.java;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.spi.types.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * The {@code AccessIndexedNode} class is the base class of instructions that read or write
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ArrayLengthNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ArrayLengthNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,6 +23,7 @@
 package com.oracle.graal.nodes.java;
 
 import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.nodes.java;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
@@ -29,7 +30,6 @@
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.spi.types.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Implements a type check that results in a {@link ClassCastException} if it fails.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,12 @@
  */
 package com.oracle.graal.nodes.java;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Represents an atomic compare-and-swap operation
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,12 @@
  */
 package com.oracle.graal.nodes.java;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.spi.types.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * The {@code InstanceOfNode} represents an instanceof test.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/IsTypeNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/IsTypeNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,12 @@
  */
 package com.oracle.graal.nodes.java;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiType.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiType.Representation;
 
 public final class IsTypeNode extends BooleanNode implements Canonicalizable, LIRLowerable {
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -23,6 +23,7 @@
 package com.oracle.graal.nodes.java;
 
 import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.lang.reflect.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.java;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewInstanceNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewInstanceNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewMultiArrayNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewMultiArrayNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.java;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewObjectArrayNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewObjectArrayNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.java;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewTypeArrayNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewTypeArrayNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.java;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,9 +22,9 @@
  */
 package com.oracle.graal.nodes.java;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * The {@code StoreFieldNode} represents a write to a static or instance field.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,11 +22,11 @@
  */
 package com.oracle.graal.nodes.java;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.cri.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * The {@code StoreIndexedNode} represents a write to an array element.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/CanonicalizerTool.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/CanonicalizerTool.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.nodes.spi;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ri.*;
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/EscapeField.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/EscapeField.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.spi;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 public class EscapeField {
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/EscapeOp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/EscapeOp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,12 +22,12 @@
  */
 package com.oracle.graal.nodes.spi;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.java.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 public abstract class LIRGeneratorTool {
     public abstract CiTarget target();
@@ -79,8 +79,8 @@
 
     public abstract RiValue emitConvert(ConvertNode.Op opcode, RiValue inputVal);
     public abstract void emitMembar(int barriers);
-    public abstract void emitDeoptimizeOnOverflow(CiDeoptAction action, CiDeoptReason reason, Object deoptInfo);
-    public abstract void emitDeoptimize(CiDeoptAction action, CiDeoptReason reason, Object deoptInfo, long leafGraphId);
+    public abstract void emitDeoptimizeOnOverflow(CiDeoptAction action, RiDeoptReason reason, Object deoptInfo);
+    public abstract void emitDeoptimize(CiDeoptAction action, RiDeoptReason reason, Object deoptInfo, long leafGraphId);
     public abstract RiValue emitCall(Object target, RiKind result, RiKind[] arguments, boolean canTrap, RiValue... args);
     public final RiValue emitCall(CiRuntimeCall runtimeCall, boolean canTrap, RiValue... args) {
         return emitCall(runtimeCall, runtimeCall.resultKind, runtimeCall.arguments, canTrap, args);
@@ -88,7 +88,7 @@
 
     public abstract void emitIf(IfNode i);
     public abstract void emitConditional(ConditionalNode i);
-    public abstract void emitGuardCheck(BooleanNode comp, CiDeoptReason deoptReason, CiDeoptAction deoptAction, boolean negated, long leafGraphId);
+    public abstract void emitGuardCheck(BooleanNode comp, RiDeoptReason deoptReason, CiDeoptAction deoptAction, boolean negated, long leafGraphId);
 
     public abstract void emitLookupSwitch(LookupSwitchNode i);
     public abstract void emitTableSwitch(TableSwitchNode i);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ObjectTypeFeedbackStore.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ObjectTypeFeedbackStore.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ObjectTypeFeedbackTool.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ObjectTypeFeedbackTool.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.spi.types;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ObjectTypeQuery.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ObjectTypeQuery.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.spi.types;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeFeedbackStore.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeFeedbackStore.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,9 +24,9 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
-import com.oracle.max.cri.ri.*;
 
 public class ScalarTypeFeedbackStore extends TypeFeedbackStore<ScalarTypeFeedbackStore> implements ScalarTypeFeedbackTool, CloneableTypeFeedback {
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeFeedbackTool.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeFeedbackTool.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.spi.types;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeQuery.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/types/ScalarTypeQuery.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.spi.types;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.calc.*;
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.type;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 
 public class FloatStamp extends Stamp {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/GenericStamp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/GenericStamp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.type;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 public final class GenericStamp extends Stamp {
 
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.type;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 
 public class IntegerStamp extends Stamp {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/ObjectStamp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/ObjectStamp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.type;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 
 public class ObjectStamp extends Stamp {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/Stamp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/Stamp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.graal.nodes.type;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.spi.types.*;
-import com.oracle.max.cri.ri.*;
 
 
 public abstract class Stamp {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampFactory.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampFactory.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.type.GenericStamp.GenericStampType;
 import com.oracle.max.cri.ri.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/BoxedVirtualObjectNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/BoxedVirtualObjectNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.nodes.virtual;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualObjectNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualObjectNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,10 +22,10 @@
  */
 package com.oracle.graal.nodes.virtual;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
-import com.oracle.max.cri.ri.*;
 
 
 public class VirtualObjectNode extends ValueNode implements LIRLowerable {
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,9 +28,9 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
 import com.oracle.graal.alloc.util.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.alloc.*;
 import com.oracle.graal.compiler.alloc.Interval.UsePosList;
 import com.oracle.graal.compiler.gen.*;
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinterObserver.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinterObserver.java	Thu Jun 07 18:24:06 2012 +0200
@@ -29,6 +29,7 @@
 import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
 import com.oracle.graal.alloc.util.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.alloc.*;
 import com.oracle.graal.compiler.gen.*;
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,7 +26,7 @@
 import java.util.*;
 import java.util.Map.Entry;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.schedule.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.Node.Verbosity;
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinterDumpHandler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinterDumpHandler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,8 +27,8 @@
 import java.util.*;
 
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.criutils.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.graph.*;
 
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.extended.*;
 
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,6 +27,7 @@
 import java.util.Map.Entry;
 import java.util.concurrent.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.loop.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.debug.*;
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/Snippets.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/Snippets.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,6 +25,7 @@
 import java.lang.reflect.*;
 import java.util.concurrent.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.compiler.util.*;
@@ -36,7 +37,6 @@
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.java.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Utilities for snippet installation and management.
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/nodes/MathIntrinsicNode.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/nodes/MathIntrinsicNode.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import static com.oracle.graal.lir.amd64.AMD64Arithmetic.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.gen.*;
 import com.oracle.graal.compiler.target.*;
 import com.oracle.graal.graph.*;
@@ -34,7 +35,6 @@
 import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.nodes.type.*;
 import com.oracle.graal.snippets.target.amd64.*;
-import com.oracle.max.cri.ri.*;
 
 public class MathIntrinsicNode extends FloatingNode implements Canonicalizable, LIRGenLowerable {
 
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/target/amd64/AMD64MathIntrinsicOp.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/target/amd64/AMD64MathIntrinsicOp.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,7 +27,7 @@
 import java.util.*;
 
 import com.oracle.max.asm.target.amd64.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.lir.*;
 import com.oracle.graal.lir.amd64.*;
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CheckCastTest.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CheckCastTest.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,9 +24,9 @@
 
 import org.junit.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.java.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Tests the implementation of checkcast, allowing profiling information to
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,13 +26,13 @@
 
 import org.junit.*;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiCompiledMethod.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.java.*;
 import com.oracle.graal.nodes.*;
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiCompiledMethod.MethodInvalidatedException;
 
 /**
  * In the following tests, the usages of local variable "a" are replaced with the integer constant 0. Then
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/ConditionTest.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/ConditionTest.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,7 +28,7 @@
 
 import org.junit.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.calc.*;
 
 
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/EscapeAnalysisTest.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/EscapeAnalysisTest.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,12 +26,12 @@
 
 import org.junit.Test;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.java.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * In these test cases the probability of all invokes is set to a high value, such that an InliningPhase should inline them all.
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraphTest.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraphTest.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,6 +27,7 @@
 
 import junit.framework.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.phases.*;
 import com.oracle.graal.compiler.phases.PhasePlan.PhasePosition;
@@ -39,7 +40,6 @@
 import com.oracle.graal.lir.cfg.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Base class for Graal compiler unit tests. These are white box tests
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InstanceOfTest.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InstanceOfTest.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,9 +26,9 @@
 
 import org.junit.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.java.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Tests the implementation of instanceof, allowing profiling information to
--- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeCheckTest.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeCheckTest.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,9 +26,9 @@
 
 import org.junit.*;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiTypeProfile.*;
 import com.oracle.graal.nodes.*;
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiTypeProfile.ProfiledType;
 
 /**
  * Base class for checkcast and instanceof test classes.
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.max.asm.target.amd64;
 
+import static com.oracle.graal.api.meta.RiKind.*;
 import static com.oracle.max.cri.ci.CiRegister.RegisterFlag.*;
-import static com.oracle.max.cri.ri.RiKind.*;
 import static com.oracle.max.cri.util.MemoryBarriers.*;
 
 import com.oracle.max.cri.ci.*;
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,9 +27,9 @@
 import static com.oracle.max.cri.ci.CiValueUtil.*;
 import static com.oracle.max.cri.util.MemoryBarriers.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.asm.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * This class implements an assembler that can encode most X86 instructions.
--- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64MacroAssembler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64MacroAssembler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,9 +22,9 @@
  */
 package com.oracle.max.asm.target.amd64;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.asm.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * This class implements commonly used X86 code patterns.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAddress.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAddress.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import static com.oracle.max.cri.ci.CiValueUtil.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Represents an address in target machine memory, specified via some combination of a base register, an index register,
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAssumptions.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiAssumptions.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.io.*;
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Class for recording optimistic assumptions made during compilation.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiBitMap.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,682 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ci;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Implements a bitmap that stores a single bit for a range of integers (0-n).
- */
-public final class CiBitMap implements Serializable {
-
-    private static final long serialVersionUID = 2471441272241401105L;
-    private static final int ADDRESS_BITS_PER_WORD = 6;
-    private static final int BITS_PER_WORD = 1 << ADDRESS_BITS_PER_WORD;
-    private static final int BIT_INDEX_MASK = BITS_PER_WORD - 1;
-
-    public static final int DEFAULT_LENGTH = BITS_PER_WORD;
-
-    public static int roundUpLength(int length) {
-        return ((length + (BITS_PER_WORD - 1)) >> ADDRESS_BITS_PER_WORD) << ADDRESS_BITS_PER_WORD;
-    }
-
-    private int size;
-    private long low;
-    private long[] extra;
-
-    /**
-     * Constructs a new bit map with the {@linkplain #DEFAULT_LENGTH default length}.
-     */
-    public CiBitMap() {
-        this(DEFAULT_LENGTH);
-    }
-
-    /**
-     * Constructs a new bit map from a byte array encoded bit map.
-     *
-     * @param bitmap the bit map to convert
-     */
-    public CiBitMap(byte[] bitmap) {
-        this(bitmap, 0, bitmap.length);
-    }
-
-    /**
-     * Constructs a copy of the given bit map.
-     *
-     * @param bitmap the bit map to copy.
-     */
-    public CiBitMap(CiBitMap bitmap) {
-        this.size = bitmap.size;
-        this.low = bitmap.low;
-        if (bitmap.extra != null) {
-            this.extra = Arrays.copyOf(bitmap.extra, bitmap.extra.length);
-        }
-    }
-
-    /**
-     * Constructs a new bit map from a byte array encoded bit map.
-     *
-     * @param arr the byte array containing the bit map to convert
-     * @param off the byte index in {@code arr} at which the bit map starts
-     * @param numberOfBytes the number of bytes worth of bits to copy from {@code arr}
-     */
-    public CiBitMap(byte[] arr, int off, int numberOfBytes) {
-        this(numberOfBytes * 8);
-        int byteIndex = off;
-        int end = off + numberOfBytes;
-        assert end <= arr.length;
-        while (byteIndex < end && (byteIndex - off) < 8) {
-            long bite = (long) arr[byteIndex] & 0xff;
-            low |= bite << ((byteIndex - off) * 8);
-            byteIndex++;
-        }
-        if (byteIndex < end) {
-            assert (byteIndex - off) == 8;
-            int remBytes = end - byteIndex;
-            int remWords = (remBytes + 7) / 8;
-            for (int word = 0; word < remWords; word++) {
-                long w = 0L;
-                for (int i = 0; i < 8 && byteIndex < end; i++) {
-                    long bite = (long) arr[byteIndex] & 0xff;
-                    w |= bite << (i * 8);
-                    byteIndex++;
-                }
-                extra[word] = w;
-            }
-        }
-    }
-
-    /**
-     * Converts a {@code long} to a {@link CiBitMap}.
-     */
-    public static CiBitMap fromLong(long bitmap) {
-        CiBitMap bm = new CiBitMap(64);
-        bm.low = bitmap;
-        return bm;
-    }
-
-    /**
-     * Constructs a new bit map with the specified length.
-     *
-     * @param length the length of the bitmap
-     */
-    public CiBitMap(int length) {
-        assert length >= 0;
-        this.size = length;
-        if (length > BITS_PER_WORD) {
-            extra = new long[length >> ADDRESS_BITS_PER_WORD];
-        }
-    }
-
-    /**
-     * Sets the bit at the specified index.
-     *
-     * @param i the index of the bit to set
-     */
-    public void set(int i) {
-        if (checkIndex(i) < BITS_PER_WORD) {
-            low |= 1L << i;
-        } else {
-            int pos = wordIndex(i);
-            int index = bitInWord(i);
-            extra[pos] |= 1L << index;
-        }
-    }
-
-    /**
-     * Grows this bitmap to a new size, appending necessary zero bits.
-     *
-     * @param newLength the new length of the bitmap
-     */
-    public void grow(int newLength) {
-        if (newLength > size) {
-            // grow this bitmap to the new length
-            int newSize = newLength >> ADDRESS_BITS_PER_WORD;
-            if (newLength > 0) {
-                if (extra == null) {
-                    // extra just needs to be allocated now
-                    extra = new long[newSize];
-                } else {
-                    if (extra.length < newSize) {
-                        // extra needs to be copied
-                        long[] newExtra = new long[newSize];
-                        for (int i = 0; i < extra.length; i++) {
-                            newExtra[i] = extra[i];
-                        }
-                        extra = newExtra;
-                    } else {
-                        // nothing to do, extra is already the right size
-                    }
-                }
-            }
-            size = newLength;
-        }
-    }
-
-    private static int bitInWord(int i) {
-        return i & BIT_INDEX_MASK;
-    }
-
-    private static int wordIndex(int i) {
-        return (i >> ADDRESS_BITS_PER_WORD) - 1;
-    }
-
-    /**
-     * Clears the bit at the specified index.
-     * @param i the index of the bit to clear
-     */
-    public void clear(int i) {
-        if (checkIndex(i) < BITS_PER_WORD) {
-            low &= ~(1L << i);
-        } else {
-            int pos = wordIndex(i);
-            int index = bitInWord(i);
-            extra[pos] &= ~(1L << index);
-        }
-    }
-
-    /**
-     * Sets all the bits in this bitmap.
-     */
-    public void setAll() {
-        low = -1;
-        if (extra != null) {
-            for (int i = 0; i < extra.length; i++) {
-                extra[i] = -1;
-            }
-        }
-    }
-
-    /**
-     * Clears all the bits in this bitmap.
-     */
-    public void clearAll() {
-        low = 0;
-        if (extra != null) {
-            for (int i = 0; i < extra.length; i++) {
-                extra[i] = 0;
-            }
-        }
-    }
-
-    /**
-     * Gets the value of the bit at the specified index.
-     *
-     * @param i the index of the bit to get
-     * @return {@code true} if the bit at the specified position is {@code 1}
-     */
-    public boolean get(int i) {
-        if (checkIndex(i) < BITS_PER_WORD) {
-            return ((low >> i) & 1) != 0;
-        }
-        int pos = wordIndex(i);
-        int index = bitInWord(i);
-        long bits = extra[pos];
-        return ((bits >> index) & 1) != 0;
-    }
-
-    /**
-     * Gets the value of the bit at the specified index, returning {@code false} if the
-     * bitmap does not cover the specified index.
-     *
-     * @param i the index of the bit to get
-     * @return {@code true} if the bit at the specified position is {@code 1}
-     */
-    public boolean getDefault(int i) {
-        if (i < 0 || i >= size) {
-            return false;
-        }
-        if (i < BITS_PER_WORD) {
-            return ((low >> i) & 1) != 0;
-        }
-        int pos = wordIndex(i);
-        int index = bitInWord(i);
-        long bits = extra[pos];
-        return ((bits >> index) & 1) != 0;
-    }
-
-    /**
-     * Performs the union operation on this bitmap with the specified bitmap. That is, all bits set in either of the two
-     * bitmaps will be set in this bitmap following this operation.
-     *
-     * @param other the other bitmap for the union operation
-     */
-    public void setUnion(CiBitMap other) {
-        low |= other.low;
-        if (extra != null && other.extra != null) {
-            for (int i = 0; i < extra.length && i < other.extra.length; i++) {
-                extra[i] |= other.extra[i];
-            }
-        }
-    }
-
-    /**
-     * Performs the union operation on this bitmap with the specified bitmap. That is, a bit is set in this
-     * bitmap if and only if it is set in both this bitmap and the specified bitmap.
-     *
-     * @param other the other bitmap for this operation
-     * @return {@code true} if any bits were cleared as a result of this operation
-     */
-    public boolean setIntersect(CiBitMap other) {
-        boolean same = true;
-        long intx = low & other.low;
-        if (low != intx) {
-            same = false;
-            low = intx;
-        }
-        long[] oxtra = other.extra;
-        if (extra != null && oxtra != null) {
-            for (int i = 0; i < extra.length; i++) {
-                long a = extra[i];
-                if (i < oxtra.length) {
-                    // zero bits out of this map
-                    long ax = a & oxtra[i];
-                    if (a != ax) {
-                        same = false;
-                        extra[i] = ax;
-                    }
-                } else {
-                    // this bitmap is larger than the specified bitmap; zero remaining bits
-                    if (a != 0) {
-                        same = false;
-                        extra[i] = 0;
-                    }
-                }
-            }
-        }
-        return !same;
-    }
-
-    /**
-     * Gets the number of addressable bits in this bitmap.
-     *
-     * @return the size of this bitmap
-     */
-    public int size() {
-        return size;
-    }
-
-    private int checkIndex(int i) {
-        if (i < 0 || i >= size) {
-            throw new IndexOutOfBoundsException();
-        }
-        return i;
-    }
-
-    public void setFrom(CiBitMap other) {
-        assert this.size == other.size : "must have same size";
-
-        low = other.low;
-        if (extra != null) {
-            for (int i = 0; i < extra.length; i++) {
-                extra[i] = other.extra[i];
-            }
-        }
-    }
-
-    public void setDifference(CiBitMap other) {
-        assert this.size == other.size : "must have same size";
-
-        low &= ~other.low;
-        if (extra != null) {
-            for (int i = 0; i < extra.length; i++) {
-                extra[i] &= ~other.extra[i];
-            }
-        }
-    }
-
-    public boolean isSame(CiBitMap other) {
-        if (this.size != other.size || this.low != other.low) {
-            return false;
-        }
-
-        if (extra != null) {
-            for (int i = 0; i < extra.length; i++) {
-                if (extra[i] != other.extra[i]) {
-                    return false;
-                }
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * Returns the index of the first set bit that occurs on or after a specified start index.
-     * If no such bit exists then -1 is returned.
-     * <p>
-     * To iterate over the set bits in a {@code BitMap}, use the following loop:
-     *
-     * <pre>
-     * for (int i = bitMap.nextSetBit(0); i &gt;= 0; i = bitMap.nextSetBit(i + 1)) {
-     *     // operate on index i here
-     * }
-     * </pre>
-     *
-     * @param fromIndex the index to start checking from (inclusive)
-     * @return the index of the lowest set bit between {@code [fromIndex .. size())} or -1 if there is no set bit in this range
-     * @throws IndexOutOfBoundsException if the specified index is negative.
-     */
-    public int nextSetBit(int fromIndex) {
-        return nextSetBit(fromIndex, size());
-    }
-
-    /**
-     * Returns the index of the first set bit that occurs on or after a specified start index
-     * and before a specified end index. If no such bit exists then -1 is returned.
-     * <p>
-     * To iterate over the set bits in a {@code BitMap}, use the following loop:
-     *
-     * <pre>
-     * for (int i = bitMap.nextSetBit(0, bitMap.size()); i &gt;= 0; i = bitMap.nextSetBit(i + 1, bitMap.size())) {
-     *     // operate on index i here
-     * }
-     * </pre>
-     *
-     * @param fromIndex the index to start checking from (inclusive)
-     * @param toIndex the index at which to stop checking (exclusive)
-     * @return the index of the lowest set bit between {@code [fromIndex .. toIndex)} or -1 if there is no set bit in this range
-     * @throws IndexOutOfBoundsException if the specified index is negative.
-     */
-    public int nextSetBit(int fromIndex, int toIndex) {
-        assert fromIndex <= size() : "index out of bounds";
-        assert toIndex <= size() : "index out of bounds";
-        assert fromIndex <= toIndex : "fromIndex > toIndex";
-
-        if (fromIndex == toIndex) {
-            return -1;
-        }
-        int fromWordIndex = wordIndex(fromIndex);
-        int toWordIndex = wordIndex(toIndex - 1) + 1;
-        int resultIndex = fromIndex;
-
-        // check bits including and to the left_ of offset's position
-        int pos = bitInWord(resultIndex);
-        long res = map(fromWordIndex) >> pos;
-        if (res != 0) {
-            resultIndex += Long.numberOfTrailingZeros(res);
-            assert resultIndex >= fromIndex && resultIndex < toIndex : "just checking";
-            if (resultIndex < toIndex) {
-                return resultIndex;
-            }
-            return -1;
-        }
-        // skip over all word length 0-bit runs
-        for (fromWordIndex++; fromWordIndex < toWordIndex; fromWordIndex++) {
-            res = map(fromWordIndex);
-            if (res != 0) {
-                // found a 1, return the offset
-                resultIndex = bitIndex(fromWordIndex) + Long.numberOfTrailingZeros(res);
-                assert resultIndex >= fromIndex : "just checking";
-                if (resultIndex < toIndex) {
-                    return resultIndex;
-                }
-                return -1;
-            }
-        }
-        return -1;
-    }
-
-    private static int bitIndex(int index) {
-        return (index + 1) << ADDRESS_BITS_PER_WORD;
-    }
-
-    private long map(int index) {
-        if (index == -1) {
-            return low;
-        }
-        return extra[index];
-    }
-
-    private static boolean allZeros(int start, long[] arr) {
-        for (int i = start; i < arr.length; i++) {
-            if (arr[i] != 0) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Compares this object against the specified object.
-     * The result is {@code true} if and only if {@code obj} is
-     * not {@code null} and is a {@code CiBitMap} object that has
-     * exactly the same set of bits set to {@code true} as this bit
-     * set.
-     *
-     * @param   obj   the object to compare with.
-     */
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof CiBitMap) {
-            CiBitMap bm = (CiBitMap) obj;
-            if (bm.low == low) {
-                if (bm.extra == null) {
-                    if (extra == null) {
-                        // Common case
-                        return true;
-                    }
-                    return allZeros(0, extra);
-                }
-                if (extra == null) {
-                    return allZeros(0, bm.extra);
-                }
-                // both 'extra' array non null:
-                int i = 0;
-                int length = Math.min(extra.length, bm.extra.length);
-                while (i < length) {
-                    if (extra[i] != bm.extra[i]) {
-                        return false;
-                    }
-                    i++;
-                }
-                if (extra.length > bm.extra.length) {
-                    return allZeros(length, extra);
-                }
-                if (extra.length < bm.extra.length) {
-                    return allZeros(length, bm.extra);
-                }
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return (int) low ^ size;
-    }
-
-    /**
-     * Returns a string representation of this bit map
-     * that is the same as the string returned by {@link BitSet#toString()}
-     * for a bit set with the same bits set as this bit map.
-     */
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder(size * 2);
-        sb.append('{');
-
-        int bit = nextSetBit(0);
-        if (bit != -1) {
-            sb.append(bit);
-            for (bit = nextSetBit(bit + 1); bit >= 0; bit = nextSetBit(bit + 1)) {
-                sb.append(", ").append(bit);
-            }
-        }
-
-        sb.append('}');
-        return sb.toString();
-    }
-
-    public static int highestOneBitIndex(long value) {
-        int bit = Long.numberOfTrailingZeros(Long.highestOneBit(value));
-        if (bit == 64) {
-            return -1;
-        }
-        return bit;
-    }
-
-    /**
-     * Returns the number of bits set to {@code true} in this bit map.
-     */
-    public int cardinality() {
-        int sum = Long.bitCount(low);
-        if (extra != null) {
-            for (long word : extra) {
-                sum += Long.bitCount(word);
-            }
-        }
-        return sum;
-    }
-
-    /**
-     * Returns the "logical size" of this bit map: the index of
-     * the highest set bit in the bit map plus one. Returns zero
-     * if the bit map contains no set bits.
-     *
-     * @return  the logical size of this bit map
-     */
-    public int length() {
-        if (extra != null) {
-            for (int i = extra.length - 1; i >= 0; i--) {
-                if (extra[i] != 0) {
-                    return (highestOneBitIndex(extra[i]) + ((i + 1) * 64)) + 1;
-                }
-            }
-        }
-        return highestOneBitIndex(low) + 1;
-    }
-
-    /**
-     * Returns a string representation of this bit map with every set bit represented as {@code '1'}
-     * and every unset bit represented as {@code '0'}. The first character in the returned string represents
-     * bit 0 in this bit map.
-     *
-     * @param length the number of bits represented in the returned string. If {@code length < 0 || length > size()},
-     *            then the value of {@link #length()} is used.
-     */
-    public String toBinaryString() {
-        int length = length();
-        if (length == 0) {
-            return "";
-        }
-        StringBuilder sb = new StringBuilder(length);
-        for (int i = 0; i < length; ++i) {
-            sb.append(get(i) ? '1' : '0');
-        }
-        return sb.toString();
-    }
-
-    static final char[] hexDigits = {
-        '0', '1', '2', '3', '4', '5', '6', '7',
-        '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
-    };
-
-    /**
-     * Returns a string representation of this bit map in hex.
-     */
-    public String toHexString() {
-        if (size == 0) {
-            return "";
-        }
-        int hexSize = CiUtil.align(this.size, 4);
-        StringBuilder sb = new StringBuilder(hexSize / 4);
-        for (int i = 0; i < hexSize; i += 4) {
-            int nibble = get(i) ? 1 : 0;
-            if (get(i + 1)) {
-                nibble |= 2;
-            }
-            if (get(i + 2)) {
-                nibble |= 4;
-            }
-            if (get(i + 3)) {
-                nibble |= 8;
-            }
-
-            sb.append(hexDigits[nibble]);
-        }
-        return sb.toString();
-    }
-
-    public CiBitMap copy() {
-        CiBitMap n = new CiBitMap(BITS_PER_WORD);
-        n.low = low;
-        if (extra != null) {
-            n.extra = Arrays.copyOf(extra, extra.length);
-        }
-        n.size = size;
-        return n;
-    }
-
-    /**
-     * Copies this bit map into a given byte array.
-     *
-     * @param arr the destination
-     * @param off the byte index in {@code arr} at which to start writing
-     * @param numberOfBytes the number of bytes worth of bits to copy from this bit map.
-     *        The number of bits copied is {@code numberOfBytes * 8}. If {@code numberOfBytes}
-     *        is -1, then {@code ((size() + 7) / 8)} is used instead.
-     * @return the number of bytes written to {@code arr}
-     */
-    public int copyTo(byte[] arr, int off, int numberOfBytes) {
-        for (int i = 0; i < numberOfBytes; ++i) {
-            long word = low;
-            int byteInWord;
-            if (i >= 8) {
-                int wordIndex = (i - 8) / 8;
-                word = extra[wordIndex];
-                byteInWord = i & 0x7;
-            } else {
-                byteInWord = i;
-            }
-            assert byteInWord < 8;
-            byte b = (byte) (word >> (byteInWord * 8));
-            arr[off + i] = b;
-        }
-        return numberOfBytes;
-    }
-
-    /**
-     * Converts this bit map to a byte array. The length of the returned
-     * byte array is {@code ((size() + 7) / 8)}.
-     */
-    public byte[] toByteArray() {
-        byte[] arr = new byte[(size + 7) / 8];
-        copyTo(arr, 0, arr.length);
-        return arr;
-    }
-
-    /**
-     * Converts this bit map to a long.
-     *
-     * @throws IllegalArgumentException if {@code (size() > 64)}
-     */
-    public long toLong() {
-        if (size > 64) {
-            throw new IllegalArgumentException("bit map of size " + size + " cannot be converted to long");
-        }
-        return low;
-    }
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCallingConvention.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCallingConvention.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import static com.oracle.max.cri.ci.CiValueUtil.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 
 /**
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCodePos.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCodePos.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.io.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Represents a code position, that is, a chain of inlined methods with bytecode
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCompilationStatistics.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCompilationStatistics.java	Thu Jun 07 18:24:06 2012 +0200
@@ -28,6 +28,7 @@
 import java.util.*;
 import java.util.concurrent.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ri.*;
 
 @SuppressWarnings("unused")
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiDebugInfo.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiDebugInfo.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,8 @@
 
 import java.io.*;
 
+import com.oracle.graal.api.meta.*;
+
 /**
  * Represents the debugging information for a particular place in the code,
  * which includes the code position, a reference map, and deoptimization information.
@@ -43,13 +45,13 @@
      * for bit {@code k} in byte {@code n}, it refers to the register whose
      * {@linkplain CiRegister#number number} is {@code (k + n * 8)}.
      */
-    public final CiBitMap registerRefMap;
+    public final RiBitMap registerRefMap;
 
     /**
      * The reference map for the stack frame at this point. A set bit at {@code k} in the map
      * represents stack slot number {@code k}.
      */
-    public final CiBitMap frameRefMap;
+    public final RiBitMap frameRefMap;
 
     /**
      * Creates a new {@code CiDebugInfo} from the given values.
@@ -58,7 +60,7 @@
      * @param registerRefMap the register map
      * @param frameRefMap the reference map for {@code frame}, which may be {@code null}
      */
-    public CiDebugInfo(CiCodePos codePos, CiBitMap registerRefMap, CiBitMap frameRefMap) {
+    public CiDebugInfo(CiCodePos codePos, RiBitMap registerRefMap, RiBitMap frameRefMap) {
         this.codePos = codePos;
         this.registerRefMap = registerRefMap;
         this.frameRefMap = frameRefMap;
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiDeoptReason.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ci;
-
-
-public enum CiDeoptReason {
-    None,
-    NullCheckException,
-    BoundsCheckException,
-    ClassCastException,
-    ArrayStoreException,
-    UnreachedCode,
-    TypeCheckedInliningViolated,
-    OptimizedTypeCheckViolated,
-    NotCompiledExceptionHandler,
-    Unresolved,
-    JavaSubroutineMismatch,
-    ArithmeticException,
-    RuntimeConstraint;
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiExceptionHandler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiExceptionHandler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.cri.ci;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * An implementation of the {@link RiExceptionHandler} interface.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiFrame.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiFrame.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,7 +24,7 @@
 
 import java.io.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Represents the Java bytecode frame state(s) at a given position
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiMonitorValue.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiMonitorValue.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.cri.ci;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 public final class CiMonitorValue extends RiValue {
     private static final long serialVersionUID = 8241681800464483691L;
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegister.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegister.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,7 +25,7 @@
 import java.io.*;
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Represents a target machine register.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfig.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfig.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,9 +24,9 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.CiCallingConvention.*;
 import com.oracle.max.cri.ci.CiRegister.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * A register configuration binds roles and {@linkplain CiRegisterAttributes attributes}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfigImpl.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterConfigImpl.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,9 +24,9 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.CiCallingConvention.*;
 import com.oracle.max.cri.ci.CiRegister.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * A default implementation of {@link CiRegisterConfig}.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterValue.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRegisterValue.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.cri.ci;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Denotes a register that stores a value of a fixed kind. There is exactly one (canonical) instance of {@code
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiRuntimeCall.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,9 +22,9 @@
  */
 package com.oracle.max.cri.ci;
 
-import static com.oracle.max.cri.ri.RiKind.*;
+import static com.oracle.graal.api.meta.RiKind.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Enumerates the calls that must be provided by the runtime system. The compiler
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiStackSlot.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiStackSlot.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,9 +22,9 @@
  */
 package com.oracle.max.cri.ci;
 
-import static com.oracle.max.cri.ri.RiKind.*;
+import static com.oracle.graal.api.meta.RiKind.*;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Represents a compiler spill slot or an outgoing stack-based argument in a method's frame
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTarget.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTarget.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.cri.ci;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 
 /**
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTargetMethod.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTargetMethod.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,6 +25,7 @@
 import java.io.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ri.*;
 
 /**
@@ -547,7 +548,7 @@
         }
     }
 
-    private static void appendRefMap(StringBuilder sb, String name, CiBitMap map) {
+    private static void appendRefMap(StringBuilder sb, String name, RiBitMap map) {
         if (map != null) {
             sb.append(' ').append(name).append('[').append(map.toBinaryString()).append(']');
         }
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiUtil.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiUtil.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,8 +27,8 @@
 import java.lang.annotation.*;
 import java.util.*;
 
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiTypeProfile.ProfiledType;
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiTypeProfile.*;
 
 /**
  * Miscellaneous collection of utility methods used in the {@code CRI} project.
@@ -58,42 +58,6 @@
         return null;
     }
 
-    /**
-     * Extends the functionality of {@link Class#getSimpleName()} to include a non-empty string for anonymous and local
-     * classes.
-     *
-     * @param clazz the class for which the simple name is being requested
-     * @param withEnclosingClass specifies if the returned name should be qualified with the name(s) of the enclosing
-     *            class/classes of {@code clazz} (if any). This option is ignored if {@code clazz} denotes an anonymous
-     *            or local class.
-     * @return the simple name
-     */
-    public static String getSimpleName(Class< ? > clazz, boolean withEnclosingClass) {
-        final String simpleName = clazz.getSimpleName();
-        if (simpleName.length() != 0) {
-            if (withEnclosingClass) {
-                String prefix = "";
-                Class< ? > enclosingClass = clazz;
-                while ((enclosingClass = enclosingClass.getEnclosingClass()) != null) {
-                    prefix = prefix + enclosingClass.getSimpleName() + ".";
-                }
-                return prefix + simpleName;
-            }
-            return simpleName;
-        }
-        // Must be an anonymous or local class
-        final String name = clazz.getName();
-        int index = name.indexOf('$');
-        if (index == -1) {
-            return name;
-        }
-        index = name.lastIndexOf('.', index);
-        if (index == -1) {
-            return name;
-        }
-        return name.substring(index + 1);
-    }
-
     public static final int K = 1024;
     public static final int M = 1024 * 1024;
 
@@ -174,73 +138,6 @@
     }
 
     /**
-     * Converts a given type to its Java programming language name. The following are examples of strings returned by
-     * this method:
-     *
-     * <pre>
-     *     qualified == true:
-     *         java.lang.Object
-     *         int
-     *         boolean[][]
-     *     qualified == false:
-     *         Object
-     *         int
-     *         boolean[][]
-     * </pre>
-     *
-     * @param riType the type to be converted to a Java name
-     * @param qualified specifies if the package prefix of the type should be included in the returned name
-     * @return the Java name corresponding to {@code riType}
-     */
-    public static String toJavaName(RiType riType, boolean qualified) {
-        RiKind kind = riType.kind(false);
-        if (kind.isPrimitive() || kind == RiKind.Void) {
-            return kind.javaName;
-        }
-        return internalNameToJava(riType.name(), qualified);
-    }
-
-    /**
-     * Converts a given type to its Java programming language name. The following are examples of strings returned by
-     * this method:
-     *
-     * <pre>
-     *      java.lang.Object
-     *      int
-     *      boolean[][]
-     * </pre>
-     *
-     * @param riType the type to be converted to a Java name
-     * @return the Java name corresponding to {@code riType}
-     */
-    public static String toJavaName(RiType riType) {
-        return (riType == null) ? null : internalNameToJava(riType.name(), true);
-    }
-
-    public static String internalNameToJava(String name, boolean qualified) {
-        switch (name.charAt(0)) {
-            case 'L': {
-                String result = name.substring(1, name.length() - 1).replace('/', '.');
-                if (!qualified) {
-                    final int lastDot = result.lastIndexOf('.');
-                    if (lastDot != -1) {
-                        result = result.substring(lastDot + 1);
-                    }
-                }
-                return result;
-
-            }
-            case '[':
-                return internalNameToJava(name.substring(1), qualified) + "[]";
-            default:
-                if (name.length() != 1) {
-                    throw new IllegalArgumentException("Illegal internal name: " + name);
-                }
-                return RiKind.fromPrimitiveOrVoidTypeChar(name.charAt(0)).javaName;
-        }
-    }
-
-    /**
      * Gets a string for a given method formatted according to a given format specification. A format specification is
      * composed of characters that are to be copied verbatim to the result and specifiers that denote an attribute of
      * the method that is to be copied to the result. A specifier is a single character preceded by a '%' character. The
@@ -287,14 +184,14 @@
                         if (sig == null) {
                             sig = method.signature();
                         }
-                        sb.append(toJavaName(sig.returnType(null), qualified));
+                        sb.append(RiUtil.toJavaName(sig.returnType(null), qualified));
                         break;
                     }
                     case 'H':
                         qualified = true;
                         // fall through
                     case 'h': {
-                        sb.append(toJavaName(method.holder(), qualified));
+                        sb.append(RiUtil.toJavaName(method.holder(), qualified));
                         break;
                     }
                     case 'n': {
@@ -312,7 +209,7 @@
                             if (i != 0) {
                                 sb.append(", ");
                             }
-                            sb.append(toJavaName(sig.argumentTypeAt(i, null), qualified));
+                            sb.append(RiUtil.toJavaName(sig.argumentTypeAt(i, null), qualified));
                         }
                         break;
                     }
@@ -377,14 +274,14 @@
                         qualified = true;
                         // fall through
                     case 't': {
-                        sb.append(toJavaName(type, qualified));
+                        sb.append(RiUtil.toJavaName(type, qualified));
                         break;
                     }
                     case 'H':
                         qualified = true;
                         // fall through
                     case 'h': {
-                        sb.append(toJavaName(field.holder(), qualified));
+                        sb.append(RiUtil.toJavaName(field.holder(), qualified));
                         break;
                     }
                     case 'n': {
@@ -680,7 +577,7 @@
         String nl = NEW_LINE;
         if (info.hasRegisterRefMap()) {
             sb.append("  reg-ref-map:");
-            CiBitMap bm = info.registerRefMap;
+            RiBitMap bm = info.registerRefMap;
             if (formatter != null) {
                 for (int reg = bm.nextSetBit(0); reg >= 0; reg = bm.nextSetBit(reg + 1)) {
                     sb.append(" " + formatter.formatRegister(reg));
@@ -690,7 +587,7 @@
         }
         if (info.hasStackRefMap()) {
             sb.append("frame-ref-map:");
-            CiBitMap bm = info.frameRefMap;
+            RiBitMap bm = info.frameRefMap;
             if (formatter != null) {
                 for (int i = bm.nextSetBit(0); i >= 0; i = bm.nextSetBit(i + 1)) {
                     sb.append(" " + formatter.formatStackSlot(i));
@@ -788,7 +685,7 @@
         }
 
         boolean firstDeoptReason = true;
-        for (CiDeoptReason reason: CiDeoptReason.values()) {
+        for (RiDeoptReason reason: RiDeoptReason.values()) {
             int count = info.getDeoptimizationCount(reason);
             if (count > 0) {
                 if (firstDeoptReason) {
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.cri.ci;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 public class CiValueUtil {
     public static boolean isIllegal(RiValue value) {
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiVirtualObject.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiVirtualObject.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,6 +22,7 @@
  */
 package com.oracle.max.cri.ci;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ri.*;
 
 /**
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/package-info.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/package-info.java	Thu Jun 07 18:24:06 2012 +0200
@@ -33,10 +33,10 @@
  * {@link com.oracle.max.cri.ci.CiCodePos} and {@link com.oracle.max.cri.ci.CiDebugInfo} provide detailed information to the
  * runtime to support debugging and deoptimization of the compiled code.
  * <p>
- * The compiler manipulates {@link com.oracle.max.cri.ri.RiValue} instances that have a {@link com.oracle.max.cri.ri.RiKind}, and are
- * immutable. A concrete {@link com.oracle.max.cri.ri.RiValue value} is one of the following subclasses:
+ * The compiler manipulates {@link com.oracle.graal.api.meta.RiValue} instances that have a {@link com.oracle.graal.api.meta.RiKind}, and are
+ * immutable. A concrete {@link com.oracle.graal.api.meta.RiValue value} is one of the following subclasses:
  * <ul>
- * <li>{@link com.oracle.max.cri.ri.RiConstant}: a constant value.
+ * <li>{@link com.oracle.graal.api.meta.RiConstant}: a constant value.
  * <li>{@link com.oracle.max.cri.ci.CiRegisterValue}: a value stored in a {@linkplain com.oracle.max.cri.ci.CiRegister target machine register}.
  * <li>{@link com.oracle.max.cri.ci.CiStackSlot}: a spill slot or an outgoing stack-based argument in a method's frame.
  * <li>{@link com.oracle.max.cri.ci.CiAddress}: an address in target machine memory.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiCodeInfo.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents some code installed in the code cache of the runtime.
- * This encapsulated details are only for informational purposes.
- * At any time, the runtime may invalidate the underlying code (e.g. due to deopt etc).
- */
-public interface RiCodeInfo {
-
-    /**
-     * Gets the start address of this installed code.
-     */
-    long start();
-
-    /**
-     * Gets a copy of this installed code.
-     */
-    byte[] code();
-
-    /**
-     * Gets the method (if any) from which this installed code was compiled.
-     */
-    RiResolvedMethod method();
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiCompiledMethod.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents a compiled instance of a method. It may have been invalidated or removed in the meantime.
- */
-public interface RiCompiledMethod {
-
-    public abstract class MethodInvalidatedException extends RuntimeException {
-
-        private static final long serialVersionUID = -3540232440794244844L;
-    }
-
-    /**
-     * Returns the method to which the compiled code belongs.
-     * @return the method to which the compiled code belongs.
-     */
-    RiResolvedMethod method();
-
-    /**
-     * @return true if the code represented by this object is still valid, false otherwise (may happen due to deopt, etc.)
-     */
-    boolean isValid();
-
-    Object execute(Object arg1, Object arg2, Object arg3);
-
-    Object executeVarargs(Object... args);
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiConstant.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,498 +0,0 @@
-/*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents a constant (boxed) value, such as an integer, floating point number, or object reference,
- * within the compiler and across the compiler/runtime interface. Exports a set of {@code CiConstant}
- * instances that represent frequently used constant values, such as {@link #ZERO}.
- */
-public final class RiConstant extends RiValue {
-    private static final long serialVersionUID = -6355452536852663986L;
-
-    private static final RiConstant[] INT_CONSTANT_CACHE = new RiConstant[100];
-    static {
-        for (int i = 0; i < INT_CONSTANT_CACHE.length; ++i) {
-            INT_CONSTANT_CACHE[i] = new RiConstant(RiKind.Int, i);
-        }
-    }
-
-    public static final RiConstant NULL_OBJECT = new RiConstant(RiKind.Object, null);
-    public static final RiConstant INT_MINUS_1 = new RiConstant(RiKind.Int, -1);
-    public static final RiConstant INT_0 = forInt(0);
-    public static final RiConstant INT_1 = forInt(1);
-    public static final RiConstant INT_2 = forInt(2);
-    public static final RiConstant INT_3 = forInt(3);
-    public static final RiConstant INT_4 = forInt(4);
-    public static final RiConstant INT_5 = forInt(5);
-    public static final RiConstant LONG_0 = new RiConstant(RiKind.Long, 0L);
-    public static final RiConstant LONG_1 = new RiConstant(RiKind.Long, 1L);
-    public static final RiConstant FLOAT_0 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(0.0F));
-    public static final RiConstant FLOAT_1 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(1.0F));
-    public static final RiConstant FLOAT_2 = new RiConstant(RiKind.Float, Float.floatToRawIntBits(2.0F));
-    public static final RiConstant DOUBLE_0 = new RiConstant(RiKind.Double, Double.doubleToRawLongBits(0.0D));
-    public static final RiConstant DOUBLE_1 = new RiConstant(RiKind.Double, Double.doubleToRawLongBits(1.0D));
-    public static final RiConstant TRUE = new RiConstant(RiKind.Boolean, 1L);
-    public static final RiConstant FALSE = new RiConstant(RiKind.Boolean, 0L);
-
-    static {
-        assert NULL_OBJECT.isDefaultValue();
-        assert INT_0.isDefaultValue();
-        assert FLOAT_0.isDefaultValue();
-        assert DOUBLE_0.isDefaultValue();
-        assert FALSE.isDefaultValue();
-
-        // Ensure difference between 0.0f and -0.0f is preserved
-        assert FLOAT_0 != forFloat(-0.0F);
-        assert !forFloat(-0.0F).isDefaultValue();
-
-        // Ensure difference between 0.0d and -0.0d is preserved
-        assert DOUBLE_0 != forDouble(-0.0d);
-        assert !forDouble(-0.0D).isDefaultValue();
-
-        assert NULL_OBJECT.isNull();
-    }
-
-    /**
-     * The boxed object value. This is ignored iff {@code !kind.isObject()}.
-     */
-    private final Object object;
-
-    /**
-     * The boxed primitive value as a {@code long}. This is ignored iff {@code kind.isObject()}.
-     * For {@code float} and {@code double} values, this value is the result of
-     * {@link Float#floatToRawIntBits(float)} and {@link Double#doubleToRawLongBits(double)} respectively.
-     */
-    private final long primitive;
-
-    /**
-     * Create a new constant represented by the specified object reference.
-     *
-     * @param kind the type of this constant
-     * @param object the value of this constant
-     */
-    private RiConstant(RiKind kind, Object object) {
-        super(kind);
-        this.object = object;
-        this.primitive = 0L;
-    }
-
-    /**
-     * Create a new constant represented by the specified primitive.
-     *
-     * @param kind the type of this constant
-     * @param primitive the value of this constant
-     */
-    public RiConstant(RiKind kind, long primitive) {
-        super(kind);
-        this.object = null;
-        this.primitive = primitive;
-    }
-
-    /**
-     * Checks whether this constant is non-null.
-     * @return {@code true} if this constant is a primitive, or an object constant that is not null
-     */
-    public boolean isNonNull() {
-        return !kind.isObject() || object != null;
-    }
-
-    /**
-     * Checks whether this constant is null.
-     * @return {@code true} if this constant is the null constant
-     */
-    public boolean isNull() {
-        return kind.isObject() && object == null;
-    }
-
-    @Override
-    public String toString() {
-        return kind.javaName + "[" + kind.format(boxedValue()) + (kind != RiKind.Object ? "|0x" + Long.toHexString(primitive) : "") + "]";
-    }
-
-    /**
-     * Gets this constant's value as a string.
-     *
-     * @return this constant's value as a string
-     */
-    public String valueString() {
-        if (kind.isPrimitive()) {
-            return boxedValue().toString();
-        } else if (kind.isObject()) {
-            if (object == null) {
-                return "null";
-            } else if (object instanceof String) {
-                return "\"" + object + "\"";
-            } else {
-                return "<object: " + kind.format(object) + ">";
-            }
-        } else if (kind.isJsr()) {
-            return "bci:" + boxedValue().toString();
-        } else {
-            return "???";
-        }
-    }
-
-    /**
-     * Returns the value of this constant as a boxed Java value.
-     * @return the value of this constant
-     */
-    public Object boxedValue() {
-        // Checkstyle: stop
-        switch (kind) {
-            case Byte: return (byte) asInt();
-            case Boolean: return asInt() == 0 ? Boolean.FALSE : Boolean.TRUE;
-            case Short: return (short) asInt();
-            case Char: return (char) asInt();
-            case Jsr: return (int) primitive;
-            case Int: return asInt();
-            case Long: return asLong();
-            case Float: return asFloat();
-            case Double: return asDouble();
-            case Object: return object;
-        }
-        // Checkstyle: resume
-        throw new IllegalArgumentException();
-    }
-
-    private boolean valueEqual(RiConstant other, boolean ignoreKind) {
-        // must have equivalent kinds to be equal
-        if (!ignoreKind && kind != other.kind) {
-            return false;
-        }
-        if (kind.isObject()) {
-            return object == other.object;
-        }
-        return primitive == other.primitive;
-    }
-
-    /**
-     * Converts this constant to a primitive int.
-     * @return the int value of this constant
-     */
-    public int asInt() {
-        if (kind.stackKind().isInt() || kind.isJsr()) {
-            return (int) primitive;
-        }
-        throw new Error("Constant is not int: " + this);
-    }
-
-    /**
-     * Converts this constant to a primitive boolean.
-     * @return the boolean value of this constant
-     */
-    public boolean asBoolean() {
-        if (kind == RiKind.Boolean) {
-            return primitive != 0L;
-        }
-        throw new Error("Constant is not boolean: " + this);
-    }
-
-    /**
-     * Converts this constant to a primitive long.
-     * @return the long value of this constant
-     */
-    public long asLong() {
-        // Checkstyle: stop
-        switch (kind.stackKind()) {
-            case Jsr:
-            case Int:
-            case Long: return primitive;
-            case Float: return (long) asFloat();
-            case Double: return (long) asDouble();
-            default: throw new Error("Constant is not long: " + this);
-        }
-        // Checkstyle: resume
-    }
-
-    /**
-     * Converts this constant to a primitive float.
-     * @return the float value of this constant
-     */
-    public float asFloat() {
-        if (kind.isFloat()) {
-            return Float.intBitsToFloat((int) primitive);
-        }
-        throw new Error("Constant is not float: " + this);
-    }
-
-    /**
-     * Converts this constant to a primitive double.
-     * @return the double value of this constant
-     */
-    public double asDouble() {
-        if (kind.isFloat()) {
-            return Float.intBitsToFloat((int) primitive);
-        }
-        if (kind.isDouble()) {
-            return Double.longBitsToDouble(primitive);
-        }
-        throw new Error("Constant is not double: " + this);
-    }
-
-    /**
-     * Converts this constant to the object reference it represents.
-     * @return the object which this constant represents
-     */
-    public Object asObject() {
-        if (kind.isObject()) {
-            return object;
-        }
-        throw new Error("Constant is not object: " + this);
-    }
-
-    /**
-     * Converts this constant to the jsr reference it represents.
-     * @return the object which this constant represents
-     */
-    public int asJsr() {
-        if (kind.isJsr()) {
-            return (int) primitive;
-        }
-        throw new Error("Constant is not jsr: " + this);
-    }
-
-    /**
-     * Unchecked access to a primitive value.
-     * @return
-     */
-    public long asPrimitive() {
-        if (kind.isObject()) {
-            throw new Error("Constant is not primitive: " + this);
-        }
-        return primitive;
-    }
-
-    /**
-     * Computes the hashcode of this constant.
-     * @return a suitable hashcode for this constant
-     */
-    @Override
-    public int hashCode() {
-        if (kind.isObject()) {
-            return System.identityHashCode(object);
-        }
-        return (int) primitive;
-    }
-
-    /**
-     * Checks whether this constant equals another object. This is only
-     * true if the other object is a constant and has the same value.
-     * @param o the object to compare equality
-     * @return {@code true} if this constant is equivalent to the specified object
-     */
-    @Override
-    public boolean equals(Object o) {
-        return o == this || o instanceof RiConstant && valueEqual((RiConstant) o, false);
-    }
-
-    /**
-     * Checks whether this constant is identical to another constant or has the same value as it.
-     * @param other the constant to compare for equality against this constant
-     * @return {@code true} if this constant is equivalent to {@code other}
-     */
-    public boolean equivalent(RiConstant other) {
-        return other == this || valueEqual(other, false);
-    }
-
-    /**
-     * Checks whether this constant is the default value for its type.
-     * @return {@code true} if the value is the default value for its type; {@code false} otherwise
-     */
-    public boolean isDefaultValue() {
-        // Checkstyle: stop
-        switch (kind.stackKind()) {
-            case Int: return asInt() == 0;
-            case Long: return asLong() == 0;
-            case Float: return this == FLOAT_0;
-            case Double: return this == DOUBLE_0;
-            case Object: return object == null;
-        }
-        // Checkstyle: resume
-        throw new IllegalArgumentException("Cannot det default CiConstant for kind " + kind);
-    }
-
-    /**
-     * Gets the default value for a given kind.
-     *
-     * @return the default value for {@code kind}'s {@linkplain RiKind#stackKind() stack kind}
-     */
-    public static RiConstant defaultValue(RiKind kind) {
-        // Checkstyle: stop
-        switch (kind.stackKind()) {
-            case Int: return INT_0;
-            case Long: return LONG_0;
-            case Float: return FLOAT_0;
-            case Double: return DOUBLE_0;
-            case Object: return NULL_OBJECT;
-        }
-        // Checkstyle: resume
-        throw new IllegalArgumentException("Cannot get default CiConstant for kind " + kind);
-    }
-
-    /**
-     * Creates a boxed double constant.
-     * @param d the double value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forDouble(double d) {
-        if (Double.compare(0.0D, d) == 0) {
-            return DOUBLE_0;
-        }
-        if (Double.compare(d, 1.0D) == 0) {
-            return DOUBLE_1;
-        }
-        return new RiConstant(RiKind.Double, Double.doubleToRawLongBits(d));
-    }
-
-    /**
-     * Creates a boxed float constant.
-     * @param f the float value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forFloat(float f) {
-        if (Float.compare(f, 0.0F) == 0) {
-            return FLOAT_0;
-        }
-        if (Float.compare(f, 1.0F) == 0) {
-            return FLOAT_1;
-        }
-        if (Float.compare(f, 2.0F) == 0) {
-            return FLOAT_2;
-        }
-        return new RiConstant(RiKind.Float, Float.floatToRawIntBits(f));
-    }
-
-    /**
-     * Creates a boxed long constant.
-     * @param i the long value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forLong(long i) {
-        return i == 0 ? LONG_0 : i == 1 ? LONG_1 : new RiConstant(RiKind.Long, i);
-    }
-
-    /**
-     * Creates a boxed integer constant.
-     * @param i the integer value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forInt(int i) {
-        if (i == -1) {
-            return INT_MINUS_1;
-        }
-        if (i >= 0 && i < INT_CONSTANT_CACHE.length) {
-            return INT_CONSTANT_CACHE[i];
-        }
-        return new RiConstant(RiKind.Int, i);
-    }
-
-    /**
-     * Creates a boxed byte constant.
-     * @param i the byte value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forByte(byte i) {
-        return new RiConstant(RiKind.Byte, i);
-    }
-
-    /**
-     * Creates a boxed boolean constant.
-     * @param i the boolean value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forBoolean(boolean i) {
-        return i ? TRUE : FALSE;
-    }
-
-    /**
-     * Creates a boxed char constant.
-     * @param i the char value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forChar(char i) {
-        return new RiConstant(RiKind.Char, i);
-    }
-
-    /**
-     * Creates a boxed short constant.
-     * @param i the short value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forShort(short i) {
-        return new RiConstant(RiKind.Short, i);
-    }
-
-    /**
-     * Creates a boxed address (jsr/ret address) constant.
-     * @param i the address value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forJsr(int i) {
-        return new RiConstant(RiKind.Jsr, i);
-    }
-
-    /**
-     * Creates a boxed object constant.
-     * @param o the object value to box
-     * @return a boxed copy of {@code value}
-     */
-    public static RiConstant forObject(Object o) {
-        if (o == null) {
-            return NULL_OBJECT;
-        }
-        return new RiConstant(RiKind.Object, o);
-    }
-
-    /**
-     * Creates a boxed constant for the given kind from an Object.
-     * The object needs to be of the Java boxed type corresponding to the kind.
-     * @param kind the kind of the constant to create
-     * @param value the Java boxed value: a Byte instance for CiKind Byte, etc.
-     * @return the boxed copy of {@code value}
-     */
-    public static RiConstant forBoxed(RiKind kind, Object value) {
-        switch (kind) {
-            case Boolean:
-                return forBoolean((Boolean) value);
-            case Byte:
-                return forByte((Byte) value);
-            case Char:
-                return forChar((Character) value);
-            case Short:
-                return forShort((Short) value);
-            case Int:
-                return forInt((Integer) value);
-            case Long:
-                return forLong((Long) value);
-            case Float:
-                return forFloat((Float) value);
-            case Double:
-                return forDouble((Double) value);
-            case Object:
-                return forObject(value);
-            default:
-                throw new RuntimeException("cannot create CiConstant for boxed " + kind + " value");
-        }
-    }
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiConstantPool.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents the runtime representation of the constant pool that is
- * used by the compiler when parsing bytecode. The {@code lookupXXX} methods look up a constant
- * pool entry without performing resolution, and are used during compilation.
- */
-public interface RiConstantPool {
-
-    /**
-     * Makes sure that the type referenced by the specified constant pool entry is loaded and
-     * initialized. This can be used to compile time resolve a type. It works for field, method,
-     * or type constant pool entries.
-     * @param cpi the index of the constant pool entry that references the type
-     * @param opcode the opcode of the instruction that references the type
-     */
-    void loadReferencedType(int cpi, int opcode);
-
-    /**
-     * Looks up a reference to a field. If {@code opcode} is non-negative, then resolution checks
-     * specific to the JVM instruction it denotes are performed if the field is already resolved.
-     * Should any of these checks fail, an {@linkplain RiField#isResolved() unresolved}
-     * field reference is returned.
-     *
-     * @param cpi the constant pool index
-     * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1}
-     * @return a reference to the field at {@code cpi} in this pool
-     * @throws ClassFormatError if the entry at {@code cpi} is not a field
-     */
-    RiField lookupField(int cpi, int opcode);
-
-    /**
-     * Looks up a reference to a method. If {@code opcode} is non-negative, then resolution checks
-     * specific to the JVM instruction it denotes are performed if the method is already resolved.
-     * Should any of these checks fail, an {@linkplain RiMethod#isResolved() unresolved}
-     * method reference is returned.
-     *
-     * @param cpi the constant pool index
-     * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1}
-     * @return a reference to the method at {@code cpi} in this pool
-     * @throws ClassFormatError if the entry at {@code cpi} is not a method
-     */
-    RiMethod lookupMethod(int cpi, int opcode);
-
-    /**
-     * Looks up a reference to a type. If {@code opcode} is non-negative, then resolution checks
-     * specific to the JVM instruction it denotes are performed if the type is already resolved.
-     * Should any of these checks fail, an {@linkplain RiType#isResolved() unresolved}
-     * type reference is returned.
-     *
-     * @param cpi the constant pool index
-     * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1}
-     * @return a reference to the compiler interface type
-     */
-    RiType lookupType(int cpi, int opcode);
-
-    /**
-     * Looks up a method signature.
-     *
-     * @param cpi the constant pool index
-     * @return the method signature at index {@code cpi} in this constant pool
-     */
-    RiSignature lookupSignature(int cpi);
-
-    /**
-     * Looks up a constant at the specified index.
-     * @param cpi the constant pool index
-     * @return the {@code CiConstant} instance representing the constant
-     */
-    Object lookupConstant(int cpi);
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiExceptionHandler.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents an exception handler within the bytecode.
- */
-public interface RiExceptionHandler {
-
-    /**
-     * Gets the start bytecode index of the protected range of this handler.
-     * @return the start bytecode index
-     */
-    int startBCI();
-
-    /**
-     * Gets the end bytecode index of the protected range of this handler.
-     * @return the end bytecode index
-     */
-    int endBCI();
-
-    /**
-     * Gets the bytecode index of the handler block of this handler.
-     * @return the handler block bytecode index
-     */
-    int handlerBCI();
-
-    /**
-     * Gets the index into the constant pool representing the type of exception
-     * caught by this handler.
-     * @return the constant pool index of the catch type
-     */
-    int catchTypeCPI();
-
-    /**
-     * Checks whether this handler catches all exceptions.
-     * @return {@code true} if this handler catches all exceptions
-     */
-    boolean isCatchAll();
-
-    /**
-     * The type of exception caught by this exception handler.
-     *
-     * @return the exception type
-     */
-    RiType catchType();
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiExceptionSeen.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-
-/**
- * Represents the three possibilities that an exception was seen at a specific BCI.
- */
-public enum RiExceptionSeen {
-    TRUE,
-    FALSE,
-    NOT_SUPPORTED;
-
-    public static RiExceptionSeen get(boolean value) {
-        return value ? TRUE : FALSE;
-    }
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiField.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents a reference to a field, including both resolved and unresolved fields. Fields, like methods and types, are
- * resolved through {@link RiConstantPool constant pools}, and their actual implementation is provided by the
- * {@link RiRuntime runtime} to the compiler.
- */
-public interface RiField {
-    /**
-     * Gets the name of this field as a string.
-     * @return the name of this field
-     */
-    String name();
-
-    /**
-     * Gets the type of this field as a compiler-runtime interface type.
-     * @return the type of this field
-     */
-    RiType type();
-
-    /**
-     * Gets the kind of this field.
-     * @param architecture When true, the architecture-specific kind used for emitting machine code is returned.
-     *        When false, the kind according to the Java specification is returned.
-     * @return the kind
-     */
-    RiKind kind(boolean architecture);
-
-    /**
-     * Gets the holder of this field as a compiler-runtime interface type.
-     * @return the holder of this field
-     */
-    RiType holder();
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiKind.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-import static com.oracle.max.cri.ri.RiKind.Flags.*;
-
-import java.lang.reflect.*;
-
-import sun.misc.*;
-
-import com.oracle.max.cri.ci.*;
-
-/**
- * Denotes the basic kinds of types in CRI, including the all the Java primitive types,
- * for example, {@link RiKind#Int} for {@code int} and {@link RiKind#Object}
- * for all object types.
- * A kind has a single character short name, a Java name, and a set of flags
- * further describing its behavior.
- */
-public enum RiKind {
-    Boolean('z', "boolean", FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Byte   ('b', "byte",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Short  ('s', "short",   FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Char   ('c', "char",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Int    ('i', "int",     FIELD_TYPE | RETURN_TYPE | PRIMITIVE | STACK_INT),
-    Float  ('f', "float",   FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
-    Long   ('j', "long",    FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
-    Double ('d', "double",  FIELD_TYPE | RETURN_TYPE | PRIMITIVE),
-    Object ('a', "Object",  FIELD_TYPE | RETURN_TYPE),
-    Void   ('v', "void",    RETURN_TYPE),
-    /** Denote a bytecode address in a {@code JSR} bytecode. */
-    Jsr    ('r', "jsr",     0),
-    /** The non-type. */
-    Illegal('-', "illegal", 0);
-
-    public static final RiKind[] VALUES = values();
-    public static final RiKind[] JAVA_VALUES = new RiKind[] {RiKind.Boolean, RiKind.Byte, RiKind.Short, RiKind.Char, RiKind.Int, RiKind.Float, RiKind.Long, RiKind.Double, RiKind.Object};
-
-    RiKind(char ch, String name, int flags) {
-        this.typeChar = ch;
-        this.javaName = name;
-        this.flags = flags;
-    }
-
-    static class Flags {
-        /**
-         * Can be an object field type.
-         */
-        public static final int FIELD_TYPE  = 0x0001;
-        /**
-         * Can be result type of a method.
-         */
-        public static final int RETURN_TYPE = 0x0002;
-        /**
-         * Behaves as an integer when on Java evaluation stack.
-         */
-        public static final int STACK_INT   = 0x0004;
-        /**
-         * Represents a Java primitive type.
-         */
-        public static final int PRIMITIVE   = 0x0008;
-    }
-
-    /**
-     * The flags for this kind.
-     */
-    private final int flags;
-
-    /**
-     * The name of the kind as a single character.
-     */
-    public final char typeChar;
-
-    /**
-     * The name of this kind which will also be it Java programming language name if
-     * it is {@linkplain #isPrimitive() primitive} or {@code void}.
-     */
-    public final String javaName;
-
-    /**
-     * Checks whether this kind is valid as the type of a field.
-     * @return {@code true} if this kind is valid as the type of a Java field
-     */
-    public boolean isValidFieldType() {
-        return (flags & FIELD_TYPE) != 0;
-    }
-
-    /**
-     * Checks whether this kind is valid as the return type of a method.
-     * @return {@code true} if this kind is valid as the return type of a Java method
-     */
-    public boolean isValidReturnType() {
-        return (flags & RETURN_TYPE) != 0;
-    }
-
-    /**
-     * Checks whether this type is valid as an {@code int} on the Java operand stack.
-     * @return {@code true} if this type is represented by an {@code int} on the operand stack
-     */
-    public boolean isInt() {
-        return (flags & STACK_INT) != 0;
-    }
-
-    /**
-     * Checks whether this type is a Java primitive type.
-     * @return {@code true} if this is {@link #Boolean}, {@link #Byte}, {@link #Char}, {@link #Short},
-     *                                 {@link #Int}, {@link #Long}, {@link #Float} or {@link #Double}.
-     */
-    public boolean isPrimitive() {
-        return (flags & PRIMITIVE) != 0;
-    }
-
-    /**
-     * Gets the kind that represents this kind when on the Java operand stack.
-     * @return the kind used on the operand stack
-     */
-    public RiKind stackKind() {
-        if (isInt()) {
-            return Int;
-        }
-        return this;
-    }
-
-    public static RiKind fromTypeString(String typeString) {
-        assert typeString.length() > 0;
-        final char first = typeString.charAt(0);
-        if (first == '[' || first == 'L') {
-            return RiKind.Object;
-        }
-        return RiKind.fromPrimitiveOrVoidTypeChar(first);
-    }
-
-    /**
-     * Gets the kind from the character describing a primitive or void.
-     * @param ch the character
-     * @return the kind
-     */
-    public static RiKind fromPrimitiveOrVoidTypeChar(char ch) {
-        // Checkstyle: stop
-        switch (ch) {
-            case 'Z': return Boolean;
-            case 'C': return Char;
-            case 'F': return Float;
-            case 'D': return Double;
-            case 'B': return Byte;
-            case 'S': return Short;
-            case 'I': return Int;
-            case 'J': return Long;
-            case 'V': return Void;
-        }
-        // Checkstyle: resume
-        throw new IllegalArgumentException("unknown primitive or void type character: " + ch);
-    }
-
-    public Class< ? > toJavaClass() {
-        // Checkstyle: stop
-        switch(this) {
-            case Void:      return java.lang.Void.TYPE;
-            case Long:      return java.lang.Long.TYPE;
-            case Int:       return java.lang.Integer.TYPE;
-            case Byte:      return java.lang.Byte.TYPE;
-            case Char:      return java.lang.Character.TYPE;
-            case Double:    return java.lang.Double.TYPE;
-            case Float:     return java.lang.Float.TYPE;
-            case Short:     return java.lang.Short.TYPE;
-            case Boolean:   return java.lang.Boolean.TYPE;
-            default:        return null;
-        }
-        // Checkstyle: resume
-    }
-
-    public Class< ? > toBoxedJavaClass() {
-        // Checkstyle: stop
-        switch(this) {
-            case Void:      return null;
-            case Long:      return java.lang.Long.class;
-            case Int:       return java.lang.Integer.class;
-            case Byte:      return java.lang.Byte.class;
-            case Char:      return java.lang.Character.class;
-            case Double:    return java.lang.Double.class;
-            case Float:     return java.lang.Float.class;
-            case Short:     return java.lang.Short.class;
-            case Boolean:   return java.lang.Boolean.class;
-            default:        return null;
-        }
-        // Checkstyle: resume
-    }
-
-    /**
-     * Checks whether this value type is void.
-     * @return {@code true} if this type is void
-     */
-    public final boolean isVoid() {
-        return this == RiKind.Void;
-    }
-
-    /**
-     * Checks whether this value type is long.
-     * @return {@code true} if this type is long
-     */
-    public final boolean isLong() {
-        return this == RiKind.Long;
-    }
-
-    /**
-     * Checks whether this value type is float.
-     * @return {@code true} if this type is float
-     */
-    public final boolean isFloat() {
-        return this == RiKind.Float;
-    }
-
-    /**
-     * Checks whether this value type is double.
-     * @return {@code true} if this type is double
-     */
-    public final boolean isDouble() {
-        return this == RiKind.Double;
-    }
-
-    /**
-     * Checks whether this value type is float or double.
-     * @return {@code true} if this type is float or double
-     */
-    public final boolean isFloatOrDouble() {
-        return this == RiKind.Double || this == RiKind.Float;
-    }
-
-   /**
-     * Checks whether this value type is an object type.
-     * @return {@code true} if this type is an object
-     */
-    public final boolean isObject() {
-        return this == RiKind.Object;
-    }
-
-    /**
-     * Checks whether this value type is an address type.
-     * @return {@code true} if this type is an address
-     */
-    public boolean isJsr() {
-        return this == RiKind.Jsr;
-    }
-
-    /**
-     * Converts this value type to a string.
-     */
-    @Override
-    public String toString() {
-        return javaName;
-    }
-
-    /**
-     * Marker interface for types that should be {@linkplain RiKind#format(Object) formatted}
-     * with their {@link Object#toString()} value.
-     */
-    public interface FormatWithToString {}
-
-    /**
-     * Gets a formatted string for a given value of this kind.
-     *
-     * @param value a value of this kind
-     * @return a formatted string for {@code value} based on this kind
-     */
-    public String format(Object value) {
-        if (isObject()) {
-            if (value == null) {
-                return "null";
-            } else {
-                if (value instanceof String) {
-                    String s = (String) value;
-                    if (s.length() > 50) {
-                        return "\"" + s.substring(0, 30) + "...\"";
-                    } else {
-                        return " \"" + s + '"';
-                    }
-                } else if (value instanceof RiType) {
-                    return "class " + CiUtil.toJavaName((RiType) value);
-                } else if (value instanceof Enum || value instanceof FormatWithToString) {
-                    return String.valueOf(value);
-                } else if (value instanceof Class< ? >) {
-                    return ((Class< ? >) value).getName() + ".class";
-                } else if (value.getClass().isArray()) {
-                    return formatArray(value);
-                } else {
-                    return CiUtil.getSimpleName(value.getClass(), true) + "@" + System.identityHashCode(value);
-                }
-            }
-        } else {
-            return value.toString();
-        }
-    }
-
-    private static final int MAX_FORMAT_ARRAY_LENGTH = Integer.getInteger("maxFormatArrayLength", 5);
-
-    private static String formatArray(Object array) {
-        Class< ? > componentType = array.getClass().getComponentType();
-        assert componentType != null;
-        int arrayLength = Array.getLength(array);
-        StringBuilder buf = new StringBuilder(CiUtil.getSimpleName(componentType, true)).
-                        append('[').
-                        append(arrayLength).
-                        append("]{");
-        int length = Math.min(MAX_FORMAT_ARRAY_LENGTH, arrayLength);
-        boolean primitive = componentType.isPrimitive();
-        for (int i = 0; i < length; i++) {
-            if (primitive) {
-                buf.append(Array.get(array, i));
-            } else {
-                Object o = ((Object[]) array)[i];
-                buf.append(RiKind.Object.format(o));
-            }
-            if (i != length - 1) {
-                buf.append(", ");
-            }
-        }
-        if (arrayLength != length) {
-            buf.append(", ...");
-        }
-        return buf.append('}').toString();
-    }
-
-    public final char signatureChar() {
-        return Character.toUpperCase(typeChar);
-    }
-
-    public final int arrayBaseOffset() {
-        switch(this) {
-            case Boolean:
-                return Unsafe.ARRAY_BOOLEAN_BASE_OFFSET;
-            case Byte:
-                return Unsafe.ARRAY_BYTE_BASE_OFFSET;
-            case Char:
-                return Unsafe.ARRAY_CHAR_BASE_OFFSET;
-            case Short:
-                return Unsafe.ARRAY_SHORT_BASE_OFFSET;
-            case Int:
-                return Unsafe.ARRAY_INT_BASE_OFFSET;
-            case Long:
-                return Unsafe.ARRAY_LONG_BASE_OFFSET;
-            case Float:
-                return Unsafe.ARRAY_FLOAT_BASE_OFFSET;
-            case Double:
-                return Unsafe.ARRAY_DOUBLE_BASE_OFFSET;
-            case Object:
-                return Unsafe.ARRAY_OBJECT_BASE_OFFSET;
-            default:
-                assert false : "unexpected kind: " + this;
-                return -1;
-        }
-    }
-
-    public final int arrayIndexScale() {
-        switch(this) {
-            case Boolean:
-                return Unsafe.ARRAY_BOOLEAN_INDEX_SCALE;
-            case Byte:
-                return Unsafe.ARRAY_BYTE_INDEX_SCALE;
-            case Char:
-                return Unsafe.ARRAY_CHAR_INDEX_SCALE;
-            case Short:
-                return Unsafe.ARRAY_SHORT_INDEX_SCALE;
-            case Int:
-                return Unsafe.ARRAY_INT_INDEX_SCALE;
-            case Long:
-                return Unsafe.ARRAY_LONG_INDEX_SCALE;
-            case Float:
-                return Unsafe.ARRAY_FLOAT_INDEX_SCALE;
-            case Double:
-                return Unsafe.ARRAY_DOUBLE_INDEX_SCALE;
-            case Object:
-                return Unsafe.ARRAY_OBJECT_INDEX_SCALE;
-            default:
-                assert false : "unexpected kind: " + this;
-                return -1;
-        }
-    }
-
-    public RiConstant readUnsafeConstant(Object value, long displacement) {
-        assert value != null;
-        Unsafe u = Unsafe.getUnsafe();
-        switch(this) {
-            case Boolean:
-                return RiConstant.forBoolean(u.getBoolean(value, displacement));
-            case Byte:
-                return RiConstant.forByte(u.getByte(value, displacement));
-            case Char:
-                return RiConstant.forChar(u.getChar(value, displacement));
-            case Short:
-                return RiConstant.forShort(u.getShort(value, displacement));
-            case Int:
-                return RiConstant.forInt(u.getInt(value, displacement));
-            case Long:
-                return RiConstant.forLong(u.getLong(value, displacement));
-            case Float:
-                return RiConstant.forFloat(u.getFloat(value, displacement));
-            case Double:
-                return RiConstant.forDouble(u.getDouble(value, displacement));
-            case Object:
-                return RiConstant.forObject(u.getObject(value, displacement));
-            default:
-                assert false : "unexpected kind: " + this;
-                return null;
-        }
-    }
-
-    public long minValue() {
-        switch (this) {
-            case Boolean:
-                return 0;
-            case Byte:
-                return java.lang.Byte.MIN_VALUE;
-            case Char:
-                return java.lang.Character.MIN_VALUE;
-            case Short:
-                return java.lang.Short.MIN_VALUE;
-            case Jsr:
-            case Int:
-                return java.lang.Integer.MIN_VALUE;
-            case Long:
-                return java.lang.Long.MIN_VALUE;
-            default:
-                throw new IllegalArgumentException("illegal call to minValue on " + this);
-        }
-    }
-
-    public long maxValue() {
-        switch (this) {
-            case Boolean:
-                return 1;
-            case Byte:
-                return java.lang.Byte.MAX_VALUE;
-            case Char:
-                return java.lang.Character.MAX_VALUE;
-            case Short:
-                return java.lang.Short.MAX_VALUE;
-            case Jsr:
-            case Int:
-                return java.lang.Integer.MAX_VALUE;
-            case Long:
-                return java.lang.Long.MAX_VALUE;
-            default:
-                throw new IllegalArgumentException("illegal call to maxValue on " + this);
-        }
-    }
-
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiMethod.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents resolved and unresolved methods. Methods, like fields and types, are resolved through
- * {@link RiConstantPool constant pools}, and their actual implementation is provided by the {@link RiRuntime runtime}
- * to the compiler.
- */
-public interface RiMethod {
-
-    /**
-     * Gets the name of the method as a string.
-     * @return the name of the method
-     */
-    String name();
-
-    /**
-     * Gets the type in which this method is declared.
-     * @return the type in which this method is declared
-     */
-    RiType holder();
-
-    /**
-     * Gets the signature of the method.
-     * @return the signature of the method
-     */
-    RiSignature signature();
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiProfilingInfo.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-import com.oracle.max.cri.ci.*;
-
-
-/**
- * Provides access to the profiling information of one specific method.
- * Every accessor method returns the information that is available at the time of invocation.
- * If a method is invoked multiple times, it may return significantly different results for every invocation
- * as the profiling information may be changed by other Java threads at any time.
- */
-public interface RiProfilingInfo {
-
-    /**
-     * Gets the length of the code associated with this profile.
-     */
-    int codeSize();
-
-    /**
-     * Returns an estimate of how often the branch at the given byte code was taken.
-     * @return The estimated probability, with 0.0 meaning never and 1.0 meaning always, or -1 if this information is not available.
-     */
-    double getBranchTakenProbability(int bci);
-
-    /**
-     * Returns an estimate of how often the switch cases are taken at the given BCI.
-     * The default case is stored as the last entry.
-     * @return A double value that contains the estimated probabilities, with 0.0 meaning never and 1.0 meaning always,
-     * or -1 if this information is not available.
-     */
-    double[] getSwitchProbabilities(int bci);
-
-    /**
-     * Returns the TypeProfile for the given BCI.
-     * @return Returns an RiTypeProfile object, or null if not available.
-     */
-    RiTypeProfile getTypeProfile(int bci);
-
-    /**
-     * Returns information if the given BCI did ever throw an exception.
-     * @return {@link RiExceptionSeen#TRUE} if the instruction has thrown an exception at least once,
-     * {@link RiExceptionSeen#FALSE} if it never threw an exception, and {@link RiExceptionSeen#NOT_SUPPORTED}
-     * if this information was not recorded.
-     */
-    RiExceptionSeen getExceptionSeen(int bci);
-
-    /**
-     * Returns an estimate how often the current BCI was executed. Avoid comparing execution counts to each other,
-     * as the returned value highly depends on the time of invocation.
-     * @return the estimated execution count or -1 if not available.
-     */
-    int getExecutionCount(int bci);
-
-    /**
-     * Returns how frequently a method was deoptimized for the given deoptimization reason. This only indicates how
-     * often the method did fall back to the interpreter for the execution and does not indicate how often it was recompiled.
-     * @param reason the reason for which the number of deoptimizations should be queried
-     * @return the number of times the compiled method deoptimized for the given reason.
-     */
-    int getDeoptimizationCount(CiDeoptReason reason);
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiResolvedField.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-/**
- * Represents a reference to a resolved field. Fields, like methods and types, are
- * resolved through {@link RiConstantPool constant pools}, and their actual implementation is provided by the
- * {@link RiRuntime runtime} to the compiler.
- */
-public interface RiResolvedField extends RiField {
-
-    /**
-     * Gets the access flags for this field. Only the flags specified in the JVM specification
-     * will be included in the returned mask. The utility methods in the {@link Modifier} class
-     * should be used to query the returned mask for the presence/absence of individual flags.
-     * @return the mask of JVM defined field access flags defined for this field
-     */
-    int accessFlags();
-
-    /**
-     * Gets the constant value of this field if available.
-     * @param receiver object from which this field's value is to be read. This value is ignored if this field is static.
-     * @return the constant value of this field or {@code null} if the constant value is not available
-     */
-    RiConstant constantValue(RiConstant receiver);
-
-    /**
-     * Gets the holder of this field as a compiler-runtime interface type.
-     * @return the holder of this field
-     */
-    RiResolvedType holder();
-
-    /**
-     * Returns this field's annotation of a specified type.
-     *
-     * @param annotationClass the Class object corresponding to the annotation type
-     * @return the annotation of type {@code annotationClass} for this field if present, else null
-     */
-    <T extends Annotation> T getAnnotation(Class<T> annotationClass);
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiResolvedMethod.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-import java.util.*;
-
-import com.oracle.max.cri.ci.*;
-
-
-/**
- * Represents resolved methods. Methods, like fields and types, are resolved through
- * {@link RiConstantPool constant pools}, and their actual implementation is provided by the {@link RiRuntime runtime}
- * to the compiler.
- */
-public interface RiResolvedMethod extends RiMethod {
-
-    /**
-     * Gets the bytecode of the method, if the method {@linkplain #isResolved()} and has code.
-     * The returned byte array does not contain breakpoints or non-Java bytecodes.
-     * @return the bytecode of the method or {@code null} if none is available
-     */
-    byte[] code();
-
-    /**
-     * Gets the size of the bytecode of the method, if the method {@linkplain #isResolved()} and has code.
-     * @return the size of the bytecode in bytes, or 0 if no bytecode is available
-     */
-    int codeSize();
-
-    /**
-     * Gets the size of the compiled machine code.
-     * @return the size of the compiled machine code in bytes, or 0 if no compiled code exists.
-     */
-    int compiledCodeSize();
-
-    /**
-     * Gets an estimate how complex it is to compile this method.
-     * @return A value >= 0, where higher means more complex.
-     */
-    int compilationComplexity();
-
-    /**
-     * Gets the symbol used to link this method if it is native, otherwise {@code null}.
-     */
-    String jniSymbol();
-
-    /**
-     * Gets the type in which this method is declared.
-     * @return the type in which this method is declared
-     */
-    RiResolvedType holder();
-
-    /**
-     * Gets the maximum number of locals used in this method's bytecode.
-     * @return the maximum number of locals
-     */
-    int maxLocals();
-
-    /**
-     * Gets the maximum number of stack slots used in this method's bytecode.
-     * @return the maximum number of stack slots
-     */
-    int maxStackSize();
-
-    /**
-     * Checks whether this method has balanced monitor operations.
-     * @return {@code true} if the method has balanced monitor operations
-     */
-    boolean hasBalancedMonitors();
-
-    /**
-     * Gets the access flags for this method. Only the flags specified in the JVM specification
-     * will be included in the returned mask. The utility methods in the {@link Modifier} class
-     * should be used to query the returned mask for the presence/absence of individual flags.
-     * @return the mask of JVM defined method access flags defined for this method
-     */
-    int accessFlags();
-
-    /**
-     * Checks whether this method is a leaf method.
-     * @return {@code true} if the method is a leaf method (that is, is final or private)
-     */
-    boolean isLeafMethod();
-
-    /**
-     * Checks whether this method is a class initializer.
-     * @return {@code true} if the method is a class initializer
-     */
-    boolean isClassInitializer();
-
-    /**
-     * Checks whether this method is a constructor.
-     * @return {@code true} if the method is a constructor
-     */
-    boolean isConstructor();
-
-    /**
-     * Checks whether this method has been overridden. Decisions made based
-     * on a method being overridden must be registered as dependencies.
-     * @return {@code true} if the method has been overridden
-     */
-    boolean isOverridden();
-
-    /**
-     * Checks whether the compiler can insert safepoint polls in this method.
-     * @return {@code true} if the method cannot have safepoint polls inserted
-     */
-    boolean noSafepointPolls();
-
-    /**
-     * Gets a map from bytecode indexes to bit maps denoting the live locals at that position.
-     * If a non-null array is return, its length is guaranteed to be equal to {@code code().length}.
-     *
-     * @return the liveness map if it is available; {@code null} otherwise
-     */
-    CiBitMap[] livenessMap();
-
-    /**
-     * Checks whether this method can be statically bound (that is, it is final or private or static).
-     * @return {@code true} if this method can be statically bound
-     */
-    boolean canBeStaticallyBound();
-
-    /**
-     * Gets the list of exception handlers for this method.
-     * @return the list of exception handlers
-     */
-    RiExceptionHandler[] exceptionHandlers();
-
-    /**
-     * Gets a stack trace element for this method and a given bytecode index.
-     */
-    StackTraceElement toStackTraceElement(int bci);
-
-    /**
-     * Temporary work-around to support the @ACCESSOR Maxine annotation.
-     * Non-Maxine VMs should just return {@code null}.
-     */
-    RiResolvedType accessor();
-
-    /**
-     * Gets the intrinsic id of this method.
-     */
-    String intrinsic();
-
-    /**
-     * Provides an estimate of how often this method has been executed.
-     * @return The number of invocations, or -1 if this information isn't available.
-     */
-    int invocationCount();
-
-    /**
-     * Returns an object that provides access to the method's profiling information.
-     * @return The profiling information recorded for this method.
-     */
-    RiProfilingInfo profilingInfo();
-
-    /**
-     * Returns a map that the compiler can use to store objects that should survive the current compilation.
-     */
-    Map<Object, Object> compilerStorage();
-
-    /**
-     * Returns a pointer to the method's constant pool.
-     * @return the constant pool
-     */
-    RiConstantPool getConstantPool();
-
-    /**
-     * Returns this method's annotation of a specified type.
-     *
-     * @param annotationClass the Class object corresponding to the annotation type
-     * @return the annotation of type {@code annotationClass} for this method if present, else null
-     */
-    <T extends Annotation> T getAnnotation(Class<T> annotationClass);
-
-    /**
-     * Returns an array of arrays that represent the annotations on the formal
-     * parameters, in declaration order, of this method.
-     *
-     * @see Method#getParameterAnnotations()
-     * @see CiUtil#getParameterAnnotation(int, RiResolvedMethod)
-     */
-    Annotation[][] getParameterAnnotations();
-
-    /**
-     * Returns an array of {@link Type} objects that represent the formal
-     * parameter types, in declaration order, of this method.
-     *
-     * @see Method#getGenericParameterTypes()
-     */
-    Type[] getGenericParameterTypes();
-
-    /**
-     * Returns a {@link Type} object that represents the formal return type of this method.
-     *
-     * @see Method#getGenericReturnType()
-     */
-    Type getGenericReturnType();
-
-    /**
-     * @return {@code true} if this method can be inlined
-     */
-    boolean canBeInlined();
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiResolvedType.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import com.oracle.max.cri.ci.*;
-
-/**
- * Represents a resolved in the compiler-runtime interface. Types include primitives, objects, {@code void},
- * and arrays thereof. Types, like fields and methods, are resolved through {@link RiConstantPool constant pools}, and
- * their actual implementation is provided by the {@link RiRuntime runtime} to the compiler.
- */
-public interface RiResolvedType extends RiType {
-
-    /**
-     * Gets the encoding of (that is, a constant representing the value of) the specified part of this type.
-     * @param r the part of the this type
-     * @return a constant representing a reference to the specified part of this type
-     */
-    RiConstant getEncoding(Representation r);
-
-    /**
-     * Checks whether this type has any subclasses so far. Any decisions
-     * based on this information require the registration of a dependency, since
-     * this information may change.
-     * @return {@code true} if this class has subclasses
-     */
-    boolean hasSubclass();
-
-    /**
-     * Checks whether this type has a finalizer method.
-     * @return {@code true} if this class has a finalizer
-     */
-    boolean hasFinalizer();
-
-    /**
-     * Checks whether this type has any finalizable subclasses so far. Any decisions
-     * based on this information require the registration of a dependency, since
-     * this information may change.
-     * @return {@code true} if this class has any subclasses with finalizers
-     */
-    boolean hasFinalizableSubclass();
-
-    /**
-     * Checks whether this type is an interface.
-     * @return {@code true} if this type is an interface
-     */
-    boolean isInterface();
-
-    /**
-     * Checks whether this type is an instance class.
-     * @return {@code true} if this type is an instance class
-     */
-    boolean isInstanceClass();
-
-    /**
-     * Checks whether this type is an array class.
-     * @return {@code true} if this type is an array class
-     */
-    boolean isArrayClass();
-
-    /**
-     * Gets the access flags for this type. Only the flags specified in the JVM specification
-     * will be included in the returned mask. The utility methods in the {@link Modifier} class
-     * should be used to query the returned mask for the presence/absence of individual flags.
-     * @return the mask of JVM defined class access flags defined for this type
-     */
-    int accessFlags();
-
-    /**
-     * Checks whether this type is initialized.
-     * @return {@code true} if this type is initialized
-     */
-    boolean isInitialized();
-
-    /**
-     * Checks whether this type is a subtype of another type.
-     * @param other the type to test
-     * @return {@code true} if this type a subtype of the specified type
-     */
-    boolean isSubtypeOf(RiResolvedType other);
-
-    /**
-     * Checks whether the specified object is an instance of this type.
-     * @param obj the object to test
-     * @return {@code true} if the object is an instance of this type
-     */
-    boolean isInstance(RiConstant obj);
-
-    /**
-     * Attempts to get an exact type for this type. Final classes,
-     * arrays of final classes, and primitive types all have exact types.
-     * @return the exact type of this type, if it exists; {@code null} otherwise
-     */
-    RiResolvedType exactType();
-
-    /**
-     * Gets the super type of this type or {@code null} if no such type exists.
-     */
-    RiResolvedType superType();
-
-    /**
-     * Walks the class hierarchy upwards and returns the least common type that is a super type of both
-     * the current and the given type.
-     * @return the least common type that is a super type of both the current and the given type, or null if primitive types are involved.
-     */
-    RiResolvedType leastCommonAncestor(RiResolvedType otherType);
-
-    /**
-     * Attempts to get the unique concrete subtype of this type.
-     * @return the exact type of this type, if it exists; {@code null} otherwise
-     */
-    RiResolvedType uniqueConcreteSubtype();
-
-    /**
-     * For array types, gets the type of the components.
-     * @return the component type of this array type
-     */
-    RiResolvedType componentType();
-
-    /**
-     * Gets the type representing an array with elements of this type.
-     * @return a new compiler interface type representing an array of this type
-     */
-    RiResolvedType arrayOf();
-
-    /**
-     * Resolves the method implementation for virtual dispatches on objects
-     * of this dynamic type.
-     * @param method the method to select the implementation of
-     * @return the method implementation that would be selected at runtime
-     */
-    RiResolvedMethod resolveMethodImpl(RiResolvedMethod method);
-
-    /**
-     * Given an RiMethod a, returns a concrete RiMethod b that is the only possible
-     * unique target for a virtual call on a(). Returns {@code null} if either no
-     * such concrete method or more than one such method exists. Returns the method a
-     * if a is a concrete method that is not overridden. If the compiler uses the
-     * result of this method for its compilation, it must register an assumption
-     * (see {@link CiAssumptions}), because dynamic class loading can invalidate
-     * the result of this method.
-     * @param method the method a for which a unique concrete target is searched
-     * @return the unique concrete target or {@code null} if no such target exists
-     *         or assumptions are not supported by this runtime
-     */
-    RiResolvedMethod uniqueConcreteMethod(RiResolvedMethod method);
-
-    /**
-     * Returns the instance fields declared in this class sorted by field offset.
-     * @return an array of instance fields
-     */
-    RiResolvedField[] declaredFields();
-
-    /**
-     * Returns this type's annotation of a specified type.
-     *
-     * @param annotationClass the Class object corresponding to the annotation type
-     * @return the annotation of type {@code annotationClass} for this type if present, else null
-     */
-    <T extends Annotation> T getAnnotation(Class<T> annotationClass);
-
-    /**
-     * Returns the java.lang.Class object representing this RiType instance or {@code null} if none exists.
-     * @return the java.lang.Class object
-     */
-    Class<?> toJava();
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.lang.reflect.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
 
 /**
@@ -132,13 +133,13 @@
      * Encodes a deoptimization action and a deoptimization reason in an integer value.
      * @return the encoded value as an integer
      */
-    int encodeDeoptActionAndReason(CiDeoptAction action, CiDeoptReason reason);
+    int encodeDeoptActionAndReason(CiDeoptAction action, RiDeoptReason reason);
 
     /**
      * Converts a RiDeoptReason into an integer value.
      * @return An integer value representing the given RiDeoptReason.
      */
-    int convertDeoptReason(CiDeoptReason reason);
+    int convertDeoptReason(RiDeoptReason reason);
 
     /**
      * Converts a RiDeoptAction into an integer value.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiSignature.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents a method signature provided by the runtime.
- *
- * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#7035">Method Descriptors</a>
- */
-public interface RiSignature {
-    /**
-     * Gets the number of arguments in this signature, adding 1 for a receiver if requested.
-     *
-     * @param receiver true if 1 is to be added to the result for a receiver
-     * @return the number of arguments + 1 iff {@code receiver == true}
-     */
-    int argumentCount(boolean receiver);
-
-    /**
-     * Gets the argument type at the specified position. This method will return a
-     * {@linkplain RiType#isResolved() resolved} type if possible but without
-     * triggering any class loading or resolution.
-     *
-     * @param index the index into the parameters, with {@code 0} indicating the first parameter
-     * @param accessingClass the context of the type lookup. If accessing class is resolved, its class loader
-     *        is used to retrieve an existing resolved type. This value can be {@code null} if the caller does
-     *        not care for a resolved type.
-     * @return the {@code index}'th argument type
-     */
-    RiType argumentTypeAt(int index, RiResolvedType accessingClass);
-
-    /**
-     * Gets the argument kind at the specified position.
-     * @param index the index into the parameters, with {@code 0} indicating the first parameter
-     * @param architecture When true, the architecture-specific kind used for emitting machine code is returned.
-     *        When false, the kind according to the Java specification is returned.
-     * @return the kind of the argument at the specified position
-     */
-    RiKind argumentKindAt(int index, boolean architecture);
-
-    /**
-     * Gets the return type of this signature. This method will return a
-     * {@linkplain RiResolvedType resolved} type if possible but without
-     * triggering any class loading or resolution.
-     *
-     * @param accessingClass the context of the type lookup. If accessing class is resolved, its class loader
-     *        is used to retrieve an existing resolved type. This value can be {@code null} if the caller does
-     *        not care for a resolved type.
-     * @return the compiler interface type representing the return type
-     */
-    RiType returnType(RiType accessingClass);
-
-    /**
-     * Gets the return kind of this signature.
-     * @param architectureSpecific When true, the architecture-specific kind used for emitting machine code is returned.
-     *        When false, the kind according to the Java specification is returned.
-     * @return the return kind
-     */
-    RiKind returnKind(boolean architectureSpecific);
-
-    /**
-     * Converts this signature to a string.
-     * @return the signature as a string
-     */
-    String asString();
-
-    /**
-     * Gets the size, in Java slots, of the arguments to this signature.
-     * @param withReceiver {@code true} if to add a slot for a receiver object; {@code false} not to include the receiver
-     * @return the size of the arguments in slots
-     */
-    int argumentSlots(boolean withReceiver);
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiType.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-/**
- * Represents a resolved or unresolved type in the compiler-runtime interface. Types include primitives, objects, {@code void},
- * and arrays thereof.
- */
-public interface RiType {
-
-    /**
-     * Represents each of the several different parts of the runtime representation of
-     * a type which compiled code may need to reference individually. These may or may not be
-     * different objects or data structures, depending on the runtime system.
-     */
-    public enum Representation {
-        /**
-         * The runtime representation of the data structure containing the static fields of this type.
-         */
-        StaticFields,
-
-        /**
-         * The runtime representation of the Java class object of this type.
-         */
-        JavaClass,
-
-        /**
-         * The runtime representation of the "hub" of this type--that is, the closest part of the type
-         * representation which is typically stored in the object header.
-         */
-        ObjectHub
-    }
-
-    /**
-     * Gets the name of this type in internal form. The following are examples of strings returned by this method:
-     * <pre>
-     *     "Ljava/lang/Object;"
-     *     "I"
-     *     "[[B"
-     * </pre>
-     *
-     * @return the name of this type in internal form
-     */
-    String name();
-
-    /**
-     * For array types, gets the type of the components.
-     * @return the component type of this array type
-     */
-    RiType componentType();
-
-    /**
-     * Gets the type representing an array with elements of this type.
-     * @return a new compiler interface type representing an array of this type
-     */
-    RiType arrayOf();
-
-    /**
-     * Gets the kind of this compiler interface type.
-     * @param architecture When true, the architecture-specific kind used for emitting machine code is returned.
-     *        When false, the kind according to the Java specification is returned.
-     * @return the kind
-     */
-    RiKind kind(boolean architecture);
-
-    /**
-     * Gets the kind used to represent the specified part of this type.
-     * @param r the part of the this type
-     * @return the kind of constants for the specified part of the type
-     */
-    RiKind getRepresentationKind(Representation r);
-
-    RiResolvedType resolve(RiResolvedType accessingClass);
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiTypeProfile.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-import java.io.*;
-
-/**
- * This profile object represents the type profile at a specific BCI. The precision of the supplied values may vary,
- * but a runtime that provides this information should be aware that it will be used to guide performance-critical
- * decisions like speculative inlining, etc.
- */
-public final class RiTypeProfile implements Serializable {
-
-    private static final long serialVersionUID = -6877016333706838441L;
-
-    /**
-     * A profiled type that has a probability. Profiled types are naturally sorted in
-     * descending order of their probabilities.
-     */
-    public static class ProfiledType implements Comparable<ProfiledType>, Serializable {
-        private static final long serialVersionUID = 7838575753661305744L;
-        public final RiResolvedType type;
-        public final double probability;
-
-        public ProfiledType(RiResolvedType type, double probability) {
-            assert type != null;
-            assert probability >= 0.0D && probability <= 1.0D;
-            this.type = type;
-            this.probability = probability;
-        }
-
-        @Override
-        public int compareTo(ProfiledType o) {
-            if (probability > o.probability) {
-                return -1;
-            } else if (probability < o.probability) {
-                return 1;
-            }
-            return 0;
-        }
-    }
-
-    private final double notRecordedProbability;
-    private final ProfiledType[] ptypes;
-
-    /**
-     * Determines if an array of profiled types are sorted in descending order of their probabilities.
-     */
-    public static boolean isSorted(ProfiledType[] ptypes) {
-        for (int i = 1; i < ptypes.length; i++) {
-            if (ptypes[i - 1].probability < ptypes[i].probability) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    public RiTypeProfile(double notRecordedProbability, ProfiledType... ptypes) {
-        this.ptypes = ptypes;
-        this.notRecordedProbability = notRecordedProbability;
-        assert isSorted(ptypes);
-    }
-
-    /**
-     * Returns the estimated probability of all types that could not be recorded due to profiling limitations.
-     * @return double value >= 0.0 and <= 1.0
-     */
-    public double getNotRecordedProbability() {
-        return notRecordedProbability;
-    }
-
-    /**
-     * A list of types for which the runtime has recorded probability information.
-     */
-    public ProfiledType[] getTypes() {
-        return ptypes;
-    }
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiValue.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.oracle.max.cri.ri;
-
-import java.io.*;
-
-/**
- * Abstract base class for values manipulated by the compiler. All values have a {@linkplain RiKind kind} and are immutable.
- */
-public abstract class RiValue implements Serializable {
-    private static final long serialVersionUID = -6909397188697766469L;
-
-    @SuppressWarnings("serial")
-    public static RiValue IllegalValue = new RiValue(RiKind.Illegal) {
-        @Override
-        public String toString() {
-            return "-";
-        }
-    };
-
-    /**
-     * The kind of this value.
-     */
-    public final RiKind kind;
-
-    /**
-     * Initializes a new value of the specified kind.
-     * @param kind the kind
-     */
-    protected RiValue(RiKind kind) {
-        this.kind = kind;
-    }
-
-    /**
-     * String representation of the kind, which should be the end of all {@link #toString()} implementation of subclasses.
-     */
-    protected final String kindSuffix() {
-        return "|" + kind.typeChar;
-    }
-}
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/package-info.java	Thu Jun 07 18:12:01 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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.
- */
-/**
- * The runtime-provided part of the bi-directional interface between the compiler and the runtime system of a virtual machine for the
- * instruction set defined in {@link com.oracle.graal.compiler.graphbuilder.Bytecodes}.
- * <p>
- * Unlike the {@link com.oracle.max.cri.ci compiler-provided interface}, the runtime-provided interface is specified largely
- * using interfaces, that must be implemented by classes provided by a specific runtime implementation.
- * <p>
- * {@link com.oracle.max.cri.ri.RiRuntime} encapsulates the main functionality of the runtime for the compiler.
- * <p>
- * Types (i.e., primitives, classes and interfaces}, fields and methods are represented by {@link com.oracle.max.cri.ri.RiType},
- * {@link com.oracle.max.cri.ri.RiField} and {@link com.oracle.max.cri.ri.RiMethod}, respectively, with additional support from
- * {@link com.oracle.max.cri.ri.RiSignature} and {@link com.oracle.max.cri.ri.RiExceptionHandler}. Access to the runtime constant pool
- * is through {@link com.oracle.max.cri.ri.RiConstantPool}.
- */
-package com.oracle.max.cri.ri;
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java	Thu Jun 07 18:24:06 2012 +0200
@@ -26,9 +26,9 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ci.CiAddress.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Represents an assembler that allows a client such as the runtime system to
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/RiXirGenerator.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/RiXirGenerator.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.max.cri.xir;
 
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiType.Representation;
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiType.*;
 
 /**
  * Represents the interface through which the compiler requests the XIR for a given bytecode from the runtime system.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirArgument.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirArgument.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.max.cri.xir;
 
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * Represents an argument to an {@link XirSnippet}.
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirSnippet.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirSnippet.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,8 +24,8 @@
 
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.CiTargetMethod.*;
-import com.oracle.max.cri.ri.*;
 import com.oracle.max.cri.xir.CiXirAssembler.*;
 
 /**
--- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseProfilingInfo.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseProfilingInfo.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.max.criutils;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 
 /**
@@ -78,7 +78,7 @@
     }
 
     @Override
-    public int getDeoptimizationCount(CiDeoptReason reason) {
+    public int getDeoptimizationCount(RiDeoptReason reason) {
         return 0;
     }
 
--- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedField.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedField.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.max.criutils;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * A implementation of {@link RiField} for an unresolved field.
--- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedMethod.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/BaseUnresolvedMethod.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,8 @@
  */
 package com.oracle.max.criutils;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * A implementation of {@link RiMethod} for an unresolved method.
--- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/CompilationPrinter.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/CompilationPrinter.java	Thu Jun 07 18:24:06 2012 +0200
@@ -27,8 +27,8 @@
 import java.io.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
 
 /**
  * Utility for printing compilation related data structures at various compilation phases.
@@ -106,7 +106,7 @@
     /**
      * Formats a given {@linkplain FrameState JVM frame state} as a multi line string.
      */
-    protected String debugInfoToString(CiCodePos codePos, CiBitMap registerRefMap, CiBitMap frameRefMap, CiArchitecture arch) {
+    protected String debugInfoToString(CiCodePos codePos, RiBitMap registerRefMap, RiBitMap frameRefMap, CiArchitecture arch) {
         StringBuilder sb = new StringBuilder();
 
         if (registerRefMap != null) {
--- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/JniMangle.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/JniMangle.java	Thu Jun 07 18:24:06 2012 +0200
@@ -22,8 +22,7 @@
  */
 package com.oracle.max.criutils;
 
-import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
+import com.oracle.graal.api.meta.*;
 
 /**
  * A utility for mangling Java method name and signatures into C function names.
@@ -81,7 +80,7 @@
      */
     public static String mangleMethod(RiResolvedType declaringClass, String name, RiSignature signature, boolean splitSuffix) {
         final StringBuilder result = new StringBuilder(100);
-        final String declaringClassName = CiUtil.toJavaName(declaringClass);
+        final String declaringClassName = RiUtil.toJavaName(declaringClass);
         result.append("Java_").append(mangle(declaringClassName)).append('_').append(mangle(name));
         if (signature != null) {
             if (splitSuffix) {
--- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/SnapshotProfilingInfo.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/SnapshotProfilingInfo.java	Thu Jun 07 18:24:06 2012 +0200
@@ -24,6 +24,7 @@
 
 import java.io.*;
 
+import com.oracle.graal.api.meta.*;
 import com.oracle.max.cri.ci.*;
 import com.oracle.max.cri.ri.*;
 
@@ -48,7 +49,7 @@
         typeProfiles = new RiTypeProfile[codeSize];
         exceptions = new RiExceptionSeen[codeSize];
         executions = new int[codeSize];
-        deopts = new int[CiDeoptReason.values().length];
+        deopts = new int[RiDeoptReason.values().length];
 
         for (int bci = 0; bci < codeSize; bci++) {
             executions[bci] = other.getExecutionCount(bci);
@@ -57,7 +58,7 @@
             switches[bci] = other.getSwitchProbabilities(bci);
             typeProfiles[bci] = other.getTypeProfile(bci);
         }
-        for (CiDeoptReason reason: CiDeoptReason.values()) {
+        for (RiDeoptReason reason: RiDeoptReason.values()) {
             deopts[reason.ordinal()] = other.getDeoptimizationCount(reason);
         }
     }
@@ -82,7 +83,7 @@
     public int getExecutionCount(int bci) {
         return bci < executions.length ? executions[bci] : -1;
     }
-    public int getDeoptimizationCount(CiDeoptReason reason) {
+    public int getDeoptimizationCount(RiDeoptReason reason) {
         return deopts[reason.ordinal()];
     }
 
--- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/TypeCheckHints.java	Thu Jun 07 18:12:01 2012 +0200
+++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/TypeCheckHints.java	Thu Jun 07 18:24:06 2012 +0200
@@ -25,9 +25,9 @@
 import java.lang.reflect.*;
 import java.util.*;
 
+import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.meta.RiTypeProfile.*;
 import com.oracle.max.cri.ci.*;
-import com.oracle.max.cri.ri.*;
-import com.oracle.max.cri.ri.RiTypeProfile.ProfiledType;
 
 /**
  * Utility for deriving hint types for a type check instruction (e.g. checkcast or instanceof)