diff options
author | Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr> | 2014-04-10 14:11:25 +0000 |
---|---|---|
committer | Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr> | 2014-04-10 14:11:25 +0000 |
commit | 2859498cad7a33700a297b505cec38199c85e699 (patch) | |
tree | e2a52ec3b6d16908b43b68628ece285e7b2e007c /bytecomp/printlambda.ml | |
parent | fb74ef5e51a247f212208372b6ab293f71afb8b7 (diff) |
Add %loc_* primitives and corresponding values in Pervasives
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14571 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/printlambda.ml')
-rw-r--r-- | bytecomp/printlambda.ml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bytecomp/printlambda.ml b/bytecomp/printlambda.ml index a2b2d5c5a..fd90caf59 100644 --- a/bytecomp/printlambda.ml +++ b/bytecomp/printlambda.ml @@ -87,11 +87,19 @@ let record_rep ppf r = | Record_float -> fprintf ppf "float" ;; +let string_of_loc_kind = function + | Loc_FILE -> "loc_FILE" + | Loc_LINE -> "loc_LINE" + | Loc_MODULE -> "loc_MODULE" + | Loc_POS -> "loc_POS" + | Loc_LOC -> "loc_LOC" + let primitive ppf = function | Pidentity -> fprintf ppf "id" | Pignore -> fprintf ppf "ignore" | Prevapply _ -> fprintf ppf "revapply" | Pdirapply _ -> fprintf ppf "dirapply" + | Ploc kind -> fprintf ppf "%s" (string_of_loc_kind kind) | Pgetglobal id -> fprintf ppf "global %a" Ident.print id | Psetglobal id -> fprintf ppf "setglobal %a" Ident.print id | Pmakeblock(tag, Immutable) -> fprintf ppf "makeblock %i" tag |