+inline Recompiler::~Recompiler()
+{
+ // Call sourceParsed() after reparsing all functions because it will execute
+ // JavaScript in the inspector.
+ SourceProviderMap::const_iterator end = m_sourceProviders.end();
+ for (SourceProviderMap::const_iterator iter = m_sourceProviders.begin(); iter != end; ++iter)
+ m_debugger->sourceParsed(iter->value, iter->key, -1, String());
+}
+
+inline void Recompiler::operator()(JSCell* cell)
+{
+ if (!cell->inherits(&JSFunction::s_info))
+ return;
+
+ JSFunction* function = jsCast<JSFunction*>(cell);
+ if (function->executable()->isHostFunction())
+ return;
+
+ FunctionExecutable* executable = function->jsExecutable();
+
+ // Check if the function is already in the set - if so,
+ // we've already retranslated it, nothing to do here.
+ if (!m_functionExecutables.add(executable).isNewEntry)
+ return;
+
+ ExecState* exec = function->scope()->globalObject()->JSGlobalObject::globalExec();
+ executable->clearCodeIfNotCompiling();
+ executable->clearUnlinkedCodeForRecompilationIfNotCompiling();
+ if (m_debugger == function->scope()->globalObject()->debugger())
+ m_sourceProviders.add(executable->source().provider(), exec);
+}
+
+} // namespace
+
+namespace JSC {
+