1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-14 20:54:48 +00:00
janet/dsts/minimal.dsts
Calvin Rose d84cc5342e Fix write after free bug.
Remove caching from strings, tuples, and structs.
Keyword style strings removed, now are just symbols. The
compiler can decide to treat symbols with a leading ':'
differently for mostly the same effect. This was done because
as strings are no longer interned, symbols are cheaper to look
up and check for equality.
2017-11-27 14:03:34 -05:00

26 lines
369 B
Plaintext

{
bork 'boop
bytecode [
(load-integer 0 15)
(load-integer 1 0)
(load-constant 3 lookup)
:label
(equals 2 1 0)
(jump-if 2 :done)
(push 0)
(add-immediate 0 0 -1)
(syscall 2 0)
(get 2 3 0)
(push 2)
(syscall 2 0)
(jump :label)
:done
(return-nil)
]
constants [
(def lookup "0123456789abcdef")
]
}