aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/shedlang/compiler/shid/instructions/ShidInstruction.java
blob: 36de2a535e43b591461d58bd932189240669bf42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package org.shedlang.compiler.shid.instructions;

import org.shedlang.compiler.sources.Source;

public sealed interface ShidInstruction
    permits ShidBlock, ShidCall, ShidDeclareNativeFunction, ShidDeclareNativeType, ShidDefineEffect, ShidDefineFunction, ShidDefineStruct, ShidDiscard, ShidDuplicate, ShidEffectHandlerBreak, ShidFieldLoad, ShidIf, ShidIntAdd, ShidIntEquals, ShidIntGreaterThan, ShidIntGreaterThanOrEqual, ShidIntLessThan, ShidIntLessThanOrEqual, ShidIntMultiply, ShidIntNotEqual, ShidIntSub, ShidLocalDrop, ShidLocalLoad, ShidLocalStore, ShidLoop, ShidLoopBreak, ShidLoopContinue, ShidMethodLoad, ShidMethodStore, ShidNamespaceFieldStore, ShidNamespaceImport, ShidPushBool, ShidPushInt, ShidPushString, ShidPushUnit, ShidResume, ShidReturn, ShidStringAdd, ShidSwitch, ShidTry, ShidTupleCreate, ShidTupleGet, ShidVarLoad, ShidVarStore {

    /**
     * If an instruction is a terminator, execution is guaranteed to leave the
     * current block.
     */
    boolean isBlockTerminator();

    Source source();
}