use of com.oracle.truffle.api.nodes.ExplodeLoop in project sulong by graalvm.
the class LLVMStructArrayLiteralNode method writeDouble.
@Specialization
@ExplodeLoop
protected LLVMAddress writeDouble(VirtualFrame frame, LLVMAddress addr) {
long currentPtr = addr.getVal();
for (int i = 0; i < values.length; i++) {
try {
LLVMAddress currentValue = values[i].executeLLVMAddress(frame);
memMove.executeWithTarget(LLVMAddress.fromLong(currentPtr), currentValue, stride);
currentPtr += stride;
} catch (UnexpectedResultException e) {
CompilerDirectives.transferToInterpreter();
throw new IllegalStateException(e);
}
}
return addr;
}
use of com.oracle.truffle.api.nodes.ExplodeLoop in project sulong by graalvm.
the class LLVMStructArrayLiteralNode method doVoid.
@Specialization(guards = { "noOffset(addr)" })
@ExplodeLoop
protected Object doVoid(VirtualFrame frame, LLVMTruffleObject addr) {
LLVMTruffleObject currentPtr = addr;
for (int i = 0; i < values.length; i++) {
LLVMTruffleObject currentValue = (LLVMTruffleObject) values[i].executeGeneric(frame);
memMove.executeWithTarget(currentPtr, currentValue, stride);
currentPtr = currentPtr.increment(stride);
}
return addr;
}
use of com.oracle.truffle.api.nodes.ExplodeLoop in project sulong by graalvm.
the class LLVMStoreVectorNode method writeVector.
@Specialization(guards = "address.isManaged()")
@ExplodeLoop
protected Object writeVector(LLVMTruffleObject address, LLVMFunctionVector value, @Cached("createForeignWrite()") LLVMForeignWriteNode foreignWrite) {
assert value.getLength() == vectorLength;
LLVMTruffleObject currentPtr = address;
for (int i = 0; i < vectorLength; i++) {
foreignWrite.execute(currentPtr, value.getValue(i));
currentPtr = currentPtr.increment(I64_SIZE_IN_BYTES);
}
return null;
}
use of com.oracle.truffle.api.nodes.ExplodeLoop in project sulong by graalvm.
the class LLVMStoreVectorNode method writeVector.
@Specialization(guards = "address.isManaged()")
@ExplodeLoop
protected Object writeVector(LLVMTruffleObject address, LLVMI8Vector value, @Cached("createForeignWrite()") LLVMForeignWriteNode foreignWrite) {
assert value.getLength() == vectorLength;
LLVMTruffleObject currentPtr = address;
for (int i = 0; i < vectorLength; i++) {
foreignWrite.execute(currentPtr, value.getValue(i));
currentPtr = currentPtr.increment(I8_SIZE_IN_BYTES);
}
return null;
}
Aggregations