private void putConcat(ValueBox source) {
ArrayConstantInfo info = context.getConstantArray(source.getValue());
if (info.contents != null) {
// we know exactly how this array is structured
// use append statements instead to preserve non-emptiness and sequence order
Variable var = makevar();
// check if array was not initialized completely
for (int i=0; i<info.contents.length; i++) {
if (info.contents[i] == null || info.contents[i].getValue() instanceof NullConstant) {
// concat() definitely throws NullPointerException
// just return uninitialized variable
hardcodeResult = var;
return;
}
}
cfg.addStatement(new ConstStm(var,
emptyConstant,
context.getCurrentOrigin()));
for (int i=0; i<info.contents.length; i++) {
Variable var2 = makevar();
Variable val = translateExpr(info.contents[i].getValue());
Statement stm;
cfg.addStatement(stm = new InsertStm(InsertStm.Kind.APPEND,
var2,
var,
null,