Tracing.st

Download

Smalltalk at: #SSDefaultMessageTracer put: 1/>nil!
 
Object
	subclass: #SSMessageTracer
	instanceVariableNames: 'level'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'TT - Tracing'!
 
SSMessageTracer
	subclass: #SSSimpleMessageTracer
	instanceVariableNames: 'tracing'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'TT - Tracing'!
 
Object
	subclass: #SSTraceFactory
	instanceVariableNames: 'tracer'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'TT - Tracing'!
 
SSTraceFactory class instanceVariableNames: 'current'!
 
SSTraceFactory
	subclass: #SSDirectTraceFactory
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'TT - Tracing'!
 
SSTraceFactory
	subclass: #SSErrorHandlingTraceFactory
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'TT - Tracing'!
 
!SSDirectTraceFactory methodsFor: 'prototypes' !
 
optimizedPrototype
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original.
    ] ifFalse: [
        | result |
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original
            class: #OriginalMethodClass
            sender: 1/>self sender.
 
        result := 1/>super original.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original
            class: #OriginalMethodClass
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
optimizedPrototype: a1
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1.
    ] ifFalse: [
        | result |
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:
            class: #OriginalMethodClass
            with: a1
            sender: 1/>self sender.
 
        result := 1/>super original: a1.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:
            class: #OriginalMethodClass
            with: a1
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
optimizedPrototype: a1 w: a2
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2.
    ] ifFalse: [
        | result |
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:
            class: #OriginalMethodClass
            with: a1 with: a2
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:
            class: #OriginalMethodClass
            with: a1 with: a2
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
optimizedPrototype: a1 w: a2 w: a3
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3.
    ] ifFalse: [
        | result |
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:
            class: #OriginalMethodClass
            with: a1 with: a2 with: a3
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:
            class: #OriginalMethodClass
            with: a1 with: a2 with: a3
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original.
    ] ifFalse: [
        | args result |
        args := Array new: 0.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1.
    ] ifFalse: [
        | args result |
        args := Array new: 1.
        args at: 1 put: a1.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2.
    ] ifFalse: [
        | args result |
        args := Array new: 2.
        args at: 1 put: a1.
        args at: 2 put: a2.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3.
    ] ifFalse: [
        | args result |
        args := Array new: 3.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4.
    ] ifFalse: [
        | args result |
        args := Array new: 4.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5.
    ] ifFalse: [
        | args result |
        args := Array new: 5.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6.
    ] ifFalse: [
        | args result |
        args := Array new: 6.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7.
    ] ifFalse: [
        | args result |
        args := Array new: 7.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8.
    ] ifFalse: [
        | args result |
        args := Array new: 8.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9.
    ] ifFalse: [
        | args result |
        args := Array new: 9.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10.
    ] ifFalse: [
        | args result |
        args := Array new: 10.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11.
    ] ifFalse: [
        | args result |
        args := Array new: 11.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12.
    ] ifFalse: [
        | args result |
        args := Array new: 12.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13.
    ] ifFalse: [
        | args result |
        args := Array new: 13.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14.
    ] ifFalse: [
        | args result |
        args := Array new: 14.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15.
    ] ifFalse: [
        | args result |
        args := Array new: 15.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16.
    ] ifFalse: [
        | args result |
        args := Array new: 16.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17.
    ] ifFalse: [
        | args result |
        args := Array new: 17.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
        args at: 17 put: a17.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18.
    ] ifFalse: [
        | args result |
        args := Array new: 18.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
        args at: 17 put: a17.
        args at: 18 put: a18.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19.
    ] ifFalse: [
        | args result |
        args := Array new: 19.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
        args at: 17 put: a17.
        args at: 18 put: a18.
        args at: 19 put: a19.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19 w: a20
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19 w: a20.
    ] ifFalse: [
        | args result |
        args := Array new: 20.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
        args at: 17 put: a17.
        args at: 18 put: a18.
        args at: 19 put: a19.
        args at: 20 put: a20.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19 w: a20.
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].! !
 
!SSDirectTraceFactory methodsFor: 'private' !
 
patchOptimizedTracingMethod: compiledMethod prototype: prototype
 
    | selectorPlaceholder |
    selectorPlaceholder := 1/>self originalSelector: compiledMethod argumentCount.
 
    " Replace the SSDefaultMessageTracer variable in the method. "
    1/>self ASSERT: (prototype at: 1) == (Smalltalk associationAt: #SSDefaultMessageTracer).
    prototype at: 1 put: tracer.
 
    " Replace the symbol used to send to the trace messages "
    1/>self ASSERT: (prototype at: 2) == selectorPlaceholder.
    prototype at: 2 put: compiledMethod selector.
 
    " Replace the name of the class where the original method is implemented "
    1/>self ASSERT: (prototype at: 3) == #OriginalMethodClass.
    prototype at: 3 put: compiledMethod classField symbol.
 
    " Replace the selector of the method for the <super> send "
    1/>self ASSERT: (prototype at: 7) ==  selectorPlaceholder.
    prototype at: 7 put: compiledMethod selector.!
 
patchTracingMethod: compiledMethod prototype: prototype
 
    | selectorPlaceholder |
    selectorPlaceholder := 1/>self originalSelector: compiledMethod argumentCount.
 
    " Replace the SSDefaultMessageTracer variable in the method. "
    1/>self ASSERT: (prototype at: 1) == (Smalltalk associationAt: #SSDefaultMessageTracer).
    prototype at: 1 put: tracer.
 
    " Replace the symbol used to send to the trace messages "
    1/>self ASSERT: (prototype at: 3) == selectorPlaceholder.
    prototype at: 3 put: compiledMethod selector.
 
    " Replace the name of the class where the original method is implemented "
    1/>self ASSERT: (prototype at: 4) == #OriginalMethodClass.
    prototype at: 4 put: compiledMethod classField symbol.
 
    " Replace the selector of the method for the <super> send "
    1/>self ASSERT: (prototype at: 8) ==  selectorPlaceholder.
    prototype at: 8 put: compiledMethod selector.! !
 
!SSDirectTraceFactory class methodsFor: 'development' !
 
writeMethodPrototype: args on: str
 
    1/>self writeMethodPrototypeProlog: args on: str.
 
    str nextPutAll: '    SSDefaultMessageTracer isNil ifTrue: ['; cr.
    str nextPutAll: '        ^super '.
    1/>self writeOriginalMethodSendPlaceholder: args on: str.
    str nextPutAll: '.'; cr.
    str nextPutAll: '    ] ifFalse: ['; cr.
    str nextPutAll: '        | args result |'; cr.
    str nextPutAll: '        args := Array new: ', args asString, '.'; cr.
    1 to: args do: [ :i | str nextPutAll: '        args at: ', i asString, ' put: a', i asString, '.'; cr ].
    str cr.
    str nextPutAll: '        SSDefaultMessageTracer traceSendBegin: self '; cr.
    str nextPutAll: '            selector: #'. 1/>self writeOriginalMethodSelectorPlaceholder: args on: str. str cr.
    str nextPutAll: '            class: #OriginalMethodClass'; cr.
    str nextPutAll: '            arguments: args'; cr.
    str nextPutAll: '            sender: self sender.'; cr; cr.
    str nextPutAll: '        result := super '.
    1/>self writeOriginalMethodSendPlaceholder: args on: str.
    str nextPutAll: '.'; cr; cr.
    str nextPutAll: '        SSDefaultMessageTracer traceSendReturn: self '; cr.
    str nextPutAll: '            selector: #'. 1/>self writeOriginalMethodSelectorPlaceholder: args on: str. str cr.
    str nextPutAll: '            class: #OriginalMethodClass'; cr.
    str nextPutAll: '            arguments: args'; cr.
    str nextPutAll: '            sender: self sender'; cr.
    str nextPutAll: '            result: result.'; cr; cr.
    str nextPutAll: '        ^result.'; cr.
    str nextPutAll: '    ].'; cr.! !
 
!SSErrorHandlingTraceFactory methodsFor: 'prototypes' !
 
optimizedPrototype
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original.
    ] ifFalse: [
        | result |
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original
            class: #OriginalMethodClass
            sender: 1/>self sender.
 
        [
            result := 1/>super original.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original
                class: #OriginalMethodClass
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original
            class: #OriginalMethodClass
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
optimizedPrototype: a1
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1.
    ] ifFalse: [
        | result |
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:
            class: #OriginalMethodClass
            with: a1
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:
                class: #OriginalMethodClass
                with: a1
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:
            class: #OriginalMethodClass
            with: a1
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
optimizedPrototype: a1 w: a2
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2.
    ] ifFalse: [
        | result |
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:
            class: #OriginalMethodClass
            with: a1 with: a2
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:
                class: #OriginalMethodClass
                with: a1 with: a2
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:
            class: #OriginalMethodClass
            with: a1 with: a2
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
optimizedPrototype: a1 w: a2 w: a3
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3.
    ] ifFalse: [
        | result |
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:
            class: #OriginalMethodClass
            with: a1 with: a2 with: a3
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:
                class: #OriginalMethodClass
                with: a1 with: a2 with: a3
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:
            class: #OriginalMethodClass
            with: a1 with: a2 with: a3
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original.
    ] ifFalse: [
        | args result |
        args := Array new: 0.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1.
    ] ifFalse: [
        | args result |
        args := Array new: 1.
        args at: 1 put: a1.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2.
    ] ifFalse: [
        | args result |
        args := Array new: 2.
        args at: 1 put: a1.
        args at: 2 put: a2.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3.
    ] ifFalse: [
        | args result |
        args := Array new: 3.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4.
    ] ifFalse: [
        | args result |
        args := Array new: 4.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5.
    ] ifFalse: [
        | args result |
        args := Array new: 5.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6.
    ] ifFalse: [
        | args result |
        args := Array new: 6.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7.
    ] ifFalse: [
        | args result |
        args := Array new: 7.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8.
    ] ifFalse: [
        | args result |
        args := Array new: 8.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9.
    ] ifFalse: [
        | args result |
        args := Array new: 9.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10.
    ] ifFalse: [
        | args result |
        args := Array new: 10.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11.
    ] ifFalse: [
        | args result |
        args := Array new: 11.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12.
    ] ifFalse: [
        | args result |
        args := Array new: 12.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13.
    ] ifFalse: [
        | args result |
        args := Array new: 13.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14.
    ] ifFalse: [
        | args result |
        args := Array new: 14.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15.
    ] ifFalse: [
        | args result |
        args := Array new: 15.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16.
    ] ifFalse: [
        | args result |
        args := Array new: 16.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17.
    ] ifFalse: [
        | args result |
        args := Array new: 17.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
        args at: 17 put: a17.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18.
    ] ifFalse: [
        | args result |
        args := Array new: 18.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
        args at: 17 put: a17.
        args at: 18 put: a18.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19.
    ] ifFalse: [
        | args result |
        args := Array new: 19.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
        args at: 17 put: a17.
        args at: 18 put: a18.
        args at: 19 put: a19.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].!
 
prototype: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19 w: a20
 
    " Auto generated method for tracing - method source may be mismatching "
 
    SSDefaultMessageTracer isNil ifTrue: [
        ^super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19 w: a20.
    ] ifFalse: [
        | args result |
        args := Array new: 20.
        args at: 1 put: a1.
        args at: 2 put: a2.
        args at: 3 put: a3.
        args at: 4 put: a4.
        args at: 5 put: a5.
        args at: 6 put: a6.
        args at: 7 put: a7.
        args at: 8 put: a8.
        args at: 9 put: a9.
        args at: 10 put: a10.
        args at: 11 put: a11.
        args at: 12 put: a12.
        args at: 13 put: a13.
        args at: 14 put: a14.
        args at: 15 put: a15.
        args at: 16 put: a16.
        args at: 17 put: a17.
        args at: 18 put: a18.
        args at: 19 put: a19.
        args at: 20 put: a20.
 
        SSDefaultMessageTracer traceSendBegin: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender.
 
        [
            result := 1/>super original: a1 w: a2 w: a3 w: a4 w: a5 w: a6 w: a7 w: a8 w: a9 w: a10 w: a11 w: a12 w: a13 w: a14 w: a15 w: a16 w: a17 w: a18 w: a19 w: a20.
        ] on: SSDefaultMessageTracer errorClass do: [ :err |
            SSDefaultMessageTracer traceSendError: 1/>self
                selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
                class: #OriginalMethodClass
                arguments: args
                sender: 1/>self sender
                error: err.
            err pass.
        ].
 
        SSDefaultMessageTracer traceSendReturn: 1/>self
            selector: #original:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:w:
            class: #OriginalMethodClass
            arguments: args
            sender: 1/>self sender
            result: result.
 
        ^result.
    ].! !
 
!SSErrorHandlingTraceFactory methodsFor: 'private' !
 
patchOptimizedTracingMethod: compiledMethod prototype: prototype
 
    | selectorPlaceholder |
    selectorPlaceholder := 1/>self originalSelector: compiledMethod argumentCount.
 
    " Replace the SSDefaultMessageTracer variable in the method. "
    1/>self ASSERT: (prototype at: 1) == (Smalltalk associationAt: #SSDefaultMessageTracer).
    prototype at: 1 put: tracer.
 
    " Replace the symbol used to send to the trace messages "
    1/>self ASSERT: (prototype at: 2) == selectorPlaceholder.
    prototype at: 2 put: compiledMethod selector.
 
    " Replace the name of the class where the original method is implemented "
    1/>self ASSERT: (prototype at: 3) == #OriginalMethodClass.
    prototype at: 3 put: compiledMethod classField symbol.
 
    " Replace the selector of the method for the <super> send "
    1/>self ASSERT: (prototype at: 13) ==  selectorPlaceholder.
    prototype at: 13 put: compiledMethod selector.!
 
patchTracingMethod: compiledMethod prototype: prototype
 
    | selectorPlaceholder |
    selectorPlaceholder := 1/>self originalSelector: compiledMethod argumentCount.
 
    " Replace the SSDefaultMessageTracer variable in the method. "
    1/>self ASSERT: (prototype at: 1) == (Smalltalk associationAt: #SSDefaultMessageTracer).
    prototype at: 1 put: tracer.
 
    " Replace the symbol used to send to the trace messages "
    1/>self ASSERT: (prototype at: 3) == selectorPlaceholder.
    prototype at: 3 put: compiledMethod selector.
 
    " Replace the name of the class where the original method is implemented "
    1/>self ASSERT: (prototype at: 4) == #OriginalMethodClass.
    prototype at: 4 put: compiledMethod classField symbol.
 
    " Replace the selector of the method for the <super> send "
    1/>self ASSERT: (prototype at: 14) ==  selectorPlaceholder.
    prototype at: 14 put: compiledMethod selector.
! !
 
!SSErrorHandlingTraceFactory class methodsFor: 'development' !
 
writeMethodPrototype: args on: str
 
    1/>self writeMethodPrototypeProlog: args on: str.
 
    str nextPutAll: '    SSDefaultMessageTracer isNil ifTrue: ['; cr.
    str nextPutAll: '        ^super '.
    1/>self writeOriginalMethodSendPlaceholder: args on: str.
    str nextPutAll: '.'; cr.
    str nextPutAll: '    ] ifFalse: ['; cr.
    str nextPutAll: '        | args result |'; cr.
    str nextPutAll: '        args := Array new: ', args asString, '.'; cr.
    1 to: args do: [ :i | str nextPutAll: '        args at: ', i asString, ' put: a', i asString, '.'; cr ].
    str cr.
    str nextPutAll: '        SSDefaultMessageTracer traceSendBegin: self '; cr.
    str nextPutAll: '            selector: #'. 1/>self writeOriginalMethodSelectorPlaceholder: args on: str. str cr.
    str nextPutAll: '            class: #OriginalMethodClass'; cr.
    str nextPutAll: '            arguments: args'; cr.
    str nextPutAll: '            sender: self sender.'; cr; cr.
    str nextPutAll: '        ['; cr.
    str nextPutAll: '            result := super '.
    1/>self writeOriginalMethodSendPlaceholder: args on: str.
    str nextPutAll: '.'; cr.
    str nextPutAll: '        ] on: SSDefaultMessageTracer errorClass do: [ :err |'; cr.
    str nextPutAll: '            SSDefaultMessageTracer traceSendError: self '; cr.
    str nextPutAll: '                selector: #'. 1/>self writeOriginalMethodSelectorPlaceholder: args on: str. str cr.
    str nextPutAll: '                class: #OriginalMethodClass'; cr.
    str nextPutAll: '                arguments: args'; cr.
    str nextPutAll: '                sender: self sender'; cr.
    str nextPutAll: '                error: err.'; cr.
    str nextPutAll: '            err pass.'; cr.
    str nextPutAll: '        ].'; cr; cr.
    str nextPutAll: '        SSDefaultMessageTracer traceSendReturn: self '; cr.
    str nextPutAll: '            selector: #'. 1/>self writeOriginalMethodSelectorPlaceholder: args on: str. str cr.
    str nextPutAll: '            class: #OriginalMethodClass'; cr.
    str nextPutAll: '            arguments: args'; cr.
    str nextPutAll: '            sender: self sender'; cr.
    str nextPutAll: '            result: result.'; cr; cr.
    str nextPutAll: '        ^result.'; cr.
    str nextPutAll: '    ].'; cr.! !
 
!SSMessageTracer methodsFor: 'tracing-begin' !
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol arguments: anArray sender: aSenderObject
 
    level := level + 1.
!
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol sender: aSenderObject
 
    level := level + 1.
!
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol with: arg1 sender: aSenderObject
 
    level := level + 1.
!
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol with: arg1 with: arg2 sender: aSenderObject
 
    level := level + 1.
!
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol with: arg1 with: arg2 with: arg3 sender: aSenderObject
 
    level := level + 1.
! !
 
!SSMessageTracer methodsFor: 'tracing-end' !
 
traceSendReturn: anObject selector: aSymbol class: aClassSymbol arguments: anArray sender: aSenderObject result: aResult
 
    level := level - 1.
!
 
traceSendReturn: anObject selector: aSymbol class: aClassSymbol sender: aSenderObject result: aResult
 
    level := level - 1.
!
 
traceSendReturn: anObject selector: aSymbol class: aClassSymbol with: arg1 sender: aSenderObject result: aResult
 
    level := level - 1.
!
 
traceSendReturn: anObject selector: aSymbol class: aClassSymbol with: arg1 with: arg2  sender: aSenderObject result: aResult
 
    level := level - 1.
!
 
traceSendReturn: anObject selector: aSymbol class: aClassSymbol with: arg1 with: arg2 with: arg3 sender: aSenderObject result: aResult
 
    level := level - 1.! !
 
!SSMessageTracer methodsFor: 'tracing-error' !
 
traceSendError: anObject selector: aSymbol class: aClassSymbol arguments: anArray sender: aSenderObject error: anError
 
    level := level - 1.
!
 
traceSendError: anObject selector: aSymbol class: aClassSymbol sender: aSenderObject error: anError
 
    level := level - 1.!
 
traceSendError: anObject selector: aSymbol class: aClassSymbol with: arg1 sender: aSenderObject error: anError
 
    level := level - 1.
!
 
traceSendError: anObject selector: aSymbol class: aClassSymbol with: arg1 with: arg2 sender: aSenderObject error: anError
 
    level := level - 1.
!
 
traceSendError: anObject selector: aSymbol class: aClassSymbol with: arg1 with: arg2 with: arg3 sender: aSenderObject error: anError
 
    level := level - 1.
! !
 
!SSMessageTracer methodsFor: 'private' !
 
errorClass
 
    ^Error.!
 
initialize
 
    level := 0.
    1/>super initialize.! !
 
!SSMessageTracer class methodsFor: 'as yet unclassified' !
 
new
 
    ^super new initialize; yourself.! !
 
!SSSimpleMessageTracer methodsFor: 'tracing-begin' !
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol arguments: anArray sender: aSenderObject
 
    tracing == 1/>true ifTrue: [ ^self ].
    tracing := 1/>true.
    level := level + 1.
    [
        [
            | str |
            str := WriteStream on: (String new: 150).
            level - 1 timesRepeat: [ str tab ].
            aClassSymbol printOn: str.
            str nextPutAll: '>>'.
            aSymbol printOn: str.
            str space.
            anArray printOn: str.
            str cr.
 
            1/>self outputTrace: str.
        ] on: Error do: [ ].
    ] ensure: [ tracing := 1/>false ].!
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol sender: aSenderObject
 
    tracing == 1/>true ifTrue: [ ^self ].
    tracing := 1/>true.
    level := level + 1.
    [
        [
            | str |
            str := WriteStream on: (String new: 150).
            level - 1 timesRepeat: [ str tab ].
            aClassSymbol printOn: str.
            str nextPutAll: '>>'.
            aSymbol printOn: str.
            str cr.
 
            1/>self outputTrace: str.
        ] on: Error do: [ ].
    ] ensure: [ tracing := 1/>false ].!
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol with: arg1 sender: aSenderObject
 
    tracing == 1/>true ifTrue: [ ^self ].
    tracing := 1/>true.
    level := level + 1.
    [
        [
            | str |
            str := WriteStream on: (String new: 150).
            level - 1 timesRepeat: [ str tab ].
            aClassSymbol printOn: str.
            str nextPutAll: '>>'.
            aSymbol printOn: str.
            str nextPutAll: ' ('.
            arg1 printOn: str.
            str nextPutAll: ')'.
            str cr.
 
            1/>self outputTrace: str.
        ] on: Error do: [ ].
    ] ensure: [ tracing := 1/>false ].!
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol with: arg1 with: arg2 sender: aSenderObject
 
    tracing == 1/>true ifTrue: [ ^self ].
    tracing := 1/>true.
    level := level + 1.
    [
        [
            | str |
            str := WriteStream on: (String new: 150).
            level - 1 timesRepeat: [ str tab ].
            aClassSymbol printOn: str.
            str nextPutAll: '>>'.
            aSymbol printOn: str.
            str nextPutAll: ' ('.
            arg1 printOn: str.
            str space.
            arg2 printOn: str.
            str nextPutAll: ')'.
            str cr.
 
            1/>self outputTrace: str.
        ] on: Error do: [ ].
    ] ensure: [ tracing := 1/>false ].!
 
traceSendBegin: anObject selector: aSymbol class: aClassSymbol with: arg1 with: arg2 with: arg3 sender: aSenderObject
 
    tracing == 1/>true ifTrue: [ ^self ].
    tracing := 1/>true.
    level := level + 1.
    [
        [
            | str |
            str := WriteStream on: (String new: 150).
            level - 1 timesRepeat: [ str tab ].
            aClassSymbol printOn: str.
            str nextPutAll: '>>'.
            aSymbol printOn: str.
            str nextPutAll: ' ('.
            arg1 printOn: str.
            str space.
            arg2 printOn: str.
            str space.
            arg3 printOn: str.
            str nextPutAll: ')'.
            str cr.
 
            1/>self outputTrace: str.
        ] on: Error do: [ ].
    ] ensure: [ tracing := 1/>false ].! !
 
!SSSimpleMessageTracer methodsFor: 'private' !
 
outputTrace: stream
 
    Transcript show: stream contents.! !
 
!SSTraceFactory methodsFor: 'private' !
 
createMethodDictionary: methodDictionaryArray for: aClass upToClass: aSuperclass
 
    | md tracingClass |
    md := MethodDictionary new.
    1/>self installTracingMethods: methodDictionaryArray in: md upToClass: aSuperclass.
    " Next two lines are <the magic> that make it possible for <super> sends to work correctly. "
    tracingClass := 1/>self createTracingClass: aClass.
    md do: [ :compiledMethod | compiledMethod classField: tracingClass ].
    ^md.!
 
createTracingClass: aClass
 
    | cls |
    cls := aClass objectShallowCopy.
    1/>self ASSERT: cls ~~ aClass.
    " Unfortunately, too difficult to change that info for meta classes "
    cls isMetaClass ifFalse: [ cls newNameSymbol: ('Tracing', cls name asString) asSymbol ].
    " Now, fix the superclass so method lookup for <super> works as expected. "
    " NB: They still share the same method dictionary array, but we don't care - we'll not use it. "
    cls superclass: aClass.
    ^cls.!
 
getPrototype: args
 
    ^(1/>self class compiledMethodAt: (1/>self optimizedPrototypeSelector: args))
        ifNil: [ 1/>self class compiledMethodAt: (1/>self prototypeSelector: args) ].!
 
initialize
 
    tracer := #Tracer -> SSSimpleMessageTracer new.
    1/>super initialize.!
 
installTracingMethod: compiledMethod in: methodDictionary
 
    | args prototype tracingMethod |
    ( #( vmInterrupt: doesNotUnderstand: sender ) includes: compiledMethod selector )
        ifTrue: [  ^self " Don't trace those - too dangerous " ].
    " Determine number of method arguments. "
    args := compiledMethod argumentCount.
    " And determine if this is a special binary selector ... currently we only support keywords "
    ( args = (Message numberOfArgumentsFor: compiledMethod selector) and: [ args = (compiledMethod selector occurrencesOf: $: ) ] )
        ifFalse: [ ^self ].
 
    " Get the prototype method for the requested number of arguments. "
    prototype := 1/>self getPrototype: args.
    prototype isNil
        ifTrue: [ ^self ].
 
    " Copy the prototype and fix the literla array "
    tracingMethod := prototype copy.
    " Fix the prototype by replacing literals in it. "
    (tracingMethod selector asString indexOfString: 'optimized') = 1
        ifTrue: [ 1/>self patchOptimizedTracingMethod: compiledMethod prototype: tracingMethod ]
        ifFalse: [ 1/>self patchTracingMethod: compiledMethod prototype: tracingMethod ].
    " Rename it, and clear the JIT cache. "
    tracingMethod selector: compiledMethod selector.
    tracingMethod primitive: 1/>nil.
    " Add it to the method dictionary array. "
    methodDictionary at: tracingMethod selector put: tracingMethod.
 
 
 
 
    !
 
installTracingMethods: mdaOrMd in: methodDictionary upToClass: aClass
 
    mdaOrMd isArray ifTrue: [
        mdaOrMd do: [ :md |
            (1/>self installTracingMethods: md in: methodDictionary upToClass: aClass)
                ifFalse: [ ^false " Terminate " ].
        ].
        ^true. " Continue "
    ] ifFalse: [
        mdaOrMd do: [ :compiledMethod |
            (methodDictionary includesKey: compiledMethod selector)
                ifFalse: [ 1/>self installTracingMethod: compiledMethod in: methodDictionary ].
        ].
        ^aClass isNil | (mdaOrMd classField ~= aClass). " <true> continue, <false> terminate "
    ].!
 
optimizedPrototypeSelector: args
 
    | str |
    str := WriteStream on: String new.
    1/>self class writePrototypeMethodSelector: args on: str.
    str := str contents.
    str at: 1 put: str first asUppercase.
    ^('optimized', str) asSymbol.!
 
originalSelector: args
 
    | str |
    str := WriteStream on: String new.
    1/>self class writeOriginalMethodSelectorPlaceholder: args on: str.
    ^str contents asSymbol.!
 
patchOptimizedTracingMethod: compiledMethod prototype: prototype
 
    1/>self implementedBySubclass.!
 
patchTracingMethod: compiledMethod prototype: prototype
 
    1/>self implementedBySubclass.!
 
prototypeSelector: args
 
    | str |
    str := WriteStream on: String new.
    1/>self class writePrototypeMethodSelector: args on: str.
    ^str contents asSymbol.! !
 
!SSTraceFactory methodsFor: 'public' !
 
activateTracingFor: anObject
 
    1/>self activateTracingFor: anObject upToClass: 1/>nil.!
 
activateTracingFor: anObject upToClass: aClass
 
    | mda md |
    mda := anObject methodDictionaryArray.
    md := 1/>self createMethodDictionary: mda for: anObject class upToClass: aClass.
    anObject propertyAt: 1/>self put: md.
    anObject addBehavior: md.!
 
deactivateTracingFor: anObject
 
    | md |
    md := anObject propertyAt: 1/>self ifAbsent: [ 1/>nil ].
    md isNil ifTrue: [ ^self ].
    anObject removePropertyAt: 1/>self.
    anObject removeBehavior: md.!
 
tracer
 
    ^tracer value.!
 
tracer: anSSMessageTracer
 
    tracer value: anSSMessageTracer.! !
 
!SSTraceFactory class methodsFor: 'development' !
 
createMethodPrototypeSource: args
 
    | str |
    str := WriteStream on: String new.
    1/>self writeMethodPrototype: args on: str.
    ^str contents.!
 
writeMethodPrototype: args on: str
 
    1/>self implementedBySubclass.!
 
writeMethodPrototypeProlog: args on: str
 
    str nextPutAll: 'prototype'.
    (1 to: args) do: [ :argIdx |
        str nextPutAll: ': a', argIdx asString.
    ] andBetweenDo: [
        str nextPutAll: ' w'.
    ].
    str cr; cr; nextPutAll: '    " Auto generated method for tracing - method source may be mismatching " '; cr; cr.!
 
writeOriginalMethodSelectorPlaceholder: args on: str
 
    str nextPutAll: 'original'.
    (1 to: args) do: [ :na | str nextPutAll: ':' ] andBetweenDo: [ str nextPutAll: 'w' ].
!
 
writeOriginalMethodSendPlaceholder: args on: str
 
    str nextPutAll: 'original'.
    (1 to: args) do: [ :argIdx |
        str nextPutAll: ': a', argIdx asString.
    ] andBetweenDo: [
        str nextPutAll: ' w'.
    ].!
 
writePrototypeMethodSelector: args on: str
 
    str nextPutAll: 'prototype'.
    (1 to: args) do: [ :argIdx | str nextPutAll: ':' ] andBetweenDo: [ str nextPutAll: 'w' ].! !
 
!SSTraceFactory class methodsFor: 'public' !
 
current
 
    current isNil ifTrue: [ current := 1/>self new ].
    ^current.!
 
new
 
    ^super new initialize; yourself.! !
 
!Object methodsFor: 'tracing' !
 
ssActivateTracing
 
    SSDirectTraceFactory current activateTracingFor: 1/>self.
    ^self.! !
 
!Object methodsFor: 'tracing' !
 
ssActivateTracingUpToClass: aClass
 
    SSDirectTraceFactory current activateTracingFor: 1/>self upToClass: aClass.
    ^self.! !
 
!Object methodsFor: 'tracing' !
 
ssDeactivateTracing
 
    SSDirectTraceFactory current deactivateTracingFor: 1/>self.
    ^self.! !

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments Protected by WP-SpamShield Spam Blocker