Skip to content

Commit

Permalink
Work around multiple Parrot bugs for calls to foreign objects, and do…
Browse files Browse the repository at this point in the history
…cument what we're working around. (TODO: see if they already have tickets and submit them if not.)
  • Loading branch information
jnthn committed Mar 20, 2009
1 parent 7b9f811 commit ec0db22
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/builtins/guts.pir
Expand Up @@ -108,7 +108,14 @@ way. Otherwise, it uses .^dispatch from the metaclass.
foreign:
obj = '!DEREF'(obj)
.tailcall obj.name(pos_args :flat, name_args :flat :named)
# We should be able to just .tailcall. Unfortuantely, Parrot's calling
# implementation is a steaming pile of crap and can't even manage to promsie
# to put something that does array into $P0 in the following line...which only
# exists because calls to METHODs in PMCs don't seem to work with tail calls.
($P0 :slurpy, $P1 :slurpy :named) = obj.name(pos_args :flat, name_args :flat :named)
if null $P0 goto no_return
.return ($P0 :flat, $P1 :flat :named)
no_return:
.end


Expand Down

0 comments on commit ec0db22

Please sign in to comment.