Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler bug #10

Open
yonatan opened this issue Jan 4, 2011 · 1 comment
Open

Compiler bug #10

yonatan opened this issue Jan 4, 2011 · 1 comment

Comments

@yonatan
Copy link

yonatan commented Jan 4, 2011

The following code throws a VerifyError: Error #1019: Getscopeobject 1 is out of bounds.

((fn
   ([] (fn [] nil))
   ([x] nil)))
@yonatan
Copy link
Author

yonatan commented Jan 4, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant