Python API (was Re: Build errors)
Simon Feltman
s.feltman@gmail.com
Tue Jan 1 00:00:00 GMT 2013
On Wed, Oct 23, 2013 at 10:20 PM, Simon Feltman <s.feltman@gmail.com> wrote:
> ... This is well beyond my knowledge of compiler architecture,
> but it seems like this could be cleaner?
>
> the_type = ctxt.get_type(gccjit.Type.INT)
> local_i = fn.new_local(the_type, b"i")
>
> could be:
> local_i = fn.new_local(gccjit.Type.INT, b"i")
Digging into this a bit more, it looks like the gccjit API is sort of
synthesizing the context dependence for types anyhow. e.g. gcc
internals already seem to be defining the type nodes as globals
(uint64_type_node). So perhaps the API is attempting to present a new
model which the implementation may morph into?
More information about the Jit
mailing list