Re: See Vs. See
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 07, 2001
- 424 views
MTS writes: > -----------A Simple Math Demo In C---------- Your alpha translator produced 176 (non-blank) lines of C. The new beta translator (due in a week or so) produces just 66 lines of C for the same example. Here they are: void main(int argc, char *argv[]) { int _12 = 0; int _17 = 0; int _0, _1, _2, _3; Argc = argc; Argv = argv; eu_startup(_00, 1, (int)CLOCKS_PER_SEC, (int)CLK_TCK); init_literal(); shift_args(argc, argv); _0a = 50; _0b = 60; _12 = 120; _0c = 119; _12 = 110; _17 = 476; if (476 & 1) { _17 = NewDouble((476 >> 1) + 0.5); } else _17 = 476 >> 1; if (IS_ATOM_INT(_17)) { _0d = 110 + _17; } else { _0d = NewDouble((double)110 + DBL_PTR(_17)->dbl); } if (!IS_ATOM_INT(_0d)) { _1 = (long)(DBL_PTR(_0d)->dbl); DeRefDS(_0d); _0d = _1; } RefDS(_20); DeRef(_0fa); _0fa = _20; DeRef(_0fb); _0fb = NewDouble(DBL_PTR(_0fa)->dbl + DBL_PTR(_0fa)->dbl); DeRef(_17); _17 = NewDouble(DBL_PTR(_0fb)->dbl / DBL_PTR(_22)->dbl); DeRef(_0fc); _0fc = NewDouble(DBL_PTR(_0fa)->dbl + DBL_PTR(_17)->dbl); DeRefDS(_17); _17 = NewDouble(DBL_PTR(_0fa)->dbl * DBL_PTR(_0fb)->dbl); _12 = NewDouble(DBL_PTR(_0fc)->dbl * DBL_PTR(_26)->dbl); DeRef(_0fd); _0fd = NewDouble(DBL_PTR(_17)->dbl + DBL_PTR(_12)->dbl); _0 = _12; _1 = NewS1(8); _2 = (int)((s1_ptr)_1)->first; *((int *)(_2)) = 50; *((int *)(_2+4)) = 60; *((int *)(_2+8)) = 119; *((int *)(_2+12)) = _0d; RefDS(_0fa); *((int *)(_2+16)) = _0fa; RefDS(_0fb); *((int *)(_2+20)) = _0fb; RefDS(_0fc); *((int *)(_2+24)) = _0fc; RefDS(_0fd); *((int *)(_2+28)) = _0fd; _12 = MAKE_SEQ(_1); DeRefDS(_0); EPrintf(1, _29, _12); Cleanup(0); } Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com