Cleanup patch_info code a little. (#14037)
commit1ffb5fb83f41c77e901617e6c35e8306bad393ec
authorJay Krell <jay.krell@cornell.edu>
Tue, 23 Apr 2019 08:57:31 +0000 (23 01:57 -0700)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 23 Apr 2019 08:57:31 +0000 (23 10:57 +0200)
tree266011f4e584bb9f55befac48b9a3a21cd658396
parent778f3a4925ab73bd346b44ab0b397559aece67ee
Cleanup patch_info code a little. (#14037)

 e.g. whenever underlying representation is nul terminated string.
 MONO_PATCH_INFO_LDSTR_LIT
 MONO_PATCH_INFO_OBJC_SELECTOR_REF
almost the same as
 MONO_PATCH_INFO_JIT_ICALL
 MONO_PATCH_INFO_JIT_ICALL_ADDR
 MONO_PATCH_INFO_JIT_ICALL_ADDR_NOCALL

MONO_PATCH_INFO_LDSTR_LIT no longer allocate
 and copy the string from the AOT image into image_pool.

g_str_equal check pointer equality first.
While obviously correct, not obviously faster,
as it adds cost when strings are unequal.

Uninline g_str_equal, seems cleaner, but perhaps less efficient.

Combine the switch-exit and default: paths,
as only one case other than default exited the switch.

Lift out other common subexpressions.
mono/eglib/ghashtable.c
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/mini-runtime.c