@@ -1614,7 +1614,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1614
1614
{
1615
1615
// the op is the array size
1616
1616
PRECONDITION (op.size () == 1 && results.size () == 1 );
1617
- convert_newarray (i_it->source_location , statement, arg0, op, c , results);
1617
+ c = convert_newarray (i_it->source_location , statement, arg0, op, results);
1618
1618
}
1619
1619
else if (statement==" multianewarray" )
1620
1620
{
@@ -1627,7 +1627,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1627
1627
1628
1628
op=pop (dimension);
1629
1629
assert (results.size ()==1 );
1630
- convert_multianewarray (i_it->source_location , arg0, op, c , results);
1630
+ c = convert_multianewarray (i_it->source_location , arg0, op, results);
1631
1631
}
1632
1632
else if (statement==" arraylength" )
1633
1633
{
@@ -2430,11 +2430,10 @@ codet &java_bytecode_convert_methodt::do_exception_handling(
2430
2430
return c;
2431
2431
}
2432
2432
2433
- void java_bytecode_convert_methodt::convert_multianewarray (
2433
+ code_blockt java_bytecode_convert_methodt::convert_multianewarray (
2434
2434
const source_locationt &location,
2435
2435
const exprt &arg0,
2436
2436
const exprt::operandst &op,
2437
- codet &c,
2438
2437
exprt::operandst &results)
2439
2438
{
2440
2439
PRECONDITION (!location.get_line ().empty ());
@@ -2454,16 +2453,16 @@ void java_bytecode_convert_methodt::convert_multianewarray(
2454
2453
2455
2454
const exprt tmp = tmp_variable (" newarray" , ref_type);
2456
2455
create.add (code_assignt (tmp, java_new_array));
2457
- c = std::move (create);
2458
2456
results[0 ] = tmp;
2457
+
2458
+ return create;
2459
2459
}
2460
2460
2461
- void java_bytecode_convert_methodt::convert_newarray (
2461
+ code_blockt java_bytecode_convert_methodt::convert_newarray (
2462
2462
const source_locationt &location,
2463
2463
const irep_idt &statement,
2464
2464
const exprt &arg0,
2465
2465
const exprt::operandst &op,
2466
- codet &c,
2467
2466
exprt::operandst &results)
2468
2467
{
2469
2468
char element_type;
@@ -2499,18 +2498,20 @@ void java_bytecode_convert_methodt::convert_newarray(
2499
2498
side_effect_exprt java_new_array (ID_java_new_array, ref_type, location);
2500
2499
java_new_array.copy_to_operands (op[0 ]);
2501
2500
2502
- c = code_blockt () ;
2501
+ code_blockt block ;
2503
2502
2504
2503
if (max_array_length != 0 )
2505
2504
{
2506
2505
constant_exprt size_limit = from_integer (max_array_length, java_int_type ());
2507
2506
binary_relation_exprt le_max_size (op[0 ], ID_le, size_limit);
2508
2507
code_assumet assume_le_max_size (le_max_size);
2509
- to_code_block (c) .add (assume_le_max_size);
2508
+ block .add (assume_le_max_size);
2510
2509
}
2511
2510
const exprt tmp = tmp_variable (" newarray" , ref_type);
2512
- to_code_block (c) .add (code_assignt (tmp, java_new_array));
2511
+ block .add (code_assignt (tmp, java_new_array));
2513
2512
results[0 ] = tmp;
2513
+
2514
+ return block;
2514
2515
}
2515
2516
2516
2517
void java_bytecode_convert_methodt::convert_new (
0 commit comments