Examples of MemoizationCache


Examples of org.rascalmpl.interpreter.result.util.MemoizationCache

        return name;
    }

    protected Result<IValue> getMemoizedResult(IValue[] argValues, Map<String, IValue> keyArgValues) {
        if (hasMemoization()) {
            MemoizationCache memoizationActual = getMemoizationCache(false);
            if (memoizationActual == null) {
                return null;
            }
            return memoizationActual.getStoredResult(argValues, keyArgValues);
        }
        return null;
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.result.util.MemoizationCache

        }
        return null;
    }

    private MemoizationCache getMemoizationCache(boolean returnFresh) {
        MemoizationCache result = null;
        if (memoization == null) {
            result = new MemoizationCache();
            memoization = new SoftReference<>(result);
            return returnFresh ? result : null;

        }
        result = memoization.get();
        if (result == null ) {
            result = new MemoizationCache();
            memoization = new SoftReference<>(result);
            return returnFresh ? result : null;
        }
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.