@@ -27,8 +27,8 @@ class java_bytecode_convert_classt:public messaget
27
27
java_bytecode_convert_classt (
28
28
symbol_tablet &_symbol_table,
29
29
message_handlert &_message_handler,
30
- const bool & _disable_runtime_checks,
31
- int _max_array_length):
30
+ const bool _disable_runtime_checks,
31
+ size_t _max_array_length):
32
32
messaget (_message_handler),
33
33
symbol_table (_symbol_table),
34
34
disable_runtime_checks (_disable_runtime_checks),
@@ -51,8 +51,8 @@ class java_bytecode_convert_classt:public messaget
51
51
52
52
protected:
53
53
symbol_tablet &symbol_table;
54
- const bool & disable_runtime_checks;
55
- int max_array_length;
54
+ const bool disable_runtime_checks;
55
+ size_t max_array_length;
56
56
57
57
// conversion
58
58
void convert (const classt &c);
@@ -127,8 +127,12 @@ void java_bytecode_convert_classt::convert(const classt &c)
127
127
// now do methods
128
128
for (const auto &method : c.methods )
129
129
java_bytecode_convert_method (
130
- *class_symbol, method, symbol_table, get_message_handler (),
131
- disable_runtime_checks, max_array_length);
130
+ *class_symbol,
131
+ method,
132
+ symbol_table,
133
+ get_message_handler (),
134
+ disable_runtime_checks,
135
+ max_array_length);
132
136
133
137
// is this a root class?
134
138
if (c.extends .empty ())
@@ -271,9 +275,6 @@ void java_bytecode_convert_classt::add_array_types()
271
275
// we have the base class, java.lang.Object, length and data
272
276
// of appropriate type
273
277
struct_type.set_tag (symbol_type.get_identifier ());
274
- <<<<<<< d8b7f7885387d26f7031f56b237aa96e25733f6d
275
-
276
- struct_type.components ().reserve (3 );
277
278
struct_typet::componentt
278
279
comp0 (" @java.lang.Object" , symbol_typet (" java::java.lang.Object" ));
279
280
struct_type.components ().push_back (comp0);
@@ -284,18 +285,6 @@ void java_bytecode_convert_classt::add_array_types()
284
285
struct_typet::componentt
285
286
comp2 (" data" , pointer_typet (java_type_from_char (l)));
286
287
struct_type.components ().push_back (comp2);
287
- =======
288
- struct_type.components ().resize (3 );
289
- struct_type.components ()[0 ].set_name (" @java.lang.Object" );
290
- struct_type.components ()[0 ].type ()=symbol_typet (" java::java.lang.Object" );
291
- struct_type.components ()[1 ].set_name (" length" );
292
- struct_type.components ()[1 ].set_pretty_name (" length" );
293
- struct_type.components ()[1 ].type ()=java_int_type ();
294
- struct_type.components ()[2 ].set_name (" data" );
295
- struct_type.components ()[2 ].set_pretty_name (" data" );
296
- struct_type.components ()[2 ].type ()=
297
- pointer_typet (java_type_from_char (letters[i]));
298
- >>>>>>> class conversion runtime checks / array handling
299
288
300
289
symbolt symbol;
301
290
symbol.name =symbol_type.get_identifier ();
@@ -320,16 +309,16 @@ Function: java_bytecode_convert_class
320
309
321
310
bool java_bytecode_convert_class (
322
311
const java_bytecode_parse_treet &parse_tree,
323
- const bool &disable_runtime_checks,
324
312
symbol_tablet &symbol_table,
325
313
message_handlert &message_handler,
326
- int max_array_length)
314
+ const bool disable_runtime_checks,
315
+ size_t max_array_length)
327
316
{
328
317
java_bytecode_convert_classt java_bytecode_convert_class (
329
- symbol_table,
330
- message_handler,
331
- disable_runtime_checks,
332
- max_array_length);
318
+ symbol_table,
319
+ message_handler,
320
+ disable_runtime_checks,
321
+ max_array_length);
333
322
334
323
try
335
324
{
0 commit comments