Re: [jruby-user] Can I enable invokedynamic in JRUBYC command
Chris Seaton <[email protected]>
| Newsgroups | gmane.comp.lang.jruby.user |
|---|---|
| Message-ID | <CAJsFBcQcUje5muirJd_BQbddMNcFhmfmQN4b+tCL3qus1en0fA@mail.gmail.com> |
I can't answer your jrubyc question, but have you tried -Xcompile.dump=true with jruby rather than jrubyc? I can see the indy instructions when I use this. This lets you see the byte code generated. It's not in a class file, but if you really want a file on disk for some reason you could probably write the generated code to disk instead of passing it to a class loader when JRuby compiles it. Chris On 8 August 2014 00:58, O. L. <[email protected]> wrote: > Hi I've read from the JRuby release log here > http://www.jruby.org/2013/10/07/jruby-1-7-5.html that the invokedynamic > has been disabled since JRuby 1.7.5. However, it still can be enabled > using -Xcompile.invokedynamic=true command. > > I'm currently working on a research project in which I need to produce > the java class files explicitly and analyze those invokedynamic commands > in the byte codes. I tried to use a JRuby version later than 1.7.4 and > issued the following command: > > jrubyc Xcompile.invokedynamic=true myfile.rb > > But I get the following error: > > OptionParser::InvalidOption: invalid option: > -Xcompile.invokedynamic=true > complete at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/1.9/optparse.rb:1542 > catch at org/jruby/RubyKernel.java:1282 > complete at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/1.9/optparse.rb:1540 > parse_in_order at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/1.9/optparse.rb:1380 > catch at org/jruby/RubyKernel.java:1282 > parse_in_order at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/1.9/optparse.rb:1347 > order! at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/1.9/optparse.rb:1341 > permute! at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/1.9/optparse.rb:1432 > parse! at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/1.9/optparse.rb:1453 > compile_argv at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/shared/jruby/compiler.rb:83 > initialize at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/1.9/optparse.rb:882 > compile_argv at > /Users/x5lai/.rvm/rubies/jruby-1.7.5/lib/ruby/shared/jruby/compiler.rb:35 > (root) at /Users/x5lai/.rvm/rubies/jruby-1.7.5/bin/jrubyc:5 > > > Is it that this command flag is only present for the 'jruby' command and > not the 'jrubyc' command? Is there an equivalent parameter in jrubyc > command that I could turn on the invokedynamic in the byte codes > produced? > > -- > Posted via http://www.ruby-forum.com/. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >