@@ -1842,31 +1842,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1842
1842
1843
1843
op=pop (dimension);
1844
1844
assert (results.size ()==1 );
1845
-
1846
- const reference_typet ref_type=
1847
- java_reference_type (arg0.type ());
1848
-
1849
- side_effect_exprt java_new_array (ID_java_new_array, ref_type);
1850
- java_new_array.operands ()=op;
1851
-
1852
- if (!i_it->source_location .get_line ().empty ())
1853
- java_new_array.add_source_location ()=i_it->source_location ;
1854
-
1855
- code_blockt create;
1856
-
1857
- if (max_array_length!=0 )
1858
- {
1859
- constant_exprt size_limit=
1860
- from_integer (max_array_length, java_int_type ());
1861
- binary_relation_exprt le_max_size (op[0 ], ID_le, size_limit);
1862
- code_assumet assume_le_max_size (le_max_size);
1863
- create.move_to_operands (assume_le_max_size);
1864
- }
1865
-
1866
- const exprt tmp=tmp_variable (" newarray" , ref_type);
1867
- create.copy_to_operands (code_assignt (tmp, java_new_array));
1868
- c=std::move (create);
1869
- results[0 ]=tmp;
1845
+ convert_multianewarray (i_it->source_location , arg0, op, c, results);
1870
1846
}
1871
1847
else if (statement==" arraylength" )
1872
1848
{
@@ -2334,6 +2310,37 @@ codet java_bytecode_convert_methodt::convert_instructions(
2334
2310
return code;
2335
2311
}
2336
2312
2313
+ void java_bytecode_convert_methodt::convert_multianewarray (
2314
+ const source_locationt &location,
2315
+ const exprt &arg0,
2316
+ const exprt::operandst &op,
2317
+ codet &c,
2318
+ exprt::operandst &results)
2319
+ {
2320
+ const reference_typet ref_type = java_reference_type (arg0.type ());
2321
+
2322
+ side_effect_exprt java_new_array (ID_java_new_array, ref_type);
2323
+ java_new_array.operands () = op;
2324
+
2325
+ if (!location.get_line ().empty ())
2326
+ java_new_array.add_source_location () = location;
2327
+
2328
+ code_blockt create;
2329
+
2330
+ if (max_array_length != 0 )
2331
+ {
2332
+ constant_exprt size_limit = from_integer (max_array_length, java_int_type ());
2333
+ binary_relation_exprt le_max_size (op[0 ], ID_le, size_limit);
2334
+ code_assumet assume_le_max_size (le_max_size);
2335
+ create.move_to_operands (assume_le_max_size);
2336
+ }
2337
+
2338
+ const exprt tmp = tmp_variable (" newarray" , ref_type);
2339
+ create.copy_to_operands (code_assignt (tmp, java_new_array));
2340
+ c = std::move (create);
2341
+ results[0 ] = tmp;
2342
+ }
2343
+
2337
2344
void java_bytecode_convert_methodt::convert_newarray (
2338
2345
const source_locationt &location,
2339
2346
const irep_idt &statement,
0 commit comments