Module Ir_gen.Frontend_ir
val un_op_from_protobuf_bare : Protobuf.Decoder.t -> un_opval un_op_to_protobuf_bare : un_op -> Protobuf.Encoder.t -> unitval un_op_from_protobuf : Protobuf.Decoder.t -> un_opval un_op_to_protobuf : un_op -> Protobuf.Encoder.t -> unitval string_of_un_op : un_op -> string
type bin_op=|BinOpPlus|BinOpMinus|BinOpMult|BinOpIntDiv|BinOpRem|BinOpLessThan|BinOpLessThanEq|BinOpGreaterThan|BinOpGreaterThanEq|BinOpAnd|BinOpOr|BinOpEq|BinOpNotEq
val bin_op_from_protobuf_bare : Protobuf.Decoder.t -> bin_opval bin_op_to_protobuf_bare : bin_op -> Protobuf.Encoder.t -> unitval bin_op_from_protobuf : Protobuf.Decoder.t -> bin_opval bin_op_to_protobuf : bin_op -> Protobuf.Encoder.t -> unitval string_of_bin_op : bin_op -> string
val type_expr_from_protobuf : Protobuf.Decoder.t -> type_exprval type_expr_to_protobuf : type_expr -> Protobuf.Encoder.t -> unitval string_of_type : type_expr -> string
type param=|TParam of type_expr * string
val param_from_protobuf : Protobuf.Decoder.t -> paramval param_to_protobuf : param -> Protobuf.Encoder.t -> unit
type identifier=|Variable of string|ObjField of string * intobject name, field = index into class field types list
val identifier_from_protobuf : Protobuf.Decoder.t -> identifierval identifier_to_protobuf : identifier -> Protobuf.Encoder.t -> unit
val lock_type_from_protobuf_bare : Protobuf.Decoder.t -> lock_typeval lock_type_to_protobuf_bare : lock_type -> Protobuf.Encoder.t -> unitval lock_type_from_protobuf : Protobuf.Decoder.t -> lock_typeval lock_type_to_protobuf : lock_type -> Protobuf.Encoder.t -> unitval string_of_lock_type : lock_type -> string
type expr=|Integer of int|Boolean of bool|Identifier of identifier * lock_type option|Constructor of string * constructor_arg list|Let of string * expr|Assign of identifier * expr * lock_type option|Consume of identifier * lock_type option|FunctionApp of string * expr list|MethodApp of string * string * int * expr listobject name, static method name (used to get method arg types), method index into vtable, args
|Printf of string * expr list|FinishAsync of async_expr list * expr list|IfElse of expr * expr list * expr listIf ___ then ___ else ___
|WhileLoop of expr * expr listWhile ___ do ___ ;
|BinOp of bin_op * expr * expr|UnOp of un_op * expr|Block of block_expr|Lock of string * lock_type|Unlock of string * lock_typeand block_expr= expr listand async_expr=|AsyncExpr of string list * block_exprAsync exprs have a precomputed list of their free variables (passed as arguments when they are spawned as thread)
and constructor_arg=|ConstructorArg of int * exprint=field_index,expr= assigned value
val expr_from_protobuf : Protobuf.Decoder.t -> exprval expr_to_protobuf : expr -> Protobuf.Encoder.t -> unitval block_expr_from_protobuf : Protobuf.Decoder.t -> block_exprval block_expr_to_protobuf : block_expr -> Protobuf.Encoder.t -> unitval async_expr_from_protobuf : Protobuf.Decoder.t -> async_exprval async_expr_to_protobuf : async_expr -> Protobuf.Encoder.t -> unitval constructor_arg_from_protobuf : Protobuf.Decoder.t -> constructor_argval constructor_arg_to_protobuf : constructor_arg -> Protobuf.Encoder.t -> unit
type function_defn=|TFunction of string * type_expr * param list * expr listFunction defn consists of the function name, return type, the list of params, and the body expr block of the function
val function_defn_from_protobuf : Protobuf.Decoder.t -> function_defnval function_defn_to_protobuf : function_defn -> Protobuf.Encoder.t -> unit
type class_defn=|TClass of string * type_expr list * string listClass definitions consist of the class name, the list of the types of its fields and a vtable. Its methods are now plain old functions
val class_defn_from_protobuf : Protobuf.Decoder.t -> class_defnval class_defn_to_protobuf : class_defn -> Protobuf.Encoder.t -> unit
type program=|Prog of class_defn list * function_defn list * expr listEach bolt program defines the classes,followed by functions, followed by the main expression block to execute.