File tree 2 files changed +17
-0
lines changed 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -310,6 +310,18 @@ void java_bytecode_convert_classt::convert(const classt &c)
310
310
}
311
311
}
312
312
313
+ // now do lambda method handles (bootstrap methods)
314
+ for (const auto &lambda_entry : c.lambda_method_handle_map )
315
+ {
316
+ // if the handle is of unknown type, we still need to store it to preserve
317
+ // the correct indexing (invokedynamic instructions will retrieve
318
+ // method handles by index)
319
+ lambda_entry.second .is_unknown_handle ()
320
+ ? class_type.add_unknown_lambda_method_handle ()
321
+ : class_type.add_lambda_method_handle (
322
+ " java::" + id2string (lambda_entry.second .lambda_method_ref ));
323
+ }
324
+
313
325
// produce class symbol
314
326
symbolt new_symbol;
315
327
new_symbol.base_name =c.name ;
Original file line number Diff line number Diff line change @@ -205,6 +205,11 @@ class java_bytecode_parse_treet
205
205
lambda_method_handle.u2_values = std::move (params);
206
206
return lambda_method_handle;
207
207
}
208
+
209
+ bool is_unknown_handle () const
210
+ {
211
+ return handle_type == method_handle_typet::UNKNOWN_HANDLE;
212
+ }
208
213
};
209
214
210
215
// TODO(tkiley): This map shouldn't be interacted with directly (instead
You can’t perform that action at this time.
0 commit comments