{"push_id":2399425560,"size":3,"distinct_size":2,"ref":"refs/heads/fix-liveness","head":"13e7fc1df075b534e09fb3689726372c39c18421","before":"30d2474b26572bc5e247beb6933557c8278a8497","commits":[{"sha":"d52213c3f5e96bb3450721d96aa68d3c5e0865b6","author":{"name":"Alon Zakai","email":"d3377c7bf8900ea04e219e1ab7aa8a46e80610fa@gmail.com"},"message":"Function pointer cast emulation (#1468)\n\nThis adds a pass that implements \"function pointer cast emulation\" - allows indirect calls to go through even if the number of arguments or their types is incorrect. That is undefined behavior in C/C++ but in practice somehow works in native archs. It is even relied upon in e.g. Python.\r\n\r\nEmscripten already has such emulation for asm.js, which also worked for asm2wasm. This implements something like it in binaryen which also allows the wasm backend to use it. As a result, Python should now be portable using the wasm backend.\r\n\r\nThe mechanism used for the emulation is to make all indirect calls use a fixed number of arguments, all of type i64, and a return type of also i64. Thunks are then placed in the table which translate the arguments properly for the target, basically by reinterpreting to i64 and back. As a result, receiving an i64 when an i32 is sent will have the upper bits all zero, and the reverse would truncate the upper bits, etc. (Note that this is different than emscripten's existing emulation, which converts (as signed) to a double. That makes sense for JS where double's can contain all numeric values, but in wasm we have i64s. Also, bitwise conversion may be more like what native archs do anyhow. It is enough for Python.)\r\n\r\nAlso adds validation for a function's type matching the function's actual params and result (surprised we didn't have that before, but we didn't, and there was even a place in the test suite where that was wrong).\r\n\r\nAlso simplifies the build script by moving two cpp files into the wasm/ subdir, so they can be built once and shared between the various tools.","distinct":false,"url":"https://api.github.com/repos/WebAssembly/binaryen/commits/d52213c3f5e96bb3450721d96aa68d3c5e0865b6"},{"sha":"21615c8fbde80ed27682d4e795e43e1ce0a3f263","author":{"name":"Alon Zakai (kripken)","email":"d3377c7bf8900ea04e219e1ab7aa8a46e80610fa@gmail.com"},"message":"undo","distinct":true,"url":"https://api.github.com/repos/WebAssembly/binaryen/commits/21615c8fbde80ed27682d4e795e43e1ce0a3f263"},{"sha":"13e7fc1df075b534e09fb3689726372c39c18421","author":{"name":"Alon Zakai (kripken)","email":"d3377c7bf8900ea04e219e1ab7aa8a46e80610fa@gmail.com"},"message":"Merge remote-tracking branch 'origin/master' into fix-liveness","distinct":true,"url":"https://api.github.com/repos/WebAssembly/binaryen/commits/13e7fc1df075b534e09fb3689726372c39c18421"}]}
{"actor":{"display_login":"kripken"}}