Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
76f87fe3
Commit
76f87fe3
authored
Feb 28, 2021
by
Esme Povirk
Committed by
Alexandre Julliard
Mar 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Add an option to enable the interpreter.
Signed-off-by:
Esme Povirk
<
esme@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ff6a3433
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
metahost.c
dlls/mscoree/metahost.c
+28
-0
mscoree_private.h
dlls/mscoree/mscoree_private.h
+12
-0
No files found.
dlls/mscoree/metahost.c
View file @
76f87fe3
...
...
@@ -106,6 +106,7 @@ MonoImage* (CDECL *mono_image_open_from_module_handle)(HMODULE module_handle, ch
static
void
(
CDECL
*
mono_install_assembly_preload_hook
)(
MonoAssemblyPreLoadFunc
func
,
void
*
user_data
);
int
(
CDECL
*
mono_jit_exec
)(
MonoDomain
*
domain
,
MonoAssembly
*
assembly
,
int
argc
,
char
*
argv
[]);
MonoDomain
*
(
CDECL
*
mono_jit_init_version
)(
const
char
*
domain_name
,
const
char
*
runtime_version
);
static
void
(
CDECL
*
mono_jit_set_aot_mode
)(
MonoAotMode
mode
);
static
int
(
CDECL
*
mono_jit_set_trace_options
)(
const
char
*
options
);
void
*
(
CDECL
*
mono_marshal_get_vtfixup_ftnptr
)(
MonoImage
*
image
,
DWORD
token
,
WORD
type
);
MonoDomain
*
(
CDECL
*
mono_object_get_domain
)(
MonoObject
*
obj
);
...
...
@@ -158,6 +159,8 @@ static HRESULT load_mono(LPCWSTR mono_path)
WCHAR
mono_dll_path
[
MAX_PATH
+
16
];
WCHAR
mono_lib_path
[
MAX_PATH
+
4
],
mono_etc_path
[
MAX_PATH
+
4
];
char
mono_lib_path_a
[
MAX_PATH
],
mono_etc_path_a
[
MAX_PATH
];
int
aot_size
;
char
aot_setting
[
256
];
int
trace_size
;
char
trace_setting
[
256
];
int
verbose_size
;
...
...
@@ -239,6 +242,7 @@ static HRESULT load_mono(LPCWSTR mono_path)
LOAD_OPT_MONO_FUNCTION
(
mono_callspec_set_assembly
,
NULL
);
LOAD_OPT_MONO_FUNCTION
(
mono_image_open_from_module_handle
,
image_open_module_handle_dummy
);
LOAD_OPT_MONO_FUNCTION
(
mono_jit_set_aot_mode
,
NULL
);
LOAD_OPT_MONO_FUNCTION
(
mono_profiler_create
,
NULL
);
LOAD_OPT_MONO_FUNCTION
(
mono_profiler_install
,
NULL
);
LOAD_OPT_MONO_FUNCTION
(
mono_profiler_set_runtime_shutdown_begin_callback
,
NULL
);
...
...
@@ -277,6 +281,30 @@ static HRESULT load_mono(LPCWSTR mono_path)
mono_install_assembly_preload_hook
(
mono_assembly_preload_hook_fn
,
NULL
);
aot_size
=
GetEnvironmentVariableA
(
"WINE_MONO_AOT"
,
aot_setting
,
sizeof
(
aot_setting
));
if
(
aot_size
)
{
MonoAotMode
mode
;
if
(
strcmp
(
aot_setting
,
"interp"
)
==
0
)
mode
=
MONO_AOT_MODE_INTERP_ONLY
;
else
if
(
strcmp
(
aot_setting
,
"none"
)
==
0
)
mode
=
MONO_AOT_MODE_NONE
;
else
{
ERR
(
"unknown WINE_MONO_AOT setting, valid settings are interp and none
\n
"
);
mode
=
MONO_AOT_MODE_NONE
;
}
if
(
mono_jit_set_aot_mode
!=
NULL
)
{
mono_jit_set_aot_mode
(
mode
);
}
else
{
ERR
(
"mono_jit_set_aot_mode export not found
\n
"
);
}
}
trace_size
=
GetEnvironmentVariableA
(
"WINE_MONO_TRACE"
,
trace_setting
,
sizeof
(
trace_setting
));
if
(
trace_size
)
...
...
dlls/mscoree/mscoree_private.h
View file @
76f87fe3
...
...
@@ -147,6 +147,18 @@ typedef void (CDECL *MonoProfileFunc)(MonoProfiler *prof);
typedef
void
(
CDECL
*
MonoPrintCallback
)
(
const
char
*
string
,
INT
is_stdout
);
typedef
enum
{
MONO_AOT_MODE_NONE
,
MONO_AOT_MODE_NORMAL
,
MONO_AOT_MODE_HYBRID
,
MONO_AOT_MODE_FULL
,
MONO_AOT_MODE_LLVMONLY
,
MONO_AOT_MODE_INTERP
,
MONO_AOT_MODE_INTERP_LLVMONLY
,
MONO_AOT_MODE_LLVMONLY_INTERP
,
MONO_AOT_MODE_INTERP_ONLY
}
MonoAotMode
;
extern
BOOL
is_mono_started
DECLSPEC_HIDDEN
;
extern
MonoImage
*
(
CDECL
*
mono_assembly_get_image
)(
MonoAssembly
*
assembly
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment