Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ir.runtime;
 
 
 
 public class IRBreakJump extends RuntimeException {
    public int scopeIdToReturnTo;
    public IRubyObject breakValue;
    public boolean caughtByLambda;
    public boolean breakInEval;
    private IRBreakJump() {}
    // See https://jira.codehaus.org/browse/JRUBY-6523
    // Dont use static threadlocals because they leak classloaders.
    // Instead, use soft/weak references so that GC can collect these.
    public static IRBreakJump create(int scopeIdToReturnToIRubyObject rv) {
        IRBreakJump bj;
        Reference<IRBreakJumpbjRef = .get();
        if (bjRef != null) {
            bj = bjRef.get();
        } else {
            bj = new IRBreakJump();
            .set(new SoftReference<IRBreakJump>(bj));
        }
        bj.scopeIdToReturnTo = scopeIdToReturnTo;
        bj.breakValue = rv;
        bj.caughtByLambda = false;
        bj.breakInEval = false;
        return bj;
    }
New to GrepCode? Check out our FAQ X