Melvin Smith <[EMAIL PROTECTED]> wrote: > Basically all metadata has to be collected before any code can be emitted. > I was thinking of generating an _init routine that creates the classes, > so we have several possibilities.
Why? A class definition should AFAIK end up in the constant table as a class PMC specifying the inheritance and attributes. So a .class directive is from parsing POV a constant definition, like a string constant. > Long term: We should parse the whole PIR file before doing any sort of > code emission. That's true. pbc.c already has most of the necessary structures. These should of course be rearanged, kept inside IMCC_INFO() and so on. But basically it shouldn't be too hard. We have to rearange all imcc globals anyway - there can't be globals or multi-threading will break horribly. > This isn't really so big a deal since high level languages should be able to > emit PIR code with all metadata first anyway. That's not necessary AFAIK. > -Melvin leo