mirror of https://github.com/pyodide/pyodide.git
Add compiler patch
This commit is contained in:
parent
f2e46063d6
commit
4df291a56f
|
@ -0,0 +1,38 @@
|
|||
index f6c9842ff..9f83181eb 100644
|
||||
--- a/emsdk/emscripten/tag-1.38.4/src/support.js
|
||||
+++ b/emsdk/emscripten/tag-1.38.4/src/support.js
|
||||
@@ -158,7 +158,33 @@ function loadWebAssemblyModule(binary) {
|
||||
'Infinity': Infinity,
|
||||
},
|
||||
'global.Math': Math,
|
||||
- env: env
|
||||
+ env: env,
|
||||
+ 'asm2wasm': { // special asm2wasm imports
|
||||
+ "f64-rem": function(x, y) {
|
||||
+ return x % y;
|
||||
+ },
|
||||
+ "debugger": function() {
|
||||
+ debugger;
|
||||
+ }
|
||||
+#if NEED_ALL_ASM2WASM_IMPORTS
|
||||
+ ,
|
||||
+ "f64-to-int": function(x) {
|
||||
+ return x | 0;
|
||||
+ },
|
||||
+ "i32s-div": function(x, y) {
|
||||
+ return ((x | 0) / (y | 0)) | 0;
|
||||
+ },
|
||||
+ "i32u-div": function(x, y) {
|
||||
+ return ((x >>> 0) / (y >>> 0)) >>> 0;
|
||||
+ },
|
||||
+ "i32s-rem": function(x, y) {
|
||||
+ return ((x | 0) % (y | 0)) | 0;
|
||||
+ },
|
||||
+ "i32u-rem": function(x, y) {
|
||||
+ return ((x >>> 0) % (y >>> 0)) >>> 0;
|
||||
+ }
|
||||
+#endif // NEED_ALL_ASM2WASM_IMPORTS
|
||||
+ },
|
||||
};
|
||||
#if ASSERTIONS
|
||||
var oldTable = [];
|
Loading…
Reference in New Issue