Skip to content

Commit b442c60

Browse files
author
Lukasz A.J. Wrona
committed
Move the comment outside of the function
1 parent 9f93489 commit b442c60

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

jbmc/src/java_bytecode/lambda_synthesis.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,28 @@ symbolt implemented_method_symbol(
261261
return implemented_method_symbol;
262262
}
263263

264+
// invokedynamic will be called with operands that should be stored in a
265+
// synthetic object implementing the interface type that it returns. For
266+
// example, "invokedynamic f(a, b, c) -> MyInterface" should result in the
267+
// creation of the synthetic class:
268+
// public class SyntheticCapture implements MyInterface {
269+
// private int a;
270+
// private float b;
271+
// private Other c;
272+
// public SyntheticCapture(int a, float b, Other c) {
273+
// this.a = a; this.b = b; this.c = c;
274+
// }
275+
// public void myInterfaceMethod(int d) {
276+
// f(a, b, c, d);
277+
// }
278+
// }
279+
// This method just creates the outline; the methods will be populated on
280+
// demand via java_bytecode_languaget::convert_lazy_method.
281+
282+
// Check that we understand the lambda method handle; if we don't then
283+
// we will not create a synthetic class at all, and the corresponding
284+
// invoke instruction will return null when eventually converted by
285+
// java_bytecode_convert_method.
264286
void create_invokedynamic_synthetic_classes(
265287
const irep_idt &method_identifier,
266288
const java_bytecode_parse_treet::methodt::instructionst &instructions,
@@ -274,28 +296,6 @@ void create_invokedynamic_synthetic_classes(
274296
{
275297
if(strcmp(bytecode_info[instruction.bytecode].mnemonic, "invokedynamic"))
276298
continue;
277-
// invokedynamic will be called with operands that should be stored in a
278-
// synthetic object implementing the interface type that it returns. For
279-
// example, "invokedynamic f(a, b, c) -> MyInterface" should result in the
280-
// creation of the synthetic class:
281-
// public class SyntheticCapture implements MyInterface {
282-
// private int a;
283-
// private float b;
284-
// private Other c;
285-
// public SyntheticCapture(int a, float b, Other c) {
286-
// this.a = a; this.b = b; this.c = c;
287-
// }
288-
// public void myInterfaceMethod(int d) {
289-
// f(a, b, c, d);
290-
// }
291-
// }
292-
// This method just creates the outline; the methods will be populated on
293-
// demand via java_bytecode_languaget::convert_lazy_method.
294-
295-
// Check that we understand the lambda method handle; if we don't then
296-
// we will not create a synthetic class at all, and the corresponding
297-
// invoke instruction will return null when eventually converted by
298-
// java_bytecode_convert_method.
299299
const auto &dynamic_method_type =
300300
to_java_method_type(instruction.args.at(0).type());
301301
const auto lambda_method_name = ::lambda_method_name(

0 commit comments

Comments
 (0)