Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Emscripten 3.1.1 bump #63894

Merged
merged 62 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0a6c904
Initial changes for emscripten 2.0.34
radekdoulik Dec 7, 2021
1c2f989
Use emcc-link.rsp in build targets
radekdoulik Dec 8, 2021
f74d8b9
Use updated docker images
radekdoulik Dec 8, 2021
20f59e5
Fix compiler warnings
Dec 9, 2021
31197d9
Put `--profiling-funcs` to `_EmccLinkFlags`
radekdoulik Dec 9, 2021
2063241
Fix build
radekdoulik Dec 9, 2021
6aed1c5
Add shell to the environment
radekdoulik Dec 13, 2021
1f0048f
Merge remote-tracking branch 'origin/main' into pr-emscripten-34-bump
radekdoulik Dec 21, 2021
17c0117
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Jan 3, 2022
11e2ce5
Add emcc-link.rsp to PlatformManifestFileEntry
radekdoulik Jan 4, 2022
3eb44cf
Feedback
radekdoulik Jan 7, 2022
c0e4d84
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Jan 12, 2022
460d09a
Bump emscripten version
radekdoulik Jan 17, 2022
6f7d0c2
Bump llvm package version and use its libclang
radekdoulik Jan 17, 2022
b9c7488
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Jan 17, 2022
e089ab1
Use newer docker images with emscripten 3.1.1
radekdoulik Jan 19, 2022
1cfd8bb
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Jan 19, 2022
01c9516
Remove unused variable
radekdoulik Jan 20, 2022
e8a77c9
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Feb 3, 2022
5076d72
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Feb 16, 2022
1b81b20
Add note about icu repo
radekdoulik Feb 16, 2022
a7d92fb
Add comment to improve code readability
radekdoulik Feb 16, 2022
5cf57dc
Bump the ICU and emsdk versions
lewing Feb 16, 2022
d810106
Merge branch 'main' into pr-emscripten-311-bump
lewing Feb 16, 2022
d42afa8
disable non-wasm builds
radical Feb 16, 2022
ffe7aa0
disable wasm jobs in runtime, and runtime-staging, as we'll be runnin…
radical Feb 17, 2022
7205be1
Merge remote-tracking branch 'origin/main' into pr-emscripten-311-bump
radical Feb 17, 2022
3b90be5
[wasm] Re-enable tests that were disabled due to the earlier emsdk bump
radical Feb 17, 2022
7b90965
[wasm] Disable nodejs tests
radical Feb 17, 2022
f7c77d9
fix wbt build
radical Feb 17, 2022
5166d90
Update path to node in helix commands.
maraf Feb 17, 2022
1b7a8d1
Merge remote-tracking branch 'origin/main' into pr-emscripten-311-bump
radical Feb 18, 2022
af8bc89
disable non-wasm builds
radical Feb 18, 2022
f80cc5c
Merge remote-tracking branch 'origin/main' into pr-emscripten-311-bump
radical Feb 19, 2022
d792358
Merge remote-tracking branch 'origin/main' into pr-emscripten-311-bump
radical Feb 19, 2022
c18ae32
[wasm] Make emscripten version mismatch an error on CI
radical Feb 19, 2022
6a0fa45
Bump emscripten packages used to preview3, which has emsdk 3.1.1
radical Feb 19, 2022
54dc582
Update emscripten package version in Versions.props tooo
radical Feb 19, 2022
635286c
Re-enable wasm jobs
radical Feb 20, 2022
756f6e5
Merge remote-tracking branch 'origin/main' into pr-emscripten-311-bump
radical Feb 20, 2022
a0c64b2
enable non-wasm jobs
radical Feb 20, 2022
c3046b0
Add more missing exports
radekdoulik Feb 23, 2022
42f9f10
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Feb 23, 2022
f7e3905
__dl_seterr shouldn't be needed
radekdoulik Feb 23, 2022
0812dbc
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Mar 1, 2022
c17fb1b
Fix MicrosoftNETCoreRuntimeICUTransportVersion
radekdoulik Mar 11, 2022
721db38
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Mar 16, 2022
f733732
Put back the 3.1.1 docker images after merge
radekdoulik Mar 16, 2022
c68ce2d
Revert "fix wbt build"
radekdoulik Mar 16, 2022
5305472
Revert "[wasm] Disable nodejs tests"
radekdoulik Mar 16, 2022
b8a0d83
Use newer ICU package, last that still had 3.1.1
radekdoulik Mar 16, 2022
a34230f
Try different helix queue parameter
radekdoulik Mar 16, 2022
e55f6be
Revert "Try different helix queue parameter"
radekdoulik Mar 16, 2022
0b4ad77
Fix helix queue with docker tag
radekdoulik Mar 16, 2022
f96e33a
Merge remote-tracking branch 'remotes/origin/main' into pr-emscripten…
radekdoulik Mar 16, 2022
d9b8aef
Try to set PYTHONPATH for emscripten
radekdoulik Mar 17, 2022
24d8396
[wasm] Do not set _WasmDevel=true for blazor projects
radical Mar 17, 2022
c5a3329
Increase timeout
radekdoulik Mar 17, 2022
18db8a4
Fix WBT tests
radekdoulik Mar 17, 2022
7b33355
Merge branch 'main' into pr-emscripten-311-bump
radical Mar 18, 2022
d37b85e
[wasm] Export more functions
radical Mar 18, 2022
7c9ae48
fix exported function names
radical Mar 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@
<!-- MsQuic -->
<SystemNetMsQuicTransportVersion>7.0.0-alpha.1.21529.3</SystemNetMsQuicTransportVersion>
<!-- Mono LLVM -->
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21615.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21615.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21615.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21615.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21615.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21615.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21615.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21615.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22064.2</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22064.2</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22064.2</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22064.2</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22064.2</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22064.2</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22064.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22064.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<!-- emscripten / Node -->
<MicrosoftNETWorkloadEmscriptenManifest70100Version>7.0.0-alpha.1.21601.1</MicrosoftNETWorkloadEmscriptenManifest70100Version>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptenManifest70100Version)</MicrosoftNETRuntimeEmscriptenVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ jobs:
targetRid: browser-wasm
platform: Browser_wasm
container:
image: ubuntu-18.04-webassembly-20210707133424-12f133e
image: ubuntu-18.04-webassembly-20211208134944-544b18c
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,6 @@ jobs:

# WebAssembly windows
- ${{ if eq(parameters.platform, 'Browser_wasm_win') }}:
- (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210702131541-6837048
- (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20211208140215-544b18c

${{ insert }}: ${{ parameters.jobParameters }}
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
<PlatformManifestFileEntry Include="pinvoke.c" IsNative="true" />
<PlatformManifestFileEntry Include="pinvoke.h" IsNative="true" />
<PlatformManifestFileEntry Include="emcc-default.rsp" IsNative="true" />
<PlatformManifestFileEntry Include="emcc-link.rsp" IsNative="true" />
<PlatformManifestFileEntry Include="emcc-props.json" IsNative="true" />
<!-- ICU-specific files -->
<PlatformManifestFileEntry Include="libicudata.a" IsNative="true" />
Expand Down
6 changes: 3 additions & 3 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,9 @@
<MonoUseCrossTool>true</MonoUseCrossTool>
<MonoAotAbi>wasm32-unknown-none</MonoAotAbi>
<MonoAotOffsetsFile>$(MonoObjCrossDir)offsets-wasm32-unknown-none.h</MonoAotOffsetsFile>
<MonoLibClang Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(EMSDK_PATH)/upstream/lib/libclang.dylib</MonoLibClang>
<MonoLibClang Condition="$([MSBuild]::IsOSPlatform('Linux'))">$(EMSDK_PATH)/upstream/lib/libclang.so</MonoLibClang>
<MonoLibClang Condition="$([MSBuild]::IsOSPlatform('Windows'))">$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'upstream', 'bin', 'libclang.dll'))</MonoLibClang>
<MonoLibClang Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(MonoAOTLLVMDir)/lib/libclang.dylib</MonoLibClang>
<MonoLibClang Condition="$([MSBuild]::IsOSPlatform('Linux'))">$(MonoAOTLLVMDir)/lib/libclang.so</MonoLibClang>
<MonoLibClang Condition="$([MSBuild]::IsOSPlatform('Windows'))">$([MSBuild]::NormalizePath('$(MonoAOTLLVMDir)', 'bin', 'libclang.dll'))</MonoLibClang>
<PythonCmd Condition="'$(HostOS)' == 'windows'">setlocal EnableDelayedExpansion &amp;&amp; call &quot;$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))&quot; &amp;&amp; !EMSDK_PYTHON!</PythonCmd>
<_ForceRelease Condition="$([MSBuild]::IsOSPlatform('Windows')) and '$(TargetArchitecture)' == 'wasm' and '$(Configuration)' == 'Debug'">true</_ForceRelease>
</PropertyGroup>
Expand Down
11 changes: 9 additions & 2 deletions src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ static gboolean buffer_replies;
DebuggerTlsData *tls; \
tls = (DebuggerTlsData *)mono_native_tls_get_value (debugger_tls_id);
#else
#define GET_TLS_DATA_FROM_THREAD(thread) \
#define GET_TLS_DATA_FROM_THREAD(...) \
radekdoulik marked this conversation as resolved.
Show resolved Hide resolved
DebuggerTlsData *tls; \
tls = &debugger_wasm_thread;
#define GET_DEBUGGER_TLS() \
Expand Down Expand Up @@ -9115,7 +9115,9 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
int objid;
ErrorCode err;
MonoThread *thread_obj;
#ifndef TARGET_WASM
MonoInternalThread *thread;
#endif
int pos, i, len, frame_idx;
StackFrame *frame;
MonoDebugMethodJitInfo *jit;
Expand All @@ -9129,11 +9131,16 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
if (err != ERR_NONE)
return err;

#ifndef TARGET_WASM
thread = THREAD_TO_INTERNAL (thread_obj);

#endif
id = decode_id (p, &p, end);

#ifndef TARGET_WASM
GET_TLS_DATA_FROM_THREAD (thread);
#else
GET_TLS_DATA_FROM_THREAD ();
#endif
g_assert (tls);

for (i = 0; i < tls->frame_count; ++i) {
Expand Down
5 changes: 4 additions & 1 deletion src/mono/mono/metadata/seq-points-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,10 @@ mono_seq_point_data_read (SeqPointData *data, char *path)
fseek(f, 0, SEEK_SET);

buffer_orig = buffer = (guint8 *)g_malloc (fsize + 1);
fread(buffer_orig, fsize, 1, f);
size_t items = fread(buffer_orig, fsize, 1, f);
if (items != 1)
return FALSE;

fclose(f);

entry_count = decode_var_int (buffer, &buffer);
Expand Down
9 changes: 3 additions & 6 deletions src/mono/mono/metadata/sre-encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ mono_dynimage_encode_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType *
HANDLE_FUNCTION_ENTER ();

MonoDynamicTable *table;
guint32 token, enclosing;
guint32 token;
MonoClass *klass;

/* if the type requires a typespec, we must try that first*/
Expand All @@ -446,11 +446,8 @@ mono_dynimage_encode_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType *
goto leave;
}

if (m_class_get_nested_in (klass)) {
enclosing = mono_dynimage_encode_typedef_or_ref_full (assembly, m_class_get_byval_arg (m_class_get_nested_in (klass)), FALSE);
/* get the typeref idx of the enclosing type */
enclosing >>= MONO_TYPEDEFORREF_BITS;
}
if (m_class_get_nested_in (klass))
mono_dynimage_encode_typedef_or_ref_full (assembly, m_class_get_byval_arg (m_class_get_nested_in (klass)), FALSE);
table = &assembly->tables [MONO_TABLE_TYPEREF];
token = MONO_TYPEDEFORREF_TYPEREF | (table->next_idx << MONO_TYPEDEFORREF_BITS); /* typeref */
g_hash_table_insert (assembly->typeref, type, GUINT_TO_POINTER(token));
Expand Down
8 changes: 6 additions & 2 deletions src/mono/mono/mini/aot-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -2658,7 +2658,7 @@ compute_llvm_code_range (MonoAotModule *amodule, guint8 **code_start, guint8 **c

#ifdef HOST_WASM
gsize min = 1 << 30, max = 0;
gsize prev = 0;
//gsize prev = 0;

// FIXME: This depends on emscripten allocating ftnptr ids sequentially
for (int i = 0; i < amodule->info.nmethods; ++i) {
Expand All @@ -2672,7 +2672,7 @@ compute_llvm_code_range (MonoAotModule *amodule, guint8 **code_start, guint8 **c
min = val;
else if (val > max)
max = val;
prev = val;
//prev = val;
}
}
if (max) {
Expand Down Expand Up @@ -5679,12 +5679,16 @@ get_new_unbox_arbitrary_trampoline_frome_page (gpointer addr)
static gpointer
get_numerous_trampoline (MonoAotTrampoline tramp_type, int n_got_slots, MonoAotModule **out_amodule, guint32 *got_offset, guint32 *out_tramp_size)
{
#ifndef DISABLE_ASSERT_MESSAGES
MonoImage *image;
#endif
MonoAotModule *amodule = get_mscorlib_aot_module ();
int index, tramp_size;

#ifndef DISABLE_ASSERT_MESSAGES
/* Currently, we keep all trampolines in the mscorlib AOT image */
image = mono_defaults.corlib;
#endif

*out_amodule = amodule;

Expand Down
11 changes: 9 additions & 2 deletions src/mono/mono/mini/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2067,9 +2067,12 @@ mono_main (int argc, char* argv[])
MonoDomain *domain;
MonoImageOpenStatus open_status;
const char* aname, *mname = NULL;
int i, count = 1;
guint32 opt, action = DO_EXEC, recompilation_times = 1;
int i;
#ifndef DISABLE_JIT
int count = 1;
MonoGraphOptions mono_graph_options = (MonoGraphOptions)0;
#endif
guint32 opt, action = DO_EXEC, recompilation_times = 1;
int mini_verbose_level = 0;
char *trace_options = NULL;
char *aot_options = NULL;
Expand Down Expand Up @@ -2222,13 +2225,15 @@ mono_main (int argc, char* argv[])
} else if (strcmp (argv [i], "--mixed-mode") == 0) {
mixed_mode = TRUE;
#endif
#ifndef DISABLE_JIT
} else if (strcmp (argv [i], "--ncompile") == 0) {
if (i + 1 >= argc){
fprintf (stderr, "error: --ncompile requires an argument\n");
return 1;
}
count = atoi (argv [++i]);
action = DO_BENCH;
#endif
} else if (strcmp (argv [i], "--trace") == 0) {
trace_options = (char*)"";
} else if (strncmp (argv [i], "--trace=", 8) == 0) {
Expand Down Expand Up @@ -2346,6 +2351,7 @@ mono_main (int argc, char* argv[])

mname = argv [++i];
action = DO_BENCH;
#ifndef DISABLE_JIT
} else if (strncmp (argv [i], "--graph=", 8) == 0) {
if (i + 1 >= argc){
fprintf (stderr, "error: --graph option requires a method name argument\n");
Expand All @@ -2364,6 +2370,7 @@ mono_main (int argc, char* argv[])
mname = argv [++i];
mono_graph_options = MONO_GRAPH_CFG;
action = DO_DRAW;
#endif
} else if (strcmp (argv [i], "--debug") == 0) {
enable_debugging = TRUE;
} else if (strncmp (argv [i], "--debug=", 8) == 0) {
Expand Down
7 changes: 6 additions & 1 deletion src/mono/mono/mini/mini-generic-sharing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,9 @@ mini_get_interp_in_wrapper (MonoMethodSignature *sig)
static GHashTable *cache;
const char *name;
gboolean generic = FALSE;
#ifndef DISABLE_JIT
gboolean return_native_struct;
#endif

sig = mini_get_underlying_reg_signature (sig);

Expand All @@ -1763,7 +1765,10 @@ mini_get_interp_in_wrapper (MonoMethodSignature *sig)
* stack, pass this address to the interp_entry and when we return it we use
* CEE_MONO_LDNATIVEOBJ
*/
return_native_struct = sig->ret->type == MONO_TYPE_VALUETYPE && sig->pinvoke;
#ifndef DISABLE_JIT
return_native_struct =
#endif
sig->ret->type == MONO_TYPE_VALUETYPE && sig->pinvoke;

/* Create the signature for the wrapper */
csig = g_malloc0 (MONO_SIZEOF_METHOD_SIGNATURE + (sig->param_count * sizeof (MonoType*)));
Expand Down
8 changes: 4 additions & 4 deletions src/mono/mono/mini/mini-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -3285,7 +3285,7 @@ mono_llvmonly_runtime_invoke (MonoMethod *method, RuntimeInvokeInfo *info, void
static MonoObject*
mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc, MonoError *error)
{
MonoMethod *invoke, *callee;
MonoMethod *callee;
MonoObject *(*runtime_invoke) (MonoObject *this_obj, void **params, MonoObject **exc, void* compiled_method);
RuntimeInvokeInfo *info, *info2;
MonoJitInfo *ji = NULL;
Expand Down Expand Up @@ -3328,7 +3328,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
MonoMethod *wrapper;

wrapper = mono_marshal_get_array_accessor_wrapper (method);
invoke = mono_marshal_get_runtime_invoke (wrapper, FALSE);
mono_marshal_get_runtime_invoke (wrapper, FALSE);
callee = wrapper;
} else {
callee = NULL;
Expand Down Expand Up @@ -3404,8 +3404,8 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
static RuntimeInvokeDynamicFunction dyn_runtime_invoke = NULL;
if (info->dyn_call_info) {
if (!dyn_runtime_invoke) {
invoke = mono_marshal_get_runtime_invoke_dynamic ();
RuntimeInvokeDynamicFunction invoke_func = (RuntimeInvokeDynamicFunction)mono_jit_compile_method_jit_only (invoke, error);
MonoMethod *dynamic_invoke = mono_marshal_get_runtime_invoke_dynamic ();
RuntimeInvokeDynamicFunction invoke_func = (RuntimeInvokeDynamicFunction)mono_jit_compile_method_jit_only (dynamic_invoke, error);
mono_memory_barrier ();
dyn_runtime_invoke = invoke_func;
if (!dyn_runtime_invoke && mono_use_interpreter) {
Expand Down
40 changes: 1 addition & 39 deletions src/mono/mono/mini/mini-wasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ mono_arch_create_vars (MonoCompile *cfg)
{
MonoMethodSignature *sig;
CallInfo *cinfo;
MonoType *sig_ret;

sig = mono_method_signature_internal (cfg->method);

Expand All @@ -220,7 +219,7 @@ mono_arch_create_vars (MonoCompile *cfg)
// if (cinfo->ret.storage == ArgValuetypeInReg)
// cfg->ret_var_is_local = TRUE;

sig_ret = mini_get_underlying_type (sig->ret);
mini_get_underlying_type (sig->ret);
if (cinfo->ret.storage == ArgValuetypeAddrInIReg || cinfo->ret.storage == ArgGsharedVTOnStack) {
cfg->vret_addr = mono_compile_create_var (cfg, mono_get_int_type (), OP_ARG);
if (G_UNLIKELY (cfg->verbose_level > 1)) {
Expand Down Expand Up @@ -643,8 +642,6 @@ mono_arch_patch_code_new (MonoCompile *cfg, guint8 *code, MonoJumpInfo *ji, gpoi

G_BEGIN_DECLS

void * getgrnam (const char *name);
void * getgrgid (gid_t gid);
int inotify_init (void);
int inotify_rm_watch (int fd, int wd);
int inotify_add_watch (int fd, const char *pathname, uint32_t mask);
Expand Down Expand Up @@ -674,13 +671,6 @@ pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *pa
return 0;
}

int
pthread_sigmask (int how, const sigset_t *set, sigset_t *oset)
{
return 0;
}


int
sigsuspend(const sigset_t *sigmask)
{
Expand All @@ -694,18 +684,6 @@ getdtablesize (void)
return 256; //random constant that is the fd limit
}

void *
getgrnam (const char *name)
{
return NULL;
}

void *
getgrgid (gid_t gid)
{
return NULL;
}

int
inotify_init (void)
{
Expand Down Expand Up @@ -743,22 +721,6 @@ ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count)
return -1;
}

int
getpwnam_r (const char *name, struct passwd *pwd, char *buffer, size_t bufsize,
struct passwd **result)
{
*result = NULL;
return ENOTSUP;
}

int
getpwuid_r (uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize,
struct passwd **result)
{
*result = NULL;
return ENOTSUP;
}

G_END_DECLS

/* Helper for runtime debugging */
Expand Down
1 change: 1 addition & 0 deletions src/mono/mono/sgen/sgen-gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,7 @@ sgen_dummy_use (gpointer v)
{
#if defined(_MSC_VER) || defined(HOST_WASM)
static volatile gpointer ptr;
(void)ptr; // avoid compiler warning: variable 'ptr' set but not used
ptr = v;
#elif defined(__GNUC__)
__asm__ volatile ("" : "=r"(v) : "r"(v));
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/sgen/sgen-workers.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void sgen_workers_set_num_active_workers (int generation, int num_workers);
#ifndef DISABLE_SGEN_MAJOR_MARKSWEEP_CONC
void sgen_workers_start_all_workers (int generation, SgenObjectOperations *object_ops_nopar, SgenObjectOperations *object_ops_par, SgenWorkersFinishCallback finish_job);
#else
#define sgen_workers_start_all_workers(...)
#define sgen_workers_start_all_workers(generation, object_ops_nopar, object_ops_par, finish_job) (void)object_ops_par; // avoid compiler warning: variable 'object_ops_par' set but not used
#endif

void sgen_workers_enqueue_job (int generation, SgenThreadPoolJob *job, gboolean enqueue);
Expand Down
5 changes: 2 additions & 3 deletions src/mono/mono/utils/mono-mmap-wasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,20 @@ int
mono_vfree (void *addr, size_t length, MonoMemAccountType type)
{
VallocInfo *info = (VallocInfo*)(valloc_hash ? g_hash_table_lookup (valloc_hash, addr) : NULL);
int res;

if (info) {
/*
* We are passed the aligned address in the middle of the mapping allocated by
* mono_valloc_align (), free the original mapping.
*/
BEGIN_CRITICAL_SECTION;
res = munmap (info->addr, info->size);
munmap (info->addr, info->size);
END_CRITICAL_SECTION;
g_free (info);
g_hash_table_remove (valloc_hash, addr);
} else {
BEGIN_CRITICAL_SECTION;
res = munmap (addr, length);
munmap (addr, length);
END_CRITICAL_SECTION;
}

Expand Down
Loading