8 public Sources(State s) {
12 public boolean setSource(SetDescriptor sd) {
15 public boolean allocSource(SetDescriptor sd) {
18 public SetDescriptor getSourceSet(SetDescriptor sd) {
21 public void generateSourceAlloc(CodeWriter cr,VarDescriptor vd, SetDescriptor sd) {
22 TypeDescriptor td=sd.getType();
23 Expr e=td.getSizeExpr();
24 VarDescriptor size=VarDescriptor.makeNew("size");
26 cr.outputline(td.getGenerateType().getSafeSymbol()+" "+vd.getSafeSymbol()+"=("+td.getGenerateType().getSafeSymbol()+") malloc("+size.getSafeSymbol()+");");