package org.shedlang.compiler.shid.instructions; import org.shedlang.compiler.sources.Source; import org.shedlang.compiler.types.NamespaceName; import org.shedlang.compiler.types.SimpleStructType; import org.shedlang.compiler.types.UserDefinedEffect; /** * Pop a value from the temporary value stack, get the given field from the * popped value, and push the field's value onto the temporary value stack. */ public record ShidFieldLoad( Receiver receiver, String fieldName, Source source ) implements ShidInstruction { public sealed interface Receiver { record Effect(UserDefinedEffect effect) implements Receiver {} record Namespace(NamespaceName name) implements Receiver {} record Struct(SimpleStructType type) implements Receiver {} } @Override public boolean isBlockTerminator() { return false; } }