Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CallingConvention.java @ 9742:cff1e11941c0
moved temporaries from CallingConvention to ForeignCallLinkage
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 16 May 2013 18:05:30 +0200 |
parents | d04944441454 |
children | b04b94b71649 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CallingConvention.java Thu May 16 17:36:16 2013 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CallingConvention.java Thu May 16 18:05:30 2013 +0200 @@ -27,9 +27,8 @@ import com.oracle.graal.api.meta.*; /** - * A calling convention describes the locations in which the arguments for a call are placed, the - * location in which the return value is placed if the call is not void and any - * {@linkplain #getTemporaries() extra} locations used (and killed) by the call. + * A calling convention describes the locations in which the arguments for a call are placed and the + * location in which the return value is placed if the call is not void. */ public class CallingConvention { @@ -78,11 +77,6 @@ private final AllocatableValue[] argumentLocations; /** - * The locations used (and killed) by the call in addition to the arguments. - */ - private final AllocatableValue[] temporaryLocations; - - /** * Creates a description of the registers and stack locations used by a call. * * @param stackSize amount of stack space (in bytes) required for the stack-based arguments of @@ -92,28 +86,11 @@ * @param argumentLocations the ordered locations in which the arguments are placed */ public CallingConvention(int stackSize, AllocatableValue returnLocation, AllocatableValue... argumentLocations) { - this(AllocatableValue.NONE, stackSize, returnLocation, argumentLocations); - } - - /** - * Creates a description of the registers and stack locations used by a call. - * - * @param temporaryLocations the locations used (and killed) by the call in addition to - * {@code arguments} - * @param stackSize amount of stack space (in bytes) required for the stack-based arguments of - * the call - * @param returnLocation the location for the return value or {@link Value#ILLEGAL} if a void - * call - * @param argumentLocations the ordered locations in which the arguments are placed - */ - public CallingConvention(AllocatableValue[] temporaryLocations, int stackSize, AllocatableValue returnLocation, AllocatableValue... argumentLocations) { assert argumentLocations != null; - assert temporaryLocations != null; assert returnLocation != null; this.argumentLocations = argumentLocations; this.stackSize = stackSize; this.returnLocation = returnLocation; - this.temporaryLocations = temporaryLocations; assert verify(); } @@ -155,17 +132,6 @@ return argumentLocations.clone(); } - /** - * Gets the locations used (and killed) by the call apart from the - * {@linkplain #getArgument(int) arguments}. - */ - public AllocatableValue[] getTemporaries() { - if (temporaryLocations.length == 0) { - return temporaryLocations; - } - return temporaryLocations.clone(); - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -178,14 +144,6 @@ if (!returnLocation.equals(Value.ILLEGAL)) { sb.append(" -> ").append(returnLocation); } - if (temporaryLocations.length != 0) { - sb.append("; temps="); - sep = ""; - for (Value op : temporaryLocations) { - sb.append(sep).append(op); - sep = ", "; - } - } sb.append("]"); return sb.toString(); }