This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Accessing Go type descriptors from the middle end


Hi Ian,
Thank you for your reply.

On Fri, Dec 14, 2012 at 10:00 AM, Ian Lance Taylor <iant@google.com> wrote:
> On Thu, Dec 13, 2012 at 4:16 AM, Matt Davis <mattdavis9@gmail.com> wrote:
>>
>> I have a GIMPLE pass and would like to make use of the data type
>> information that the Go frontend produces.  Is there a way to access
>> this information from the middle end without having to query the
>> frontend?
>
> What kind of data type information are you interested in?

I am working on an implementation of my alternate memory allocator for Go.
This allocator makes use of the layout of data types.  I was hoping to
use the existing descriptors that are generated by the frontend, so
that I would not have to create my own.  My runtime will make use of
these descriptors. However, it would suit me just as well to create my
own type-information.  It will just bloat the binary a bit, but, for
my purposes, that is no big deal.

> In general you can't query the frontend from a GIMPLE pass.  And the
> way the Go frontend is structured, it would be pretty hard to make
> that work even if it were possible.  There is no mapping from GIMPLE
> types to Go types, because no such mapping is needed.  Once the
> program has been converted to GIMPLE, the Go frontend is out of the
> picture anyhow.

Ah, that's cool.  Thank you very much for your input.

-Matt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]