@@ -237,23 +237,24 @@ struct java_bytecode_parse_treet
237
237
typedef std::vector<u2> u2_valuest;
238
238
struct lambda_method_handlet
239
239
{
240
- method_handle_typet handle_type;
240
+ method_handle_typet handle_type = method_handle_typet::UNKNOWN_HANDLE ;
241
241
irep_idt lambda_method_name;
242
242
irep_idt lambda_method_ref;
243
243
irep_idt interface_type;
244
244
irep_idt method_type;
245
245
u2_valuest u2_values;
246
- lambda_method_handlet () : handle_type(method_handle_typet::UNKNOWN_HANDLE)
246
+ lambda_method_handlet () = default ;
247
+
248
+ // / Construct a lambda method handle with parameters \p params.
249
+ explicit lambda_method_handlet (const u2_valuest ¶ms)
250
+ : u2_values(params)
247
251
{
248
252
}
249
253
250
- static lambda_method_handlet
251
- create_unknown_handle (const u2_valuest params)
254
+ // / Construct a lambda method handle with parameters \p params.
255
+ explicit lambda_method_handlet (u2_valuest &¶ms)
256
+ : u2_values(std::move(params))
252
257
{
253
- lambda_method_handlet lambda_method_handle;
254
- lambda_method_handle.handle_type = method_handle_typet::UNKNOWN_HANDLE;
255
- lambda_method_handle.u2_values = std::move (params);
256
- return lambda_method_handle;
257
258
}
258
259
259
260
bool is_unknown_handle () const
@@ -290,7 +291,9 @@ struct java_bytecode_parse_treet
290
291
return methods.back ();
291
292
}
292
293
293
- void add_method_handle (size_t bootstrap_index, lambda_method_handlet handle)
294
+ void add_method_handle (
295
+ size_t bootstrap_index,
296
+ const lambda_method_handlet &handle)
294
297
{
295
298
lambda_method_handle_map[{name, bootstrap_index}] = handle;
296
299
}
0 commit comments