@@ -118,7 +118,7 @@ static optionalt<irep_idt> interface_method_id(
118
118
return implemented_interface_type.methods ().at (0 ).get_name ();
119
119
}
120
120
121
- const java_class_typet synthetic_class_type (
121
+ symbolt synthetic_class_symbol (
122
122
const irep_idt &synthetic_class_name,
123
123
const irep_idt &lambda_method_name,
124
124
const struct_tag_typet &implemented_interface_tag,
@@ -163,7 +163,11 @@ const java_class_typet synthetic_class_type(
163
163
synthetic_class_type.components ().emplace_back (std::move (new_field));
164
164
}
165
165
}
166
- return synthetic_class_type;
166
+
167
+ type_symbolt synthetic_class_symbol (synthetic_class_type);
168
+ synthetic_class_symbol.name = synthetic_class_name;
169
+ synthetic_class_symbol.mode = ID_java;
170
+ return synthetic_class_symbol;
167
171
}
168
172
169
173
static symbolt create_constructor_symbol (
@@ -328,12 +332,6 @@ void create_invokedynamic_synthetic_classes(
328
332
const irep_idt synthetic_class_name =
329
333
lambda_synthetic_class_name (method_identifier, instruction.address );
330
334
331
- const java_class_typet synthetic_class_type = ::synthetic_class_type (
332
- synthetic_class_name,
333
- *lambda_method_name,
334
- implemented_interface_tag,
335
- dynamic_method_type);
336
-
337
335
symbol_table.add (create_constructor_symbol (
338
336
synthetic_methods, synthetic_class_name, dynamic_method_type));
339
337
@@ -343,14 +341,11 @@ void create_invokedynamic_synthetic_classes(
343
341
implemented_interface_tag,
344
342
synthetic_class_name));
345
343
346
- // Register class symbol:
347
-
348
- symbol_table.add ([&] {
349
- type_symbolt synthetic_class_symbol (synthetic_class_type);
350
- synthetic_class_symbol.name = synthetic_class_name;
351
- synthetic_class_symbol.mode = ID_java;
352
- return synthetic_class_symbol;
353
- }());
344
+ symbol_table.add (synthetic_class_symbol (
345
+ synthetic_class_name,
346
+ *lambda_method_name,
347
+ implemented_interface_tag,
348
+ dynamic_method_type));
354
349
}
355
350
}
356
351
}
0 commit comments