Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ir.runtime;
 
 
 
 public class IRReturnJump extends RuntimeException implements Unrescuable {
    public IRMethod methodToReturnFrom;
    public Object returnValue;
    private IRReturnJump() {}
    // 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 IRReturnJump create(IRMethod mObject rv) {
        IRReturnJump rj;
        Reference<IRReturnJumprjRef = .get();
        if (rjRef != null) {
            rj = rjRef.get();
        } else {
            rj = new IRReturnJump();
            .set(new SoftReference<IRReturnJump>(rj));
        }
        rj.methodToReturnFrom = m;
        rj.returnValue = rv;
        return rj;
    }
New to GrepCode? Check out our FAQ X