Update to emscripten 2.0.14 (#1256)

This commit is contained in:
Dexter Chua 2021-02-16 11:25:53 +08:00 committed by GitHub
parent a79e2893f2
commit df3861e469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 55 deletions

View File

@ -1,4 +1,4 @@
export PYODIDE_EMSCRIPTEN_VERSION ?= 2.0.13
export PYODIDE_EMSCRIPTEN_VERSION ?= 2.0.14
export PYODIDE_BINARYEN_VERSION ?= ed20954 # version_99. The git tag tags the wrong commit
# BASH_ENV tells bash to run pyodide_env.sh on startup, whcih sets various

View File

@ -16,31 +16,6 @@ index 2990646..517fc33 100644
#endif
return wasmTable.get(ptr).apply(null, args)
#endif
diff --git a/emsdk/upstream/emscripten/src/runtime_functions.js b/emsdk/upstream/emscripten/src/runtime_functions.js
index 5ae5cfc..02474b3 100644
--- a/emsdk/upstream/emscripten/src/runtime_functions.js
+++ b/emsdk/upstream/emscripten/src/runtime_functions.js
@@ -114,6 +114,18 @@ function getEmptyTableSlot() {
return wasmTable.length - 1;
}
+function updateWasmFunctionMap(start,count)
+{
+ for(var i=start;i<start+count;i++)
+ {
+ var item = wasmTable.get(i);
+ // Ignore null values.
+ if (item) {
+ functionsInTableMap.set(item, i);
+ }
+ }
+}
+
// Add a wasm function to the table.
function addFunctionWasm(func, sig) {
// Check if the function is already in the table, to ensure each function
diff --git a/emsdk/upstream/emscripten/src/runtime_init_table.js b/emsdk/upstream/emscripten/src/runtime_init_table.js
index c8af59d..7084ff7 100644
--- a/emsdk/upstream/emscripten/src/runtime_init_table.js
+++ b/emsdk/upstream/emscripten/src/runtime_init_table.js
@@ -13,3 +13,17 @@ var wasmTable = new WebAssembly.Table({
@ -174,15 +149,6 @@ index 876492b..750a18d 100644
#endif
}
#if DYLINK_DEBUG
@@ -428,6 +482,8 @@ var LibraryDylink = {
assert(table.get(tableBase + i) !== undefined, 'table entry was not filled in');
}
#endif
+ // make sure that internal wasm stuff knows about everything in the table
+ updateWasmFunctionMap(tableBase,tableSize);
moduleExports = relocateExports(instance.exports, memoryBase);
if (!flags.allowUndefined) {
reportUndefinedSymbols();
@@ -713,6 +769,8 @@ var LibraryDylink = {
nodelete: Boolean(flags & {{{ cDefine('RTLD_NODELETE') }}}),

View File

@ -1,20 +0,0 @@
diff --git a/upstream/emscripten/src/library.js b/upstream/emscripten/src/library.js
index ea4cf27..6a692bd 100644
--- a/emsdk/upstream/emscripten/src/library.js
+++ b/emsdk/upstream/emscripten/src/library.js
@@ -772,6 +772,7 @@ LibraryManager.library = {
return ((Date.now() - _clock.start) * ({{{ cDefine('CLOCKS_PER_SEC') }}} / 1000))|0;
},
+ time__sig: 'ii',
time: function(ptr) {
var ret = (Date.now()/1000)|0;
if (ptr) {
@@ -780,6 +781,7 @@ LibraryManager.library = {
return ret;
},
+ difftime__sig: 'iii',
difftime: function(time1, time0) {
return time1 - time0;
},