Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Commits on Oct 6, 2015
  1. @nirvdrum
  2. @headius
  3. @headius
  4. @nirvdrum

    [Truffle] Switched from a Field to a MethodHandle.

    nirvdrum authored
    This should perform better since the access check is performed up front rather than on each invocation. It also plays better with SVM.
  5. @nirvdrum
  6. @nirvdrum
  7. @chrisseaton
  8. @chrisseaton
  9. @headius
  10. @enebo

    TL;DR define_method defined methods will execute ~2x faster in common…

    enebo authored
    … cases.
    This optimization will convert define_method from being a block and fully promoting it to a method (only for JIT now).  Once we unify InterpretedIRMethod and MixedModeIRMethod we can enable this for full builds in -X-C as well.  This ended
    up have more issues than anticipated.  block_given? in particular refers to the block outside the define_method block and not to any block passed to that newly defined method.  This required the creation of a new Method type DefineMethodMethod.
    The biggest limitation to this optimization is that if the block for define_method references any variables in a parent scope then we will not perform the optimization.  This is mildly undesirable and for read-only lvar access I think we can hoist the value from the parent scope and pass it into our converted method.  This seemed like a ton of extra work so it is a blue sky future.
    There will be a future set of commit(s) to make this optimization trigger more often.  Right now if the new method has contained closures which acceess lvars outside of their current scope then we do not perform this opt.  The next round of optimization will involve calculating whether nested closures can escape the define_method only.
    Calculating -------------------------------------
    define_method w/ capture
                            56.284k i/100ms
                     def   104.909k i/100ms
           define_method    63.224k i/100ms
    define_method w/ capture
                              1.115M (± 5.8%) i/s -      5.572M
                     def      3.409M (± 9.3%) i/s -     16.890M
           define_method      1.086M (± 4.8%) i/s -      5.437M
    system ~/work/jruby master * 1412% jruby ../snippets/define_method3.rb
    Calculating -------------------------------------
    define_method w/ capture
                            58.167k i/100ms
                     def   108.644k i/100ms
           define_method    92.163k i/100ms
    define_method w/ capture
                              1.171M (± 6.4%) i/s -      5.875M
                     def      3.241M (± 8.1%) i/s -     16.079M
           define_method      2.795M (± 8.7%) i/s -     13.917M
    system ~/work/jruby master * 1408% mri22 ../snippets/define_method3.rb
    Calculating -------------------------------------
    define_method w/ capture
                            46.709k i/100ms
                     def    63.690k i/100ms
           define_method    46.901k i/100ms
    define_method w/ capture
                            832.886k (± 6.4%) i/s -      4.157M
                     def      1.732M (± 7.8%) i/s -      8.662M
           define_method    856.637k (± 6.6%) i/s -      4.268M
  11. @chrisseaton
  12. @chrisseaton
  13. @eregon
  14. @eregon
  15. @eregon
  16. @eregon
Commits on Oct 5, 2015
  1. @nirvdrum
  2. @nirvdrum
  3. @headius
  4. @eregon

    [Truffle] Check the length of the Hash while iterating.

    eregon authored
    * It could change if mutated while iterating.
    * Rubinius #each_item expects this check at least in #select!.
  5. @eregon
  6. @eregon
  7. @eregon
  8. @mkristian
  9. @headius

    Share evalType threadlocal between mixed mode and compiled block.

    headius authored
    Fixes #3368
    evalType gets tweaked at various stages of block execution, and
    when there were two copies in MixedModeIRBlockBody and its
    contained CompiledIRBlockBody, they weren't being set consistently
    in both places. This change makes them share the threadlocal and
    fixes the issues in #3368 leading to eval not scoping right.
    The root problem was that evalType is used to indicate that a
    given body is being used for an eval, which in this case meant it
    was being used for a class eval. Without the flag, the
    search for a method def scope would walk past the block
    and out into the containing class, defining methods in the wrong
    TODO: Clean up state like evalType and do a better job of unifying
    the different container objects for block bodies.
  10. @headius
  11. @headius

    Enum#values is a new array every time, so avoid it for Visibility.

    headius authored
    Several places used Visibility.values to get a list of all
    Visibilities, with the result that they created a new array every
    time. There may be other enums with the same usage but they have
    not shown up in my profiles.
  12. @mkristian

    make clean behave more as you expect it

    mkristian authored
    it does delete bin/jruby and lib/jni but will recreate them immediately. this
    allows to run ```mvn clean install``` and have everything in place in fresh manner.
  13. @mkristian

    add webapp integration test

    mkristian authored
    using either rackup, puma or torquebox as server and sinatra as
    web framework, running from filesystem as is. further using bundler
    and having plenty of jar dependencies both locked down (Gemfile.lock
    and Jars.lock)
  14. @eregon
  15. @eregon
  16. @eregon
  17. @eregon
Commits on Oct 4, 2015
  1. @pitr-ch
  2. @pitr-ch

    [Truffle] code formatting

    pitr-ch authored
Something went wrong with that request. Please try again.