Mantis - Squeak
Viewing Issue Advanced Details
3612 Compiler minor always 05-12-06 18:11 05-12-14 23:15
kwl  
nicolas cellier  
normal  
resolved 3.9  
fixed  
none    
none trunk  
0003612: MethodProperties are nil when creating CompiledMethod with the toReturnXYZ methods
The toReturnXYZ methods on the class side leave MethodProperties uninitialized and so Behavior>>#basicAddSelector:withMethod: fails when it does compiledMethod #selector:.

Looks like MethodProperties would like to be a bit closer to CompiledMethod.
MessageNotUnderstood: UndefinedObject>>selector:
12 May 2006 6:08:28 pm

VM: Win32 - a SmalltalkImage
Image: Squeak3.9alpha [latest update: 0007028]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir ...etc...
Trusted Dir ...etc...
Untrusted Dir ...etc...

UndefinedObject(Object)>>doesNotUnderstand: #selector:
    Receiver: nil
    Arguments and temporary variables:
        aMessage: selector: #x
    Receiver's instance variables:
nil

CompiledMethod>>selector:
    Receiver: a CompiledMethod (1207)
    Arguments and temporary variables:
        aSymbol: #x
    Receiver's instance variables:
a CompiledMethod (1207)

ImmutableSlots(Behavior)>>basicAddSelector:withMethod:
    Receiver: a descendent of MutableSlots
    Arguments and temporary variables:
        selector: #x
        compiledMethod: a CompiledMethod (1207)
        oldMethodOrNil: nil
    Receiver's instance variables:
        superclass: MutableSlots
        methodDict: a MethodDictionary(#x->a CompiledMethod (1207) )
        format: 132
        traitComposition: nil
        localSelectors: nil

ImmutableSlots(Behavior)>>basicAddSelector:withMethod:
    Receiver: a descendent of MutableSlots
    Arguments and temporary variables:
        selector: #x
        compiledMethod: a CompiledMethod (1207)
        oldMethodOrNil: nil
    Receiver's instance variables:
        superclass: MutableSlots
        methodDict: a MethodDictionary(#x->a CompiledMethod (1207) )
        format: 132
        traitComposition: nil
        localSelectors: nil
...etc...
 CompiledMethodTest-toReturnXyz-kwl-M3612.st [^] (846 bytes) 12-18-08 17:46

Notes
(0012870)
kwl   
12-18-08 17:50   
uploaded a test which reproduces the problem.

this test should go green once CompiledMethod or Behavior have been fixed.
(0014501)
nicolas cellier   
05-12-14 23:15   
The test have rotten a bit, the trailer should now be CompiledmethodTrailer empty rather than #(0 0 0 0).

Also, the first assertion does not make sense:

    self
        shouldnt: [aBehavior basicAddSelector: #m0 withMethod: CompiledMethod toReturnSelf].

Maybe the intention was shouldnt: [...] raise: MessageNotUnderstood ?

After fixing those two slips, the test pass, so I consider the issue as resolved.
I ignore in which version exactly but won't dissect.