[macruby-changes] [1541] MacRuby/branches/experimental/roxor.cpp

source_changes at macosforge.org source_changes at macosforge.org
Tue May 5 20:14:23 PDT 2009


Revision: 1541
          http://trac.macosforge.org/projects/ruby/changeset/1541
Author:   vincent.isambart at gmail.com
Date:     2009-05-05 20:14:22 -0700 (Tue, 05 May 2009)
Log Message:
-----------
we do not need to save lvars

Modified Paths:
--------------
    MacRuby/branches/experimental/roxor.cpp

Modified: MacRuby/branches/experimental/roxor.cpp
===================================================================
--- MacRuby/branches/experimental/roxor.cpp	2009-05-06 03:07:51 UTC (rev 1540)
+++ MacRuby/branches/experimental/roxor.cpp	2009-05-06 03:14:22 UTC (rev 1541)
@@ -5983,6 +5983,7 @@
 RoxorCompiler::compile_lvars(ID *tbl)
 {
     int lvar_count = (int)tbl[0];
+    int has_real_lvars = false;
     for (int i = 0; i < lvar_count; i++) {
 	ID id = tbl[i + 1];
 	if (lvars.find(id) != lvars.end()) {
@@ -5995,9 +5996,10 @@
 	    Value *store = new AllocaInst(RubyObjTy, "", bb);
 	    new StoreInst(nilVal, store, bb);
 	    lvars[id] = store;
+	    has_real_lvars = true;
 	}
     }
-    return lvar_count > 0;
+    return has_real_lvars;
 }
 
 Value *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090505/9a710812/attachment-0001.html>


More information about the macruby-changes mailing list