[Python-Dev] [ANN] VPython 0.1

Jakob Sievers cadr4u at gmail.com
Fri Oct 24 18:08:47 CEST 2008

skip at pobox.com writes:

> BTW, as to the implementation of individual VM instructions I don't believe
> the Vmgen stuff affects that.  It's just the way the instructions are
> assembled.

Vmgen handles the pushing and popping as well. E.g. ROT_THREE becomes:

  rot_three ( a1 a2 a3 -- a3 a1 a2 )


  binary_power ( a1 a2 -- a  dec:a1 dec:a2  next:a )
  a = PyNumber_Power(a1, a2, Py_None);

(Here I have abused Vmgen a bit by declaring, in addition to the actual
value stack, some dummy stacks with different stack prefixes and using
the ``push'' instructions generated for those to do reference

I should mention that some of the more involved instructions have no
declared effect (i.e. ( -- ) ) with stack manipulation still being
done by hand. 


More information about the Python-Dev mailing list