public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [PATCH olang v1 0/3] codege: initial implementation of pointers
@ 2024-10-14 12:06 Carlos Maniero
  2024-10-14 12:06 ` [PATCH olang v1 1/3] fix: checker: populate vardef value scope Carlos Maniero
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Carlos Maniero @ 2024-10-14 12:06 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Carlos Maniero

This patchset enables the following program in olang:

fn main(): u32 {
  var a: u32 = 1
  var b: u32* = &a
  *b = 0
  return a
}

It is still not possible to perform multiple dereference (**b).

There was an issue during the vardef scope population where the vardef
value was not been populated (aka no scope set).

Carlos Maniero (3):
  fix: checker: populate vardef value scope
  codegen: x64: generate address of (&)
  codegen: x64: generate dereference assignment

 src/checker.c              |  5 +++
 src/codegen_linux_x86_64.c | 89 ++++++++++++++++++++++++++++++--------
 tests/olc/0034_pointers.ol |  4 +-
 3 files changed, 79 insertions(+), 19 deletions(-)


base-commit: f1a40e971f5a8890acf2015632a39b64ca29e30c
-- 
2.46.1


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

end of thread, other threads:[~2024-10-14 12:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-14 12:06 [PATCH olang v1 0/3] codege: initial implementation of pointers Carlos Maniero
2024-10-14 12:06 ` [PATCH olang v1 1/3] fix: checker: populate vardef value scope Carlos Maniero
2024-10-14 12:06 ` [PATCH olang v1 2/3] codegen: x64: generate address of (&) Carlos Maniero
2024-10-14 12:06 ` [PATCH olang v1 3/3] codegen: x64: generate dereference assignment Carlos Maniero
2024-10-14 12:07   ` [olang/patches/.build.yml] build success builds.sr.ht
2024-10-14 14:35 ` [PATCH olang v1 0/3] codege: initial implementation of pointers 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