public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [PATCH olang v1 0/6] Remove symbol lookups from codegen
@ 2024-10-24 12:38 Carlos Maniero
  2024-10-24 12:38 ` [PATCH olang v1 1/6] ast: create the ast_id_t and apply it to var_def and ref Carlos Maniero
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Carlos Maniero @ 2024-10-24 12:38 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Carlos Maniero

Until now, the codegen was responsible to make the symbol resolution
because we didn't have a semantics layer.

Now with the semantics, the symbols are already resolved and saved on
the AST. To avoid redundancy and code duplication, a new struct was
added to represent identifiers.

Carlos Maniero (6):
  ast: create the ast_id_t and apply it to var_def and ref
  semantics: resolve variable symbols
  semantics: refactor: use the ast_id_t into the fn_call node
  semantics: refactor: use the ast_id_t into the fn_def.params
  type: refactor: rename type.id to type.name
  ast: remove dead code from var_assign ast node

 src/ast.c              |   8 +-
 src/ast.h              |  26 +++----
 src/codegen_x86_64.c   |  47 ++++--------
 src/pretty_print_ast.c |  17 +++--
 src/type.c             |   8 +-
 src/type.h             |  25 ++++---
 src/type_checker.c     | 161 ++++++++++++++++++++++++++++++++++++-----
 7 files changed, 201 insertions(+), 91 deletions(-)


base-commit: f87fb371a0105a458be07bd3f269bb45da913d16
-- 
2.46.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-10-31  3:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-24 12:38 [PATCH olang v1 0/6] Remove symbol lookups from codegen Carlos Maniero
2024-10-24 12:38 ` [PATCH olang v1 1/6] ast: create the ast_id_t and apply it to var_def and ref Carlos Maniero
2024-10-24 12:38 ` [PATCH olang v1 2/6] semantics: resolve variable symbols Carlos Maniero
2024-10-24 12:38 ` [PATCH olang v1 3/6] semantics: refactor: use the ast_id_t into the fn_call node Carlos Maniero
2024-10-24 12:38 ` [PATCH olang v1 4/6] semantics: refactor: use the ast_id_t into the fn_def.params Carlos Maniero
2024-10-24 12:38 ` [PATCH olang v1 5/6] type: refactor: rename type.id to type.name Carlos Maniero
2024-10-24 12:38 ` [PATCH olang v1 6/6] ast: remove dead code from var_assign ast node Carlos Maniero
2024-10-24 12:39   ` [olang/patches/.build.yml] build success builds.sr.ht
2024-10-31  3:16 ` [PATCH olang v1 0/6] Remove symbol lookups from codegen Carlos Maniero

Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox