MiniD dsource project set up

Rémy Mouëza ray.jay.ay.moueza at DoNtSpAm.gmail.com
Tue Jun 27 11:49:42 PDT 2006


In article <e7q97v$e04$1 at digitaldaemon.com>, Jarrett Billingsley says...
>
>"Boris Wang" <nano.kago at hotmail.com> wrote in message 
>news:e7q6kq$aq7$1 at digitaldaemon.com...
>
>> Can we make the whole D running interpreted or something just-in-time 
>> compile?
>
>MiniD is not a scriptable D; it's just a scripting language that looks like 
>D.  You'll have a native host program, most likely written in D, which will 
>load MiniD code (either source or compiled into bytecode) and run it.  JIT 
>compiling is a little over my head :S 
>

A few years ago, when I was dreaming to make my own little programming language,
I've seen the libjit library :
http://www.southern-storm.com.au/libjit.html

(I am still dreaming now, but I have more ideas of how to do it.)
I know very little about it. There is a C interface and it aims to be portable. 

Native code generation is not the only way to optimize a bytecode program : I've
heard about some Smalltalk variant that was not using the 256 bytes possible to
code the bytecode instructions. The remaining bytes where used to create macro
instructions. 

The bytecode was first analysed, the bytecode sequences that was appearing
frequently where detected and kind of precompiled into a macro instruction wich
number was placed in the available bytes. Then, the bytecode was reduced : the
sequences where replaced with their corresponding macro numbers.

The program sized was shorten and the macros allowed to reduce the amount of
lookup and stack frame to be used and made the program more efficient/fast.





More information about the Digitalmars-d-announce mailing list