Skip to content

Commit

Permalink
Update clightgen
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierleroy committed Jul 5, 2024
1 parent f187aa3 commit e42aaab
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions export/ExportBase.ml
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,22 @@ let asttype p t =
| AST.Tany32 -> "AST.Tany32"
| AST.Tany64 -> "AST.Tany64")

let astrettype p = function
| AST.Tret t -> asttype p t
| AST.Tvoid -> fprintf p "AST.Tvoid"
| AST.Tbool -> fprintf p "AST.Tbool"
| AST.Tint8signed -> fprintf p "AST.Tint8signed"
| AST.Tint8unsigned -> fprintf p "AST.Tint8unsigned"
| AST.Tint16signed -> fprintf p "AST.Tint16signed"
| AST.Tint16unsigned -> fprintf p "AST.Tint16unsigned"
let astxtype p t =
fprintf p "%s"
(match t with
| AST.Xbool -> "AST.Xbool"
| AST.Xint8signed -> "AST.Xint8signed"
| AST.Xint8unsigned -> "AST.Xint8unsigned"
| AST.Xint16signed -> "AST.Xint16signed"
| AST.Xint16unsigned -> "AST.Xint16unsigned"
| AST.Xint -> "AST.Xint"
| AST.Xfloat -> "AST.Xfloat"
| AST.Xlong -> "AST.Xlong"
| AST.Xsingle -> "AST.Xsingle"
| AST.Xptr -> "AST.Xptr"
| AST.Xany32 -> "AST.Xany32"
| AST.Xany64 -> "AST.Xany64"
| AST.Xvoid -> "AST.Xvoid")

let name_of_chunk = function
| Mbool -> "Mbool"
Expand All @@ -188,8 +196,8 @@ let callconv p cc =

let signatur p sg =
fprintf p "@[<hov 2>(mksignature@ %a@ %a@ %a)@]"
(print_list asttype) sg.sig_args
astrettype sg.sig_res
(print_list astxtype) sg.sig_args
astxtype sg.sig_res
callconv sg.sig_cc

let external_function p = function
Expand Down

0 comments on commit e42aaab

Please sign in to comment.