From 367013f589b2ae87a0b83410bc4ea770e1263157 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 12 Dec 2017 23:39:20 +0000 Subject: Change Map and PtrSet grow rate --- src/check_decl.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/check_decl.cpp') 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 } -- cgit v1.2.3