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

Commits on Feb 10, 2017

  1. Copy the full SHA
    ae9cff9 View commit details
  2. Fixed #2161. Hash inspection not working as in MRI for sprintf %p.

    Fixed specs:
    -String#% when format string contains %<> formats should raise ArgumentError if no hash given
    -String#% pads with spaces for %E with Inf, -Inf, and NaN
    
    This also fixes a whole class of errors with mixed argument usage but it is
    foggy enough where it did not lead to any obvious specs.
    enebo committed Feb 10, 2017
    Copy the full SHA
    86a1058 View commit details
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/IRScope.java
Original file line number Diff line number Diff line change
@@ -503,13 +503,13 @@ private void runCompilerPasses(List<CompilerPass> passes, IGVDumper dumper) {
CompilerPassScheduler scheduler = IRManager.schedulePasses(passes);
for (CompilerPass pass : scheduler) {
pass.run(this);
if (dumper != null) dumper.dump(getCFG(), pass.getLabel());
if (dumper != null) dumper.dump(getCFG(), pass.getShortLabel());
}

if (RubyInstanceConfig.IR_UNBOXING) {
CompilerPass pass = new UnboxingPass();
pass.run(this);
if (dumper != null) dumper.dump(getCFG(), pass.getLabel());
if (dumper != null) dumper.dump(getCFG(), pass.getShortLabel());
}

if (dumper != null) dumper.close();
Original file line number Diff line number Diff line change
@@ -20,6 +20,11 @@ public String getLabel() {
return "Add Call Protocol Instructions (push/pop of dyn-scope, frame, impl-class values)";
}

@Override
public String getShortLabel() {
return "Add Call Proto";
}

private boolean explicitCallProtocolSupported(IRScope scope) {
return scope instanceof IRMethod
|| (scope instanceof IRClosure && !(scope instanceof IREvalScript))
Original file line number Diff line number Diff line change
@@ -20,6 +20,11 @@ public String getLabel() {
return "Add Local Variable Load/Store Instructions";
}

@Override
public String getShortLabel() {
return "Add LVar L/S";
}

public static List<Class<? extends CompilerPass>> DEPENDENCIES = Arrays.<Class<? extends CompilerPass>>asList(LiveVariableAnalysis.class);

@Override
Original file line number Diff line number Diff line change
@@ -14,7 +14,12 @@
public class AddMissingInitsPass extends CompilerPass {
@Override
public String getLabel() {
return "AddMissingInitsPass";
return "Add Missing Initialization";
}

@Override
public String getShortLabel() {
return "Add Missing Init.";
}

@Override
7 changes: 7 additions & 0 deletions core/src/main/java/org/jruby/ir/passes/CompilerPass.java
Original file line number Diff line number Diff line change
@@ -36,6 +36,13 @@ public abstract class CompilerPass {
*/
public abstract String getLabel();

/**
* Shorter label
*/
public String getShortLabel() {
return getLabel();
}

@Override
public int hashCode() {
return getLabel().hashCode();
Original file line number Diff line number Diff line change
@@ -13,6 +13,11 @@ public String getLabel() {
return "Dead Code Elimination";
}

@Override
public String getShortLabel() {
return "DCE";
}

@Override
public List<Class<? extends CompilerPass>> getDependencies() {
return DEPENDENCIES;
Original file line number Diff line number Diff line change
@@ -17,6 +17,11 @@ public String getLabel() {
return "Local Optimizations";
}

@Override
public String getShortLabel() {
return "Local Opts";
}

@Override
public Object execute(IRScope s, Object... data) {
for (BasicBlock b: s.getCFG().getBasicBlocks()) {
Original file line number Diff line number Diff line change
@@ -19,6 +19,11 @@ public String getLabel() {
return "Delegated Variable Removal";
}

@Override
public String getShortLabel() {
return "Opt Delegation";
}

@Override
public Object execute(IRScope s, Object... data) {
EnumSet<IRFlags> flags = s.getExecutionContext().getFlags();
Original file line number Diff line number Diff line change
@@ -22,6 +22,11 @@ public String getLabel() {
return "Optimize Dynamic Scopes";
}

@Override
public String getShortLabel() {
return "Opt Dyn Scopes";
}

private void setupLocalVarReplacement(LocalVariable v, IRScope s, Map<Operand, Operand> varRenameMap) {
if (varRenameMap.get(v) == null) varRenameMap.put(v, s.getNewTemporaryVariableFor(v));
}
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ public void CFG(CFG cfg, String name) {
endTag(writer, "nodes");

startTag(writer, "edges");

for (Tuple<Integer, Integer> edge: instrEdges) {
emptyTag(writer, "edge", "from", edge.a, "to", edge.b);
}
212 changes: 140 additions & 72 deletions core/src/main/java/org/jruby/util/Sprintf.java

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions spec/tags/ruby/core/string/modulo_tags.txt

This file was deleted.