summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/compenv.ml1
-rw-r--r--driver/main.ml2
-rw-r--r--driver/main_args.ml22
-rw-r--r--driver/main_args.mli2
-rw-r--r--driver/optmain.ml2
5 files changed, 29 insertions, 0 deletions
diff --git a/driver/compenv.ml b/driver/compenv.ml
index 338d4c36a1..e3f7812163 100644
--- a/driver/compenv.ml
+++ b/driver/compenv.ml
@@ -205,6 +205,7 @@ let read_one_param ppf position name v =
| "strict-sequence" -> set "strict-sequence" [ strict_sequence ] v
| "strict-formats" -> set "strict-formats" [ strict_formats ] v
| "thread" -> set "thread" [ use_threads ] v
+ | "unboxed-types" -> set "unboxed-types" [ unboxed_types ] v
| "unsafe" -> set "unsafe" [ fast ] v
| "verbose" -> set "verbose" [ verbose ] v
| "nopervasives" -> set "nopervasives" [ nopervasives ] v
diff --git a/driver/main.ml b/driver/main.ml
index 87086c10c9..dc8b9dff97 100644
--- a/driver/main.ml
+++ b/driver/main.ml
@@ -145,6 +145,8 @@ module Options = Main_args.Make_bytecomp_options (struct
let _no_strict_formats = unset strict_formats
let _thread = set use_threads
let _vmthread = set use_vmthreads
+ let _unboxed_types = set unboxed_types
+ let _no_unboxed_types = unset unboxed_types
let _unsafe = set fast
let _unsafe_string = set unsafe_string
let _use_prims s = use_prims := s
diff --git a/driver/main_args.ml b/driver/main_args.ml
index c4f2bad06d..55e6f5c219 100644
--- a/driver/main_args.ml
+++ b/driver/main_args.ml
@@ -472,6 +472,16 @@ let mk_unbox_closures_factor f =
Clflags.default_unbox_closures_factor
;;
+let mk_unboxed_types f =
+ "-unboxed-types", Arg.Unit f,
+ " unannotated unboxable types will be unboxed"
+;;
+
+let mk_no_unboxed_types f =
+ "-no-unboxed-types", Arg.Unit f,
+ " unannotated unboxable types will not be unboxed (default)"
+;;
+
let mk_unsafe f =
"-unsafe", Arg.Unit f,
" Do not compile bounds checking on array and string access"
@@ -742,6 +752,8 @@ module type Common_options = sig
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
+ val _unboxed_types : unit -> unit
+ val _no_unboxed_types : unit -> unit
val _unsafe : unit -> unit
val _unsafe_string : unit -> unit
val _version : unit -> unit
@@ -991,6 +1003,8 @@ struct
mk_strict_formats F._strict_formats;
mk_no_strict_formats F._no_strict_formats;
mk_thread F._thread;
+ mk_unboxed_types F._unboxed_types;
+ mk_no_unboxed_types F._no_unboxed_types;
mk_unsafe F._unsafe;
mk_unsafe_string F._unsafe_string;
mk_use_runtime F._use_runtime;
@@ -1050,6 +1064,8 @@ struct
mk_no_strict_sequence F._no_strict_sequence;
mk_strict_formats F._strict_formats;
mk_no_strict_formats F._no_strict_formats;
+ mk_unboxed_types F._unboxed_types;
+ mk_no_unboxed_types F._no_unboxed_types;
mk_unsafe F._unsafe;
mk_unsafe_string F._unsafe_string;
mk_version F._version;
@@ -1154,6 +1170,8 @@ struct
mk_unbox_closures F._unbox_closures;
mk_unbox_closures_factor F._unbox_closures_factor;
mk_inline_max_unroll F._inline_max_unroll;
+ mk_unboxed_types F._unboxed_types;
+ mk_no_unboxed_types F._no_unboxed_types;
mk_unsafe F._unsafe;
mk_unsafe_string F._unsafe_string;
mk_v F._v;
@@ -1251,6 +1269,8 @@ module Make_opttop_options (F : Opttop_options) = struct
mk_no_strict_formats F._no_strict_formats;
mk_unbox_closures F._unbox_closures;
mk_unbox_closures_factor F._unbox_closures_factor;
+ mk_unboxed_types F._unboxed_types;
+ mk_no_unboxed_types F._no_unboxed_types;
mk_unsafe F._unsafe;
mk_unsafe_string F._unsafe_string;
mk_verbose F._verbose;
@@ -1321,6 +1341,8 @@ struct
mk_strict_formats F._strict_formats;
mk_no_strict_formats F._no_strict_formats;
mk_thread F._thread;
+ mk_unboxed_types F._unboxed_types;
+ mk_no_unboxed_types F._no_unboxed_types;
mk_unsafe_string F._unsafe_string;
mk_v F._v;
mk_verbose F._verbose;
diff --git a/driver/main_args.mli b/driver/main_args.mli
index 5e146e25d7..b5b0eaaedb 100644
--- a/driver/main_args.mli
+++ b/driver/main_args.mli
@@ -39,6 +39,8 @@ module type Common_options = sig
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
+ val _unboxed_types : unit -> unit
+ val _no_unboxed_types : unit -> unit
val _unsafe : unit -> unit
val _unsafe_string : unit -> unit
val _version : unit -> unit
diff --git a/driver/optmain.ml b/driver/optmain.ml
index e9ae7fd6a6..6a8ea204d8 100644
--- a/driver/optmain.ml
+++ b/driver/optmain.ml
@@ -231,6 +231,8 @@ module Options = Main_args.Make_optcomp_options (struct
let _thread = set use_threads
let _unbox_closures = set unbox_closures
let _unbox_closures_factor f = unbox_closures_factor := f
+ let _unboxed_types = set unboxed_types
+ let _no_unboxed_types = clear unboxed_types
let _unsafe = set fast
let _unsafe_string = set unsafe_string
let _v () = print_version_and_library "native-code compiler"