The whiteknight/imcc_compreg_pmc branch is passing most tests for me right now, and I would like to get some other people to help testing it before I think about a merge. First, here is a list of the major things which have changed in this branch:
1) All internal IMCC functions take a imc_info_t* pointer instead of a PARROT_INTERP. imc_info_t* now has a field ->interp which holds a reference to the parent interp object 2) There is a new API for IMCC in compilers/imcc/api.c. These functions mirror the general conventions and functionality of Parrot's new embedding API (exception handling, error detection, etc). The IMCC API should be used anywhere that Parrot's embedding API is used and IMCC access is needed 3) There is a new IMCCompiler PMC type that replaces the old PIR and PASM compreg entries. This new PMC type implements VTABLE_invoke, so to most users it operates in exactly the same way as the old NCI PMC did. However, it also adds some new methods .compile_file, .compile_string, and .preprocess_file. This PMC type needs to be cleaned/refactored still, but the general idea is in place 4) The only ways to interact with IMCC now are through the new API (for embedders) or through the new IMCCompiler PMC (for PIR and HLL users). Other interface functions are deprecated and removed or renamed. 5) The PIR/PASM compreg entries are not added automatically during interpreter initialization. These must be explicitly setup if you want them, and they do not exist at all if you do not create them. The new API provides routines to do this semi-automagically 6) Several places in IMCC have been radically refactored. Specifically compilers/imcc/main.c, among others. 7) IMCC_fatal and IMCC_fataly have been modified to throw Parrot exceptions instead of weird IMCC exceptions. This is just the start of what will need to be several refactors to the IMCC error handling mechanisms. Some things that HAVE NOT CHANGED (but are still on the roadmap) 1) IMCC is still built in with libparrot. It is not a separate library yet. However, as mentioned above, it is not initialized or used at all unless specifically requested 2) We still return Eval PMCs from IMCC, even though those are deprecated. 3) IMCC syntax and semantics for PIR and PASM have not changed at all. Error messages and error codes have not changed. Many other warts and problems have not been excised. There are a few places where I would like to clean up the code, although major changes will wait for a new branch. I would like to get as many tests as possible on different platforms and especially with various HLLs. I have tested NQP-RX myself, but I would like to see more tests. Thanks, --Andrew Whitworth _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
