If memory serves me right, Chris Dutton wrote: > Actually, if you really want Eiffel to compile to Parrot, it might be > interesting to work on getting ANSI C to compile to Parrot first, since > most Eiffel compilers use compilation to C as an intermediate step.
This won't be too much of stretch .... We already have an ANSI C compiler working well with DotGNU pnet.. (with a IL output plugin)... <log of="#dotgnu" on="22-10-2002"> [11:31] <rhysw> Dan: to go off on a different tangent now - C support [11:31] <rhysw> Dan: compiling C to Parrot, that is [11:31] <Dan> Ah, that. Yeah, definitely doable. It'll be rather slow, though [11:31] <Dan> Our function call overhead's rather large compared to what C needs [11:32] <Dan> Still, I find the thought of C with native continuations rather interesting. Scary, but interesting [11:32] <rhysw> Dan: I was more thinking of the memory layout issues. C code is very particular about struct layout, array representation, etc. I didn't see any opcodes that would allow one to do "pull an int32 out of offset N from this pointer". [11:33] <Dan> C's not at all particular about struct layout, unless they changed the standard. [11:33] <Dan> Still, you can do them either with struct PMCs, whcih'd be slowish, or with the pack/unpack opcodes, which I bet are insufficiently documetned [11:34] Action: Dan apparently can't type this evening [11:35] <Dan> Still, the packed structures need more thoght. Hrm. [11:35] <rhysw> Dan: I suppose a better question would be "is supporting C a goal, or would it just be a cool hack but otherwise uninteresting?" [11:36] <rhysw> because, as you say, it wouldn't be terribly efficient ... [11:36] <Dan> Neither, really. It's interesting in the sense that it'd let people use code that they otherwise couldn't, if they don't have a C compiler for. [11:36] <Dan> But it's definitely not a primary goal [11:36] <Dan> Consider it both mildly interesting and mildly bemusing :) [11:37] <fitzix> Dan: It could make it very useful as a power tool [11:37] <Kyeran> Could someone toss up the Parrot URL so I can find out what it is? :) [11:37] <fitzix> Dan: sort of a "swiss army knife" kind of thing [11:37] <Dan> True, but I'm not willing to lose sight of the primary goal for it. </log> Was our last conversation about Parrot & C compilers .. We'll be adding a Parrot codegen for the compiler backend , as soon as the Objects are set in stone.... So possibly there exists a possibility for doing up the C compiler (with codegen tweaking) to develop a C compiler targetting Parrot. Gopal -- The difference between insanity and genius is measured by success