codes size (was Re: Question about protection of raw partition ...)
Posted in 1992
Path: emory!swrinde!elroy.jpl.nasa.gov!ames!sun-barr!news2me.ebay.sun.com!newstop!sun!amdcad!weitek!pyramid!infmx!news From: cortesi@informix.com (David Cortesi) Newsgroups: comp.databases.informix Message-ID: <1992Mar2.205148.16436@informix.com> Date: 2 Mar 92 20:51:48 GMT References: <1992Mar1.011328.17509@anasaz> Sender: news@informix.com (Usenet News) Reply-To: cortesi@informix.com Organization: Informix Software, Inc. In article <1992Mar1.011328.17509@anasaz> briand@anasaz (Brian Douglass) writes, regarding code size of compiled 4GL programs: > ... Also, if > you look at the ESQL/C and C output of the 4GL compiler, it no wonder code > gets so huge. Just to increment a variable goes from a 4GL statment like > this: > LET x1 = x1 + 1 > to a C call like > pushshort(x1); > pushint(1); > _doadd(); > popshort(&x1); -------------------------------- > status = _expcode; > if (status < 0) > /* * SQL SEES BLOCK BEGINNING */ > { > fgl_fatal(fgl_modname, 4, status); > /* * SQL SEES BLOCK ENDING */ ---------------------------------------- > } You should note that the lengthy check of status after every expression (marked off above) is not required. In 4.0 you can turn it off by writing WHENEVER ERROR CONTINUE. This can have a dramatic effect on program size from 4.0 compiles. In 4.1 every expression is no longer checked for status by default. The above status-check code is only generated in 4.1 when you have written WHENEVER ANY ERROR...