Leopold Toetsch wrote:
Bernhard Schmalhofer <[EMAIL PROTECTED]> wrote:


The 'eval' compiler returns a bytecode segment without a constant table. The
'destroy' of the Eval PMC needs to handle that.


How that? Are there no constants? Anyway, switching to a new bytecode
segment does switch the constant table too, so all compiled code ought
to have a constant table.

Yes, there are no constants. The only thing the generated sub does, is to return an integer value, that was computed in the C-Code.
Thus the m4 macro "eval( 1 ^ 3 )" compiles into a sub that looks in PIR like:


.sub generated_sub
  .return( 3 )
.end

Of course it would be much more simle to use a plain NCI call for this purpose.
But I wanted to play with 'compreg' when I implemented that.


CU, Bernhard

--
**************************************************
Dipl.-Physiker Bernhard Schmalhofer
Senior Developer
Biomax Informatics AG
Lochhamer Str. 11
82152 Martinsried, Germany
Tel: +49 89 895574-839
Fax: +49 89 895574-825
eMail: [EMAIL PROTECTED]
Website: www.biomax.com
**************************************************

Reply via email to