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 v2 3/4] codegen: fix map symbol list type
Date: Sun, 22 Sep 2024 00:46:41 +0000 (UTC)	[thread overview]
Message-ID: <20240922004619.518310-4-carlos@maniero.me> (raw)
In-Reply-To: <20240922004619.518310-1-carlos@maniero.me>

It was supposed to be an array of pointers.

Signed-off-by: Carlos Maniero <carlos@maniero.me>
---
 src/codegen_linux_x86_64.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/codegen_linux_x86_64.c b/src/codegen_linux_x86_64.c
index 3ce11a7..1fa6c58 100644
--- a/src/codegen_linux_x86_64.c
+++ b/src/codegen_linux_x86_64.c
@@ -426,9 +426,9 @@ calculate_fn_local_size(scope_t *scope)
 
     size_t local_size = 0;
 
-    map_kv_t kvs[scope->symbols->size];
+    map_kv_t *kvs[scope->symbols->size];
 
-    map_get_kvs(scope->symbols, (map_kv_t **)kvs);
+    map_get_kvs(scope->symbols, kvs);
 
     for (size_t i = 0; i < scope->symbols->size; ++i) {
         // FIXME: symbols must have their types. Since we just have 8bytes
-- 
2.34.1


  parent reply	other threads:[~2024-09-22  0:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22  0:46 [PATCH olang v2 0/4] extend unsined integers types (u8, u16, u64) Carlos Maniero
2024-09-22  0:46 ` [PATCH olang v2 1/4] parser: replace type enum to a string view Carlos Maniero
2024-09-22  0:46 ` [PATCH olang v2 2/4] checker: scope: populate symbol's type Carlos Maniero
2024-09-22  0:46 ` Carlos Maniero [this message]
2024-09-22  0:46 ` [PATCH olang v2 4/4] codegen: operate mov instructions based on the " Carlos Maniero
2024-09-22  0:47   ` [olang/patches/.build.yml] build success builds.sr.ht
2024-09-22 14:15   ` [PATCH olang v2 4/4] codegen: operate mov instructions based on the symbol's type Johnny Richard
2024-09-22 14:19 ` [PATCH olang v2 0/4] extend unsined integers types (u8, u16, u64) Johnny Richard

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=20240922004619.518310-4-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