From 0b44878fcdf7a002b26aac555fa547fd313d1c5d Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Fri, 10 Feb 2023 20:37:47 +0100 Subject: [PATCH] Remove TODO to allow const variable names I made it possible for variable names to be const strings, only to discover this actually used *more* heap memory instead of less. Also only very low performance gains. So let's not do that and keep things a bit simpler. --- src/context.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/context.c b/src/context.c index a63f4db..bcbeb02 100644 --- a/src/context.c +++ b/src/context.c @@ -830,9 +830,6 @@ init_globals(apfl_ctx ctx) goto error; } - // TODO: It's silly that we need to copy the name into a new gc string. - // It should be possible for the scope to also have a const string - // as a name. struct apfl_string *name = new_copied_string(gc, apfl_string_view_from(global->name)); if (name == NULL) { goto error;