[m-rev.] for post-commit review: Match output arguments correctly?for mutually recursive code
Paul Bone
paul at bone.id.au
Wed Apr 12 10:26:01 AEST 2017
On Wed, Apr 12, 2017 at 10:19:21AM +1000, Zoltan Somogyi wrote:
>
> I don't think ignoring the remaining arguments in the OutputVars0 = [] case
> is right. If the caller's output arguments are X, Y and Z, and the callee's are
> X, Y, Z and W, then I don't think we want to consider the call to be a tail call.
> The code we would generate for a tail call for e.g. the LLDS backend may do
> the right thing, but it would do so only by accident, and I don't think we
> want to rely on accidents.
>
> I think requiring the caller and callee to have the *same* sequence of
> output arguments is safer, and it can be done with simpler code.
> That is why I am committing the attached diff.
>
Okay, I didn't know how much this could be relied on, we havn't changed the
calling conventions before (to my knowledge) so I assumed they were pretty
stable. I agree that it is possible they could change or new optimisations
could be added and that would cause problems.
Thanks.
--
Paul Bone
http://paul.bone.id.au
More information about the reviews
mailing list