- RefPtr<EvalExecutable> evalExecutable;
-
- if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject())
- evalExecutable = m_cacheMap.get(evalSource.rep());
-
- if (!evalExecutable) {
- evalExecutable = EvalExecutable::create(exec, makeSource(evalSource));
- exceptionValue = evalExecutable->compile(exec, scopeChain);
- if (exceptionValue)
- return 0;
+ if (!inStrictContext && evalSource.length() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject())
+ return m_cacheMap.get(evalSource.impl()).get();
+ return 0;
+ }
+
+ EvalExecutable* getSlow(ExecState* exec, ScriptExecutable* owner, bool inStrictContext, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue)
+ {
+ EvalExecutable* evalExecutable = EvalExecutable::create(exec, makeSource(evalSource), inStrictContext);
+ exceptionValue = evalExecutable->compile(exec, scopeChain);
+ if (exceptionValue)
+ return 0;
+
+ if (!inStrictContext && evalSource.length() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries)
+ m_cacheMap.set(evalSource.impl(), WriteBarrier<EvalExecutable>(exec->globalData(), owner, evalExecutable));
+
+ return evalExecutable;
+ }
+
+ EvalExecutable* get(ExecState* exec, ScriptExecutable* owner, bool inStrictContext, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue)
+ {
+ EvalExecutable* evalExecutable = tryGet(inStrictContext, evalSource, scopeChain);