Go patch committed: pass constant arguments directly to thunk functions
Ian Lance Taylor
Fri Sep 19 18:53:00 GMT 2014
When the Go frontend builds a thunk, for a go or defer statement, it
sets up a struct to hold the arguments to the function, passes a pointer
to that struct to the thunk, and the thunk then calls the function
passing the fields of the struct. Something along these lines is
necessary when calling a function with variable arguments. However, if
the arguments are constant, then it's not necessary to store the
constants in the struct; they can be encoded directly in the thunk.
This patch from Chris Manghane implements this in the Go frontend.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2051 bytes
More information about the Gcc-patches