return inner.accept(new BytecodeOperandVisitor(context));
}
@Override
public BytecodeValue visit(New aNew) {
BytecodeContext newContext;
List<Definition> defs = aNew.getDefs();
BytecodeValue thisObject = context.getValue("this").dereference();
BytecodeClass newClass;
if(thisObject != null) {
BytecodeClassDef thisClass = (BytecodeClassDef) thisObject;
newContext = new BytecodeContextImpl(thisClass.getContext());
newClass = (BytecodeClass) thisClass.getCompleteClass();
} else {
newContext = context;
newClass = new BytecodeClass(newContext);
}
BytecodeContext tempContext = new BytecodeContextImpl(context);
for(Definition def : defs) {
def.accept(new BytecodeDefVisitor(newClass.getContext(),tempContext));
}
return newClass;
}