Replying to three different messages.
On Wed, Sep 26, 2012 at 5:55 PM, Rob Pike <
r...@golang.org> wrote:
> The terminology in the document confused me on first reading. The arg
> field isn't args, it's variables. Moreover, it's referred to as a
> frame pointer, which it is, but it's not the function's frame it
> refers to but sort of an idealization of the caller's frame. The
> presentation could be clearer.
Agreed. I took Robert's suggestion of calling the arg field a context pointer.
On Wed, Sep 26, 2012 at 6:14 PM, Robert Griesemer <
g...@golang.org> wrote:
> 1) If the context were passed in a register, I don't understand the need for
> assembly stubs when calling Go functions directly from C:
Go functions are okay; it's only Go closures that need assembly help,
to stuff the register. I revised the text.
On Wed, Sep 26, 2012 at 4:00 PM, Ian Lance Taylor <
ia...@google.com> wrote:
> You kind of skated over an interesting point in your proposal: every
> ordinary function will take an extra unused initial argument, but
> every method will not.
You are very good at zeroing in on flaws in my thinking. You're right
that the new method value/closure unification (t.M) implies that
methods do not take the unused initial argument. Unfortunately, the
existing method expression/function unification (T.M) implies that
they do, so we have a contradiction. It's not terrible but it does
imply that one of these requires a wrapper. However, needing to
rethink the method calling convention might not be all bad. Right now
interface calls to non-pointer receivers are made through a wrapper.
If we have to revise something about methods we might want to look
first at making that wrapper cheaper.
I will shelve the proposal for now until I can spend more time
thinking about how method calls should look.
Russ