Update Binaryen to latest; Various fixes

This commit is contained in:
Daniel Wirtz
2018-10-11 08:49:08 +02:00
committed by GitHub
parent b54a97c0fe
commit f7c734789e
228 changed files with 12372 additions and 14996 deletions

View File

@ -1,8 +1,7 @@
const js = true;
declare namespace JSOp {
export function mod(x: f64, y: f64): f64;
}
@external("math", "mod")
export declare function mod(x: f64, y: f64): f64;
function check<T>(actual: T, expected: T): bool {
if (isNaN(expected)) return isNaN(actual);
@ -14,7 +13,7 @@ function check<T>(actual: T, expected: T): bool {
function test_fmod(left: f64, right: f64, expected: f64): bool {
return check<f64>( left % right , expected) &&
(!js || check<f64>(JSOp.mod(left , right), expected));
(!js || check<f64>(mod(left , right), expected));
}
// sanity