# HG changeset patch # User Thomas Wuerthinger # Date 1339192062 -7200 # Node ID a891c53a295b245ad68420e67b54bc82e3c00f07 # Parent bc647d8b0080a7758f5b8232496969e940ee4e09 Renaming RiKind => Kind. diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java Fri Jun 08 23:47:42 2012 +0200 @@ -37,7 +37,7 @@ /** * A sentinel value used as a place holder in an instruction stream for an address that will be patched. */ - public static final CiAddress Placeholder = new CiAddress(RiKind.Illegal, Value.IllegalValue); + public static final CiAddress Placeholder = new CiAddress(Kind.Illegal, Value.IllegalValue); /** * Base register that defines the start of the address computation. @@ -66,7 +66,7 @@ * @param kind the kind of the value being addressed * @param base the base register */ - public CiAddress(RiKind kind, Value base) { + public CiAddress(Kind kind, Value base) { this(kind, base, IllegalValue, Scale.Times1, 0); } @@ -76,7 +76,7 @@ * @param base the base register * @param displacement the displacement */ - public CiAddress(RiKind kind, Value base, int displacement) { + public CiAddress(Kind kind, Value base, int displacement) { this(kind, base, IllegalValue, Scale.Times1, displacement); } @@ -89,7 +89,7 @@ * @param scale the scaling factor * @param displacement the displacement */ - public CiAddress(RiKind kind, Value base, Value index, Scale scale, int displacement) { + public CiAddress(Kind kind, Value base, Value index, Scale scale, int displacement) { super(kind); this.base = base; this.index = index; diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java Fri Jun 08 23:47:42 2012 +0200 @@ -32,7 +32,7 @@ public final boolean eliminated; public CiMonitorValue(Value owner, Value lockData, boolean eliminated) { - super(RiKind.Illegal); + super(Kind.Illegal); this.owner = owner; this.lockData = lockData; this.eliminated = eliminated; diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegister.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegister.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegister.java Fri Jun 08 23:47:42 2012 +0200 @@ -76,7 +76,7 @@ /** * An array of {@link CiRegisterValue} objects, for this register, with one entry - * per {@link RiKind}, indexed by {@link RiKind#ordinal}. + * per {@link Kind}, indexed by {@link Kind#ordinal}. */ private final CiRegisterValue[] values; @@ -119,8 +119,8 @@ this.flags = createMask(flags); this.encoding = encoding; - values = new CiRegisterValue[RiKind.VALUES.length]; - for (RiKind kind : RiKind.VALUES) { + values = new CiRegisterValue[Kind.VALUES.length]; + for (Kind kind : Kind.VALUES) { values[kind.ordinal()] = new CiRegisterValue(kind, this); } } @@ -142,16 +142,16 @@ * @param kind the specified kind * @return the {@link CiRegisterValue} */ - public CiRegisterValue asValue(RiKind kind) { + public CiRegisterValue asValue(Kind kind) { return values[kind.ordinal()]; } /** * Gets this register as a {@linkplain CiRegisterValue value} with no particular kind. - * @return a {@link CiRegisterValue} with {@link RiKind#Illegal} kind. + * @return a {@link CiRegisterValue} with {@link Kind#Illegal} kind. */ public CiRegisterValue asValue() { - return asValue(RiKind.Illegal); + return asValue(Kind.Illegal); } /** diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfig.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfig.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfig.java Fri Jun 08 23:47:42 2012 +0200 @@ -37,7 +37,7 @@ /** * Gets the register to be used for returning a value of a given kind. */ - CiRegister getReturnRegister(RiKind kind); + CiRegister getReturnRegister(Kind kind); /** * Gets the register to which {@link CiRegister#Frame} and {@link CiRegister#CallerFrame} are bound. @@ -54,7 +54,7 @@ * @param target the target platform * @param stackOnly ignore registers */ - CiCallingConvention getCallingConvention(Type type, RiKind[] parameters, CiTarget target, boolean stackOnly); + CiCallingConvention getCallingConvention(Type type, Kind[] parameters, CiTarget target, boolean stackOnly); /** * Gets the ordered set of registers that are can be used to pass parameters diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java Fri Jun 08 23:47:42 2012 +0200 @@ -167,7 +167,7 @@ System.arraycopy(src.stackArg0Offsets, 0, stackArg0Offsets, 0, stackArg0Offsets.length); } - public CiRegister getReturnRegister(RiKind kind) { + public CiRegister getReturnRegister(Kind kind) { if (kind.isDouble() || kind.isFloat()) { return floatingPointReturn; } @@ -188,7 +188,7 @@ * This implementation assigns all available registers to parameters before assigning * any stack slots to parameters. */ - public CiCallingConvention getCallingConvention(Type type, RiKind[] parameters, CiTarget target, boolean stackOnly) { + public CiCallingConvention getCallingConvention(Type type, Kind[] parameters, CiTarget target, boolean stackOnly) { Value[] locations = new Value[parameters.length]; int currentGeneral = 0; @@ -196,7 +196,7 @@ int currentStackOffset = stackArg0Offsets[type.ordinal()]; for (int i = 0; i < parameters.length; i++) { - final RiKind kind = parameters[i]; + final Kind kind = parameters[i]; switch (kind) { case Byte: diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java Fri Jun 08 23:47:42 2012 +0200 @@ -26,7 +26,7 @@ /** * Denotes a register that stores a value of a fixed kind. There is exactly one (canonical) instance of {@code - * CiRegisterValue} for each ({@link CiRegister}, {@link RiKind}) pair. Use {@link CiRegister#asValue(RiKind)} to + * CiRegisterValue} for each ({@link CiRegister}, {@link Kind}) pair. Use {@link CiRegister#asValue(Kind)} to * retrieve the canonical {@link CiRegisterValue} instance for a given (register,kind) pair. */ public final class CiRegisterValue extends Value { @@ -40,7 +40,7 @@ /** * Should only be called from {@link CiRegister#CiRegister} to ensure canonicalization. */ - protected CiRegisterValue(RiKind kind, CiRegister register) { + protected CiRegisterValue(Kind kind, CiRegister register) { super(kind); this.reg = register; } diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRuntimeCall.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRuntimeCall.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRuntimeCall.java Fri Jun 08 23:47:42 2012 +0200 @@ -22,7 +22,7 @@ */ package com.oracle.graal.api.code; -import static com.oracle.graal.api.meta.RiKind.*; +import static com.oracle.graal.api.meta.Kind.*; import com.oracle.graal.api.meta.*; @@ -48,10 +48,10 @@ ArithmeticSin(Double, Double), GenericCallback(Object, Object, Object); - public final RiKind resultKind; - public final RiKind[] arguments; + public final Kind resultKind; + public final Kind[] arguments; - private CiRuntimeCall(RiKind resultKind, RiKind... args) { + private CiRuntimeCall(Kind resultKind, Kind... args) { this.resultKind = resultKind; this.arguments = args; } diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java Fri Jun 08 23:47:42 2012 +0200 @@ -22,7 +22,7 @@ */ package com.oracle.graal.api.code; -import static com.oracle.graal.api.meta.RiKind.*; +import static com.oracle.graal.api.meta.Kind.*; import com.oracle.graal.api.meta.*; @@ -45,7 +45,7 @@ * @param inCallerFrame Specifies if the offset is relative to the stack pointer, * or the beginning of the frame (stack pointer + total frame size). */ - public static CiStackSlot get(RiKind kind, int offset, boolean addFrameSize) { + public static CiStackSlot get(Kind kind, int offset, boolean addFrameSize) { assert kind.stackKind() == kind; assert addFrameSize || offset >= 0; @@ -73,7 +73,7 @@ /** * Private constructor to enforce use of {@link #get()} so that a cache can be used. */ - private CiStackSlot(RiKind kind, int offset, boolean addFrameSize) { + private CiStackSlot(Kind kind, int offset, boolean addFrameSize) { super(kind); this.offset = offset; this.addFrameSize = addFrameSize; @@ -162,8 +162,8 @@ private static final CiStackSlot[][] OUT_CACHE = makeCache(PARAM_CACHE_PER_KIND_SIZE, 1, false); private static CiStackSlot[][] makeCache(int cachePerKindSize, int sign, boolean addFrameSize) { - CiStackSlot[][] cache = new CiStackSlot[RiKind.VALUES.length][]; - for (RiKind kind : new RiKind[] {Illegal, Int, Long, Float, Double, Object, Jsr}) { + CiStackSlot[][] cache = new CiStackSlot[Kind.VALUES.length][]; + for (Kind kind : new Kind[] {Illegal, Int, Long, Float, Double, Object, Jsr}) { CiStackSlot[] slots = new CiStackSlot[cachePerKindSize]; for (int i = 0; i < cachePerKindSize; i++) { slots[i] = new CiStackSlot(kind, sign * i * CACHE_GRANULARITY, addFrameSize); diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiTarget.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiTarget.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiTarget.java Fri Jun 08 23:47:42 2012 +0200 @@ -55,7 +55,7 @@ /** * The CiKind to be used for representing raw pointers and CPU registers. */ - public final RiKind wordKind; + public final Kind wordKind; /** * The stack alignment requirement of the platform. For example, @@ -110,9 +110,9 @@ this.isMP = isMP; this.wordSize = arch.wordSize; if (wordSize == 8) { - this.wordKind = RiKind.Long; + this.wordKind = Kind.Long; } else { - this.wordKind = RiKind.Int; + this.wordKind = Kind.Int; } this.stackAlignment = stackAlignment; this.stackBias = 0; // TODO: configure with param once SPARC port exists @@ -128,7 +128,7 @@ * @param kind the kind for which to get the size * @return the size in bytes of {@code kind} */ - public int sizeInBytes(RiKind kind) { + public int sizeInBytes(Kind kind) { // Checkstyle: stop switch (kind) { case Boolean: return 1; diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiUtil.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiUtil.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiUtil.java Fri Jun 08 23:47:42 2012 +0200 @@ -160,7 +160,7 @@ * @param format a format specification * @param method the method to be formatted * @param kinds if {@code true} then the types in {@code method}'s signature are printed in the - * {@linkplain RiKind#jniName JNI} form of their {@linkplain RiKind kind} + * {@linkplain Kind#jniName JNI} form of their {@linkplain Kind kind} * @return the result of formatting this method according to {@code format} * @throws IllegalFormatException if an illegal specifier is encountered in {@code format} */ @@ -252,8 +252,8 @@ * * @param format a format specification * @param field the field to be formatted - * @param kinds if {@code true} then {@code field}'s type is printed in the {@linkplain RiKind#jniName JNI} form of - * its {@linkplain RiKind kind} + * @param kinds if {@code true} then {@code field}'s type is printed in the {@linkplain Kind#jniName JNI} form of + * its {@linkplain Kind kind} * @return the result of formatting this field according to {@code format} * @throws IllegalFormatException if an illegal specifier is encountered in {@code format} */ @@ -604,21 +604,21 @@ return sb; } - public static RiKind[] signatureToKinds(RiResolvedMethod method) { - RiKind receiver = isStatic(method.accessFlags()) ? null : method.holder().kind(); + public static Kind[] signatureToKinds(RiResolvedMethod method) { + Kind receiver = isStatic(method.accessFlags()) ? null : method.holder().kind(); return signatureToKinds(method.signature(), receiver); } - public static RiKind[] signatureToKinds(RiSignature signature, RiKind receiverKind) { + public static Kind[] signatureToKinds(RiSignature signature, Kind receiverKind) { int args = signature.argumentCount(false); - RiKind[] result; + Kind[] result; int i = 0; if (receiverKind != null) { - result = new RiKind[args + 1]; + result = new Kind[args + 1]; result[0] = receiverKind; i = 1; } else { - result = new RiKind[args]; + result = new Kind[args]; } for (int j = 0; j < args; j++) { result[i + j] = signature.argumentKindAt(j); diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java Fri Jun 08 23:47:42 2012 +0200 @@ -87,27 +87,27 @@ } public static CiRegister asIntReg(Value value) { - assert value.kind == RiKind.Int || value.kind == RiKind.Jsr; + assert value.kind == Kind.Int || value.kind == Kind.Jsr; return asRegister(value); } public static CiRegister asLongReg(Value value) { - assert value.kind == RiKind.Long : value.kind; + assert value.kind == Kind.Long : value.kind; return asRegister(value); } public static CiRegister asObjectReg(Value value) { - assert value.kind == RiKind.Object; + assert value.kind == Kind.Object; return asRegister(value); } public static CiRegister asFloatReg(Value value) { - assert value.kind == RiKind.Float; + assert value.kind == Kind.Float; return asRegister(value); } public static CiRegister asDoubleReg(Value value) { - assert value.kind == RiKind.Double; + assert value.kind == Kind.Double; return asRegister(value); } diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java Fri Jun 08 23:47:42 2012 +0200 @@ -48,7 +48,7 @@ } private CiVirtualObject(RiType type, Value[] values, int id) { - super(RiKind.Object); + super(Kind.Object); this.type = type; this.values = values; this.id = id; @@ -124,7 +124,7 @@ this.runtime = runtime; } - public CiVirtualObject constantProxy(RiKind kind, Value objectValue, Value primitiveValue) { + public CiVirtualObject constantProxy(Kind kind, Value objectValue, Value primitiveValue) { Constant cKind = Constant.forObject(kind); // TODO: here the ordering is hard coded... we should query RiType.fields() and act accordingly return new CiVirtualObject(runtime.getType(Constant.class), new Value[] {cKind, primitiveValue, Value.IllegalValue, objectValue}, nextId++); diff -r bc647d8b0080 -r a891c53a295b graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java Fri Jun 08 23:44:20 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java Fri Jun 08 23:47:42 2012 +0200 @@ -33,7 +33,7 @@ * {@link com.oracle.graal.api.code.CiCodePos} and {@link com.oracle.graal.api.code.CiDebugInfo} provide detailed information to the * runtime to support debugging and deoptimization of the compiled code. *

- * The compiler manipulates {@link com.oracle.graal.api.meta.Value} instances that have a {@link com.oracle.graal.api.meta.RiKind}, and are + * The compiler manipulates {@link com.oracle.graal.api.meta.Value} instances that have a {@link com.oracle.graal.api.meta.Kind}, and are * immutable. A concrete {@link com.oracle.graal.api.meta.Value value} is one of the following subclasses: *