mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Split up cycle check and adding type info timings
This commit is contained in:
+11
-6
@@ -4674,12 +4674,7 @@ void check_parsed_files(Checker *c) {
|
|||||||
for_array(i, c->info.definitions) {
|
for_array(i, c->info.definitions) {
|
||||||
Entity *e = c->info.definitions[i];
|
Entity *e = c->info.definitions[i];
|
||||||
if (e->kind == Entity_TypeName && e->type != nullptr) {
|
if (e->kind == Entity_TypeName && e->type != nullptr) {
|
||||||
// i64 size = type_size_of(c->allocator, e->type);
|
(void)type_align_of(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);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (e->kind == Entity_Procedure) {
|
} else if (e->kind == Entity_Procedure) {
|
||||||
DeclInfo *decl = e->decl_info;
|
DeclInfo *decl = e->decl_info;
|
||||||
ast_node(pl, ProcLit, decl->proc_lit);
|
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");
|
TIME_SECTION("check deferred procedures");
|
||||||
for (Entity *src = nullptr; mpmc_dequeue(&c->procs_with_deferred_to_check, &src); /**/) {
|
for (Entity *src = nullptr; mpmc_dequeue(&c->procs_with_deferred_to_check, &src); /**/) {
|
||||||
|
|||||||
Reference in New Issue
Block a user