Skip to content

Commit 7f843a7

Browse files
author
thk123
committed
Add natural language explanation of the test's checks
1 parent fa27117 commit 7f843a7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

unit/java_bytecode/java_bytecode_convert_method/convert_invoke_dynamic.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ struct lambda_assignment_test_datat
2626
bool should_return_value;
2727
};
2828

29+
/// Verifies for a given function that contains:
30+
/// {lambda_variable_id} = invokedynamic method_handle_index
31+
/// code looks
32+
/// like:
33+
/// tmp_object_symbol = java_new(lambda_tmp_type)
34+
/// {lambda_variable_id} = (cast)tmp_object_symbol
35+
/// and the type lambda_tmp_type:
36+
/// implements {lambda_interface}
37+
/// has method {lambda_interface_method_descriptor}
38+
/// and the method body looks like
39+
/// function_call_exprt(
40+
/// should_return_value ? symbol_exprt : nil_exprt,
41+
/// {lambda_function_id},
42+
/// {expected_params})
43+
/// \param symbol_table: The loaded symbol table
44+
/// \param instructions: The instructions of the method that calls invokedynamic
45+
/// \param test_data: The parameters for the test
2946
void validate_lamdba_assignement(
3047
const symbol_tablet &symbol_table,
3148
const std::vector<codet> &instructions,

0 commit comments

Comments
 (0)