Re: [gofrontend-dev] Re: [PATCH 03/13] HACK! Allow the static chain to be set from C

2014-10-13 Thread Richard Biener
On Sat, Oct 11, 2014 at 6:23 AM, Richard Henderson r...@redhat.com wrote: On 10/10/2014 06:42 PM, Peter Collingbourne wrote: A colleague has suggested a perhaps nicer syntax: __builtin_call_chain(pointer, call) where call must be a call expression I like this. Unlike the other suggestions,

Re: [gofrontend-dev] Re: [PATCH 03/13] HACK! Allow the static chain to be set from C

2014-10-13 Thread Peter Collingbourne
On Mon, Oct 13, 2014 at 1:10 AM, Richard Biener richard.guent...@gmail.com wrote: On Sat, Oct 11, 2014 at 6:23 AM, Richard Henderson r...@redhat.com wrote: On 10/10/2014 06:42 PM, Peter Collingbourne wrote: A colleague has suggested a perhaps nicer syntax: __builtin_call_chain(pointer, call)

[PATCH 03/13] HACK! Allow the static chain to be set from C

2014-10-10 Thread Richard Henderson
This is awful syntax, and therefore contains no documentation. But we'll need to be able to set the static chain on a few calls within the Go runtime, so we need to expose this by some means. It currently looks like function(args...) __builtin_call_chain(pointer) because that was easy

Re: [PATCH 03/13] HACK! Allow the static chain to be set from C

2014-10-10 Thread Ian Lance Taylor
On Fri, Oct 10, 2014 at 1:42 PM, Richard Henderson r...@redhat.com wrote: This is awful syntax, and therefore contains no documentation. But we'll need to be able to set the static chain on a few calls within the Go runtime, so we need to expose this by some means. It currently looks like

Re: [gofrontend-dev] Re: [PATCH 03/13] HACK! Allow the static chain to be set from C

2014-10-10 Thread Peter Collingbourne
On Fri, Oct 10, 2014 at 6:06 PM, Peter Collingbourne p...@google.com wrote: On Fri, Oct 10, 2014 at 5:33 PM, 'Ian Lance Taylor' via gofrontend-dev gofrontend-...@googlegroups.com wrote: On Fri, Oct 10, 2014 at 1:42 PM, Richard Henderson r...@redhat.com wrote: This is awful syntax, and

Re: [gofrontend-dev] Re: [PATCH 03/13] HACK! Allow the static chain to be set from C

2014-10-10 Thread Richard Henderson
On 10/10/2014 06:42 PM, Peter Collingbourne wrote: A colleague has suggested a perhaps nicer syntax: __builtin_call_chain(pointer, call) where call must be a call expression I like this. Unlike the other suggestions, it doesn't mess with the parsing of the regular part of the function call.