Skip to content

Commit b99856a

Browse files
committed
.
1 parent bc0a6fc commit b99856a

File tree

5 files changed

+15
-27
lines changed

5 files changed

+15
-27
lines changed

emcc.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,11 +1576,10 @@ def check(input_file):
15761576
# memalign is used to ensure allocated thread stacks are aligned.
15771577
shared.Settings.EXPORTED_FUNCTIONS += ['_memalign', '_malloc']
15781578

1579-
if not shared.Settings.WASM:
1580-
# dynCall_ii is used to call pthread entry points in worker.js (as
1581-
# metadce does not consider worker.js, which is external, we must
1582-
# consider it a user export, i.e., one which can never be removed).
1583-
building.user_requested_exports += ['dynCall_ii']
1579+
# dynCall_ii is used to call pthread entry points in worker.js (as
1580+
# metadce does not consider worker.js, which is external, we must
1581+
# consider it a user export, i.e., one which can never be removed).
1582+
building.user_requested_exports += ['dynCall_ii']
15841583

15851584
if shared.Settings.MINIMAL_RUNTIME:
15861585
building.user_requested_exports += ['exit']

src/preamble_minimal.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -200,17 +200,6 @@ var wasmOffsetConverter;
200200
#include "wasm_offset_converter.js"
201201
#endif
202202

203-
/** @param {Array=} args */
204-
#if ALLOW_ES6
205-
function dynCallDirect(ptr, ...args) {
206-
return wasmTable.get(ptr).apply(null, args);
207-
}
208-
#else
209-
function dynCallDirect(ptr) {
210-
return wasmTable.get(ptr).apply(null, Array.prototype.slice.call(arguments, 1));
211-
}
212-
#endif
213-
214203
#if EXIT_RUNTIME
215204

216205
function callRuntimeCallbacks(callbacks) {

src/runtime_init_table.js renamed to src/runtime_table.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@ var wasmTable = new WebAssembly.Table({
77
'element': 'anyfunc'
88
});
99
#endif
10+
11+
#if ALLOW_ES6
12+
function dynCallDirect(ptr, ...args) {
13+
return wasmTable.get(ptr).apply(null, args);
14+
}
15+
#else
16+
function dynCallDirect(ptr) {
17+
return wasmTable.get(ptr).apply(null, Array.prototype.slice.call(arguments, 1));
18+
}
19+
#endif

src/support.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -600,16 +600,6 @@ function makeBigInt(low, high, unsigned) {
600600
return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0));
601601
}
602602

603-
#if ALLOW_ES6
604-
function dynCallDirect(ptr, ...args) {
605-
return wasmTable.get(ptr).apply(null, args);
606-
}
607-
#else
608-
function dynCallDirect(ptr) {
609-
return wasmTable.get(ptr).apply(null, Array.prototype.slice.call(arguments, 1));
610-
}
611-
#endif
612-
613603
/** @param {Array=} args */
614604
function dynCall(sig, ptr, args) {
615605
#if ASSERTIONS

tools/shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ def make_invoke(sig, named=True):
12261226
if Settings.WASM_BIGINT or 'j' not in sig:
12271227
new_args = ['a' + str(i) for i in range(1, len(legal_sig))]
12281228
for i in range(len(sig) - 1):
1229-
if sig[i+1] == 'j':
1229+
if sig[i + 1] == 'j':
12301230
new_args[i] = 'BigInt(%s)' % new_args[i]
12311231
new_args = ','.join(new_args)
12321232
body = '%sdynCallDirect(index, %s);' % (ret, new_args)

0 commit comments

Comments
 (0)