proc/add(a = 0, b = 0)
return a + b
Outputs this bytecode:
/proc/add
file "test.dm"
line 7
get arg<1>
push null
eq
pop
cjmp 21
line 6
push 0
set arg<1>
get arg<2>
push null
eq
pop
cjmp 36
push 0
set arg<2>
line 7
get arg<1>
get arg<2>
add
retval
(Also note the bugged line numbers, function starts at line 6)
It doesnt even use isnull (I'm fairly sure isnull is an instruction, but it isnt on my list)
Can these be improved to be inside the defvars array if they fit in a 5 byte value specifier? They're just null there right now