public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [PATCH olang v2 0/6] Remove symbol lookups from codegen
@ 2024-10-31  3:13 Carlos Maniero
  2024-10-31  3:13 ` [PATCH olang v2 1/6] ast: create the ast_ident_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-31  3:13 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.

v2:
- rename ast_id_t to ast_ident_t

Carlos Maniero (6):
  ast: create the ast_ident_t and apply it to var_def and ref
  semantics: resolve variable symbols
  semantics: refactor: use the ast_ident_t into the fn_call node
  semantics: refactor: use the ast_ident_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              |  14 ++--
 src/ast.h              |  32 ++++----
 src/codegen_x86_64.c   |  50 +++++--------
 src/pretty_print_ast.c |  18 +++--
 src/type.c             |   8 +-
 src/type.h             |  25 ++++---
 src/type_checker.c     | 164 ++++++++++++++++++++++++++++++++++++-----
 7 files changed, 213 insertions(+), 98 deletions(-)


base-commit: f87fb371a0105a458be07bd3f269bb45da913d16
-- 
2.46.1


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

end of thread, other threads:[~2024-11-01  0:17 UTC | newest]

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

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