diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-07-30 14:37:53 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-07-30 14:37:53 -0400 |
| commit | d1f967ffb4dc099a34f54434be10a58eb33b81f7 (patch) | |
| tree | e959c8de3024351f2169a9b6f06ba7d0cdb46c22 /src | |
| parent | e8e00267ae57c152739362ef623393d9816aa9d5 (diff) | |
Struct reordering to improve packing
Diffstat (limited to 'src')
| -rw-r--r-- | src/ast.h | 2 | ||||
| -rw-r--r-- | src/environment.h | 4 | ||||
| -rw-r--r-- | src/stdlib/types.h | 4 |
3 files changed, 5 insertions, 5 deletions
@@ -76,8 +76,8 @@ typedef enum { typedef struct tag_ast_s { const char *name; arg_ast_t *fields; - bool secret:1; struct tag_ast_s *next; + bool secret:1; } tag_ast_t; struct type_ast_s { diff --git a/src/environment.h b/src/environment.h index a508c967..85287d02 100644 --- a/src/environment.h +++ b/src/environment.h @@ -42,13 +42,13 @@ typedef struct env_s { // Lookup table for env_t* where the key is: // - Resolved path for local imports (so that `use ./foo.tm` is the same as `use ./baz/../foo.tm`) // - Raw 'use' string for module imports + namespace_t *namespace; + const char *id_suffix; Table_t *imports; compilation_unit_t *code; type_t *fn_ret; loop_ctx_t *loop_ctx; deferral_t *deferred; - const char *id_suffix; - namespace_t *namespace; Closure_t *comprehension_action; bool do_source_mapping:1; } env_t; diff --git a/src/stdlib/types.h b/src/stdlib/types.h index 7d61a524..03b397b7 100644 --- a/src/stdlib/types.h +++ b/src/stdlib/types.h @@ -65,14 +65,14 @@ struct TypeInfo_s { } OptionalInfo; struct { const char *name; - int num_tags; NamedType_t *tags; + int num_tags; } EnumInfo; struct { const char *name; + NamedType_t *fields; int num_fields; bool is_secret:1, is_opaque:1; - NamedType_t *fields; } StructInfo; }; }; |
