Skip to content

Commit 5e92c9b

Browse files
Add reference allocation code for references
1 parent d809cf9 commit 5e92c9b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

jbmc/src/java_bytecode/assignments_from_json.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -755,12 +755,7 @@ static get_or_create_reference_resultt get_or_create_reference(
755755
reference.array_length =
756756
info.allocate_objects.allocate_automatic_local_object(
757757
java_int_type(), "user_specified_array_length");
758-
code.add(code_without_referencest{code_assignt{
759-
*reference.array_length, side_effect_expr_nondett{java_int_type()}}});
760-
code.add(code_without_referencest{code_assumet{binary_predicate_exprt{
761-
*reference.array_length, ID_ge, from_integer(0, java_int_type())}}});
762-
code.add(code_without_referencest{
763-
allocate_array(reference.expr, *reference.array_length, info.loc)});
758+
code.add(reference_allocationt{id, info.loc});
764759
}
765760
else
766761
{

0 commit comments

Comments
 (0)