Compiler fails to compile 500+ line script
------------------------------------------

                 Key: JRUBY-2246
                 URL: http://jira.codehaus.org/browse/JRUBY-2246
             Project: JRuby
          Issue Type: Bug
          Components: Compiler
    Affects Versions: JRuby 1.1RC2
         Environment: JRuby 1.1RC2
            Reporter: Vladimir Sizikov
             Fix For: JRuby 1.1


A very simple script:

a = 1
a += 1 # repeat this line 500 times

An attempt to compile it breaks on Linux and Windows:

jruby -J-Djruby.jit.logging.verbose=true -X+C script.rb
could not compile: blah-1.rb because of: "(class: 
ruby/opt/work/samples/blah_minus_1, method: __file__from_line_500 signature: 
(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;)
 Accessing value from uninitialized register 11"
java.lang.VerifyError: (class: ruby/opt/work/samples/blah_minus_1, method: 
__file__from_line_500 signature: 
(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;)
 Accessing value from uninitialized register 11
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
        at org.jruby.Ruby.tryCompile(Ruby.java:442)
        at org.jruby.Ruby.tryCompile(Ruby.java:427)
        at org.jruby.Ruby.runNormally(Ruby.java:408)
        at org.jruby.Ruby.runFromMain(Ruby.java:298)
        at org.jruby.Main.run(Main.java:141)
        at org.jruby.Main.run(Main.java:88)
        at org.jruby.Main.main(Main.java:79)
Error, could not compile; pass -J-Djruby.jit.logging.verbose=true for more 
details

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to