- RefPtr<EvalNode> evalNode;
-
- if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject())
- evalNode = m_cacheMap.get(evalSource.rep());
-
- if (!evalNode) {
- int errorLine;
- UString errorMessage;
-
- SourceCode source = makeSource(evalSource);
- evalNode = exec->globalData().parser->parse<EvalNode>(exec, exec->dynamicGlobalObject()->debugger(), source, &errorLine, &errorMessage);
- if (evalNode) {
- if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries)
- m_cacheMap.set(evalSource.rep(), evalNode);
- } else {
- exceptionValue = Error::create(exec, SyntaxError, errorMessage, errorLine, source.provider()->asID(), 0);
- return 0;
- }
- }
+ if (!inStrictContext && evalSource.length() < Options::maximumEvalCacheableSourceLength() && scope->begin()->isVariableObject())
+ return m_cacheMap.get(evalSource.impl()).get();
+ return 0;
+ }
+
+ EvalExecutable* getSlow(ExecState* exec, ScriptExecutable* owner, bool inStrictContext, ThisTDZMode thisTDZMode, const String& evalSource, JSScope* scope)
+ {
+ EvalExecutable* evalExecutable = EvalExecutable::create(exec, makeSource(evalSource), inStrictContext, thisTDZMode);
+ if (!evalExecutable)
+ return 0;