Package org.rascalmpl.interpreter.result.util

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


        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


        }
        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

Related Classes of org.rascalmpl.interpreter.result.util.MemoizationCache$CacheKeyWrapper

Copyright © 2018 www.massapicom. 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.