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: 967477f1c60e
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 20dbbeaed602
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Oct 8, 2014

  1. Fix bug in LVA when running on closures directly.

    * LVA usually runs on method scopes and in that context, runs on
      all scopes nested in it.
    
    * But, 2689915 relaxed the constraint of running LVA on method
      scopes only as part of the series of commits to do more aggressive
      opts on blocks.
    
    * This patch fixes a bug in LVA when LVA runs on a closure directly
      after its dynscope has been eliminated.
    
    * We can now reorder DeadCodeElimination and OptimizeDynScopesPass
      in IRScope:optimizeSimpleScopes without crashing.
    subbuss committed Oct 8, 2014
    Copy the full SHA
    d0f5815 View commit details
  2. Copy the full SHA
    4217d94 View commit details
  3. Copy the full SHA
    20dbbea View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −1 core/src/main/java/org/jruby/ir/passes/LiveVariableAnalysis.java
  2. +0 −1 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

import org.jruby.ir.IRClosure;
import org.jruby.ir.IREvalScript;
import org.jruby.ir.IRFlags;
import org.jruby.ir.IRScope;
import org.jruby.ir.instructions.ClosureAcceptingInstr;
import org.jruby.ir.instructions.Instr;
@@ -81,7 +82,7 @@ public Object execute(IRScope scope, Object... data) {
// conservatively assume that any dirtied variables that
// belong to an outer scope are live on exit.
Set<LocalVariable> nlVars = new HashSet<LocalVariable>();
collectNonLocalDirtyVars((IRClosure)scope, nlVars, 0);
collectNonLocalDirtyVars((IRClosure)scope, nlVars, scope.getFlags().contains(IRFlags.DYNSCOPE_ELIMINATED) ? -1 : 0);

// Init DF vars from this set
for (Variable v: nlVars) {
1 change: 0 additions & 1 deletion core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Original file line number Diff line number Diff line change
@@ -143,7 +143,6 @@ private void logScope(IRScope scope) {
public void emitScope(IRScope scope, String name, Signature signature) {
List <BasicBlock> bbs;
if (prepare) {
scope.prepareForInterpretation(false);
bbs = scope.prepareForCompilation();
} else {
bbs = scope.buildLinearization();