Bug 1523562 [wpt PR 14802] - [Animation Worklet] Upstream worklet animation with...
[gecko.git] / modules / fdlibm / import.sh
blob67ab1b463fd16d06af5b7ff8c3bc8404bf01b12f
1 #!/bin/sh
3 set -e
5 BASE_URL=https://raw.githubusercontent.com/freebsd/freebsd/master/lib/msun/src
7 download_source() {
8 REMOTE_FILENAME=$1
9 LOCAL_FILENAME=$2
10 while true; do
11 curl -o "src/${LOCAL_FILENAME}" "${BASE_URL}/${REMOTE_FILENAME}" && break
12 done
15 mkdir -p src
17 # headers
18 download_source math.h fdlibm.h
19 download_source math_private.h math_private.h
21 # Math.acos
22 download_source e_acos.c e_acos.cpp
24 # Math.acosh
25 download_source e_acosh.c e_acosh.cpp
27 # Math.asin
28 download_source e_asin.c e_asin.cpp
30 # Math.asinh
31 download_source s_asinh.c s_asinh.cpp
33 # Math.atan
34 download_source s_atan.c s_atan.cpp
36 # Math.atanh
37 download_source e_atanh.c e_atanh.cpp
39 # Math.atan2
40 download_source e_atan2.c e_atan2.cpp
42 # Math.cbrt
43 download_source s_cbrt.c s_cbrt.cpp
45 # Math.ceil
46 download_source s_ceil.c s_ceil.cpp
47 download_source s_ceilf.c s_ceilf.cpp
49 # Math.cos (not used due to poor performance)
51 # Math.cosh
52 download_source e_cosh.c e_cosh.cpp
54 # Math.exp
55 download_source e_exp.c e_exp.cpp
57 # Math.expm1
58 download_source s_expm1.c s_expm1.cpp
60 # Math.floor and Math.round
61 download_source s_floor.c s_floor.cpp
63 # Math.fround
64 download_source s_floorf.c s_floorf.cpp
66 # Math.hypot
67 download_source e_hypot.c e_hypot.cpp
69 # Math.log
70 download_source e_log.c e_log.cpp
72 # Math.log1p
73 download_source s_log1p.c s_log1p.cpp
75 # Math.log10
76 download_source e_log10.c e_log10.cpp
77 download_source k_log.h k_log.h
79 # Math.log2
80 download_source e_log2.c e_log2.cpp
82 # Math.pow (not used due to poor performance)
84 # Math.sin (not used due to poor performance)
86 # Math.sinh
87 download_source e_sinh.c e_sinh.cpp
89 # Math.sqrt (not used due to poor performance)
91 # Math.tan (not used due to poor performance)
93 # Math.tanh
94 download_source s_tanh.c s_tanh.cpp
96 # Math.trunc
97 download_source s_trunc.c s_trunc.cpp
98 download_source s_truncf.c s_truncf.cpp
100 # dependencies
101 download_source k_exp.c k_exp.cpp
102 download_source s_copysign.c s_copysign.cpp
103 download_source s_fabs.c s_fabs.cpp
104 download_source s_scalbn.c s_scalbn.cpp
106 # These are not not used in Math.* functions, but used internally.
107 download_source e_pow.c e_pow.cpp
108 download_source e_sqrt.c e_sqrt.cpp
110 download_source s_nearbyint.c s_nearbyint.cpp
111 download_source s_rint.c s_rint.cpp
112 download_source s_rintf.c s_rintf.cpp