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

Commits on Jan 5, 2016

  1. [Truffle] \n -> %n

    chrisseaton committed Jan 5, 2016
    Copy the full SHA
    d907dda View commit details
  2. Copy the full SHA
    baa2415 View commit details
  3. Copy the full SHA
    ac35b66 View commit details
Original file line number Diff line number Diff line change
@@ -32,4 +32,8 @@ public Method getMethod() {
public SourceSection getSourceSection() {
return sourceSection;
}

public List<CallSiteVersion> getVersions() {
return versions;
}
}
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ public class CallSiteVersion {

public CallSiteVersion(CallSite callSite) {
this.callSite = callSite;
callSite.getVersions().add(this);
}

public CallSite getCallSite() {
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ private void write(Method method) {
endLine = sourceSection.getEndLine();
}

stream.printf("method %d %s %s %d %d\n",
stream.printf("method %d %s %s %d %d%n",
ids.getId(method),
sharedInfo.getName(),
sourceName,
@@ -73,7 +73,7 @@ private void write(Method method) {
}

private void write(MethodVersion version) {
stream.printf("method-version %d %d\n",
stream.printf("method-version %d %d%n",
ids.getId(version.getMethod()),
ids.getId(version));

@@ -82,22 +82,22 @@ private void write(MethodVersion version) {
}

for (FrameSlot slot : version.getRootNode().getFrameDescriptor().getSlots()) {
stream.printf("local %d %s %s\n",
stream.printf("local %d %s %s%n",
ids.getId(version),
slot.getIdentifier(),
slot.getKind());
}
}

private void write(CallSite callSite) {
stream.printf("callsite %d %d %d\n",
stream.printf("callsite %d %d %d%n",
ids.getId(callSite.getMethod()),
ids.getId(callSite),
callSite.getSourceSection().getStartLine());
}

private void write(CallSiteVersion version) {
stream.printf("callsite-version %d %d\n",
stream.printf("callsite-version %d %d%n",
ids.getId(version.getCallSite()),
ids.getId(version));

@@ -108,15 +108,15 @@ private void write(CallSiteVersion version) {

private void write(CallSiteVersion callSiteVersion, Calls calls) {
if (calls instanceof CallsMegamorphic) {
stream.printf("calls %d mega\n",
stream.printf("calls %d mega%n",
ids.getId(callSiteVersion));
} else if (calls instanceof CallsForeign) {
stream.printf("calls %d foreign\n",
stream.printf("calls %d foreign%n",
ids.getId(callSiteVersion));
} else {
final CallsMethod callsMethod = (CallsMethod) calls;

stream.printf("calls %d %d\n",
stream.printf("calls %d %d%n",
ids.getId(callSiteVersion),
ids.getId(callsMethod.getMethodVersion()));
}
Original file line number Diff line number Diff line change
@@ -661,9 +661,9 @@ public void shutdown() {
callGraph.resolve();

if (options.CALL_GRAPH_WRITE != null) {
try (PrintStream stream = new PrintStream(options.CALL_GRAPH_WRITE)) {
try (PrintStream stream = new PrintStream(options.CALL_GRAPH_WRITE, StandardCharsets.UTF_8.name())) {
new SimpleWriter(callGraph, stream).write();
} catch (FileNotFoundException e) {
} catch (FileNotFoundException | UnsupportedEncodingException e) {
e.printStackTrace();
}
}