aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 351a8d0a0..3501ba84d 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -822,6 +822,20 @@ void check_entity_decl(Checker *c, Entity *e, DeclInfo *d, Type *named_type) {
return;
}
+#if 0
+ char buf[256] = {};
+ isize n = gb_snprintf(buf, 256, "%.*s %d", LIT(e->token.string), e->kind);
+ Timings timings = {};
+ timings_init(&timings, make_string(cast(u8 *)buf, n-1), 16);
+ defer ({
+ timings_print_all(&timings);
+ timings_destroy(&timings);
+ });
+#define TIME_SECTION(str) timings_start_section(&timings, str_lit(str))
+#else
+#define TIME_SECTION(str)
+#endif
+
if (d == nullptr) {
d = decl_info_of_entity(&c->info, e);
if (d == nullptr) {
@@ -860,6 +874,8 @@ void check_entity_decl(Checker *c, Entity *e, DeclInfo *d, Type *named_type) {
}
c->context = prev;
+
+#undef TIME_SECTION
}