las3r
las3r copied to clipboard
Compiler bug
The following code throws a VerifyError: Error #1019: Getscopeobject 1 is out of bounds.
((fn
([] (fn [] nil))
([x] nil)))
Disassembly of what I'm guessing is the offending function:
var null::anonymous_at_2():
maxStack:3 localCount:6 initScopeDepth:3 maxScopeDepth:5
getlex :B51F505B61474B5840F390D8982B21476624D06B
setlocal3
getlex :B51F505B61474B5840F390D8982B21476624D06B
getproperty :rt
setlocal 4
getlocal1
getproperty :length
pushuint 0 // 0x0
ifeq L0
getlocal1
getproperty :length
pushuint 1 // 0x1
ifeq L1
getlex com.las3r.errors:RuntimeError
pushstring "Variadic function invoked with invalid arity."
construct (1)
throw
L0: getlocal1
setlocal1
getlocal0
pushscope
newactivation
dup
pushscope
setlocal 5
L2: label
newfunction anonymous_at_3
returnvalue
L1: getlocal1
dup
pushint 1 // 0x1
nextvalue
setlocal1
setlocal2
getlocal0
pushscope
getscopeobject 1
getlocal1
coerce_a
setslot 1
L3: label
pushnull
returnvalue
0 Extras
1 Traits Entries
:local14