[macruby-changes] [2600] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Sep 21 21:19:55 PDT 2009


Revision: 2600
          http://trac.macosforge.org/projects/ruby/changeset/2600
Author:   lsansonetti at apple.com
Date:     2009-09-21 21:19:55 -0700 (Mon, 21 Sep 2009)
Log Message:
-----------
fixed a bug in the AOT compilation of undef

Modified Paths:
--------------
    MacRuby/trunk/compiler.cpp
    MacRuby/trunk/vm.cpp

Modified: MacRuby/trunk/compiler.cpp
===================================================================
--- MacRuby/trunk/compiler.cpp	2009-09-22 02:16:43 UTC (rev 2599)
+++ MacRuby/trunk/compiler.cpp	2009-09-22 04:19:55 UTC (rev 2600)
@@ -4482,11 +4482,13 @@
 		}
 
 		assert(node->u2.node != NULL);
-		ID name = node->u2.node->u1.id;
+		VALUE name = node->u2.node->nd_lit;
+		assert(TYPE(name) == T_SYMBOL);
+		ID name_id = SYM2ID(name);
 
 		std::vector<Value *> params;
 		params.push_back(compile_current_class());
-		params.push_back(compile_id(name));
+		params.push_back(compile_id(name_id));
 		params.push_back(ConstantInt::get(Type::Int8Ty,
 			    dynamic_class ? 1 : 0));
 

Modified: MacRuby/trunk/vm.cpp
===================================================================
--- MacRuby/trunk/vm.cpp	2009-09-22 02:16:43 UTC (rev 2599)
+++ MacRuby/trunk/vm.cpp	2009-09-22 04:19:55 UTC (rev 2600)
@@ -1306,7 +1306,7 @@
 
 extern "C"
 void
-rb_vm_undef(VALUE klass, VALUE name, unsigned char dynamic_class)
+rb_vm_undef(VALUE klass, ID name, unsigned char dynamic_class)
 {
     if (dynamic_class) {
 	Class k = GET_VM()->get_current_class();
@@ -1314,7 +1314,7 @@
 	    klass = (VALUE)k;
 	}
     }
-    rb_vm_undef_method((Class)klass, rb_to_id(name), true);
+    rb_vm_undef_method((Class)klass, name, true);
 }
 
 extern "C"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090921/f3031307/attachment.html>


More information about the macruby-changes mailing list