}
return new NodePair(fn,last);
} else {
+ if(con.getArrayInitializer() == null) {
FlatNode first=null;
FlatNode last=null;
TempDescriptor[] temps=new TempDescriptor[con.numArgs()];
return new NodePair(first,np.getEnd());
} else
return new NodePair(first, fn);
+ } else if(state.MGC) {
+ // array creation with initializers
+ return flattenArrayInitializerNode(con.getArrayInitializer(), out_temp);
+ }
+ return null;
}
}
//Get src value
if (an.getSrc()!=null) {
- NodePair np_src=flattenExpressionNode(an.getSrc(),src_tmp);
- first=np_src.getBegin();
- last=np_src.getEnd();
+ if(an.getSrc().getEval() != null) {
+ first = last = new FlatLiteralNode(an.getSrc().getType(), an.getSrc().getEval().longValue(), src_tmp);
+ } else {
+ NodePair np_src=flattenExpressionNode(an.getSrc(),src_tmp);
+ first=np_src.getBegin();
+ last=np_src.getEnd();
+ }
} else if (!pre) {
FlatLiteralNode fln=new FlatLiteralNode(new TypeDescriptor(TypeDescriptor.INT),new Integer(1),src_tmp);
first=fln;
boolean isGlobal = false;
String disjointId = null;
// get the type the array to be initialized
- TypeDescriptor td = out_temp.getType();
+ TypeDescriptor td = ain.getType();
// create a new array of size equal to the array initializer
FlatNode first=null;