Skip to content

Commit 067ccbf

Browse files
thk123Matthias Güdemann
thk123
authored and
Matthias Güdemann
committed
Rename j to boostrap_method_index
1 parent d7a4e50 commit 067ccbf

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/java_bytecode/java_bytecode_parser.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,7 +1803,9 @@ java_bytecode_parsert::parse_method_handle(const method_handle_infot &entry)
18031803
void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
18041804
{
18051805
u2 num_bootstrap_methods = read_u2();
1806-
for(size_t j = 0; j < num_bootstrap_methods; j++)
1806+
for(size_t bootstrap_method_index = 0;
1807+
bootstrap_method_index < num_bootstrap_methods;
1808+
++bootstrap_method_index)
18071809
{
18081810
u2 bootstrap_methodhandle_ref = read_u2();
18091811
const pool_entryt &entry = pool_entry(bootstrap_methodhandle_ref);
@@ -1868,7 +1870,7 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
18681870
lambda_method_handlet lambda_method_handle;
18691871
lambda_method_handle.handle_type = method_handle_typet::UNKNOWN_HANDLE;
18701872
lambda_method_handle.u2_values = std::move(u2_values);
1871-
parsed_class.lambda_method_handle_map[{parsed_class.name, j}] =
1873+
parsed_class.lambda_method_handle_map[{parsed_class.name, bootstrap_method_index}] =
18721874
lambda_method_handle;
18731875
}
18741876
else
@@ -1887,7 +1889,7 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
18871889
lambda_method_handle.handle_type =
18881890
method_handle_typet::UNKNOWN_HANDLE;
18891891
lambda_method_handle.u2_values = std::move(u2_values);
1890-
parsed_class.lambda_method_handle_map[{parsed_class.name, j}] =
1892+
parsed_class.lambda_method_handle_map[{parsed_class.name, bootstrap_method_index}] =
18911893
lambda_method_handle;
18921894
}
18931895
else
@@ -1902,7 +1904,7 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
19021904
lambda_method_handle.handle_type =
19031905
method_handle_typet::UNKNOWN_HANDLE;
19041906
lambda_method_handle.u2_values = std::move(u2_values);
1905-
parsed_class.lambda_method_handle_map[{parsed_class.name, j}] =
1907+
parsed_class.lambda_method_handle_map[{parsed_class.name, bootstrap_method_index}] =
19061908
lambda_method_handle;
19071909
}
19081910
else
@@ -1931,7 +1933,7 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
19311933
<< id2string(pool_entry(method_type_argument.ref1).s)
19321934
<< eom;
19331935
}
1934-
parsed_class.lambda_method_handle_map[{parsed_class.name, j}] =
1936+
parsed_class.lambda_method_handle_map[{parsed_class.name, bootstrap_method_index}] =
19351937
*lambda_method_handle;
19361938
}
19371939
}
@@ -1942,7 +1944,7 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
19421944
lambda_method_handlet lambda_method_handle;
19431945
lambda_method_handle.handle_type = method_handle_typet::UNKNOWN_HANDLE;
19441946
lambda_method_handle.u2_values = std::move(u2_values);
1945-
parsed_class.lambda_method_handle_map[{parsed_class.name, j}] =
1947+
parsed_class.lambda_method_handle_map[{parsed_class.name, bootstrap_method_index}] =
19461948
lambda_method_handle;
19471949
error() << "ERROR: num_bootstrap_arguments must be at least 3" << eom;
19481950
}

0 commit comments

Comments
 (0)