1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-06 08:38:07 +00:00

Add better support for arrays and struct fields in IR.

Also add option for named registers.
This commit is contained in:
Calvin Rose
2023-08-08 18:56:02 -05:00
parent de2440d458
commit 8007806c8e
2 changed files with 154 additions and 36 deletions

View File

@@ -4,11 +4,12 @@
(prim 1 f64)
(struct 2 0 1)
(pointer 3 0)
(array 4 1 1024)
(bind 0 0)
(bind 1 0)
(bind 2 0)
(bind 3 1)
(bind 4 1)
(bind bob 1)
(bind 5 1)
(bind 6 2)
(constant 0 10)
@@ -17,10 +18,8 @@
(add 2 1 0)
(constant 3 1.77)
(call 3 sin 3)
(cast 4 2)
(fset 2 6 0)
(fset 3 6 1)
(add 5 4 3)
(cast bob 2)
(add 5 bob 3)
(jump :location)
(return 5))
:parameter-count 0