summaryrefslogtreecommitdiff
path: root/bytecomp/printlambda.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2008-07-14 09:09:53 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2008-07-14 09:09:53 +0000
commit91d39feb72f044192554e9b992440bf7fd78b4fa (patch)
treeef98b2c824d578bb4db59e6a3dae308bd2591c7d /bytecomp/printlambda.ml
parent14c620848340e7f0197099ae612a58e47ac26ae8 (diff)
downloadocaml-91d39feb72f044192554e9b992440bf7fd78b4fa.tar.gz
PR#4223, PR#1508: added unsafe variants of Bigarray.Array{1,2,3}.{get,set}
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8911 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/printlambda.ml')
-rw-r--r--bytecomp/printlambda.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/bytecomp/printlambda.ml b/bytecomp/printlambda.ml
index a67642b2e7..80cc7d3f69 100644
--- a/bytecomp/printlambda.ml
+++ b/bytecomp/printlambda.ml
@@ -61,9 +61,9 @@ let boxed_integer_mark name = function
let print_boxed_integer name ppf bi =
fprintf ppf "%s" (boxed_integer_mark name bi);;
-let print_bigarray name kind ppf layout =
+let print_bigarray name unsafe kind ppf layout =
fprintf ppf "Bigarray.%s[%s,%s]"
- name
+ (if unsafe then "unsafe_"^ name else name)
(match kind with
| Pbigarray_unknown -> "generic"
| Pbigarray_float32 -> "float32"
@@ -177,8 +177,10 @@ let primitive ppf = function
| Pbintcomp(bi, Cgt) -> print_boxed_integer ">" ppf bi
| Pbintcomp(bi, Cle) -> print_boxed_integer "<=" ppf bi
| Pbintcomp(bi, Cge) -> print_boxed_integer ">=" ppf bi
- | Pbigarrayref(n, kind, layout) -> print_bigarray "get" kind ppf layout
- | Pbigarrayset(n, kind, layout) -> print_bigarray "set" kind ppf layout
+ | Pbigarrayref(unsafe, n, kind, layout) ->
+ print_bigarray "get" unsafe kind ppf layout
+ | Pbigarrayset(unsafe, n, kind, layout) ->
+ print_bigarray "set" unsafe kind ppf layout
let rec lam ppf = function
| Lvar id ->