Skip to content

Commit

Permalink
Remove now unused MONO_PATCH_INFO_METHOD_CODE_SLOT.
Browse files Browse the repository at this point in the history
  • Loading branch information
vargaz committed Mar 22, 2023
1 parent e16e7ae commit ca863b7
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 23 deletions.
2 changes: 0 additions & 2 deletions src/mono/mono/mini/aot-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -6967,7 +6967,6 @@ encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info, guint8 *buf, guint
case MONO_PATCH_INFO_ICALL_ADDR:
case MONO_PATCH_INFO_ICALL_ADDR_CALL:
case MONO_PATCH_INFO_METHOD_RGCTX:
case MONO_PATCH_INFO_METHOD_CODE_SLOT:
case MONO_PATCH_INFO_METHOD_PINVOKE_ADDR_CACHE:
encode_method_ref (acfg, patch_info->data.method, p, &p);
break;
Expand Down Expand Up @@ -8936,7 +8935,6 @@ can_encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info)
case MONO_PATCH_INFO_METHOD:
case MONO_PATCH_INFO_METHOD_FTNDESC:
case MONO_PATCH_INFO_METHODCONST:
case MONO_PATCH_INFO_METHOD_CODE_SLOT:
case MONO_PATCH_INFO_METHOD_PINVOKE_ADDR_CACHE:
case MONO_PATCH_INFO_LLVMONLY_INTERP_ENTRY: {
MonoMethod *method = patch_info->data.method;
Expand Down
1 change: 0 additions & 1 deletion src/mono/mono/mini/aot-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -3778,7 +3778,6 @@ decode_patch (MonoAotModule *aot_module, MonoMemPool *mp, MonoJumpInfo *ji, guin
case MONO_PATCH_INFO_ICALL_ADDR:
case MONO_PATCH_INFO_ICALL_ADDR_CALL:
case MONO_PATCH_INFO_METHOD_RGCTX:
case MONO_PATCH_INFO_METHOD_CODE_SLOT:
case MONO_PATCH_INFO_METHOD_PINVOKE_ADDR_CACHE:
case MONO_PATCH_INFO_LLVMONLY_INTERP_ENTRY: {
MethodRef ref;
Expand Down
18 changes: 0 additions & 18 deletions src/mono/mono/mini/mini-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,6 @@ mono_patch_info_hash (gconstpointer data)
case MONO_PATCH_INFO_SEQ_POINT_INFO:
case MONO_PATCH_INFO_METHOD_RGCTX:
case MONO_PATCH_INFO_SIGNATURE:
case MONO_PATCH_INFO_METHOD_CODE_SLOT:
case MONO_PATCH_INFO_AOT_JIT_INFO:
case MONO_PATCH_INFO_METHOD_PINVOKE_ADDR_CACHE:
case MONO_PATCH_INFO_GSHARED_METHOD_INFO:
Expand Down Expand Up @@ -1493,22 +1492,6 @@ mono_resolve_patch_target_ext (MonoMemoryManager *mem_manager, MonoMethod *metho
mono_error_assert_ok (error);
break;
}
case MONO_PATCH_INFO_METHOD_CODE_SLOT: {
gpointer code_slot;

MonoJitMemoryManager *jit_mm = jit_mm_for_method (patch_info->data.method);
jit_mm_lock (jit_mm);
if (!jit_mm->method_code_hash)
jit_mm->method_code_hash = g_hash_table_new (NULL, NULL);
code_slot = g_hash_table_lookup (jit_mm->method_code_hash, patch_info->data.method);
if (!code_slot) {
code_slot = mono_mem_manager_alloc0 (jit_mm->mem_manager, sizeof (gpointer));
g_hash_table_insert (jit_mm->method_code_hash, patch_info->data.method, code_slot);
}
jit_mm_unlock (jit_mm);
target = code_slot;
break;
}
case MONO_PATCH_INFO_METHOD_PINVOKE_ADDR_CACHE: {
target = mono_mem_manager_alloc0 (mem_manager, sizeof (gpointer));
break;
Expand Down Expand Up @@ -4302,7 +4285,6 @@ free_jit_mem_manager (MonoMemoryManager *mem_manager)
g_hash_table_foreach (info->dynamic_code_hash, dynamic_method_info_free, NULL);
g_hash_table_destroy (info->dynamic_code_hash);
}
g_hash_table_destroy (info->method_code_hash);
g_hash_table_destroy (info->jump_trampoline_hash);
g_hash_table_destroy (info->jit_trampoline_hash);
g_hash_table_destroy (info->delegate_info_hash);
Expand Down
1 change: 0 additions & 1 deletion src/mono/mono/mini/mini-runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ typedef struct {
GHashTable *static_rgctx_trampoline_hash;
/* maps MonoMethod -> MonoJitDynamicMethodInfo */
GHashTable *dynamic_code_hash;
GHashTable *method_code_hash;
/* Maps methods to a RuntimeInvokeInfo structure, protected by the associated MonoDomain lock */
MonoConcurrentHashTable *runtime_invoke_hash;
/* Maps MonoMethod to a GPtrArray containing sequence point locations */
Expand Down
1 change: 0 additions & 1 deletion src/mono/mono/mini/patch-info.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ PATCH_INFO(SIGNATURE, "signature")
PATCH_INFO(GSHAREDVT_CALL, "gsharedvt_call")
PATCH_INFO(GSHAREDVT_METHOD, "gsharedvt_method")
PATCH_INFO(OBJC_SELECTOR_REF, "objc_selector_ref")
PATCH_INFO(METHOD_CODE_SLOT, "method_code_slot")
PATCH_INFO(LDSTR_LIT, "ldstr_lit")
PATCH_INFO(GC_NURSERY_START, "gc_nursery_start")
PATCH_INFO(VIRT_METHOD, "virt_method")
Expand Down

0 comments on commit ca863b7

Please sign in to comment.