From 6ae2ce6a26ccd833ee531bfffaf31131d1ab5791 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 21 Sep 2018 21:43:29 -0700 Subject: [PATCH] Remove no-longer-needed math bindings All these functions are now provided by upstream compiler-builtins, so there's no need for us to be binding them automatically. The remaining `Math_*` functions are also no longer needed on nightly after https://github.com/rust-lang/rust/pull/54257 but that PR isn't on beta, so we'll need to leave these here for awhile while beta rides the trains --- crates/cli-support/src/js/mod.rs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/crates/cli-support/src/js/mod.rs b/crates/cli-support/src/js/mod.rs index e6e2adce2..c86b4e7b1 100644 --- a/crates/cli-support/src/js/mod.rs +++ b/crates/cli-support/src/js/mod.rs @@ -748,28 +748,6 @@ impl<'a> Context<'a> { "Math_sinh" => bind_math("(x) { return Math.sinh(x); }"), "Math_tan" => bind_math("(x) { return Math.tan(x); }"), "Math_tanh" => bind_math("(x) { return Math.tanh(x); }"), - "cos" => bind_math("(x) { return Math.cos(x); }"), - "cosf" => bind_math("(x) { return Math.cos(x); }"), - "exp" => bind_math("(x) { return Math.exp(x); }"), - "expf" => bind_math("(x) { return Math.exp(x); }"), - "log2" => bind_math("(x) { return Math.log2(x); }"), - "log2f" => bind_math("(x) { return Math.log2(x); }"), - "log10" => bind_math("(x) { return Math.log10(x); }"), - "log10f" => bind_math("(x) { return Math.log10(x); }"), - "log" => bind_math("(x) { return Math.log(x); }"), - "logf" => bind_math("(x) { return Math.log(x); }"), - "round" => bind_math("(x) { return Math.round(x); }"), - "roundf" => bind_math("(x) { return Math.round(x); }"), - "sin" => bind_math("(x) { return Math.sin(x); }"), - "sinf" => bind_math("(x) { return Math.sin(x); }"), - "pow" => bind_math("(x, y) { return Math.pow(x, y); }"), - "powf" => bind_math("(x, y) { return Math.pow(x, y); }"), - "exp2" => bind_math("(a) { return Math.pow(2, a); }"), - "exp2f" => bind_math("(a) { return Math.pow(2, a); }"), - "fmod" => bind_math("(a, b) { return a % b; }"), - "fmodf" => bind_math("(a, b) { return a % b; }"), - "fma" => bind_math("(a, b, c) { return (a * b) + c; }"), - "fmaf" => bind_math("(a, b, c) { return (a * b) + c; }"), _ => continue, }