[macruby-changes] [1201] MacRuby/branches/experimental/roxor.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Thu Mar 26 21:53:14 PDT 2009
Revision: 1201
http://trac.macosforge.org/projects/ruby/changeset/1201
Author: lsansonetti at apple.com
Date: 2009-03-26 21:53:14 -0700 (Thu, 26 Mar 2009)
Log Message:
-----------
let's not assert on a MASGN node part of the left side of a MASGN (it's not implemented yet, though)
Modified Paths:
--------------
MacRuby/branches/experimental/roxor.cpp
Modified: MacRuby/branches/experimental/roxor.cpp
===================================================================
--- MacRuby/branches/experimental/roxor.cpp 2009-03-27 04:23:34 UTC (rev 1200)
+++ MacRuby/branches/experimental/roxor.cpp 2009-03-27 04:53:14 UTC (rev 1201)
@@ -2541,7 +2541,8 @@
if (rhsnGetFunc == NULL) {
// VALUE rb_vm_rhsn_get(VALUE ary, int offset);
- rhsnGetFunc = cast<Function>(module->getOrInsertFunction("rb_vm_rhsn_get",
+ rhsnGetFunc = cast<Function>(module->getOrInsertFunction(
+ "rb_vm_rhsn_get",
RubyObjTy, RubyObjTy, Type::Int32Ty, NULL));
}
@@ -2553,7 +2554,8 @@
std::vector<Value *> params;
params.push_back(ary);
params.push_back(ConstantInt::get(Type::Int32Ty, i++));
- Value *elt = CallInst::Create(rhsnGetFunc, params.begin(), params.end(), "", bb);
+ Value *elt = CallInst::Create(rhsnGetFunc, params.begin(),
+ params.end(), "", bb);
switch (nd_type(ln)) {
case NODE_LASGN:
@@ -2574,8 +2576,16 @@
compile_attribute_assign(ln, elt);
break;
+ case NODE_MASGN:
+ // a,(*b),c = 1, 2, 3; b #=> [2]
+ // This is a strange case but covered by the
+ // RubySpecs.
+ // TODO
+ break;
+
default:
- compile_node_error("unimplemented MASGN subnode", ln);
+ compile_node_error("unimplemented MASGN subnode",
+ ln);
}
l = l->nd_next;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090326/e38fee0f/attachment.html>
More information about the macruby-changes
mailing list