FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JIT/AOT/translation to D?

 
Post new topic   Reply to topic     Forum Index -> MiniD
View previous topic :: View next topic  
Author Message
dhasenan



Joined: 03 Feb 2005
Posts: 73
Location: New York

PostPosted: Mon Mar 10, 2008 9:17 am    Post subject: JIT/AOT/translation to D? Reply with quote

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
View user's profile Send private message AIM Address
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Mon Mar 10, 2008 10:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MiniD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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