--- /dev/null
+package org.simantics.scl.compiler.constants;
+
+import org.cojen.classfile.TypeDesc;
+import org.simantics.scl.compiler.internal.codegen.utils.MethodBuilder;
+import org.simantics.scl.compiler.internal.codegen.utils.TransientClassBuilder;
+import org.simantics.scl.compiler.types.Type;
+
+public class LocalFieldConstant extends Constant {
+
+ String fieldName;
+
+ public LocalFieldConstant(Type type, String fieldName) {
+ super(type);
+ this.fieldName = fieldName;
+ }
+
+ @Override
+ public void push(MethodBuilder mb) {
+ TypeDesc typeDesc = mb.getJavaTypeTranslator().toTypeDesc(type);
+ mb.loadThis();
+ mb.loadField(mb.getClassName(), fieldName, typeDesc);
+ }
+
+ @Override
+ public Object realizeValue(TransientClassBuilder classBuilder) {
+ throw new UnsupportedOperationException();
+ }
+}