mirror of
https://github.com/janet-lang/janet
synced 2025-10-24 12:17:41 +00:00
Merge branch 'master' into compile-opt
This commit is contained in:
@@ -1,17 +1,25 @@
|
||||
(def ir-asm
|
||||
@{:instructions
|
||||
'((prim 0 s32)
|
||||
(prim 1 f64)
|
||||
(struct 2 0 1)
|
||||
(struct 3)
|
||||
(bind 0 0)
|
||||
(bind 1 0)
|
||||
(bind 2 0)
|
||||
#(constant 0 10)
|
||||
(constant 1 20)
|
||||
(bind 3 1)
|
||||
(bind 4 1)
|
||||
(bind 5 1)
|
||||
(constant 0 10)
|
||||
(constant 0 21)
|
||||
(add 2 1 0)
|
||||
(return 2))
|
||||
(constant 3 1.77)
|
||||
(call 3 sin 3)
|
||||
(cast 4 2)
|
||||
(add 5 4 3)
|
||||
(return 5))
|
||||
:parameter-count 0
|
||||
:link-name "main"})
|
||||
|
||||
(def as (sysir/asm ir-asm))
|
||||
(print :did-assemble)
|
||||
(os/sleep 0.5)
|
||||
(print (sysir/to-c as))
|
||||
|
||||
Reference in New Issue
Block a user