[macruby-changes] [920] MacRuby/branches/experimental/roxor.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Sat Mar 14 03:12:47 PDT 2009
Revision: 920
http://trac.macosforge.org/projects/ruby/changeset/920
Author: vincent.isambart at gmail.com
Date: 2009-03-14 03:12:46 -0700 (Sat, 14 Mar 2009)
Log Message:
-----------
fixed a bug in the dispatch of opt args
Modified Paths:
--------------
MacRuby/branches/experimental/roxor.cpp
Modified: MacRuby/branches/experimental/roxor.cpp
===================================================================
--- MacRuby/branches/experimental/roxor.cpp 2009-03-14 08:00:47 UTC (rev 919)
+++ MacRuby/branches/experimental/roxor.cpp 2009-03-14 10:12:46 UTC (rev 920)
@@ -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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090314/c270c292/attachment.html>
More information about the macruby-changes
mailing list