Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3b3bea1b9352
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 04c3e9787bcc
Choose a head ref

Commits on Oct 5, 2015

  1. add webapp integration test

    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)
    mkristian committed Oct 5, 2015
    Copy the full SHA
    09d15b9 View commit details
  2. make clean behave more as you expect it

    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.
    mkristian committed Oct 5, 2015
    Copy the full SHA
    b799bff View commit details
  3. Enum#values is a new array every time, so avoid it for Visibility.

    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.
    headius committed Oct 5, 2015
    Copy the full SHA
    b33d760 View commit details
  4. Copy the full SHA
    52ab58d View commit details
  5. Share evalType threadlocal between mixed mode and compiled block.

    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.new class eval. Without the flag, the
    search for a method def scope would walk past the Class.new block
    and out into the containing class, defining methods in the wrong
    place.
    
    TODO: Clean up state like evalType and do a better job of unifying
    the different container objects for block bodies.
    headius committed Oct 5, 2015
    Copy the full SHA
    e9d5c94 View commit details
  6. Copy the full SHA
    a9cc1b7 View commit details
  7. Copy the full SHA
    eef0e41 View commit details
  8. Copy the full SHA
    d223041 View commit details
  9. Copy the full SHA
    7103905 View commit details
  10. [Truffle] Check the length of the Hash while iterating.

    * It could change if mutated while iterating.
    * Rubinius #each_item expects this check at least in #select!.
    eregon committed Oct 5, 2015
    Copy the full SHA
    ecb7abd View commit details
  11. Copy the full SHA
    82db605 View commit details
  12. 5
    Copy the full SHA
    7a19cab View commit details
  13. 2
    Copy the full SHA
    9a4bf4f View commit details

Commits on Oct 6, 2015

  1. Copy the full SHA
    7292d31 View commit details
  2. Copy the full SHA
    50ce6bf View commit details
  3. Copy the full SHA
    39d6355 View commit details
  4. Copy the full SHA
    813a0cd View commit details
  5. Copy the full SHA
    bbfadac View commit details
  6. 7
    Copy the full SHA
    dffe5aa View commit details
  7. Copy the full SHA
    63fb366 View commit details
  8. Copy the full SHA
    f2020e0 View commit details
  9. TL;DR define_method defined methods will execute ~2x faster in common…

    … 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.
    
    Before:
    
    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
    
    After:
    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
    
    MRI:
    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
    enebo committed Oct 6, 2015
    Copy the full SHA
    3c3055d View commit details
  10. Copy the full SHA
    1176a10 View commit details
  11. Copy the full SHA
    e5e7eb9 View commit details
  12. Copy the full SHA
    8c52582 View commit details
  13. Copy the full SHA
    43278c6 View commit details
  14. Copy the full SHA
    04c3e97 View commit details
Loading