Add MC-based code generation support (experimental)
This feature is disabled by default. To enable it, please
open Config.h and change USE_MCJIT from 0 to 1.
diff --git a/lib/ExecutionEngine/ScriptCompiled.cpp b/lib/ExecutionEngine/ScriptCompiled.cpp
index d38b447..189f94a 100644
--- a/lib/ExecutionEngine/ScriptCompiled.cpp
+++ b/lib/ExecutionEngine/ScriptCompiled.cpp
@@ -90,8 +90,16 @@
void *ScriptCompiled::lookup(const char *name) {
+#if USE_OLD_JIT
FuncInfoMap::const_iterator I = mEmittedFunctions.find(name);
return (I == mEmittedFunctions.end()) ? NULL : I->second->addr;
+#endif
+
+#if USE_MCJIT
+ return mCompiler.getSymbolAddress(name);
+#endif
+
+ return NULL;
}