Skip to content

Commit 649dc3e

Browse files
committed
remove is_safe from Pdivbigint, Pmodbigint
1 parent 7d22f9c commit 649dc3e

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

jscomp/core/lam_convert.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ let lam_prim ~primitive:(p : Lambda.primitive) ~args loc : Lam.t =
258258
| Paddbigint -> prim ~primitive:Paddbigint ~args loc
259259
| Psubbigint -> prim ~primitive:Psubbigint ~args loc
260260
| Pmulbigint -> prim ~primitive:Pmulbigint ~args loc
261-
| Pdivbigint _is_safe (*FIXME*) -> prim ~primitive:Pdivbigint ~args loc
262-
| Pmodbigint _is_safe (*FIXME*) -> prim ~primitive:Pmodbigint ~args loc
261+
| Pdivbigint -> prim ~primitive:Pdivbigint ~args loc
262+
| Pmodbigint -> prim ~primitive:Pmodbigint ~args loc
263263
| Ppowbigint -> prim ~primitive:Ppowbigint ~args loc
264264
| Pandbigint -> prim ~primitive:Pandbigint ~args loc
265265
| Porbigint -> prim ~primitive:Porbigint ~args loc

jscomp/ml/lambda.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ type primitive =
231231
| Pfloatcomp of comparison
232232
(* Bigint operations *)
233233
| Pnegbigint | Paddbigint | Psubbigint | Ppowbigint
234-
| Pmulbigint | Pdivbigint of is_safe | Pmodbigint of is_safe
234+
| Pmulbigint | Pdivbigint | Pmodbigint
235235
| Pandbigint | Porbigint | Pxorbigint
236236
| Plslbigint | Pasrbigint
237237
| Pbigintcomp of comparison

jscomp/ml/lambda.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ type primitive =
197197
| Pfloatcomp of comparison
198198
(* Bigint operations *)
199199
| Pnegbigint | Paddbigint | Psubbigint | Ppowbigint
200-
| Pmulbigint | Pdivbigint of is_safe | Pmodbigint of is_safe
200+
| Pmulbigint | Pdivbigint | Pmodbigint
201201
| Pandbigint | Porbigint | Pxorbigint
202202
| Plslbigint | Pasrbigint
203203
| Pbigintcomp of comparison

jscomp/ml/printlambda.ml

+4-6
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,8 @@ let primitive ppf = function
187187
| Pxorbigint -> fprintf ppf "xor"
188188
| Plslbigint -> fprintf ppf "lsl"
189189
| Pasrbigint -> fprintf ppf "asr"
190-
| Pdivbigint Safe -> fprintf ppf "/"
191-
| Pdivbigint Unsafe -> fprintf ppf "/u"
192-
| Pmodbigint Safe -> fprintf ppf "mod"
193-
| Pmodbigint Unsafe -> fprintf ppf "mod_unsafe"
190+
| Pdivbigint -> fprintf ppf "/"
191+
| Pmodbigint -> fprintf ppf "mod"
194192
| Pbigintcomp(Ceq) -> fprintf ppf "==,"
195193
| Pbigintcomp(Cneq) -> fprintf ppf "!=,"
196194
| Pbigintcomp(Clt) -> fprintf ppf "<,"
@@ -302,8 +300,8 @@ let name_of_primitive = function
302300
| Paddbigint -> "Paddbigint"
303301
| Psubbigint -> "Psubbigint"
304302
| Pmulbigint -> "Pmulbigint"
305-
| Pdivbigint _ -> "Pdivbigint"
306-
| Pmodbigint _ -> "Pmodbigint"
303+
| Pdivbigint -> "Pdivbigint"
304+
| Pmodbigint -> "Pmodbigint"
307305
| Ppowbigint -> "Ppowbigint"
308306
| Pandbigint -> "Pandbigint"
309307
| Porbigint -> "Porbigint"

jscomp/ml/translcore.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ let primitives_table =
374374
("%addbigint", Paddbigint);
375375
("%subbigint", Psubbigint);
376376
("%mulbigint", Pmulbigint);
377-
("%divbigint", Pdivbigint Safe);
377+
("%divbigint", Pdivbigint);
378378
("%powbigint", Ppowbigint);
379-
("%modbigint", Pmodbigint Safe);
379+
("%modbigint", Pmodbigint);
380380
("%eqbigint", Pbigintcomp Ceq);
381381
("%noteqbigint", Pbigintcomp Cneq);
382382
("%ltbigint", Pbigintcomp Clt);

0 commit comments

Comments
 (0)