Way Cool: Topaz 0.10 runs code!

Topaz 0.10 includes LOTS of new stuff. Most importantly, it actually_runs_code_! You have to build the Op tree by hand -- no parsing --but still, doggone it, it's nice to have 'hello world' run!

Here's the ChangeLog entry:

Short list:* Ops are now generated from '*.ops' files using the new Perlprogram 'tools/genops'.* Compilation infrastructure works: UserCode objects can becreated Op by Op. See test_run.cc. (No parsing yet.)* Runtime infrastructure works:

UserCode objects run.Stack is flushed between statements.Control structures nest.Arbitrary cleanups can be registered (a la 'savestack').Stack is of Values, not Scalars. (duh)

* Context (list/scalar) is supported, both statically(compile-time) and dynamically (run-time).* Command line processing works.* Debugging flags are available: '-Dt' and '-Ds'.* There is a beginning of diagnostics (warn and die), including'-w' and a framework for lexical warnings.* RealGlobScalar implements the equivalent of an SVt_GV that does_not_ have SVf_FAKE set -- i.e. it does aliasing when you assignto it.

* Compatibility Note #1: I am no longer targeting Microsoft VisualC++. The EGCS team have set themselves the goal of sourcecompatibility with VC++, and they seem to already be most of theway there. EGCS's support for MS's non-standard language featureseliminates the final obstacle to our using it under Windows.

* Compatibility Note #2: EGCS's standard library still doesn'tquite have the hang of e.g. std::memcpy() vs. ::memcpy(). So youmight have to tweak calls of <string.h> functions and other Cremnants.

Grody Details:

* Inst classes implement run-time behavior of Ops. Eachcompilation in progress has an arena for Ops and an area forInsts. Once the Ops are all built, their compile() methods arecalled to create Insts in the Inst arena. The Ops are thensuperfluous and can be deleted. The Inst arena is then attachedto the UserCode, _defining_ it. At runtime, Insts are executedvia their run() methods. Insts are allocated sequentially fromtheir arena, so there is usually no need for the equivalent ofop_next. (But heaven forfend an Inst multiply inherit!)

* BasicInst.{hh,cc}: Some Insts are so basic that they don'tnecessarily come from corresponding Ops:NOP_Inst (do nothing)EndInst (stop a run loop)JumpInst (low-level goto)MarkInst (push a stack mark).

Chip SalzenbergHeh. These early Insts are helping me figure out what parts of the internal API need simplification. For example: I think I need to get rid of "interp->" on the stack operations. -- Chip Salzenberg - a.k.a. - "He's Mr. Big of 'Big And Tall' fame." // MST3K