Add TypeWriter stream to allow for in-place hashing and string generation

This commit is contained in:
gingerBill
2025-02-18 14:21:40 +00:00
parent 19b59461b0
commit 23efd1bd02
5 changed files with 361 additions and 271 deletions
+2 -2
View File
@@ -1456,11 +1456,11 @@ gb_internal String lb_get_entity_name(lbModule *m, Entity *e) {
return e->token.string;
}
gbString w = gb_string_make(heap_allocator(), "");
w = write_canonical_entity_name(w, e);
gbString w = string_canonical_entity_name(heap_allocator(), e);
defer (gb_string_free(w));
String name = copy_string(permanent_allocator(), make_string(cast(u8 const *)w, gb_string_length(w)));
gb_printf_err("%.*s\n", LIT(name));
if (e->kind == Entity_TypeName) {
e->TypeName.ir_mangled_name = name;