mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-04 09:44:40 +00:00
Split up cycle check and adding type info timings
This commit is contained in:
@@ -4674,12 +4674,7 @@ void check_parsed_files(Checker *c) {
|
||||
for_array(i, c->info.definitions) {
|
||||
Entity *e = c->info.definitions[i];
|
||||
if (e->kind == Entity_TypeName && e->type != nullptr) {
|
||||
// i64 size = type_size_of(c->allocator, e->type);
|
||||
i64 align = type_align_of(e->type);
|
||||
if (align > 0 && ptr_set_exists(&c->info.minimum_dependency_set, e)) {
|
||||
add_type_info_type(&c->builtin_ctx, e->type);
|
||||
}
|
||||
|
||||
(void)type_align_of(e->type);
|
||||
} else if (e->kind == Entity_Procedure) {
|
||||
DeclInfo *decl = e->decl_info;
|
||||
ast_node(pl, ProcLit, decl->proc_lit);
|
||||
@@ -4694,6 +4689,16 @@ void check_parsed_files(Checker *c) {
|
||||
}
|
||||
}
|
||||
}
|
||||
TIME_SECTION("add type info for type definitions");
|
||||
for_array(i, c->info.definitions) {
|
||||
Entity *e = c->info.definitions[i];
|
||||
if (e->kind == Entity_TypeName && e->type != nullptr) {
|
||||
i64 align = type_align_of(e->type);
|
||||
if (align > 0 && ptr_set_exists(&c->info.minimum_dependency_set, e)) {
|
||||
add_type_info_type(&c->builtin_ctx, e->type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TIME_SECTION("check deferred procedures");
|
||||
for (Entity *src = nullptr; mpmc_dequeue(&c->procs_with_deferred_to_check, &src); /**/) {
|
||||
|
||||
Reference in New Issue
Block a user