ObjectScanner

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

ObjectScanner

stephane ducasse
ObjectScanner does not have any user and I was wondering what was its exact purpose?
Apparently it is related to uniclasses and there are still some left over.

It is not available in CUIS.
Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ObjectScanner

Mariano Martinez Peck
Seems to be used by SmartRefStream, but I don't know why. But it is easy to test it.

This works:

    FileStream forceNewFileNamed: 'test' do:
        [ :stream |  stream fileOutClass: nil andObject: 'something'.     ].   
   
    (FileStream oldFileNamed: 'test') fileInObjectAndCode.
   

Rename ObjectScanner, and you will get a compiler error.
This is because it is being written in:

SmartRefStream >> appendClassDefns


The ObjectScanner class comment says:


An instance of this class is the compiler's context for filing in a SmartRefStream containing instance-specific classes.  When the old name of a new object's class conflicts with an existing class name, install a class var in me.  It has the old name but points at the new class.  The compiler uses it when compiling the code in the fileIn.  Fill the SmartRefStream's renamed class dictionary.

An object fileout:
!ObjectScanner new initialize!      "allow me to take control with scanFrom:"

Player subclass: Player23 instanceVariableNames: 'foo' classVariableNames: ''
    poolDictionaries: nil category: 'Instance Specific'!
    "I prescan this and (self rename: #Player23 toBe: #Player30)"

!Player23 methodsFor: 'all' stamp: 'tk 3/9/98 18:58'!    "actually sent to Player30"
foo
    ^ foo! !

!self smartRefStream!<binary representation of the objects>!



On Thu, Oct 21, 2010 at 8:10 PM, stephane ducasse <[hidden email]> wrote:
ObjectScanner does not have any user and I was wondering what was its exact purpose?
Apparently it is related to uniclasses and there are still some left over.

It is not available in CUIS.
Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ObjectScanner

Stéphane Ducasse
In reply to this post by stephane ducasse

On Oct 22, 2010, at 1:47 PM, Mariano Martinez Peck wrote:

> Seems to be used by SmartRefStream, but I don't know why. But it is easy to test it.
>
> This works:
>
>     FileStream forceNewFileNamed: 'test' do:
>         [ :stream |  stream fileOutClass: nil andObject: 'something'.     ].    
>    
>     (FileStream oldFileNamed: 'test') fileInObjectAndCode.
>    
>
> Rename ObjectScanner, and you will get a compiler error.
> This is because it is being written in:
>
> SmartRefStream >> appendClassDefns


I removed that in my cleans

>
>
> The ObjectScanner class comment says:
>
>
> An instance of this class is the compiler's context for filing in a SmartRefStream containing instance-specific classes.  When the old name of a new object's class conflicts with an existing class name, install a class var in me.  It has the old name but points at the new class.  The compiler uses it when compiling the code in the fileIn.  Fill the SmartRefStream's renamed class dictionary.
>
> An object fileout:
> !ObjectScanner new initialize!      "allow me to take control with scanFrom:"
>
> Player subclass: Player23 instanceVariableNames: 'foo' classVariableNames: ''
>     poolDictionaries: nil category: 'Instance Specific'!
>     "I prescan this and (self rename: #Player23 toBe: #Player30)"
>
> !Player23 methodsFor: 'all' stamp: 'tk 3/9/98 18:58'!    "actually sent to Player30"
> foo
>     ^ foo! !
>
> !self smartRefStream!<binary representation of the objects>!
>
>
>
> On Thu, Oct 21, 2010 at 8:10 PM, stephane ducasse <[hidden email]> wrote:
> ObjectScanner does not have any user and I was wondering what was its exact purpose?
> Apparently it is related to uniclasses and there are still some left over.
>
> It is not available in CUIS.
> Stef
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ObjectScanner

Stéphane Ducasse
In reply to this post by stephane ducasse



> Seems to be used by SmartRefStream, but I don't know why. But it is easy to test it.
>
> This works:
>
>     FileStream forceNewFileNamed: 'test' do:
>         [ :stream |  stream fileOutClass: nil andObject: 'something'.     ].    
>    
>     (FileStream oldFileNamed: 'test') fileInObjectAndCode.
>    
>
> Rename ObjectScanner, and you will get a compiler error.
> This is because it is being written in:
>
> SmartRefStream >> appendClassDefns
>
>
> The ObjectScanner class comment says:
>
>
> An instance of this class is the compiler's context for filing in a SmartRefStream containing instance-specific classes.  When the old name of a new object's class conflicts with an existing class name, install a class var in me.  It has the old name but points at the new class.  The compiler uses it when compiling the code in the fileIn.  Fill the SmartRefStream's renamed class dictionary.
>
> An object fileout:
> !ObjectScanner new initialize!      "allow me to take control with scanFrom:"
>
> Player subclass: Player23 instanceVariableNames: 'foo' classVariableNames: ''
>     poolDictionaries: nil category: 'Instance Specific'!
>     "I prescan this and (self rename: #Player23 toBe: #Player30)"
>
> !Player23 methodsFor: 'all' stamp: 'tk 3/9/98 18:58'!    "actually sent to Player30"
> foo
>     ^ foo! !
>
> !self smartRefStream!<binary representation of the objects>!
>
>
>
> On Thu, Oct 21, 2010 at 8:10 PM, stephane ducasse <[hidden email]> wrote:
> ObjectScanner does not have any user and I was wondering what was its exact purpose?
> Apparently it is related to uniclasses and there are still some left over.
>
> It is not available in CUIS.
> Stef
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

ObjectScanner.1.cs (31K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ObjectScanner

Stéphane Ducasse
In reply to this post by stephane ducasse
http://code.google.com/p/pharo/issues/detail?id=3134

On Oct 22, 2010, at 1:47 PM, Mariano Martinez Peck wrote:

> Seems to be used by SmartRefStream, but I don't know why. But it is easy to test it.
>
> This works:
>
>     FileStream forceNewFileNamed: 'test' do:
>         [ :stream |  stream fileOutClass: nil andObject: 'something'.     ].    
>    
>     (FileStream oldFileNamed: 'test') fileInObjectAndCode.
>    
>
> Rename ObjectScanner, and you will get a compiler error.
> This is because it is being written in:
>
> SmartRefStream >> appendClassDefns
>
>
> The ObjectScanner class comment says:
>
>
> An instance of this class is the compiler's context for filing in a SmartRefStream containing instance-specific classes.  When the old name of a new object's class conflicts with an existing class name, install a class var in me.  It has the old name but points at the new class.  The compiler uses it when compiling the code in the fileIn.  Fill the SmartRefStream's renamed class dictionary.
>
> An object fileout:
> !ObjectScanner new initialize!      "allow me to take control with scanFrom:"
>
> Player subclass: Player23 instanceVariableNames: 'foo' classVariableNames: ''
>     poolDictionaries: nil category: 'Instance Specific'!
>     "I prescan this and (self rename: #Player23 toBe: #Player30)"
>
> !Player23 methodsFor: 'all' stamp: 'tk 3/9/98 18:58'!    "actually sent to Player30"
> foo
>     ^ foo! !
>
> !self smartRefStream!<binary representation of the objects>!
>
>
>
> On Thu, Oct 21, 2010 at 8:10 PM, stephane ducasse <[hidden email]> wrote:
> ObjectScanner does not have any user and I was wondering what was its exact purpose?
> Apparently it is related to uniclasses and there are still some left over.
>
> It is not available in CUIS.
> Stef
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project