Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!ginosko!uunet!image.soe.clarkson.edu!news From: gary@sun.mcs.clarkson.edu (Gary Levin) Newsgroups: comp.sys.mac.programmer Subject: Odd behavior (was Re: List manager and Think C) Message-ID: Date: 5 Sep 89 21:09:01 GMT References: <5501@viscous.sco.COM> <9389@cadnetix.COM> <5014@portia.Stanford.EDU> <21813@cup.portal.com> Sender: news@sun.soe.clarkson.edu Organization: Clarkson University, Potsdam NY Lines: 41 In-reply-to: ts@cup.portal.com's message of 3 Sep 89 02:57:30 GMT In article <21813@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes: tim>Date: 3 Sep 89 02:57:30 GMT tim>The method dispatching is different when you run the program from tim>Think C that it is when you build an application. When you run tim>from Think C it does not appear to optimize method dispatching. I tim>noticed this because I wanted to see how much overhead was tim>involved in OO stuff in Think C, so I wrote a test program and tim>single stepped it with TMON. Everything wemt through the method tim>dispatcher. I then build the application and single stepped. Now tim>many things did not go through the method dispatcher. Instead tim>they jsr'ed to a jmp to the method. This sounds like it might possibly answer why the source for the class libraries was included in the sample programs instead of using libraries/projects. It also might explain why my program runs correctly from inside THINK-C, but not when I double click it as an application. (1) Is it in advisable to build libraries/projects that hold the Class library routines? * I think a light bulb just went off. Monomorphic methods are handled * as subroutine calls. There is no way that you can combine separate * modules because they won't use the right dispatch method, because you * can't recognize that a method was overridden. * Confirmation? (2) One is not supposed to distribute the Class library source, either original or modified. One is advised to base programs on Starter or Pedestal. May we distribute modified source of those routines (just the ones in the folder, not the Class library routines that are included)? May we distribute modifications of TinyEdit? -- Gary Levin/Dept of Math & CS/Clarkson Univ/Potsdam, NY 13676/(315) 268-2384 BitNet: gary@clutx Internet: gary@clutx.clarkson.edu