Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bingbingbingbing
mono
提交
385e28b1
M
mono
项目概览
bingbingbingbing
/
mono
与 Fork 源项目一致
从无法访问的项目Fork
通知
35
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mono
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
385e28b1
编写于
10月 29, 2020
作者:
R
ramanbs-rythmos
提交者:
GitHub
10月 29, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1354 from Unity-Technologies/2020.2/unity-master-fix-1273662
2020.2 : Unity master fix case 1273662
上级
2034ab53
e55ec66b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
14 deletion
+21
-14
mono/metadata/image.c
mono/metadata/image.c
+1
-1
mono/metadata/loader.c
mono/metadata/loader.c
+0
-4
mono/metadata/marshal.c
mono/metadata/marshal.c
+19
-8
mono/metadata/metadata-internals.h
mono/metadata/metadata-internals.h
+1
-1
未找到文件。
mono/metadata/image.c
浏览文件 @
385e28b1
...
...
@@ -1906,6 +1906,7 @@ mono_wrapper_caches_free (MonoWrapperCaches *cache)
free_hash
(
cache
->
runtime_invoke_vtype_cache
);
free_hash
(
cache
->
delegate_abstract_invoke_cache
);
free_hash
(
cache
->
delegate_bound_static_invoke_cache
);
free_hash
(
cache
->
runtime_invoke_direct_cache
);
free_hash
(
cache
->
managed_wrapper_cache
);
...
...
@@ -2076,7 +2077,6 @@ mono_image_close_except_pools (MonoImage *image)
g_hash_table_destroy
(
image
->
name_cache
);
}
free_hash
(
image
->
delegate_bound_static_invoke_cache
);
free_hash
(
image
->
runtime_invoke_vcall_cache
);
free_hash
(
image
->
ldfld_wrapper_cache
);
free_hash
(
image
->
ldflda_wrapper_cache
);
...
...
mono/metadata/loader.c
浏览文件 @
385e28b1
...
...
@@ -1976,10 +1976,6 @@ mono_free_method (MonoMethod *method)
{
MONO_PROFILER_RAISE
(
method_free
,
(
method
));
/* FIXME: This hack will go away when the profiler will support freeing methods */
if
(
G_UNLIKELY
(
mono_profiler_installed
()))
return
;
if
(
method
->
signature
)
{
/*
* FIXME: This causes crashes because the types inside signatures and
...
...
mono/metadata/marshal.c
浏览文件 @
385e28b1
...
...
@@ -3515,7 +3515,7 @@ free_signature_pointer_pair (SignaturePointerPair *pair)
MonoMethod
*
mono_marshal_get_delegate_invoke_internal
(
MonoMethod
*
method
,
gboolean
callvirt
,
gboolean
static_method_with_first_arg_bound
,
MonoMethod
*
target_method
)
{
MonoMethodSignature
*
sig
,
*
static_sig
,
*
invoke_sig
;
MonoMethodSignature
*
sig
,
*
invoke_sig
;
int
i
;
MonoMethodBuilder
*
mb
;
MonoMethod
*
res
;
...
...
@@ -3568,6 +3568,13 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
subtype
=
WRAPPER_SUBTYPE_DELEGATE_INVOKE_BOUND
;
g_assert
(
!
callvirt
);
invoke_sig
=
mono_method_signature
(
target_method
);
/*
* The wrapper has a different lifetime from the method to be invoked.
* If the method is dynamic we don't want to be using its signature
* in the wrapper since it could get freed early.
*/
if
(
method_is_dynamic
(
target_method
))
invoke_sig
=
mono_metadata_signature_dup_full
(
target_method
->
klass
->
image
,
invoke_sig
);
}
/*
...
...
@@ -3595,7 +3602,11 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
return
res
;
cache_key
=
method
->
klass
;
}
else
if
(
static_method_with_first_arg_bound
)
{
cache
=
get_cache
(
&
method
->
klass
->
image
->
delegate_bound_static_invoke_cache
,
GHashTable
**
cache_ptr
;
cache_ptr
=
&
mono_method_get_wrapper_cache
(
target_method
)
->
delegate_bound_static_invoke_cache
;
cache
=
get_cache
(
cache_ptr
,
(
GHashFunc
)
mono_signature_hash
,
(
GCompareFunc
)
mono_metadata_signature_equal
);
/*
...
...
@@ -3633,10 +3644,10 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
cache_key
=
sig
;
}
static_sig
=
mono_metadata_signature_dup_full
(
method
->
klass
->
image
,
sig
);
static_sig
->
hasthis
=
0
;
if
(
!
static_method_with_first_arg_bound
)
invoke_sig
=
static_sig
;
if
(
!
static_method_with_first_arg_bound
)
{
invoke_sig
=
mono_metadata_signature_dup_full
(
method
->
klass
->
image
,
sig
)
;
invoke_sig
->
hasthis
=
0
;
}
if
(
static_method_with_first_arg_bound
)
name
=
mono_signature_to_name
(
invoke_sig
,
"invoke_bound"
);
...
...
@@ -12393,8 +12404,8 @@ mono_marshal_free_dynamic_wrappers (MonoMethod *method)
if
(
image
->
wrapper_caches
.
delegate_abstract_invoke_cache
)
g_hash_table_foreach_remove
(
image
->
wrapper_caches
.
delegate_abstract_invoke_cache
,
signature_pointer_pair_matches_pointer
,
method
);
// FIXME: Need to clear the caches in other images as well
if
(
image
->
delegate_bound_static_invoke_cache
)
g_hash_table_remove
(
image
->
delegate_bound_static_invoke_cache
,
mono_method_signature
(
method
));
if
(
image
->
wrapper_caches
.
delegate_bound_static_invoke_cache
)
g_hash_table_remove
(
image
->
wrapper_caches
.
delegate_bound_static_invoke_cache
,
mono_method_signature
(
method
));
if
(
marshal_mutex_initialized
)
mono_marshal_unlock
();
...
...
mono/metadata/metadata-internals.h
浏览文件 @
385e28b1
...
...
@@ -125,6 +125,7 @@ typedef struct {
* indexed by SignaturePointerPair
*/
GHashTable
*
delegate_abstract_invoke_cache
;
GHashTable
*
delegate_bound_static_invoke_cache
;
/*
* indexed by MonoMethod pointers
...
...
@@ -339,7 +340,6 @@ struct _MonoImage {
/*
* indexed by SignaturePointerPair
*/
GHashTable
*
delegate_bound_static_invoke_cache
;
GHashTable
*
native_func_wrapper_cache
;
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录