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

Commits on Jul 6, 2016

  1. Copy the full SHA
    9d10f39 View commit details
  2. Copy the full SHA
    6902d10 View commit details
11 changes: 1 addition & 10 deletions core/src/main/java/org/jruby/anno/AnnotationBinder.java
Original file line number Diff line number Diff line change
@@ -193,16 +193,7 @@ public void processType(TypeElement cd) {
// check for frame field reads or writes
boolean frame = false;
boolean scope = false;
if (anno.frame()) {
if (DEBUG)
System.out.println("Method has frame = true: " + methodDescs.get(0).getEnclosingElement() + ":" + methodDescs);
frame = true;
}
if (anno.scope()) {
if (DEBUG)
System.out.println("Method has frame = true: " + methodDescs.get(0).getEnclosingElement() + ":" + methodDescs);
scope = true;
}

for (FrameField field : anno.reads()) {
frame |= field.needsFrame();
scope |= field.needsScope();
14 changes: 14 additions & 0 deletions core/src/main/java/org/jruby/compiler/JITCompiler.java
Original file line number Diff line number Diff line change
@@ -42,6 +42,7 @@
import org.jruby.ir.targets.JVMVisitor;
import org.jruby.ir.targets.JVMVisitorMethodContext;
import org.jruby.runtime.CompiledIRBlockBody;
import org.jruby.runtime.MethodIndex;
import org.jruby.runtime.MixedModeIRBlockBody;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;
@@ -59,6 +60,7 @@
import java.lang.invoke.MethodType;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Locale;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
@@ -141,6 +143,18 @@ public long getLargestCodeSize() {
return counts.largestCodeSize.get();
}

public String[] frameAwareMethods() {
String[] frameAwareMethods = MethodIndex.FRAME_AWARE_METHODS.toArray(new String[0]);
Arrays.sort(frameAwareMethods);
return frameAwareMethods;
}

public String[] scopeAwareMethods() {
String[] scopeAwareMethods = MethodIndex.SCOPE_AWARE_METHODS.toArray(new String[0]);
Arrays.sort(scopeAwareMethods);
return scopeAwareMethods;
}

public void tearDown() {
try {
executor.shutdown();
2 changes: 2 additions & 0 deletions core/src/main/java/org/jruby/compiler/JITCompilerMBean.java
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ public interface JITCompilerMBean {
public long getAverageCodeSize();
public long getAverageCompileTime();
public long getLargestCodeSize();
public String[] frameAwareMethods();
public String[] scopeAwareMethods();
}