Path: utzoo!utgpu!attcan!uunet!samsung!brutus.cs.uiuc.edu!wuarchive!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C build speed-up Message-ID: <3070@husc6.harvard.edu> Date: 6 Nov 89 15:24:08 GMT References: <5804@ucdavis.ucdavis.edu> <32366@ucbvax.BERKELEY.EDU> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Organization: Symantec Language Products Group Lines: 39 In article <32366@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: >LightSpeed Pascal code was full of no-ops, to leave hooks for the >debugger. THINK C doesn't work that way. Um, no. Lightspeed Pascal version 1 procedures would sometimes have a NOP at the beginning and the end of a procedure, if the code generator discovered that there were no locals, no arguments, and no compiler temps. In such cases, the code generator would go back and replace the LINK A6, #n with a NOP, and replace the UNLK A6 with a NOP. So at worst case, there would be a pair of NOPs in a procedure or function. Code compiled with Debug on has TRAP instructions in it, but no NOP instructions. Code compiled under version 2 or later (!) has no NOP instructions in it, period. In THINK C, the debug information is separate from the code; this means that there is no special code required for debugging, and therefor no rebuild step for building a non-debug application. On the other hand, the optimizer sometimes gets in the way of debugging (such as making it i impossible to crawl the stack by eliminating LINK/UNLK when appropriate). R. ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "There is no personal problem which cannot be solved by sufficient application of high explosives." ~~~~~~~~~~~~~~~