Question regarding combinator call convention

I was looking through the code for 6.12.1 and am a bit confused about 11.1.3 in the runtime system documentation docs/rts/rts.tex. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.79.641&rep=rep1&type=pdf It says the arguments passing convention to a known combinator differs from that of the others in that it starts the arguments with R1 instead of R2 (R1 points to the associated memory data structure for non-combinators). The thing I'm confused with is I would expect this would require treating combinators special, and yet I don't see an combinator specific stuff (in either ClosureTypes.h or the generated AutoApply.cmm) to treat them special. Ive also looking at functions like plusInt and a few of my own, but, apart from internal functions like stg_app_*, I'm not finding any code using the the combinator passing convention. Am I missing something? Thanks! -Tyson

On 29/01/2010 21:02, Tyson Whitehead wrote:
I was looking through the code for 6.12.1 and am a bit confused about 11.1.3 in the runtime system documentation docs/rts/rts.tex.
That's a very old document and is inaccurate in various ways. The Commentary is more up to date: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts
It says the arguments passing convention to a known combinator differs from that of the others in that it starts the arguments with R1 instead of R2 (R1 points to the associated memory data structure for non-combinators).
The address of the closure is always passed in R1, and the arguments start at R2, if R2 is a register, or the stack otherwise. Cheers, Simon

On February 1, 2010 06:43:40 Simon Marlow wrote:
That's a very old document and is inaccurate in various ways. The Commentary is more up to date:
That's good to know. Thanks for the link. : ) Cheers! -Tyson
participants (2)
-
Simon Marlow
-
Tyson Whitehead