[macruby-changes] [1627] MacRuby/branches/experimental/compiler.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 28 16:15:54 PDT 2009
Revision: 1627
http://trac.macosforge.org/projects/ruby/changeset/1627
Author: lsansonetti at apple.com
Date: 2009-05-28 16:15:53 -0700 (Thu, 28 May 2009)
Log Message:
-----------
misc bug fix
Modified Paths:
--------------
MacRuby/branches/experimental/compiler.cpp
Modified: MacRuby/branches/experimental/compiler.cpp
===================================================================
--- MacRuby/branches/experimental/compiler.cpp 2009-05-28 22:19:48 UTC (rev 1626)
+++ MacRuby/branches/experimental/compiler.cpp 2009-05-28 23:15:53 UTC (rev 1627)
@@ -5256,8 +5256,10 @@
bb = BasicBlock::Create("EntryBlock", f);
Value *sret = NULL;
+ int sret_i = 0;
if (f_sret_type != NULL) {
sret = arg++;
+ sret_i = 1;
f->addAttribute(0, Attribute::StructRet);
}
for (std::vector<unsigned int>::iterator iter = byval_args.begin();
@@ -5272,12 +5274,12 @@
// Convert every incoming argument into Ruby type.
for (unsigned int i = 0; i < ruby_func->arg_size() - 2; i++) {
Value *a = arg++;
- if (std::find(byval_args.begin(), byval_args.end(), i + 3)
+ if (std::find(byval_args.begin(), byval_args.end(), i + 3 + sret_i)
!= byval_args.end()) {
a = new LoadInst(a, "", bb);
}
Value *ruby_arg = compile_conversion_to_ruby(arg_types[i].c_str(),
- f_types[i + 2], a);
+ f_types[i + 2 + sret_i], a);
params.push_back(ruby_arg);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090528/ab588563/attachment.html>
More information about the macruby-changes
mailing list