Commit 4c06ee4f authored by Kevin Modzelewski's avatar Kevin Modzelewski

Fix a grwl deadlock in the repl

Well not sure if it's a deadlock; I think we try to
re-entrantly acquire the codegen lock, which then
confuses it later?
parent abfb53a8
......@@ -240,6 +240,9 @@ CompiledFunction* compileFunction(CLFunction* f, FunctionSpecialization* spec, E
}
void compileAndRunModule(AST_Module* m, BoxedModule* bm) {
CompiledFunction* cf;
{ // scope for limiting the locked region:
LOCK_REGION(codegen_rwlock.asWrite());
Timer _t("for compileModule()");
......@@ -256,10 +259,9 @@ void compileAndRunModule(AST_Module* m, BoxedModule* bm) {
EffortLevel::EffortLevel effort = initialEffort();
CompiledFunction* cf = compileFunction(cl_f, new FunctionSpecialization(VOID), effort, NULL);
cf = compileFunction(cl_f, new FunctionSpecialization(VOID), effort, NULL);
assert(cf->clfunc->versions.size());
_t.end();
}
if (cf->is_interpreted)
interpretFunction(cf->func, 0, NULL, NULL, NULL, NULL, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment