changeset 1241:fc579f389f9a

!ClassInfo instances were not mutable, this is necessary for .classinfo based locking to work. !ModuleInfo generation was commented out as well.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Fri, 17 Apr 2009 00:54:20 +0200
parents f295e51d2dd0
children f1877b6be63d
files gen/toobj.cpp ir/irclass.cpp
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gen/toobj.cpp	Fri Apr 17 00:36:21 2009 +0200
+++ b/gen/toobj.cpp	Fri Apr 17 00:54:20 2009 +0200
@@ -146,7 +146,7 @@
     sir->emitFunctionBodies();
 
     // generate ModuleInfo
-    //genmoduleinfo();
+    genmoduleinfo();
 
     // emit usedArray
     if (!ir.usedArray.empty())
--- a/ir/irclass.cpp	Fri Apr 17 00:36:21 2009 +0200
+++ b/ir/irclass.cpp	Fri Apr 17 00:54:20 2009 +0200
@@ -66,8 +66,9 @@
     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;
 }