Bug 1772603 [wpt PR 34303] - Add WPT test writing and reading back a 0.5 alpha fillSt...
[gecko.git] / modules / fdlibm / import.sh
blob216be47aced409d7bff25edb9658d895cec5bda2
1 #!/bin/sh
3 set -e
5 BASE_URL=https://raw.githubusercontent.com/freebsd/freebsd-src/"${1}"/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
50 download_source s_cos.c s_cos.cpp
51 download_source k_cos.c k_cos.cpp
53 # Math.cosh
54 download_source e_cosh.c e_cosh.cpp
56 # Math.exp
57 download_source e_exp.c e_exp.cpp
59 # Math.expm1
60 download_source s_expm1.c s_expm1.cpp
62 # Math.floor and Math.round
63 download_source s_floor.c s_floor.cpp
65 # Math.fround
66 download_source s_floorf.c s_floorf.cpp
68 # Math.hypot
69 download_source e_hypot.c e_hypot.cpp
71 # Math.log
72 download_source e_log.c e_log.cpp
74 # Math.log1p
75 download_source s_log1p.c s_log1p.cpp
77 # Math.log10
78 download_source e_log10.c e_log10.cpp
79 download_source k_log.h k_log.h
81 # Math.log2
82 download_source e_log2.c e_log2.cpp
84 # Math.pow (not used due to poor performance)
86 # Math.sin
87 download_source s_sin.c s_sin.cpp
88 download_source k_sin.c k_sin.cpp
90 # Math.sinh
91 download_source e_sinh.c e_sinh.cpp
93 # Math.sqrt (not used due to poor performance)
95 # Math.tan
96 download_source s_tan.c s_tan.cpp
97 download_source k_tan.c k_tan.cpp
99 # Math.tanh
100 download_source s_tanh.c s_tanh.cpp
102 # Math.trunc
103 download_source s_trunc.c s_trunc.cpp
104 download_source s_truncf.c s_truncf.cpp
106 # dependencies
107 download_source e_rem_pio2.c e_rem_pio2.cpp
108 download_source k_rem_pio2.c k_rem_pio2.cpp
109 download_source k_exp.c k_exp.cpp
110 download_source s_copysign.c s_copysign.cpp
111 download_source s_fabs.c s_fabs.cpp
112 download_source s_scalbn.c s_scalbn.cpp
114 # These are not not used in Math.* functions, but used internally.
115 download_source e_pow.c e_pow.cpp
117 download_source s_nearbyint.c s_nearbyint.cpp
118 download_source s_rint.c s_rint.cpp
119 download_source s_rintf.c s_rintf.cpp