[BUG] Abandon Sources Failure in 3.2

Scott Wallace scott.wallace at squeakland.org
Wed Oct 16 05:55:01 UTC 2002


Hi again, Michael,

(There are others on the Squeak list better qualified to respond to 
this than I, but since no one else has, here's what I can come up 
with:)


First a question:

Are you certain you *need* to use "abandonSources"?

I don't think anyone else has had occasion to use abandonSources for 
a very long time -- anyone trying this anytime recently would have 
encountered the same sequence of difficulties you've encountered ;-).

You don't need to "abandonSources" to operate without a sources file. 
You just ship your code without a sources file, and all should be 
well.  Similarly, a .changes file is optional -- just ship without it.

By simply setting the "warnIfNoSourcesFile" preference to "false", 
your user will not see the warnings that otherwise come when you 
start up an image and the sources file cannot be found.  Similarly 
for "wornIfNoChangesFile".

All you're losing (I *think* -- someone will surely correct me if I'm 
wrong) by simply omitting the sources file is the ability to see nice 
temp-names and nice formal-argument-names and comments and original 
source-code formatting when viewing code.

So perhaps you're best served by abandoning the use of 
abandonSources.  In which case you need read no further.

***********

That having been said...

At issue here is a method whose temp-names string is 441-characters 
long, whereas the qCompress: method works properly only for 
temp-name-strings up to 256 characters long.

I spoke to Dan about this last week, and he said that there should be 
a simple workaround, such that the format that places qCompressed 
temp-names in the trailer would *not* be used if the aggregate 
temp-names string is seen to be too long.

Still, it's going to require Dan, or Bill Dargel (whose initials from 
four years ago still are still emblazoned on the #abandonSources 
method,) or someone else willing to bite the bullet here, to make the 
fix.

Incidentally, the method in question has a 206-character-long 
selector, and 12 arguments, and 35 temp names.

Class: GeniePlugIn     Selector:
#primSameClassAbsoluteStrokeDistanceMyPoints:otherPoints:myVectors:otherVectors:mySquaredLengths:otherSquaredLengths:myAngles:otherAngles:maxSizeAndReferenceFlag:rowBase:rowInsertRemove:rowInsertRemoveCount:

(Even more incidentally, this 206-character-long-selector is not the 
longest in the system; there is another that is 221-characters long, 
and btw five others that are also longer than 100-characters in 
length.)

I offer, attached, a little fileout that works around the limitation 
in this one GeniePlugIn method by reassigning its temp-names to be 
t1, t2, etc. (I did this by filing out the method from an image that 
had no access to sources or temps, so it had to resort to pure 
decompilation.)  If you file this cs into your system, you should be 
able to get further in your quest for abandoning sources, if you're 
still interested in doing that ;-)

Hope this helps.

Cheers,

  -- Scott




At 9:57 AM -0600 10/7/02, cole at nimiqinc.com wrote:
>Scott,
>
>Thanks for the quick reply. Editing the method solved that problem, but
>I now get another error complaining of an improper store in the
>CompiledMethod copyWithTempNames qCompress method. Again, I have
>confirmed the same error in a stock 3.2 image.
>
>Michael
>
>
>
>Scott Wallace <scott.wallace at squeakland.org> wrote:
>>  Michael,
>>
>>  Very interesting!  Indeed, the decompiled version of this method
>>  (Morph.mouseDownPriority) cannot be recompiled because it has code
>>  (viz. the #flag: call) after the logical method end.
>>
>>  An easy workaround is:  before abandoning sources, just submit a
>>  revised version of this problematic method in which you have removed
>  > the #flag call, which has no functional role in the method anyway.
>>  The replacement method could be the following:
>>
>>  ------
>>
>  > !Morph methodsFor: 'events-processing' stamp: 'sw 10/5/2002 01:18'!
>  > mouseDownPriority
>>	"Return the default mouse down priority for the receiver"
>  >
>  >	^ (self isPartsDonor or: [self isPartsBin])
>  >		ifTrue:	[50]
>  >		ifFalse:	[0]! !
>  >
>  > ------
>  >
>  > With any luck, this is the only method that has this problem, but if
>>  any others are revealed, they can be dealt with in the same way.
>>
>>  Hope this helps,
>>
>>     -- Scott
>>
>>
>>
>>  At 11:55 AM -0600 10/4/02, cole at nimiqinc.com wrote:
>>  >Hi,
>>  >
>>  >In trying to deliver a small application based on 3.2 I found that I am
>  > >unable to successfullt abandon sources. The failure comes with a syntax
>  > >error in Morph events-processing MouseDownPriority:
>  > >
>  > >mouseDownPriority
>>  >	(self isPartsDonor
>>  >			or: [self isPartsBin])
>>  >		ifTrue: [^ 50].
>>  >	^ 0.
>>  >	End of block expected ->self flag: #workAround
>>  >
>>  >I checked this in a stock 3.2 image and was also unable to abandon
>  > >sources (but did not get exactly the same error message).
>  > >
>  > >Any ideas?
>  > >
>  > >
>  > >Michael
-------------- next part --------------
Skipped content of type multipart/appledouble


More information about the Squeak-dev mailing list