Re: Compiler status

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

Hawke' writes:
> i'm a little puzzled tho...
> is this creation of yours turning EU code -into- C code, which
> then needs to be compiled using a C compiler...

Right. It translates your Euphoria program into a set
of C source files that you compile and link using
a C compiler/linker (not supplied by RDS).
It also makes a .bat file that will compile and link
everything for you.

For Language War you would type:
       ec lw
One second later ec reports:
       20 .c files created, type make to build your .exe

You type:
       make

Your .c's are compiled and linked with
eruntime.lib (standard Euphoria run-time routines),
and you end up with lw.exe, which runs indentically to
ex lw.ex (but faster). Assuming similar compression,
compiled .exe's start off about 70K smaller than bound
.exe files, but the size grows more quickly than bound files.

> how will this affect things like run time error checking,
> and wont it significantly affect the (perhaps largest blessing
> of EU) edit/run cycle of program development?

The compiled code performs very little run-time error checking.
You should develop programs using the interpreter. When they
are running correctly, you can compile for greater speed.
If they crash, you can debug using the interpreter again.

> will unintialized variables still be detected?

No.

> will gracefull program crashes be a thing of the past,
> replaced with those dreaded, mysterious, inexplicable
> crashes without any sort of data dump?

You can get dreaded, mysterious crashes when your compiled
program has a bug. Simply run the same test again using
the interpreter, and you should get an error report.

The registered version of the compiler has
a trace facility that will let you see the last 100 or so
Euphoria statements performed just prior to any crash.
You specify "with trace" and trace(1).
It will also comment your .c files, showing each
Euphoria statement, followed by the C statements that
implement that Euphoria statement. This level of debugging
is more useful for myself in debugging the compiler.
People will normally debug using the interpeter.

> I know i cannot have my cake and eat it too...

Yes you can!
Both the compiler and the interpreter will be
maintained. They share a lot of code, and
the interpreter is essential for debugging,
and for people who don't have a C compiler,
which is most people.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu