'From Squeak 2.4b of April 23, 1999 on 26 May 1930 at 7:52:12 am'! Message subclass: #ReversedMessage instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Methods'! UndefinedObject subclass: #Trampoline instanceVariableNames: 'collection iterationMessage ' classVariableNames: '' poolDictionaries: '' category: 'Collections-Support'! Trampoline subclass: #ReversingTrampoline instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Collections-Support'! !Object methodsFor: 'iteration support' stamp: 'mpw 1/1/1901 02:30'! collect ^(ReversingTrampoline new) collection:self; iterationSelector:#collect:. ! ! !Object methodsFor: 'iteration support' stamp: 'mpw 1/1/1901 02:38'! do ^(ReversingTrampoline new) collection:self; iterationSelector:#do:. ! ! !Object methodsFor: 'iteration support' stamp: 'mpw 7/1/2035 14:09'! reject ^(ReversingTrampoline new) collection:self; iterationSelector:#reject:. ! ! !Object methodsFor: 'iteration support' stamp: 'mpw 1/1/1901 02:30'! select ^(ReversingTrampoline new) collection:self; iterationSelector:#select:. ! ! !Collection methodsFor: 'enumerating' stamp: 'mpw 1/1/1901 00:17'! collect ^(Trampoline new) collection:self; iterationSelector:#collect:. ! ! !Collection methodsFor: 'enumerating' stamp: 'mpw 7/1/2035 14:03'! contains ^(Trampoline new) collection:self; iterationSelector:#contains:. ! ! !Collection methodsFor: 'enumerating' stamp: 'mpw 7/1/2035 14:02'! count ^(Trampoline new) collection:self; iterationSelector:#count:. ! ! !Collection methodsFor: 'enumerating' stamp: 'mpw 7/1/2035 14:01'! detect ^(Trampoline new) collection:self; iterationSelector:#detect:. ! ! !Collection methodsFor: 'enumerating' stamp: 'mpw 1/1/1901 00:17'! do ^(Trampoline new) collection:self; iterationSelector:#do:. ! ! !Collection methodsFor: 'enumerating' stamp: 'mpw 1/1/1901 21:44'! inject: thisValue | msg | msg _ Message selector:#inject:into: arguments:(Array with:thisValue with:nil). ^(Trampoline new) collection:self; iterationMessage:msg. ! ! !Collection methodsFor: 'enumerating' stamp: 'mpw 1/1/1901 21:43'! reject ^(Trampoline new) collection:self; iterationSelector:#reject:. ! ! !Collection methodsFor: 'enumerating' stamp: 'mpw 1/1/1901 00:17'! select ^(Trampoline new) collection:self; iterationSelector:#select:. ! ! !Message methodsFor: 'sending' stamp: 'mpw 1/1/1901 00:22'! value:receiver lookupClass _ nil. ^self sentTo:receiver. ! ! !Message methodsFor: 'sending' stamp: 'mpw 1/1/1901 02:25'! value:receiver value:arg1 args at:1 put:arg1. lookupClass _ nil. " don't use self value: because of subclass override ... " ^self sentTo:receiver. ! ! !ReversedMessage methodsFor: 'as yet unclassified' stamp: 'mpw 1/1/1901 02:37'! sentTo: receiver | realArgs realReceiver | realArgs _ args copy. realArgs at:1 put:receiver. realReceiver _ args at:1. ^ realReceiver perform: selector withArguments: realArgs.! ! !Symbol methodsFor: 'block compatibility' stamp: 'mpw 1/1/1901 00:01'! value:receiver ^receiver perform:self. ! ! !Symbol methodsFor: 'block compatibility' stamp: 'mpw 1/1/1901 01:38'! value:receiver value:arg ^receiver perform:self with:arg. ! ! Smalltalk renameClassNamed: #Trampline as: #Trampoline! !Trampoline methodsFor: 'as yet unclassified' stamp: 'mpw 7/1/2035 14:06'! = anObject ^self doesNotUnderstand:(Message selector:#= argument:anObject). ! ! !Trampoline methodsFor: 'as yet unclassified' stamp: 'mpw 1/1/1901 00:13'! collection:target collection _ target. ! ! !Trampoline methodsFor: 'as yet unclassified' stamp: 'mpw 1/1/1901 21:35'! doesNotUnderstand:aMessage | args | args _ iterationMessage arguments. args at:args size put:aMessage. ^iterationMessage sentTo:collection. ! ! !Trampoline methodsFor: 'as yet unclassified' stamp: 'mpw 1/1/1901 21:31'! iterationMessage:msg iterationMessage _ msg. ! ! !Trampoline methodsFor: 'as yet unclassified' stamp: 'mpw 1/1/1901 21:41'! iterationSelector:sel | msg | msg _ Message selector:sel arguments:(Array new:sel numArgs). ^self iterationMessage:msg. ! ! !ReversingTrampoline methodsFor: 'as yet unclassified' stamp: 'mpw 1/1/1901 02:32'! doesNotUnderstand:aMessage | args originalTarget | args _ iterationMessage arguments. originalTarget _ collection. collection _ aMessage arguments at:1. aMessage arguments at:1 put:originalTarget. args at:args size put:(ReversedMessage selector:aMessage selector arguments:aMessage arguments). ^iterationMessage sentTo:collection. ! ! !Trampoline class methodsFor: 'as yet unclassified' stamp: 'mpw 1/1/1901 00:18'! new ^self basicNew. ! !