diff options
Diffstat (limited to 'bytecomp/lambda.ml')
-rw-r--r-- | bytecomp/lambda.ml | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/bytecomp/lambda.ml b/bytecomp/lambda.ml index 3d7cf527d6..d795f5dd17 100644 --- a/bytecomp/lambda.ml +++ b/bytecomp/lambda.ml @@ -10,12 +10,17 @@ (* *) (***********************************************************************) -(* $Id: lambda.ml 12858 2012-08-10 14:45:51Z maranget $ *) - open Misc open Path open Asttypes +type compile_time_constant = + | Big_endian + | Word_size + | Ostype_unix + | Ostype_win32 + | Ostype_cygwin + type primitive = Pidentity | Pignore @@ -86,6 +91,28 @@ type primitive = (* Operations on big arrays: (unsafe, #dimensions, kind, layout) *) | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout + (* size of the nth dimension of a big array *) + | Pbigarraydim of int + (* load/set 16,32,64 bits from a string: (unsafe)*) + | Pstring_load_16 of bool + | Pstring_load_32 of bool + | Pstring_load_64 of bool + | Pstring_set_16 of bool + | Pstring_set_32 of bool + | Pstring_set_64 of bool + (* load/set 16,32,64 bits from a + (char, int8_unsigned_elt, c_layout) Bigarray.Array1.t : (unsafe) *) + | Pbigstring_load_16 of bool + | Pbigstring_load_32 of bool + | Pbigstring_load_64 of bool + | Pbigstring_set_16 of bool + | Pbigstring_set_32 of bool + | Pbigstring_set_64 of bool + (* Compile time constants *) + | Pctconst of compile_time_constant + (* byte swap *) + | Pbswap16 + | Pbbswap of boxed_integer and comparison = Ceq | Cneq | Clt | Cgt | Cle | Cge @@ -459,6 +486,11 @@ let may_raise = function | Pbigarrayref _ | Pbigarrayset _ | Plazyforce +(* New in 4.01, err on the safe side... *) + | Pbigarraydim _|Pstring_load_16 _|Pstring_load_32 _|Pstring_load_64 _| + Pstring_set_16 _|Pstring_set_32 _|Pstring_set_64 _|Pbigstring_load_16 _| + Pbigstring_load_32 _|Pbigstring_load_64 _|Pbigstring_set_16 _| + Pbigstring_set_32 _|Pbigstring_set_64 _|Pctconst _|Pbswap16|Pbbswap _ -> true | Pidentity | Pignore |