Search in sources :

Example 1 with RecordValue

use of cz.cuni.mff.d3s.trupple.language.runtime.customvalues.RecordValue in project TrufflePascal by Aspect26.

the class WithNode method executeVoid.

@Override
public void executeVoid(VirtualFrame frame) {
    try {
        for (FrameSlot recordSlot : this.recordSlots) {
            RecordValue record = (RecordValue) frame.getObject(recordSlot);
            frame = record.getFrame();
        }
        innerStatement.executeVoid(frame);
    } catch (FrameSlotTypeException e) {
        throw new PascalRuntimeException("Unexpected accessing of non record type");
    }
}
Also used : FrameSlotTypeException(com.oracle.truffle.api.frame.FrameSlotTypeException) FrameSlot(com.oracle.truffle.api.frame.FrameSlot) RecordValue(cz.cuni.mff.d3s.trupple.language.runtime.customvalues.RecordValue) PascalRuntimeException(cz.cuni.mff.d3s.trupple.language.runtime.exceptions.PascalRuntimeException)

Aggregations

FrameSlot (com.oracle.truffle.api.frame.FrameSlot)1 FrameSlotTypeException (com.oracle.truffle.api.frame.FrameSlotTypeException)1 RecordValue (cz.cuni.mff.d3s.trupple.language.runtime.customvalues.RecordValue)1 PascalRuntimeException (cz.cuni.mff.d3s.trupple.language.runtime.exceptions.PascalRuntimeException)1