Revision: 5271 http://trac.macosforge.org/projects/ruby/changeset/5271 Author: lsansonetti@apple.com Date: 2011-03-09 18:00:48 -0800 (Wed, 09 Mar 2011) Log Message: ----------- make sure the redefined_ops gvars are always read-write, as it was causing a problem in the dead code elimination pass under AOT compilation Modified Paths: -------------- MacRuby/trunk/vm.cpp Modified: MacRuby/trunk/vm.cpp =================================================================== --- MacRuby/trunk/vm.cpp 2011-03-10 02:00:13 UTC (rev 5270) +++ MacRuby/trunk/vm.cpp 2011-03-10 02:00:48 UTC (rev 5271) @@ -865,9 +865,11 @@ GlobalVariable *gvar = NULL; if (iter == redefined_ops_gvars.end()) { if (create) { + // TODO: if OPTZ_LEVEL is 3, force global variables to always be + // true and read-only. gvar = new GlobalVariable(*RoxorCompiler::module, Type::getInt8Ty(context), - ruby_aot_compile ? true : false, + false, GlobalValue::InternalLinkage, ConstantInt::get(Type::getInt8Ty(context), 0), "");
participants (1)
-
source_changes@macosforge.org