From c7936c2ace40d7d395b1d7ca40919fa7929af919 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Fri, 17 Apr 2009 00:54:20 +0200 Subject: [PATCH] !ClassInfo instances were not mutable, this is necessary for .classinfo based locking to work. !ModuleInfo generation was commented out as well. --- gen/toobj.cpp | 2 +- ir/irclass.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gen/toobj.cpp b/gen/toobj.cpp index a479a5c3..886573f5 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -146,7 +146,7 @@ llvm::Module* Module::genLLVMModule(Ir* sir) sir->emitFunctionBodies(); // generate ModuleInfo - //genmoduleinfo(); + genmoduleinfo(); // emit usedArray if (!ir.usedArray.empty()) diff --git a/ir/irclass.cpp b/ir/irclass.cpp index 7ec4690b..15661639 100644 --- a/ir/irclass.cpp +++ b/ir/irclass.cpp @@ -66,8 +66,9 @@ LLGlobalVariable * IrStruct::getClassInfoSymbol() IrTypeClass* tc = cinfo->type->irtype->isClass(); assert(tc && "invalid ClassInfo type"); + // classinfos cannot be constants since they're used a locks for synchronized classInfo = new llvm::GlobalVariable( - tc->getPA().get(), true, _linkage, NULL, initname, gIR->module); + tc->getPA().get(), false, _linkage, NULL, initname, gIR->module); return classInfo; }