harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4634ef110c2d073a3ea87f870d5044dcf089cc9a
parent d10486b7b86b1f0ece7d86969916c279a334d494
Author: Drew DeVault <sir@cmpwn.com>
Date:   Thu, 11 Mar 2021 09:39:40 -0500

Increase size of type map to 64K

Diffstat:
Minclude/check.h | 3++-
Minclude/type_store.h | 2+-
Msrc/check.c | 2+-
Msrc/main.c | 2+-
Msrc/mod.c | 2+-
5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/check.h b/include/check.h @@ -85,7 +85,8 @@ struct ast_unit; struct scope *check(struct type_store *ts, struct build_tags *tags, const struct ast_unit *aunit, - struct unit *unit); + struct unit *unit, + bool scan_only); void check_expression(struct context *ctx, const struct ast_expression *aexpr, diff --git a/include/type_store.h b/include/type_store.h @@ -3,7 +3,7 @@ #include "ast.h" #include "types.h" -#define TYPE_STORE_BUCKETS 256 +#define TYPE_STORE_BUCKETS 65536 struct type_bucket { struct type type; diff --git a/src/check.c b/src/check.c @@ -2721,7 +2721,7 @@ load_import(struct ast_imports *import, struct scope * check(struct type_store *ts, struct build_tags *tags, - const struct ast_unit *aunit, struct unit *unit) + const struct ast_unit *aunit, struct unit *unit, bool scan_only) { struct context ctx = {0}; ctx.ns = unit->ns; diff --git a/src/main.c b/src/main.c @@ -137,7 +137,7 @@ main(int argc, char *argv[]) struct type_store ts = {0}; builtin_types_init(); - check(&ts, tags, &aunit, &unit); + check(&ts, tags, &aunit, &unit, false); if (stage == STAGE_CHECK) { return 0; } diff --git a/src/mod.c b/src/mod.c @@ -64,5 +64,5 @@ module_resolve(struct identifier *ident, struct type_store *store) // TODO: Free unused bits struct unit u = {0}; - return check(store, NULL, &aunit, &u); + return check(store, NULL, &aunit, &u, true); }