Skip to content

Commit 6ae2ce6

Browse files
committed
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 rust-lang/rust#54257 but that PR isn't on beta, so we'll need to leave these here for awhile while beta rides the trains
1 parent 9a1fa5a commit 6ae2ce6

File tree

1 file changed

+0
-22
lines changed
  • crates/cli-support/src/js

1 file changed

+0
-22
lines changed

crates/cli-support/src/js/mod.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -748,28 +748,6 @@ impl<'a> Context<'a> {
748748
"Math_sinh" => bind_math("(x) { return Math.sinh(x); }"),
749749
"Math_tan" => bind_math("(x) { return Math.tan(x); }"),
750750
"Math_tanh" => bind_math("(x) { return Math.tanh(x); }"),
751-
"cos" => bind_math("(x) { return Math.cos(x); }"),
752-
"cosf" => bind_math("(x) { return Math.cos(x); }"),
753-
"exp" => bind_math("(x) { return Math.exp(x); }"),
754-
"expf" => bind_math("(x) { return Math.exp(x); }"),
755-
"log2" => bind_math("(x) { return Math.log2(x); }"),
756-
"log2f" => bind_math("(x) { return Math.log2(x); }"),
757-
"log10" => bind_math("(x) { return Math.log10(x); }"),
758-
"log10f" => bind_math("(x) { return Math.log10(x); }"),
759-
"log" => bind_math("(x) { return Math.log(x); }"),
760-
"logf" => bind_math("(x) { return Math.log(x); }"),
761-
"round" => bind_math("(x) { return Math.round(x); }"),
762-
"roundf" => bind_math("(x) { return Math.round(x); }"),
763-
"sin" => bind_math("(x) { return Math.sin(x); }"),
764-
"sinf" => bind_math("(x) { return Math.sin(x); }"),
765-
"pow" => bind_math("(x, y) { return Math.pow(x, y); }"),
766-
"powf" => bind_math("(x, y) { return Math.pow(x, y); }"),
767-
"exp2" => bind_math("(a) { return Math.pow(2, a); }"),
768-
"exp2f" => bind_math("(a) { return Math.pow(2, a); }"),
769-
"fmod" => bind_math("(a, b) { return a % b; }"),
770-
"fmodf" => bind_math("(a, b) { return a % b; }"),
771-
"fma" => bind_math("(a, b, c) { return (a * b) + c; }"),
772-
"fmaf" => bind_math("(a, b, c) { return (a * b) + c; }"),
773751
_ => continue,
774752
}
775753

0 commit comments

Comments
 (0)