Sarek_native_gen_basemodule IntSet : sig ... endMutable variable tracking. We track which variable IDs are mutable so that TEVar can dereference them.
module StringSet : sig ... endSet of inline type names for first-class module approach
type gen_context = {mut_vars : IntSet.t;Variable IDs that are mutable (need dereferencing)
*)inline_types : StringSet.t;Type names that use first-class module accessors
*)current_module : string option;Current module name for same-module type detection
*)gen_mode : Sarek_native_intrinsics.gen_mode;Generation mode - affects how thread indices are accessed
*)use_native_arg : bool;When true, vector params are accessor objects (v#get i, v#set i x) instead of Vector.t (Vector.get v i, Vector.kernel_set v i x)
*)}Expression generation context
val empty_ctx : gen_contextEmpty generation context
val is_same_module : gen_context -> string -> boolCheck if a qualified type name is from the current module. For "Test_registered_variant.color", returns true if current_module is "Test_registered_variant".
Generate accessor function name for a field getter
Generate constructor function name for a variant constructor
val gen_literal :
loc:Ppxlib.location ->
Sarek_typed_ast.texpr ->
Ppxlib.expressionval gen_variable :
loc:Ppxlib__.Location.t ->
ctx:gen_context ->
string ->
int ->
Ppxlib.expressionGenerate variable reference (local, module-level, qualified)
val is_inline_type : StringSet.t option -> StringSet.elt -> boolval vector_type_id_expr :
?current_module:Stdlib.String.t ->
?inline_types:StringSet.t ->
?inline_ids_var:string ->
loc:Ppxlib.location ->
Sarek_types.typ ->
Ppxlib_ast.Ast.expressionval custom_type_id_expr :
?current_module:Stdlib.String.t ->
?inline_types:StringSet.t ->
?inline_ids_var:string ->
loc:Ppxlib.location ->
Sarek_types.typ ->
Ppxlib_ast.Ast.expression