use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class LIRGenerator method zapArgumentSpace.
@Override
public LIRInstruction zapArgumentSpace() {
List<StackSlot> slots = null;
for (AllocatableValue arg : res.getCallingConvention().getArguments()) {
if (isStackSlot(arg)) {
if (slots == null) {
slots = new ArrayList<>();
}
slots.add((StackSlot) arg);
} else {
assert !isVirtualStackSlot(arg);
}
}
if (slots == null) {
return null;
}
StackSlot[] zappedStack = slots.toArray(new StackSlot[slots.size()]);
JavaConstant[] zapValues = new JavaConstant[zappedStack.length];
for (int i = 0; i < zappedStack.length; i++) {
PlatformKind kind = zappedStack[i].getPlatformKind();
zapValues[i] = zapValueForKind(kind);
}
return createZapArgumentSpace(zappedStack, zapValues);
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class NodeLIRBuilder method visitInvokeArguments.
@Override
public Value[] visitInvokeArguments(CallingConvention invokeCc, Collection<ValueNode> arguments) {
// for each argument, load it into the correct location
Value[] result = new Value[arguments.size()];
int j = 0;
for (ValueNode arg : arguments) {
if (arg != null) {
AllocatableValue operand = invokeCc.getArgument(j);
gen.emitMove(operand, operand(arg));
result[j] = operand;
j++;
} else {
throw GraalError.shouldNotReachHere("I thought we no longer have null entries for two-slot types...");
}
}
return result;
}
Aggregations