Sq 3.9-7061 broken sources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Sq 3.9-7061 broken sources

timrowledge
I've been looking at cleaning up the source pointers so that we can  
consider having large source/changes files (or other access methods)  
and discovered some nasty problems with 3.9-7061

Most obvious is that some 201 methods seem to have 0 source pointers.  
Now this might indicate that some have been set to have compressed in-
image source (though there really shouldn't be any in a standard  
image) but in at least a few randomly chosen cases you get the error  
dialogue complaining about a buggered source file. The afflicted  
classes are :-
  a Set(#PlayWithMe1 #BrowserProvider #Preferences #WorldMenuProvider)

Consider -
BrowserProvider >> browserClassMenushortcut. It displays perfectly  
well in the browser because it can decompile ok. Still shouldn't have  
no source pointer though. Its method properties are nil properties,  
empty array pragmas and a suitable selector

To find the relevant methods try
  (SystemNavigation default allMethodsNoDoitsSelect:[:cm|
                cm sourcePointer = 0])
and inspect.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: OKP: On your Knees and Pray!



Reply | Threaded
Open this post in threaded view
|

Re: Sq 3.9-7061 broken sources

Marcus Denker

On 10.10.2006, at 00:36, tim Rowledge wrote:

> I've been looking at cleaning up the source pointers so that we can  
> consider having large source/changes files (or other access  
> methods) and discovered some nasty problems with 3.9-7061
>
> Most obvious is that some 201 methods seem to have 0 source  
> pointers. Now this might indicate that some have been set to have  
> compressed in-image source (though there really shouldn't be any in  
> a standard image) but in at least a few randomly chosen cases you  
> get the error dialogue complaining about a buggered source file.  
> The afflicted classes are :-
>  a Set(#PlayWithMe1 #BrowserProvider #Preferences #WorldMenuProvider)
>
> Consider -
> BrowserProvider >> browserClassMenushortcut. It displays perfectly  
> well in the browser because it can decompile ok. Still shouldn't  
> have no source pointer though. Its method properties are nil  
> properties, empty array pragmas and a suitable selector
>
> To find the relevant methods try
>  (SystemNavigation default allMethodsNoDoitsSelect:[:cm|
> cm sourcePointer = 0])
> and inspect.
>

In Preferences>>class there is:

compileAccessMethodForPreference: aPreference
        "Compile an accessor method for the given preference"

        self class compileSilently: (aPreference name, '
        ^ self valueOfFlag: #', aPreference name, ' ifAbsent: [',  
aPreference defaultValue storeString, ']') classified: 'standard  
queries'


This will result in methods with a trailer of #(0 0 0 0)...

    Marcus

Reply | Threaded
Open this post in threaded view
|

Compressed or otherwise strange sources (was Re: Sq 3.9-7061 broken sources)

timrowledge

On 9-Oct-06, at 3:50 PM, Marcus Denker wrote:

>
> In Preferences>>class there is:
>
> compileAccessMethodForPreference: aPreference
> "Compile an accessor method for the given preference"
>
> self class compileSilently: (aPreference name, '
> ^ self valueOfFlag: #', aPreference name, ' ifAbsent: [',  
> aPreference defaultValue storeString, ']') classified: 'standard  
> queries'
>
>
> This will result in methods with a trailer of #(0 0 0 0)...

Interesting. That seems like a mistake to me. Surely any method that  
can appear in the browsers really ought to have properly set  
sourcecode, just out of politeness.

Anyway, what I'm trying to establish is that there are no methods  
with compress or otherwise strange sources in the image.  No source  
at all is ok I suppose, so long as I know about it.

My current test is :

SystemNavigation default allMethodsNoDoitsSelect:[:cm|
                cm last between: 1 and: 251]
which is an empty collection. So I *think* from checking up with  
CompiledMethod>endPC etc that I can feel sure all is ok.

It seems that all methods have the new property stuff added. What I'm  
hoping to do is move the source reference into the properties, where  
once it is a proper object and not a poorly fudged integer of  
strongly assumed nature, it can be extend to do any interesting  
access work.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Oxymorons: Exact estimate



Reply | Threaded
Open this post in threaded view
|

Re: Compressed or otherwise strange sources (was Re: Sq 3.9-7061 broken sources)

Marcus Denker

On 10.10.2006, at 01:54, tim Rowledge wrote:

>
> On 9-Oct-06, at 3:50 PM, Marcus Denker wrote:
>
>>
>> In Preferences>>class there is:
>>
>> compileAccessMethodForPreference: aPreference
>> "Compile an accessor method for the given preference"
>>
>> self class compileSilently: (aPreference name, '
>> ^ self valueOfFlag: #', aPreference name, ' ifAbsent: [',  
>> aPreference defaultValue storeString, ']') classified: 'standard  
>> queries'
>>
>>
>> This will result in methods with a trailer of #(0 0 0 0)...
>
> Interesting. That seems like a mistake to me. Surely any method  
> that can appear in the browsers really ought to have properly set  
> sourcecode, just out of politeness.
>

Yes. Just to make sure: This is not 3.9 specific. It has been there  
for ages (I guess as long as Preferences exist)

> Anyway, what I'm trying to establish is that there are no methods  
> with compress or otherwise strange sources in the image.  No source  
> at all is ok I suppose, so long as I know about it.
>

It has bitten me in the past, too. It's quite interesting when you  
can recompile the image once, but not twice (because the decompiler  
had a bug).

> SystemNavigation default allMethodsNoDoitsSelect:[:cm|
> cm last between: 1 and: 251]
> which is an empty collection. So I *think* from checking up with  
> CompiledMethod>endPC etc that I can feel sure all is ok.
>
> It seems that all methods have the new property stuff added. What  
> I'm hoping to do is move the source reference into the properties,  
> where once it is a proper object and not a poorly fudged integer of  
> strongly assumed nature, it can be extend to do any interesting  
> access work.

Good! Did you look at the patch that Klaus did? I don't remember if  
he uses properties, though.

      Marcus

Reply | Threaded
Open this post in threaded view
|

Re: Compressed or otherwise strange sources (was Re: Sq 3.9-7061 broken sources)

timrowledge

On 10-Oct-06, at 12:04 AM, Marcus Denker wrote:
[snip]
>
> Good! Did you look at the patch that Klaus did? I don't remember if  
> he uses properties, though.

Yup, I'm using it for inspiration and seeing if I can make a really  
elegant version. So far so good - 6 methods, add an instvar and 2  
doits looks like a basic version, then remove about 60 methods for  
cleanup.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
..... REALITY.SYS Corrupted - Unable to recover Universe





Reply | Threaded
Open this post in threaded view
|

Re: Compressed or otherwise strange sources (was Re: Sq 3.9-7061 broken sources)

stephane ducasse-2
Cool

>> Good! Did you look at the patch that Klaus did? I don't remember  
>> if he uses properties, though.
>
> Yup, I'm using it for inspiration and seeing if I can make a really  
> elegant version. So far so good - 6 methods, add an instvar and 2  
> doits looks like a basic version, then remove about 60 methods for  
> cleanup.


Reply | Threaded
Open this post in threaded view
|

Re: Compressed or otherwise strange sources (was Re: Sq 3.9-7061 broken sources)

timrowledge
In reply to this post by timrowledge

On 10-Oct-06, at 12:12 AM, tim Rowledge wrote:

>
> Yup, I'm using it for inspiration and seeing if I can make a really  
> elegant version. So far so good - 6 methods, add an instvar and 2  
> doits looks like a basic version, then remove about 60 methods for  
> cleanup.

So now I have an image which refers to source code through a  
reference object (an encoded integer right now) held in the  
properties. Seems to work so far.

I'll have to modify the above 'then remove about 60 methods for  
cleanup' a bit. I think it might be a couple of hundred methods.  
There's some real stinkers in there. Not to mention totally  
innappropriate dependence upon the idea of two files being the only  
source access method; makes me wonder how the compressed string  
source idea worked at all.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
 From C:\*.* to shining C:\*.*