public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Carlos Maniero <carlos@maniero.me>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Carlos Maniero <carlos@maniero.me>
Subject: [PATCH olang v1 0/6] Remove symbol lookups from codegen
Date: Thu, 24 Oct 2024 12:38:31 +0000 (UTC)	[thread overview]
Message-ID: <20241024123825.120390-1-carlos@maniero.me> (raw)

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


             reply	other threads:[~2024-10-24 12:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 12:38 Carlos Maniero [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241024123825.120390-1-carlos@maniero.me \
    --to=carlos@maniero.me \
    --cc=~johnnyrichard/olang-devel@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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