mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Temporarily revert anonymous procedure load balancing
This commit is contained in:
@@ -3096,6 +3096,8 @@ gb_internal lbValue lb_find_procedure_value_from_entity(lbModule *m, Entity *e)
|
|||||||
|
|
||||||
gb_internal lbValue lb_generate_anonymous_proc_lit(lbModule *m, String const &prefix_name, Ast *expr, lbProcedure *parent) {
|
gb_internal lbValue lb_generate_anonymous_proc_lit(lbModule *m, String const &prefix_name, Ast *expr, lbProcedure *parent) {
|
||||||
lbGenerator *gen = m->gen;
|
lbGenerator *gen = m->gen;
|
||||||
|
gb_unused(gen);
|
||||||
|
|
||||||
ast_node(pl, ProcLit, expr);
|
ast_node(pl, ProcLit, expr);
|
||||||
|
|
||||||
if (pl->decl->entity.load() != nullptr) {
|
if (pl->decl->entity.load() != nullptr) {
|
||||||
@@ -3121,10 +3123,15 @@ gb_internal lbValue lb_generate_anonymous_proc_lit(lbModule *m, String const &pr
|
|||||||
token.string = name;
|
token.string = name;
|
||||||
Entity *e = alloc_entity_procedure(nullptr, token, type, pl->tags);
|
Entity *e = alloc_entity_procedure(nullptr, token, type, pl->tags);
|
||||||
e->file = expr->file();
|
e->file = expr->file();
|
||||||
|
|
||||||
|
#if 0
|
||||||
e->pkg = e->file->pkg;
|
e->pkg = e->file->pkg;
|
||||||
e->scope = e->file->scope;
|
e->scope = e->file->scope;
|
||||||
|
|
||||||
lbModule *target_module = lb_module_of_entity(gen, e, m);
|
lbModule *target_module = lb_module_of_entity(gen, e, m);
|
||||||
|
#else
|
||||||
|
lbModule *target_module = m;
|
||||||
|
#endif
|
||||||
GB_ASSERT(target_module != nullptr);
|
GB_ASSERT(target_module != nullptr);
|
||||||
|
|
||||||
// NOTE(bill): this is to prevent a race condition since these procedure literals can be created anywhere at any time
|
// NOTE(bill): this is to prevent a race condition since these procedure literals can be created anywhere at any time
|
||||||
|
|||||||
Reference in New Issue
Block a user