plan to build som v 5.1

aim  -- change instruction (t2-code) format to 64 bits (from 96 bits) without slowing down v5. 

design -- just change instruction format.  Some additional instruction may be required (to store data from local variable).  If r[0] is zero then a reduced form of "stx" will do, i.e. "stx v 0 global", similary for "ldx". 

step of work

1)  use v5, modify code generator to output a correct v5.1 code.
2)  try it with small benchmarks, check that they are correct.
3)  write eval() of v5.1.  Test small benchmarks.
4)  now compiler (in v5 object) produces correct v5.1 object and eval() for v5.1 is also correct, call it eval51().
5)  compile compiler5.1 which will produce a compiler in v5.1 object, call this "v51.obj".
6)  use v51.obj with eval51() to compile compiler5.1, let its output be "v51a.obj".
7)  when v51.obj = v51a.obj, our work is done.

measurement

1)  speed of running benchmarks.  Compare v5.1 to v5.
2)  size of object code.

additional work

I want to move "lex" back to "som" rather than in vm. I suspect that the speed advantage for lex-in-vm is not much.  I prefer the "portability", i.e. to have as little as possible in C.  I plan for future "som2C" conversion program so that everything can be written in "som" then translate to C for efficiency.  Therefore, having lex in C is not necessary.  This is best done once som v5.1 is up and running (from the base code of v5).

12 Dec 2010

why one cannot use "im line" when crossing v5 to v5.1 when compile the compiler?

Because to execute "im line" vm is executing t2-code of v5, not v5.1.  However the code generated from "im line" is v5.1 therefore vm cannot execute them.

One solution to this problem is to include vm 5.1 in vm 5  while performing the crossover. Some kind of flag is used to signal the use of vm 5.1 to execute the code v5.1 generated from "im line". But not using "im line" is much simpler.

14 Dec 2010
