3131 cur_fn_returned_idents map [string ]bool
3232 active_generic_types map [string ]types.Type
3333 // Comptime $for field iteration state
34- comptime_field_var string // variable name (e.g., 'field')
35- comptime_field_name string // current field name (e.g., 'id')
36- comptime_field_type string // current field C type name
34+ comptime_field_var string // variable name (e.g., 'field')
35+ comptime_field_name string // current field name (e.g., 'id')
36+ comptime_field_type string // current field C type name
3737 comptime_field_raw_type types.Type = types.Struct{} // raw types.Type for comptime checks
38- comptime_field_attrs []string // current field attributes
39- comptime_field_idx int // current field index
40- comptime_val_var string // the struct variable being decoded (e.g., 'val')
41- comptime_val_type string // C type of val (e.g., 'Slack')
38+ comptime_field_attrs []string // current field attributes
39+ comptime_field_idx int // current field index
40+ comptime_val_var string // the struct variable being decoded (e.g., 'val')
41+ comptime_val_type string // C type of val (e.g., 'Slack')
4242
4343 fixed_array_fields map [string ]bool
4444 fixed_array_field_elem map [string ]string
8585 resolved_module_names map [string ]string // per-function cache for resolve_module_name
8686 cached_env_scopes map [string ]voidptr // cache of env_scope results (avoids repeated locking)
8787
88- const_exprs map [string ]string // const name → C expression string (for inlining)
89- const_types map [string ]string // const name → C type string
90- runtime_const_targets map [string ]bool // module-scoped consts initialized in __v_init_consts_*
91- used_fn_keys map [string ]bool
92- force_emit_fn_names map [string ]bool // function C names that must be emitted regardless of mark_used
93- export_fn_names map [string ]string // V-qualified name → export name (from @[export:] attribute)
94- called_fn_names map [string ]bool
95- generic_spec_index map [string ][]string // fn_name → matching keys in env.generic_types
96- late_generic_specs map [string ][]map [string ]types.Type // additional comptime-discovered specs
97- anon_fn_defs [] string // lifted anonymous function definitions
98- late_struct_defs []string // struct definitions discovered during pass 5 codegen
99- pending_late_body_keys map [string ]bool // body_keys in late_struct_defs but not yet flushed to g.sb
100- late_generic_str_instances []string // c_names of late generic struct instances needing str macro check
101- pass5_ start_pos int // position in sb where pass 5 starts
102- deferred_m_includes [] string // Objective-C .m file #include lines deferred until after type definitions
103- spawned_fns map [string ]bool // spawn wrapper names already emitted
104- spawn_wrapper_defs [] string // spawn wrapper struct + function definitions
105- emitted_trampolines map [string ]bool // bound method trampoline names already emitted
106- trampoline_defs [] string // bound method trampoline definitions
88+ const_exprs map [string ]string // const name → C expression string (for inlining)
89+ const_types map [string ]string // const name → C type string
90+ runtime_const_targets map [string ]bool // module-scoped consts initialized in __v_init_consts_*
91+ used_fn_keys map [string ]bool
92+ force_emit_fn_names map [string ]bool // function C names that must be emitted regardless of mark_used
93+ export_fn_names map [string ]string // V-qualified name → export name (from @[export:] attribute)
94+ called_fn_names map [string ]bool
95+ generic_spec_index map [string ][]string // fn_name → matching keys in env.generic_types
96+ late_generic_specs map [string ][]map [string ]types.Type // additional comptime-discovered specs
97+ anon_fn_defs [] string // lifted anonymous function definitions
98+ late_struct_defs []string // struct definitions discovered during pass 5 codegen
99+ pending_late_body_keys map [string ]bool // body_keys in late_struct_defs but not yet flushed to g.sb
100+ late_generic_str_instances []string // c_names of late generic struct instances needing str macro check
101+ pass5_ start_pos int // position in sb where pass 5 starts
102+ deferred_m_includes [] string // Objective-C .m file #include lines deferred until after type definitions
103+ spawned_fns map [string ]bool // spawn wrapper names already emitted
104+ spawn_wrapper_defs [] string // spawn wrapper struct + function definitions
105+ emitted_trampolines map [string ]bool // bound method trampoline names already emitted
106+ trampoline_defs [] string // bound method trampoline definitions
107107 // @[live] hot code reloading
108108 live_fns []LiveFnInfo // @[live] functions detected during code generation
109109 live_source_file string // source file containing @[live] functions
@@ -116,16 +116,16 @@ mut:
116116 // a list of (suffix, bindings) pairs for each distinct concrete instantiation.
117117 // E.g. [("json2__ValueInfo", {T: ValueInfo}), ("json2__StructFieldInfo", {T: StructFieldInfo})]
118118 generic_struct_instances map [string ][]GenericStructInstance
119- c_file_fn_keys map [string ]bool // fn_key -> emitted from a .c.v file, so plain .v fallback should be skipped
120- typedef_c_types map [string ]bool // C struct names with @[typedef] attribute (emit without 'struct' prefix)
121- blocked_fn_keys map [string ]bool // worker-only fn keys reserved to other pass5 chunks
122- cached_vhash string // cached git short hash for @VHASH/@VCURRENTHASH
119+ c_file_fn_keys map [string ]bool // fn_key -> emitted from a .c.v file, so plain .v fallback should be skipped
120+ typedef_c_types map [string ]bool // C struct names with @[typedef] attribute (emit without 'struct' prefix)
121+ blocked_fn_keys map [string ]bool // worker-only fn keys reserved to other pass5 chunks
122+ cached_vhash string // cached git short hash for @VHASH/@VCURRENTHASH
123123}
124124
125125struct GenericStructInstance {
126- params_key string // e.g. "json2__ValueInfo" — unique key per instantiation
126+ params_key string // e.g. "json2__ValueInfo" — unique key per instantiation
127127 bindings map [string ]types.Type // e.g. {T: ValueInfo}
128- c_name string // full C struct name, e.g. "json2__Node_T_json2__StructFieldInfo"
128+ c_name string // full C struct name, e.g. "json2__Node_T_json2__StructFieldInfo"
129129}
130130
131131struct LiveFnInfo {
0 commit comments