[macruby-changes] [922] MacRuby/branches/experimental

source_changes at macosforge.org source_changes at macosforge.org
Sat Mar 14 16:54:01 PDT 2009


Revision: 922
          http://trac.macosforge.org/projects/ruby/changeset/922
Author:   vincent.isambart at gmail.com
Date:     2009-03-14 16:54:00 -0700 (Sat, 14 Mar 2009)
Log Message:
-----------
brought back the Qundef code I reverted and added a new failing test
in fact it seems the Qundef code was working fine
but some GC bug or something similar made unrelated tests fail
and so I thought I had introduced new bugs I did not

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

Modified: MacRuby/branches/experimental/roxor.cpp
===================================================================
--- MacRuby/branches/experimental/roxor.cpp	2009-03-14 10:22:19 UTC (rev 921)
+++ MacRuby/branches/experimental/roxor.cpp	2009-03-14 23:54:00 UTC (rev 922)
@@ -253,6 +253,7 @@
 	Constant *nilVal;
 	Constant *trueVal;
 	Constant *falseVal;
+	Constant *undefVal;
 	Constant *splatArgFollowsVal;
 	const Type *RubyObjTy; 
 	const Type *RubyObjPtrTy; 
@@ -571,6 +572,7 @@
     nilVal = ConstantInt::get(RubyObjTy, Qnil);
     trueVal = ConstantInt::get(RubyObjTy, Qtrue);
     falseVal = ConstantInt::get(RubyObjTy, Qfalse);
+    undefVal = ConstantInt::get(RubyObjTy, Qundef);
     splatArgFollowsVal = ConstantInt::get(RubyObjTy, SPLAT_ARG_FOLLOWS);
     PtrTy = PointerType::getUnqual(Type::Int8Ty);
 
@@ -733,7 +735,7 @@
     do {
 	assert(node->nd_value != NULL);
 
-	Value *isNilInst = new ICmpInst(ICmpInst::ICMP_EQ, iter, nilVal, "", bb);
+	Value *isNilInst = new ICmpInst(ICmpInst::ICMP_EQ, iter, undefVal, "", bb);
 
 	Function *f = bb->getParent();
 	BasicBlock *arg_nil = BasicBlock::Create("arg_nil", f);
@@ -4148,7 +4150,7 @@
 		new_argv[i] = argv[i];
 	    }
 	    else {
-		new_argv[i] = Qnil;
+		new_argv[i] = Qundef;
 	    }
 	}
 	return __rb_vm_rcall(self, node, pimp, -arity, -arity, new_argv);

Modified: MacRuby/branches/experimental/test_roxor.rb
===================================================================
--- MacRuby/branches/experimental/test_roxor.rb	2009-03-14 10:22:19 UTC (rev 921)
+++ MacRuby/branches/experimental/test_roxor.rb	2009-03-14 23:54:00 UTC (rev 922)
@@ -599,6 +599,7 @@
     p f(1, 2, 3, 4, 5, 6)
     p f(1, 2, 3, 4, 5, 6, 7)    
   }
+  assert "42", "def f((a, b)); a end; p f([42, 53])"
 end
 
 test "blocks" do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090314/11c8fe3d/attachment.html>


More information about the macruby-changes mailing list