Skip to content

Commit 4c4ccc0

Browse files
author
Owen Jones
committed
Remove variable that is always false
skip_classid was always false, so there wasn't any point having it.
1 parent a3f49a3 commit 4c4ccc0

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/java_bytecode/java_object_factory.cpp

+1-13
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ class java_object_factoryt:public messaget
6363
bool is_sub,
6464
irep_idt class_identifier,
6565
const source_locationt &loc,
66-
bool skip_classid,
6766
bool create_dynamic_objects,
6867
bool override=false,
6968
const typet &override_type=empty_typet());
@@ -158,7 +157,6 @@ Function: java_object_factoryt::gen_nondet_init
158157
is_sub -
159158
class_identifier -
160159
loc -
161-
skip_classid -
162160
create_dynamic_objects -
163161
override - Ignore the LHS' real type. Used at the moment for
164162
reference arrays, which are implemented as void*
@@ -177,7 +175,6 @@ void java_object_factoryt::gen_nondet_init(
177175
bool is_sub,
178176
irep_idt class_identifier,
179177
const source_locationt &loc,
180-
bool skip_classid,
181178
bool create_dynamic_objects,
182179
bool override,
183180
const typet &override_type)
@@ -263,7 +260,6 @@ void java_object_factoryt::gen_nondet_init(
263260
false,
264261
"",
265262
loc,
266-
false,
267263
create_dynamic_objects);
268264
}
269265

@@ -298,9 +294,6 @@ void java_object_factoryt::gen_nondet_init(
298294

299295
if(name=="@class_identifier")
300296
{
301-
if(skip_classid)
302-
continue;
303-
304297
irep_idt qualified_clsid="java::"+as_string(class_identifier);
305298
constant_exprt ci(qualified_clsid, string_typet());
306299
code_assignt code(me, ci);
@@ -328,7 +321,6 @@ void java_object_factoryt::gen_nondet_init(
328321
_is_sub,
329322
class_identifier,
330323
loc,
331-
false,
332324
create_dynamic_objects);
333325
}
334326
}
@@ -380,7 +372,7 @@ void java_object_factoryt::gen_nondet_array_init(
380372
const auto &length_sym_expr=length_sym.symbol_expr();
381373

382374
// Initialize array with some undetermined length:
383-
gen_nondet_init(length_sym_expr, false, irep_idt(), loc, false, false);
375+
gen_nondet_init(length_sym_expr, false, irep_idt(), loc, false);
384376

385377
// Insert assumptions to bound its length:
386378
binary_relation_exprt
@@ -465,7 +457,6 @@ void java_object_factoryt::gen_nondet_array_init(
465457
false,
466458
irep_idt(),
467459
loc,
468-
false,
469460
true,
470461
true,
471462
element_type);
@@ -495,7 +486,6 @@ void gen_nondet_init(
495486
code_blockt &init_code,
496487
symbol_tablet &symbol_table,
497488
const source_locationt &loc,
498-
bool skip_classid,
499489
bool create_dyn_objs,
500490
bool assume_non_null,
501491
message_handlert &message_handler,
@@ -512,7 +502,6 @@ void gen_nondet_init(
512502
false,
513503
"",
514504
loc,
515-
skip_classid,
516505
create_dyn_objs);
517506
}
518507

@@ -599,7 +588,6 @@ exprt object_factory(
599588
symbol_table,
600589
loc,
601590
false,
602-
false,
603591
!allow_null,
604592
message_handler,
605593
max_nondet_array_length);

src/java_bytecode/java_object_factory.h

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ void gen_nondet_init(
2727
code_blockt &init_code,
2828
symbol_tablet &symbol_table,
2929
const source_locationt &,
30-
bool skip_classid,
3130
bool create_dynamic_objects,
3231
bool assume_non_null,
3332
message_handlert &message_handler,

0 commit comments

Comments
 (0)