Class type Flx_cil_cil.cilPrinter


class type cilPrinter = object .. end
A printer interface for CIL trees. Create instantiations of * this type by specializing the class Flx_cil_cil.defaultCilPrinterClass.

method pVDecl : unit -> varinfo -> Flx_cil_pretty.doc
Invoked for each variable declaration. Note that variable * declarations are all the GVar, GVarDecl, GFun, all the varinfo * in formals of function types, and the formals and locals for function * definitions.
method pVar : varinfo -> Flx_cil_pretty.doc
Invoked on each variable use.
method pLval : unit -> lval -> Flx_cil_pretty.doc
Invoked on each lvalue occurrence
method pOffset : Flx_cil_pretty.doc -> offset -> Flx_cil_pretty.doc
Invoked on each offset occurrence. The second argument is the base.
method pInstr : unit -> instr -> Flx_cil_pretty.doc
Invoked on each instruction occurrence.
method pLabel : unit -> label -> Flx_cil_pretty.doc
Print a label.
method pStmt : unit -> stmt -> Flx_cil_pretty.doc
Control-flow statement. This is used by * Flx_cil_cil.printGlobal and by Flx_cil_cil.dumpGlobal.
method dStmt : Pervasives.out_channel -> int -> stmt -> unit
Dump a control-flow statement to a file with a given indentation. * This is used by Flx_cil_cil.dumpGlobal.
method dBlock : Pervasives.out_channel -> int -> block -> unit
Dump a control-flow block to a file with a given indentation. * This is used by Flx_cil_cil.dumpGlobal.
method pBlock : unit -> block -> Flx_cil_pretty.doc
method pBlock : unit -> block -> Flx_cil_pretty.doc
Print a block.
method pGlobal : unit -> global -> Flx_cil_pretty.doc
Global (vars, types, etc.). This can be slow and is used only by * Flx_cil_cil.printGlobal but not by Flx_cil_cil.dumpGlobal.
method dGlobal : Pervasives.out_channel -> global -> unit
Dump a global to a file with a given indentation. This is used by * Flx_cil_cil.dumpGlobal
method pFieldDecl : unit -> fieldinfo -> Flx_cil_pretty.doc
A field declaration
method pType : Flx_cil_pretty.doc option -> unit -> typ -> Flx_cil_pretty.doc
method pAttr : attribute -> Flx_cil_pretty.doc * bool
Attribute. Also return an indication whether this attribute must be * printed inside the __attribute__ list or not.
method pAttrParam : unit -> attrparam -> Flx_cil_pretty.doc
Attribute parameter
method pAttrs : unit -> attributes -> Flx_cil_pretty.doc
Attribute lists
method pLineDirective : ?forcefile:bool -> location -> Flx_cil_pretty.doc
Print a line-number. This is assumed to come always on an empty line. * If the forcefile argument is present and is true then the file name * will be printed always. Otherwise the file name is printed only if it * is different from the last time time this function is called. The last * file name is stored in a private field inside the cilPrinter object.
method pStmtKind : stmt -> unit -> stmtkind -> Flx_cil_pretty.doc
Print a statement kind. The code to be printed is given in the * Flx_cil_cil.stmtkind argument. The initial Flx_cil_cil.stmt argument * records the statement which follows the one being printed; * Flx_cil_cil.defaultCilPrinterClass uses this information to prettify * statement printing in certain special cases.
method pExp : unit -> exp -> Flx_cil_pretty.doc
Print expressions
method pInit : unit -> init -> Flx_cil_pretty.doc
Print initializers. This can be slow and is used by * Flx_cil_cil.printGlobal but not by Flx_cil_cil.dumpGlobal.
method dInit : Pervasives.out_channel -> int -> init -> unit
Dump a global to a file with a given indentation. This is used by * Flx_cil_cil.dumpGlobal