Ian Lance Taylor <i...@google.com> writes: > On Thu, Dec 12, 2013 at 12:21 AM, Michael Hudson-Doyle > <michael.hud...@linaro.org> wrote: >> Ian Lance Taylor <i...@google.com> writes: >> >>> This patch to the Go frontend and libgo implements method values in the >>> reflect package. Working with method values and reflect now works >>> correctly, at least on x86. >> >> Can you give me a test case? I can try it on a few other architectures >> tomorrow. > > The test case is test/recover.go in the master Go sources. But I know > that that test won't work on other architectures, because currently > reflect.MakeFunc is only implemented for 386 and amd64.
Ah, OK. > It should be possible to implement reflect.MakeFunc for all > architectures in a somewhat inefficient manner by using libffi's > closure API. I have not tried that. > > It is also of course possible to implement support for any specific > processor as I did for 386 and amd64. The difficulty depends on the > difficulty of the ABI. In general it's not too hard but it requires a > clear understanding of ABI details and assembly language programming > with full backtrace information. It's about 600 lines of code for > amd64. OK, I'll add it to a list of things to look at "at some point"... Cheers, mwh