Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions jscomp/stdlib-406/release.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ build stdlib-406/moreLabels.cmj : cc_cmi stdlib-406/moreLabels.ml | stdlib-406/h
bsc_flags = $bsc_flags -nolabels
build stdlib-406/moreLabels.cmi : cc stdlib-406/moreLabels.mli | stdlib-406/hashtbl.cmi stdlib-406/map.cmi stdlib-406/pervasives.cmj stdlib-406/set.cmi others
bsc_flags = $bsc_flags -nolabels
build stdlib-406/nativeint.cmj : cc_cmi stdlib-406/nativeint.ml | stdlib-406/nativeint.cmi stdlib-406/pervasives.cmj stdlib-406/sys.cmj others
build stdlib-406/nativeint.cmi : cc stdlib-406/nativeint.mli | stdlib-406/pervasives.cmj others
build stdlib-406/obj.cmj : cc_cmi stdlib-406/obj.ml | stdlib-406/obj.cmi others
build stdlib-406/obj.cmi : cc stdlib-406/obj.mli | stdlib-406/pervasives.cmj others
build stdlib-406/parsing.cmj : cc_cmi stdlib-406/parsing.ml | stdlib-406/array.cmj stdlib-406/lexing.cmj stdlib-406/obj.cmj stdlib-406/parsing.cmi others
Expand Down Expand Up @@ -118,4 +116,4 @@ build stdlib-406/sys.cmj : cc_cmi stdlib-406/sys.ml | stdlib-406/sys.cmi others
build stdlib-406/sys.cmi : cc stdlib-406/sys.mli | stdlib-406/pervasives.cmj others
build stdlib-406/uchar.cmj : cc_cmi stdlib-406/uchar.ml | stdlib-406/char.cmj stdlib-406/pervasives.cmj stdlib-406/uchar.cmi others
build stdlib-406/uchar.cmi : cc stdlib-406/uchar.mli | stdlib-406/pervasives.cmj others
build $stdlib : phony stdlib-406/camlinternalFormatBasics.cmi stdlib-406/camlinternalFormatBasics.cmj stdlib-406/pervasives.cmi stdlib-406/pervasives.cmj stdlib-406/arg.cmi stdlib-406/arg.cmj stdlib-406/array.cmi stdlib-406/array.cmj stdlib-406/arrayLabels.cmi stdlib-406/arrayLabels.cmj stdlib-406/buffer.cmi stdlib-406/buffer.cmj stdlib-406/bytes.cmi stdlib-406/bytes.cmj stdlib-406/bytesLabels.cmi stdlib-406/bytesLabels.cmj stdlib-406/callback.cmi stdlib-406/callback.cmj stdlib-406/camlinternalBigarray.cmi stdlib-406/camlinternalBigarray.cmj stdlib-406/camlinternalFormat.cmi stdlib-406/camlinternalFormat.cmj stdlib-406/camlinternalLazy.cmi stdlib-406/camlinternalLazy.cmj stdlib-406/camlinternalMod.cmi stdlib-406/camlinternalMod.cmj stdlib-406/camlinternalOO.cmi stdlib-406/camlinternalOO.cmj stdlib-406/char.cmi stdlib-406/char.cmj stdlib-406/complex.cmi stdlib-406/complex.cmj stdlib-406/digest.cmi stdlib-406/digest.cmj stdlib-406/filename.cmi stdlib-406/filename.cmj stdlib-406/format.cmi stdlib-406/format.cmj stdlib-406/genlex.cmi stdlib-406/genlex.cmj stdlib-406/hashtbl.cmi stdlib-406/hashtbl.cmj stdlib-406/int32.cmi stdlib-406/int32.cmj stdlib-406/int64.cmi stdlib-406/int64.cmj stdlib-406/lazy.cmi stdlib-406/lazy.cmj stdlib-406/lexing.cmi stdlib-406/lexing.cmj stdlib-406/list.cmi stdlib-406/list.cmj stdlib-406/listLabels.cmi stdlib-406/listLabels.cmj stdlib-406/map.cmi stdlib-406/map.cmj stdlib-406/marshal.cmi stdlib-406/marshal.cmj stdlib-406/moreLabels.cmi stdlib-406/moreLabels.cmj stdlib-406/nativeint.cmi stdlib-406/nativeint.cmj stdlib-406/obj.cmi stdlib-406/obj.cmj stdlib-406/parsing.cmi stdlib-406/parsing.cmj stdlib-406/printexc.cmi stdlib-406/printexc.cmj stdlib-406/printf.cmi stdlib-406/printf.cmj stdlib-406/queue.cmi stdlib-406/queue.cmj stdlib-406/random.cmi stdlib-406/random.cmj stdlib-406/scanf.cmi stdlib-406/scanf.cmj stdlib-406/set.cmi stdlib-406/set.cmj stdlib-406/sort.cmi stdlib-406/sort.cmj stdlib-406/stack.cmi stdlib-406/stack.cmj stdlib-406/stdLabels.cmi stdlib-406/stdLabels.cmj stdlib-406/std_exit.cmi stdlib-406/std_exit.cmj stdlib-406/stream.cmi stdlib-406/stream.cmj stdlib-406/string.cmi stdlib-406/string.cmj stdlib-406/stringLabels.cmi stdlib-406/stringLabels.cmj stdlib-406/sys.cmi stdlib-406/sys.cmj stdlib-406/uchar.cmi stdlib-406/uchar.cmj
build $stdlib : phony stdlib-406/camlinternalFormatBasics.cmi stdlib-406/camlinternalFormatBasics.cmj stdlib-406/pervasives.cmi stdlib-406/pervasives.cmj stdlib-406/arg.cmi stdlib-406/arg.cmj stdlib-406/array.cmi stdlib-406/array.cmj stdlib-406/arrayLabels.cmi stdlib-406/arrayLabels.cmj stdlib-406/buffer.cmi stdlib-406/buffer.cmj stdlib-406/bytes.cmi stdlib-406/bytes.cmj stdlib-406/bytesLabels.cmi stdlib-406/bytesLabels.cmj stdlib-406/callback.cmi stdlib-406/callback.cmj stdlib-406/camlinternalBigarray.cmi stdlib-406/camlinternalBigarray.cmj stdlib-406/camlinternalFormat.cmi stdlib-406/camlinternalFormat.cmj stdlib-406/camlinternalLazy.cmi stdlib-406/camlinternalLazy.cmj stdlib-406/camlinternalMod.cmi stdlib-406/camlinternalMod.cmj stdlib-406/camlinternalOO.cmi stdlib-406/camlinternalOO.cmj stdlib-406/char.cmi stdlib-406/char.cmj stdlib-406/complex.cmi stdlib-406/complex.cmj stdlib-406/digest.cmi stdlib-406/digest.cmj stdlib-406/filename.cmi stdlib-406/filename.cmj stdlib-406/format.cmi stdlib-406/format.cmj stdlib-406/genlex.cmi stdlib-406/genlex.cmj stdlib-406/hashtbl.cmi stdlib-406/hashtbl.cmj stdlib-406/int32.cmi stdlib-406/int32.cmj stdlib-406/int64.cmi stdlib-406/int64.cmj stdlib-406/lazy.cmi stdlib-406/lazy.cmj stdlib-406/lexing.cmi stdlib-406/lexing.cmj stdlib-406/list.cmi stdlib-406/list.cmj stdlib-406/listLabels.cmi stdlib-406/listLabels.cmj stdlib-406/map.cmi stdlib-406/map.cmj stdlib-406/marshal.cmi stdlib-406/marshal.cmj stdlib-406/moreLabels.cmi stdlib-406/moreLabels.cmj stdlib-406/obj.cmi stdlib-406/obj.cmj stdlib-406/parsing.cmi stdlib-406/parsing.cmj stdlib-406/printexc.cmi stdlib-406/printexc.cmj stdlib-406/printf.cmi stdlib-406/printf.cmj stdlib-406/queue.cmi stdlib-406/queue.cmj stdlib-406/random.cmi stdlib-406/random.cmj stdlib-406/scanf.cmi stdlib-406/scanf.cmj stdlib-406/set.cmi stdlib-406/set.cmj stdlib-406/sort.cmi stdlib-406/sort.cmj stdlib-406/stack.cmi stdlib-406/stack.cmj stdlib-406/stdLabels.cmi stdlib-406/stdLabels.cmj stdlib-406/std_exit.cmi stdlib-406/std_exit.cmj stdlib-406/stream.cmi stdlib-406/stream.cmj stdlib-406/string.cmi stdlib-406/string.cmj stdlib-406/stringLabels.cmi stdlib-406/stringLabels.cmj stdlib-406/sys.cmi stdlib-406/sys.cmj stdlib-406/uchar.cmi stdlib-406/uchar.cmj
16 changes: 9 additions & 7 deletions jscomp/test/build.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ build test/gpr_858_test.cmi test/gpr_858_test.cmj : cc test/gpr_858_test.ml | $s
build test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj : cc test/gpr_858_unit2_test.ml | $stdlib
build test/gpr_904_test.cmi test/gpr_904_test.cmj : cc test/gpr_904_test.ml | test/mt.cmj $stdlib
build test/gpr_974_test.cmi test/gpr_974_test.cmj : cc test/gpr_974_test.ml | $stdlib
build test/gpr_977_test.cmi test/gpr_977_test.cmj : cc test/gpr_977_test.ml | test/mt.cmj $stdlib
build test/gpr_977_test.cmi test/gpr_977_test.cmj : cc test/gpr_977_test.ml | test/mt.cmj test/nativeint.cmj $stdlib
build test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj : cc test/gpr_return_type_unused_attribute.ml | $stdlib
build test/gray_code_test.cmi test/gray_code_test.cmj : cc test/gray_code_test.ml | $stdlib
build test/guide_for_ext.cmi test/guide_for_ext.cmj : cc test/guide_for_ext.ml | $stdlib
Expand Down Expand Up @@ -374,7 +374,7 @@ build test/int32_test.cmi test/int32_test.cmj : cc test/int32_test.ml | test/ext
build test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj : cc test/int64_mul_div_test.ml | test/mt.cmj $stdlib
build test/int64_string_bench.cmi test/int64_string_bench.cmj : cc test/int64_string_bench.ml | $stdlib
build test/int64_string_test.cmi test/int64_string_test.cmj : cc test/int64_string_test.ml | test/mt.cmj $stdlib
build test/int64_test.cmi test/int64_test.cmj : cc test/int64_test.ml | test/ext_array_test.cmj test/mt.cmj $stdlib
build test/int64_test.cmi test/int64_test.cmj : cc test/int64_test.ml | test/ext_array_test.cmj test/mt.cmj test/nativeint.cmj $stdlib
build test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj : cc test/int_hashtbl_test.ml | test/mt.cmj $stdlib
build test/int_map.cmi test/int_map.cmj : cc test/int_map.ml | $stdlib
build test/int_overflow_test.cmi test/int_overflow_test.cmj : cc test/int_overflow_test.ml | test/mt.cmj $stdlib
Expand Down Expand Up @@ -453,6 +453,8 @@ build test/mutable_obj_test.cmi test/mutable_obj_test.cmj : cc test/mutable_obj_
build test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj : cc test/mutable_uncurry_test.ml | test/mt.cmj $stdlib
build test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj : cc test/mutual_non_recursive_type.ml | $stdlib
build test/name_mangle_test.cmi test/name_mangle_test.cmj : cc test/name_mangle_test.ml | test/mt.cmj $stdlib
build test/nativeint.cmj : cc_cmi test/nativeint.ml | test/nativeint.cmi $stdlib
build test/nativeint.cmi : cc test/nativeint.mli | $stdlib
build test/nested_include.cmi test/nested_include.cmj : cc test/nested_include.ml | $stdlib
build test/nested_module_alias.cmi test/nested_module_alias.cmj : cc test/nested_module_alias.ml | $stdlib
build test/nested_obj_literal.cmi test/nested_obj_literal.cmj : cc test/nested_obj_literal.ml | $stdlib
Expand All @@ -470,12 +472,12 @@ build test/obj_magic_test.cmi test/obj_magic_test.cmj : cc test/obj_magic_test.m
build test/obj_repr_test.cmi test/obj_repr_test.cmj : cc test/obj_repr_test.ml | $stdlib
build test/obj_test.cmi test/obj_test.cmj : cc test/obj_test.ml | test/mt.cmj $stdlib
build test/obj_type_test.cmi test/obj_type_test.cmj : cc test/obj_type_test.ml | $stdlib
build test/ocaml_parsetree_test.cmj : cc_cmi test/ocaml_parsetree_test.ml | test/ocaml_parsetree_test.cmi $stdlib
build test/ocaml_parsetree_test.cmj : cc_cmi test/ocaml_parsetree_test.ml | test/nativeint.cmj test/ocaml_parsetree_test.cmi $stdlib
build test/ocaml_parsetree_test.cmi : cc test/ocaml_parsetree_test.mli | $stdlib
build test/ocaml_proto_test.cmj : cc_cmi test/ocaml_proto_test.ml | test/mt.cmj test/ocaml_proto_test.cmi $stdlib
build test/ocaml_proto_test.cmi : cc test/ocaml_proto_test.mli | $stdlib
build test/ocaml_re_test.cmi test/ocaml_re_test.cmj : cc test/ocaml_re_test.ml | test/mt.cmj $stdlib
build test/ocaml_typedtree_test.cmj : cc_cmi test/ocaml_typedtree_test.ml | test/ocaml_typedtree_test.cmi $stdlib
build test/ocaml_typedtree_test.cmj : cc_cmi test/ocaml_typedtree_test.ml | test/nativeint.cmj test/ocaml_typedtree_test.cmi $stdlib
build test/ocaml_typedtree_test.cmi : cc test/ocaml_typedtree_test.mli | $stdlib
build test/of_string_test.cmi test/of_string_test.cmj : cc test/of_string_test.ml | test/mt.cmj $stdlib
build test/offset.cmi test/offset.cmj : cc test/offset.ml | $stdlib
Expand All @@ -485,7 +487,7 @@ build test/opr_4560_test.cmi test/opr_4560_test.cmj : cc test/opr_4560_test.ml |
build test/option_repr_test.cmi test/option_repr_test.cmj : cc test/option_repr_test.ml | test/mt.cmj $stdlib
build test/optional_ffi_test.cmi test/optional_ffi_test.cmj : cc test/optional_ffi_test.ml | test/mt.cmj $stdlib
build test/optional_regression_test.cmi test/optional_regression_test.cmj : cc test/optional_regression_test.ml | test/mt.cmj $stdlib
build test/parser_api.cmi test/parser_api.cmj : cc test/parser_api.ml | $stdlib
build test/parser_api.cmi test/parser_api.cmj : cc test/parser_api.ml | test/nativeint.cmj $stdlib
build test/parser_api_test.cmi test/parser_api_test.cmj : cc test/parser_api_test.ml | test/mt.cmj test/parser_api.cmj $stdlib
build test/pipe_send_readline.cmi test/pipe_send_readline.cmj : cc test/pipe_send_readline.ml | $stdlib
build test/pipe_syntax.cmi test/pipe_syntax.cmj : cc test/pipe_syntax.ml | $stdlib
Expand Down Expand Up @@ -564,7 +566,7 @@ build test/sexp.cmi : cc test/sexp.mli | $stdlib
build test/sexpm.cmj : cc_cmi test/sexpm.ml | test/sexpm.cmi $stdlib
build test/sexpm.cmi : cc test/sexpm.mli | $stdlib
build test/sexpm_test.cmi test/sexpm_test.cmj : cc test/sexpm_test.ml | test/mt.cmj test/sexpm.cmj $stdlib
build test/shift_test.cmi test/shift_test.cmj : cc test/shift_test.ml | $stdlib
build test/shift_test.cmi test/shift_test.cmj : cc test/shift_test.ml | test/nativeint.cmj $stdlib
build test/side_effect.cmi test/side_effect.cmj : cc test/side_effect.ml | $stdlib
build test/side_effect_free.cmi test/side_effect_free.cmj : cc test/side_effect_free.ml | $stdlib
build test/simple_derive_test.cmj : cc_cmi test/simple_derive_test.ml | test/simple_derive_test.cmi $stdlib
Expand Down Expand Up @@ -716,7 +718,7 @@ build test/ticker.cmi test/ticker.cmj : cc test/ticker.ml | $stdlib
build test/to_string_test.cmi test/to_string_test.cmj : cc test/to_string_test.ml | test/mt.cmj $stdlib
build test/topsort_test.cmi test/topsort_test.cmj : cc test/topsort_test.ml | $stdlib
build test/tramp_fib.cmi test/tramp_fib.cmj : cc test/tramp_fib.ml | test/mt.cmj $stdlib
build test/tscanf_test.cmi test/tscanf_test.cmj : cc test/tscanf_test.ml | test/mt.cmj test/mt_global.cmj test/testing.cmj $stdlib
build test/tscanf_test.cmi test/tscanf_test.cmj : cc test/tscanf_test.ml | test/mt.cmj test/mt_global.cmj test/nativeint.cmj test/testing.cmj $stdlib
build test/tuple_alloc.cmi test/tuple_alloc.cmj : cc test/tuple_alloc.ml | $stdlib
build test/type_disambiguate.cmi test/type_disambiguate.cmj : cc test/type_disambiguate.ml | $stdlib
build test/typeof_test.cmi test/typeof_test.cmj : cc test/typeof_test.ml | test/mt.cmj $stdlib
Expand Down
76 changes: 76 additions & 0 deletions jscomp/test/nativeint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
'use strict';

var Caml_format = require("../../lib/js/caml_format.js");
var Caml_primitive = require("../../lib/js/caml_primitive.js");
var Caml_js_exceptions = require("../../lib/js/caml_js_exceptions.js");

function succ(n) {
return n + 1;
}

function pred(n) {
return n - 1;
}

function abs(n) {
if (n >= 0) {
return n;
} else {
return -n;
}
}

function lognot(n) {
return n ^ -1;
}

function to_string(n) {
return Caml_format.caml_nativeint_format("%d", n);
}

function of_string_opt(s) {
try {
return Caml_format.caml_nativeint_of_string(s);
}
catch (raw_exn){
var exn = Caml_js_exceptions.internalToOCamlException(raw_exn);
if (exn.RE_EXN_ID === "Failure") {
return ;
}
throw exn;
}
}

var compare = Caml_primitive.caml_nativeint_compare;

function equal(x, y) {
return Caml_primitive.caml_nativeint_compare(x, y) === 0;
}

var zero = 0;

var one = 1;

var minus_one = -1;

var size = 54;

var max_int = 9007199254740991;

var min_int = -9007199254740991;

exports.zero = zero;
exports.one = one;
exports.minus_one = minus_one;
exports.succ = succ;
exports.pred = pred;
exports.abs = abs;
exports.size = size;
exports.max_int = max_int;
exports.min_int = min_int;
exports.lognot = lognot;
exports.of_string_opt = of_string_opt;
exports.to_string = to_string;
exports.compare = compare;
exports.equal = equal;
/* No side effect */
File renamed without changes.
File renamed without changes.
Loading