View previous topic :: View next topic |
Author |
Message |
dhasenan
Joined: 03 Feb 2005 Posts: 73 Location: New York
|
Posted: Mon Mar 10, 2008 9:17 am Post subject: JIT/AOT/translation to D? |
|
|
Hi --
MiniD currently runs interpreted bytecode. That's much better, of course, than directly interpreting human-readable code.
Have you considered the possibility of translating MiniD to D? A naive implementation would involve heavy associative array and delegate usage, so the result would be relatively inefficient compared to D, and you would lose the ability to change scripts on the fly, but it'd probably be a lot faster than bytecode interpretation.
Granted, that would be a large and complex backend to maintain in addition to everything else you're doing, and it would not replace the current bytecode system you have, so there isn't a huge incentive to do this. |
|
Back to top |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Mon Mar 10, 2008 10:18 am Post subject: |
|
|
It's something I've considered doing and is part of my motivation for making the Native API as powerful as possible. Basically I'd like to be able to do anything that a script can do with a native call, which would make it possible to automatically translate MiniD bytecode (or at a higher level, translate a MiniD AST) into D code.
It'll still probably be integrated fairly tightly with the rest of the language; it's just that all your functions would become native functions rather than script functions. You'd still be able to modify namespaces and such.
This would also go nicely with shared library loading, which would use SOs on *nix and DDL on Windows. You could compile your MiniD code into D, which would be compiled into a shared library, and then you could import it just like any other MiniD module. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|