@@ -101836,36 +101836,6 @@ let compile_group ({filename = file_name; env;} as meta : Lam_stats.t)
101836101836 Note the arity of [print_endline] is already analyzed before,
101837101837 so it should be safe
101838101838 *)
101839- (* | Single(_, ({name="string_of_int";_} as id),_ ), "pervasives.ml" ->
101840- Js_output.of_stmt @@ S.alias_variable id
101841- ~exp:(
101842- let arg = Ext_ident.create "param" in
101843- E.ocaml_fun [arg] [S.return_stmt (E.int_to_string (E.var arg))]
101844- ) *)
101845-
101846- (** Special handling for values in [Sys] *)
101847- | Single(_, ({name="max_array_length" | "max_string_length";_} as id) ,_ ), "sys.ml" ->
101848- (* See [js_knowledge] Array size section, can not be expressed by OCaml int,
101849- note that casual handling of {!Sys.max_string_length} could result into
101850- negative value which could cause wrong behavior of {!Buffer.create}
101851- *)
101852- Js_output.of_stmt @@ S.alias_variable id ~exp:(E.float "2147483647") (*2 ^ 31 - 1*)
101853-
101854- | Single(_, ({name="max_int";_} as id) ,_ ), ("sys.ml" | "nativeint.ml") ->
101855- (* See [js_knowledge] Max int section, (2. ** 53. -. 1.;;)
101856- can not be expressed by OCaml int
101857- FIXME: we need handle {!Nativeint} and {!Sys} differently
101858- *)
101859- Js_output.of_stmt @@ S.alias_variable id
101860- ~exp:(E.float "9007199254740991.")
101861-
101862- | Single(_, ({name="min_int";_} as id) ,_ ), ("sys.ml" | "nativeint.ml") ->
101863- (* See [js_knowledge] Max int section, -. (2. ** 53. -. 1.);;
101864- can not be expressed by OCaml int
101865- FIXME: we need handle {!Nativeint} and {!Sys} differently
101866- *)
101867- Js_output.of_stmt @@ S.alias_variable id
101868- ~exp:(E.float ("-9007199254740991."))
101869101839
101870101840 | Single (kind, id, lam), _ ->
101871101841 (* let lam = Optimizer.simplify_lets [] lam in *)
0 commit comments