Skip to content

Commit 58beeb4

Browse files
author
Thomas Kiley
authored
Merge pull request diffblue#1978 from svorenova/lambda_tg2478_cont
Tidying up for lambdas [TG-2478]
2 parents 1e3a9cd + f428247 commit 58beeb4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/java_bytecode/java_bytecode_convert_method.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,10 @@ code_typet member_type_lazy(
311311
/// \param lambda_method_handles Vector of lambda method handles (bootstrap
312312
/// methods) of the class where the lambda is called
313313
/// \param index Index of the lambda method handle in the vector
314-
/// \return Symbol of the lambda method if the method handle does not have an
315-
/// unknown type
314+
/// \return Symbol of the lambda method if the method handle has a known type
316315
optionalt<symbolt> java_bytecode_convert_methodt::get_lambda_method_symbol(
317316
const java_class_typet::java_lambda_method_handlest &lambda_method_handles,
318-
const size_t &index)
317+
const size_t index)
319318
{
320319
const symbol_exprt &lambda_method_handle = lambda_method_handles.at(index);
321320
// If the lambda method handle has an unknown type, it does not refer to

src/java_bytecode/java_bytecode_convert_method_class.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class java_bytecode_convert_methodt:public messaget
237237

238238
optionalt<symbolt> get_lambda_method_symbol(
239239
const java_class_typet::java_lambda_method_handlest &lambda_method_handles,
240-
const size_t &index);
240+
const size_t index);
241241

242242
// conversion
243243
void convert(const symbolt &class_symbol, const methodt &);

src/java_bytecode/java_types.h

+2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ class java_class_typet:public class_typet
4949

5050
void add_lambda_method_handle(const irep_idt &identifier)
5151
{
52+
// creates a symbol_exprt for the identifier and pushes it in the vector
5253
lambda_method_handles().emplace_back(identifier);
5354
}
5455
void add_unknown_lambda_method_handle()
5556
{
57+
// creates empty symbol_exprt and pushes it in the vector
5658
lambda_method_handles().emplace_back();
5759
}
5860
};

unit/testing-utils/require_parse_tree.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ require_parse_tree::require_lambda_entry_for_descriptor(
4040
entry.second.method_type == method_type &&
4141
entry.second.lambda_method_ref == lambda_method_ref);
4242
});
43-
INFO("Number of matching lambda method entries: " << matches.size());
4443
REQUIRE(matches.size() == 1);
4544
return matches.at(0).second;
4645
}

0 commit comments

Comments
 (0)