|
|
|
@ -879,24 +879,28 @@ let java_inner_class_prefix_regex = Str.regexp "\\$[0-9]+"
|
|
|
|
|
|
|
|
|
|
let csharp_inner_class_prefix_regex = Str.regexp "\\$[0-9]+"
|
|
|
|
|
|
|
|
|
|
let replace_regex regex tgt name =
|
|
|
|
|
match Str.search_forward regex name 0 with
|
|
|
|
|
| _ ->
|
|
|
|
|
Str.global_replace regex tgt name
|
|
|
|
|
| exception Caml.Not_found ->
|
|
|
|
|
name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let replace_java_inner_class_prefix_regex = replace_regex java_inner_class_prefix_regex "$_"
|
|
|
|
|
|
|
|
|
|
let replace_csharp_inner_class_prefix_regex = replace_regex csharp_inner_class_prefix_regex "$_"
|
|
|
|
|
|
|
|
|
|
let hashable_name proc_name =
|
|
|
|
|
match proc_name with
|
|
|
|
|
| Java pname -> (
|
|
|
|
|
| Java pname ->
|
|
|
|
|
(* Strip autogenerated anonymous inner class numbers in order to keep the bug hash
|
|
|
|
|
invariant when introducing new anonymous classes *)
|
|
|
|
|
let name = F.asprintf "%a" (Java.pp ~withclass:true Simple) pname in
|
|
|
|
|
match Str.search_forward java_inner_class_prefix_regex name 0 with
|
|
|
|
|
| _ ->
|
|
|
|
|
Str.global_replace java_inner_class_prefix_regex "$_" name
|
|
|
|
|
| exception Caml.Not_found ->
|
|
|
|
|
name )
|
|
|
|
|
| CSharp pname -> (
|
|
|
|
|
replace_java_inner_class_prefix_regex name
|
|
|
|
|
| CSharp pname ->
|
|
|
|
|
let name = F.asprintf "%a" (CSharp.pp ~withclass:true Simple) pname in
|
|
|
|
|
match Str.search_forward csharp_inner_class_prefix_regex name 0 with
|
|
|
|
|
| _ ->
|
|
|
|
|
Str.global_replace csharp_inner_class_prefix_regex "$_" name
|
|
|
|
|
| exception Caml.Not_found ->
|
|
|
|
|
name )
|
|
|
|
|
replace_csharp_inner_class_prefix_regex name
|
|
|
|
|
| ObjC_Cpp osig when ObjC_Cpp.is_objc_method osig ->
|
|
|
|
|
(* In Objective C, the list of parameters is part of the method name. To prevent the bug
|
|
|
|
|
hash to change when a parameter is introduced or removed, only the part of the name
|
|
|
|
|