Skip to content

Commit b5ffb21

Browse files
authored
Remove createDyncallWrapper and its usage (#22825)
This change effectively reverts #17328. IIUC the `dynCall_xxx` helpers for a given side module should always be exported by that side module. i.e. for all possible indirect calls a `dynCall_xxx` wrapper should already exist either in the main module or the side module.
1 parent 41de190 commit b5ffb21

File tree

5 files changed

+0
-205
lines changed

5 files changed

+0
-205
lines changed

src/library.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,9 +1796,6 @@ addToLibrary({
17961796
$dynCalls: '{}',
17971797
#endif
17981798
$dynCallLegacy__deps: [
1799-
#if MAIN_MODULE == 1
1800-
'$createDyncallWrapper'
1801-
#endif
18021799
#if MINIMAL_RUNTIME
18031800
'$dynCalls',
18041801
#endif
@@ -1828,11 +1825,6 @@ addToLibrary({
18281825
#if MINIMAL_RUNTIME
18291826
var f = dynCalls[sig];
18301827
#else
1831-
#if MAIN_MODULE == 1
1832-
if (!('dynCall_' + sig in Module)) {
1833-
Module['dynCall_' + sig] = createDyncallWrapper(sig);
1834-
}
1835-
#endif
18361828
var f = Module['dynCall_' + sig];
18371829
#endif
18381830
return f(ptr, ...args);

src/library_makeDynCall.js

Lines changed: 0 additions & 154 deletions
This file was deleted.

src/modules.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ export const LibraryManager = {
5757
'library_html5.js',
5858
'library_stack_trace.js',
5959
'library_wasi.js',
60-
'library_makeDynCall.js',
6160
'library_eventloop.js',
6261
'library_promise.js',
6362
];

test/test_other.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14267,15 +14267,6 @@ def test_warn_once(self):
1426714267
''')
1426814268
self.do_runf('main.c', 'warning: foo\ndone\n')
1426914269

14270-
def test_dyncallwrapper(self):
14271-
self.set_setting("MAIN_MODULE", 1)
14272-
expected = """\
14273-
2 7
14274-
i: 2 j: 8589934599 f: 3.120000 d: 77.120000
14275-
j1: 8589934599, j2: 30064771074, j3: 12884901891
14276-
"""
14277-
self.do_runf("test_runtime_dyncall_wrapper.c", expected)
14278-
1427914270
def test_compile_with_cache_lock(self):
1428014271
# Verify that, after warming the cache, running emcc does not require the cache lock.
1428114272
# Previously we would acquire the lock during sanity checking (even when the check

test/test_runtime_dyncall_wrapper.c

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)