[M3devel] "looping to get all types declared first"
Jay K
jay.krell at cornell.edu
Sun Oct 31 21:54:34 CET 2010
> I don't understand the purpose of all this. Can't you just maintain one global table mapping type id to type?
The general problem is that types are used before they are declared.
Another problem is my ignorance of what is possible.
For example, is it possible to just no type on everything at first, just a struct lang_type with typeid,
and then walk the gcc trees repeatedly replacing those as possible?
Would that require, perhaps, setting unit_at_a_time = true, which is an optimization, but ok?
Or do all the types need to be correct upon initial tree construction?
If they have to be correct up front, it takes multiple passes through the type declarations due to
circularities or out-of-orders.
I have something in place for multiple passes, but it doesn't avoid building statements (non-declarations)
in the earlier passes.
Typenames are not amenable to one global table, but I'm not sure they matter at all.
I'm thinking the backend can basically ignore them entirely -- or at least not do anything new with them
in this effort to make the trees correctly typed.
- Jay
More information about the M3devel
mailing list