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

Commits on Nov 11, 2016

  1. Copy the full SHA
    1c124a7 View commit details
  2. Copy the full SHA
    da7cc9c View commit details
  3. Copy the full SHA
    77759b5 View commit details
6 changes: 6 additions & 0 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -461,6 +461,7 @@ def help
--server run an instrumentation server on port 8080
--igv make sure IGV is running and dump Graal graphs after partial escape (implies --graal)
--full show all phases, not just up to the Truffle partial escape
--infopoints show source location for each node in IGV
--fg disable background compilation
--trace show compilation information on stdout
--jdebug run a JDWP debug server on #{JDEBUG_PORT}
@@ -648,6 +649,11 @@ def run(*args)
jruby_args << "-J-Dgraal.PrintBackendCFG=false"
end

if args.delete('--infopoints')
jruby_args << "-J-XX:+UnlockDiagnosticVMOptions" << "-J-XX:+DebugNonSafepoints"
jruby_args << "-J-Dgraal.TruffleEnableInfopoints=true"
end

if args.delete('--fg')
jruby_args << "-J-Dgraal.TruffleBackgroundCompilation=false"
end
Original file line number Diff line number Diff line change
@@ -630,8 +630,16 @@ public Object equal(VirtualFrame frame, Object a, Object b) {
public abstract static class CompareNode extends CoreMethodArrayArgumentsNode {

@Specialization
public int compare(int a, int b) {
return Integer.compare(a, b);
public int compare(int a, int b,
@Cached("createBinaryProfile()") ConditionProfile smallerProfile,
@Cached("createBinaryProfile()") ConditionProfile equalProfile) {
if (smallerProfile.profile(a < b)) {
return -1;
} else if (equalProfile.profile(a == b)) {
return 0;
} else {
return +1;
}
}

@Specialization(guards = "isRubyBignum(b)")
@@ -640,8 +648,16 @@ public int compare(int a, DynamicObject b) {
}

@Specialization
public int compare(long a, long b) {
return Long.compare(a, b);
public int compare(long a, long b,
@Cached("createBinaryProfile()") ConditionProfile smallerProfile,
@Cached("createBinaryProfile()") ConditionProfile equalProfile) {
if (smallerProfile.profile(a < b)) {
return -1;
} else if (equalProfile.profile(a == b)) {
return 0;
} else {
return +1;
}
}

@Specialization
Original file line number Diff line number Diff line change
@@ -106,23 +106,14 @@ public SharedMethodInfo withName(String newName) {

@Override
public String toString() {
final String prefix;
if (isBlock) {
prefix = "block in ";
} else {
prefix = "";
}

final String suffix;
if (sourceSection == null) {
suffix = name;
return name;
} else if (!sourceSection.isAvailable()) {
suffix = String.format("%s %s", name, sourceSection.getSource().getName());
return String.format("%s %s", name, sourceSection.getSource().getName());
} else {
suffix = String.format("%s %s:%d", name, sourceSection.getSource().getName(), sourceSection.getStartLine());
return String.format("%s %s:%d", name, sourceSection.getSource().getName(), sourceSection.getStartLine());
}

return prefix + suffix;
}

}