More execution work

This commit is contained in:
Adam
2015-02-01 17:49:33 -05:00
parent cec4f0ac59
commit e38b4c5212
15 changed files with 161 additions and 17 deletions

View File

@@ -32,6 +32,15 @@ public class ObjectInstance extends ObjectInstanceBase
}
}
private ObjectInstance(ObjectInstance other, Path path, ClassInstance type)
{
super(path, type);
/* copy fields */
for (FieldInstance field : other.fields)
this.fields.add(new FieldInstance(this, field));
}
public FieldInstance getField(NameAndType nat)
{
for (FieldInstance f : fields)
@@ -39,4 +48,10 @@ public class ObjectInstance extends ObjectInstanceBase
return f;
return null;
}
@Override
public ObjectInstanceBase dup(Path path, ClassInstance type)
{
return new ObjectInstance(this, path, type);
}
}