threads := (cast(^thread.Thread) alloc.from_stack(thread_count * sizeof thread.Thread))[0 .. (thread_count - 1)];
for^ threads do thread.spawn(it, ^t_data, #solidify thread_function {body=body, T=T, Ctx=Ctx});
- thread_function(body, ^t_data);
+ thread_function(^t_data, body);
for^ threads do thread.join(it);
dist.close(dist.data);
data: ^Ctx;
}
- thread_function :: ($body: Code, __data: ^Thread_Data($T, $Ctx)) {
+ thread_function :: (__data: ^Thread_Data($T, $Ctx), $body: Code) {
thread_data := __data.data;
for #no_close *__data.iter {
#insert body;
List of known bugs:
-[ ] switch statements should work with any type that supports '=='.
+[ ] partially solidifying procedures messes up poly param indicies, which causes them to
+ not be solved correctly.
[ ] macros cannot use 'use'.
.{ -1, 0 }, .{ -1, 1 }, .{ 0, 1 },
];
+[X] switch statements should work with any type that supports '=='.
+
[X] I don't know why this doesn't work... It is complaining that it couldn't match
either of these cases, but if I remove the first, it matches the second. This
is clearly wrong behavior, but I don't immediately see where the problem is.
new_pp->token = tkn;
new_pp->base_func = pp->base_func;
new_pp->flags = pp->flags;
- new_pp->poly_params = pp->poly_params;
+ new_pp->poly_params = bh_arr_copy(context.ast_alloc, pp->poly_params);
ensure_polyproc_cache_is_created(pp);
new_pp->concrete_funcs = pp->concrete_funcs;