JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-2621

Long bodies of code that don't appear at root don't split and can blow the 64k bytecode cap

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JRuby 1.6
    • Component/s: Compiler
    • Labels:
      None
    • Number of attachments :
      1

      Description

      This will obviously affect performance of ruby_parser quite a bit:

      ~/NetBeansProjects/jruby ➔ jruby -J-Djruby.jit.logging.verbose=true -X+C --server -rubygems -rbenchmark -e "gem :ruby_parser; require 'ruby_parser'; 5.times {puts Benchmark.measure {RubyParser.new.parse(File.read('lib/ruby/1.8/rdoc/parsers/parse_rb.rb'))}}"
      could not compile: /Users/headius/NetBeansProjects/jruby/lib/ruby/gems/1.8/gems/ruby_parser-1.0.0/lib/ruby_parser.rb because of: "Invalid method Code length 82165 in class file ruby/Users/headius/NetBeansProjects/jruby/lib/ruby/gems/$1_dot_8/gems/ruby_parser_minus_1_dot_0_dot_0/lib/ruby_parser"
      java.lang.ClassFormatError: Invalid method Code length 82165 in class file ruby/Users/headius/NetBeansProjects/jruby/lib/ruby/gems/$1_dot_8/gems/ruby_parser_minus_1_dot_0_dot_0/lib/ruby_parser
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
      	at org.jruby.util.JRubyClassLoader.defineClass(JRubyClassLoader.java:21)
      	at org.jruby.compiler.impl.StandardASMCompiler.loadClass(StandardASMCompiler.java:159)
      	at org.jruby.Ruby.tryCompile(Ruby.java:464)
      	at org.jruby.Ruby.compileAndLoadFile(Ruby.java:2041)
      	at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:56)
      	at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:320)
      	at org.jruby.runtime.load.LoadService.require(LoadService.java:346)
      	at org.jruby.RubyKernel.require(RubyKernel.java:769)
      

        Issue Links

          Activity

            People

            • Assignee:
              Charles Oliver Nutter
              Reporter:
              Charles Oliver Nutter
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: