@@ -2730,18 +2730,22 @@ pub fn (mut g FlatGen) gen_with_used_options(a &flat.FlatAst, used_fns map[strin
27302730 mut parallel_iface_scan := false
27312731 mut iface_worker := &FlatGen{}
27322732 mut iface_threads := []thread voidptr{cap: 1}
2733- $if !v3_no_parallel ? {
2734- parallel_iface_scan = g.scope_parallel_workers && !effective_no_parallel
2733+ $if !windows {
2734+ $if !v3_no_parallel ? {
2735+ parallel_iface_scan = g.scope_parallel_workers && !effective_no_parallel
2736+ }
27352737 }
27362738 if parallel_iface_scan {
2737- $if !v3_no_parallel ? {
2738- iface_worker = g.new_parallel_worker(4)
2739- iface_worker.interface_boxed_types = map[string]bool{}
2740- iface_worker.interface_boxed_types_done = false
2741- iface_worker.iface_impls = map[string][]string{}
2742- iface_worker.iface_type_ids = map[string]int{}
2743- iface_worker.ierror_method_emit_names = map[string]bool{}
2744- iface_threads << spawn interface_impl_scan_thread(voidptr(iface_worker))
2739+ $if !windows {
2740+ $if !v3_no_parallel ? {
2741+ iface_worker = g.new_parallel_worker(4)
2742+ iface_worker.interface_boxed_types = map[string]bool{}
2743+ iface_worker.interface_boxed_types_done = false
2744+ iface_worker.iface_impls = map[string][]string{}
2745+ iface_worker.iface_type_ids = map[string]int{}
2746+ iface_worker.ierror_method_emit_names = map[string]bool{}
2747+ iface_threads << spawn interface_impl_scan_thread(voidptr(iface_worker))
2748+ }
27452749 }
27462750 } else {
27472751 g.collect_interface_impls()
@@ -2767,12 +2771,14 @@ pub fn (mut g FlatGen) gen_with_used_options(a &flat.FlatAst, used_fns map[strin
27672771 g.timing_profile(' [ttime] cg preseeds ${f64(cgsw.elapsed().microseconds()) / 1000.0:7.2f} ms')
27682772 cgsw.restart()
27692773 if parallel_iface_scan {
2770- $if !v3_no_parallel ? {
2771- _ = iface_threads[0].wait()
2772- g.publish_interface_impl_scan(mut iface_worker)
2773- g.precompute_required_interface_dispatch_methods()
2774- g.timing_profile(' [ttime] cg iface wait ${f64(cgsw.elapsed().microseconds()) / 1000.0:7.2f} ms (overlapped)')
2775- cgsw.restart()
2774+ $if !windows {
2775+ $if !v3_no_parallel ? {
2776+ _ = iface_threads[0].wait()
2777+ g.publish_interface_impl_scan(mut iface_worker)
2778+ g.precompute_required_interface_dispatch_methods()
2779+ g.timing_profile(' [ttime] cg iface wait ${f64(cgsw.elapsed().microseconds()) / 1000.0:7.2f} ms (overlapped)')
2780+ cgsw.restart()
2781+ }
27762782 }
27772783 }
27782784 parallel_prep_done := g.run_pre_dispatch_parallel(effective_no_parallel)
@@ -3122,7 +3128,7 @@ fn (mut g FlatGen) gen_global_declaration_block() {
31223128fn (mut g FlatGen) gen_type_declaration_block() {
31233129 g.enum_decls()
31243130 g.type_forward_decls()
3125- g.type_alias_decls()
3131+ g.type_alias_decls(false )
31263132 // Forward-declare multi-return structs before fn-ptr typedefs, which may name a
31273133 // multi-return as a by-value return type (full bodies come after struct_decls).
31283134 g.multi_return_forward_decls()
@@ -3131,6 +3137,7 @@ fn (mut g FlatGen) gen_type_declaration_block() {
31313137 // array in param or return position) and the function declarations.
31323138 g.fixed_array_early_typedefs()
31333139 g.fn_ptr_typedefs()
3140+ g.type_alias_decls(true)
31343141 g.struct_decls()
31353142 g.fixed_array_typedefs()
31363143 g.multi_return_typedefs()
0 commit comments