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

Commits on Oct 21, 2014

  1. Copy the full SHA
    b8f9bcb View commit details
  2. Copy the full SHA
    d84dadb View commit details
Original file line number Diff line number Diff line change
@@ -146,7 +146,10 @@ protected void pre(InterpreterContext ic, ThreadContext context, IRubyObject sel
}

public InterpreterContext ensureInstrsReady() {
return method.prepareForInterpretation();
// Try unsync access first before calling more expensive method for getting IC
InterpreterContext ic = method.getInterpreterContext();

return ic == null ? method.prepareForInterpretation() : ic;
}

public DynamicMethod getMethodForCaching() {
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/interpreter/Interpreter.java
Original file line number Diff line number Diff line change
@@ -714,7 +714,7 @@ public static IRubyObject evalSimple(ThreadContext context, IRubyObject self, Ru
// this is ensured by the caller
assert file != null;

Ruby runtime = src.getRuntime();
Ruby runtime = context.runtime;

// no binding, just eval in "current" frame (caller's frame)
RubyString source = src.convertToString();
@@ -754,7 +754,7 @@ public static IRubyObject evalSimple(ThreadContext context, IRubyObject self, Ru
* @return An IRubyObject result from the evaluation
*/
public static IRubyObject evalWithBinding(ThreadContext context, IRubyObject self, IRubyObject src, Binding binding) {
Ruby runtime = src.getRuntime();
Ruby runtime = context.runtime;
DynamicScope evalScope;

// in 1.9, eval scopes are local to the binding