Re: Reducing VM size
Jeremy Tregunna <[email protected]> Sun, 10 Jun 2012 11:27:29 -0600
| Newsgroups | gmane.comp.lang.io |
|---|---|
| Message-ID | <[email protected]> |
On Sunday, 10 June, 2012 at 11:04 AM, Jan-Paul Bultmann wrote: > > When compiling down, what keeps you from using a DSL to C-Source compiler? > > > > > Technically nothing, however the idea would be to avoid having to compile any code ahead of time, and interoperability with the host language at runtime. > Although I certainly understand that this introduces a huge DSL ^^ > > > > > > > > It would. > Also would this be done by an existing C compiler or the custom JIT? Probably I'd look at using some of the clang libraries, and integrate it as part of the JIT using the libs that already exist. > When using the JIT wouldn't it be easier to use a simplified subset a la loki? > > > > > > > > Maybe, depends on how hard it'd be to get the clang libs to integrate in a meaningful way. > > Cheers Jan > On Jun 10, 2012, at 4:28 PM, Jeremy Tregunna wrote: > > > > > > > So, I had a wild thought yesterday: > > > > Exposing the host language in the source language, without having the source language act as a compiler to translate its code into the host language. I.e., for instance, Io interpreter written in C, exposes C to the runtime, but doesn't require a step of converting the Io code into raw C code, and compiling that down to a binary, linking against the runtime. > > > > I thought it might be possible to embed a C interpreter with access to the calling programs memory space (lets forget about OS technical challenges involved with that last requirement for a moment). > > > > This would allow us to cut things out of the core, implement the rest of the system at runtime in C (presumably tied into the JIT to compile it all down), really reduce the core out to almost nothing. > > > > My justification for an approach like this is to keep the size of the Acute VM down to really nothing. Just the core object model, and then at a higher level, figure out other ways to reduce the complexity of the VM. > > > > Thoughts? > > > > Regards, > > > > Jeremy Tregunna > > > > > >