Re: Some Euphoria questions

new topic     » goto parent     » topic index » view thread      » older message » newer message

Robert Craig wrote:

> See attached.

And at last, the innards of the Euphoria are revealed! (Without error
checking, of course.)

After a quick look at your code, I don't see any major secrets being given
away that can't be gleaned from Peuphoria. It's nice to see that we made
some good guesses, even if my own implementation of sequences was just plain
awful.

Seeing binary_op and unary_op defined instead of add/sub/mul/div was a bit
of a suprise, but makes sense.

I'm suprised by how readable the generated code it: nice indentation,
references to the original Euphoria source code lines, C variables sharing
the same names as the Euphoria code. Loops unsuprisingly optimized to jumps;
I would imagine Euphoria generates 'real' machine code.

Oddly, you define constants (like BATCH), but never reference them, and
instead of calling it like:

   _0cycles = _0cycles + BATCH;

you optimize it away:

   _0cycles = _0cycles + 50;

But I'm not supposed to be reading automatically generated code, am I? blink

It's also nice to see the makefile is automatically generated.

Very cool!

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu