[commit] r2311 - OSCogVM source as per VMMaker-oscog.31. Streamline the booleanCheat interpreter

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

[commit] r2311 - OSCogVM source as per VMMaker-oscog.31. Streamline the booleanCheat interpreter

commits-3
 
Author: eliot
Date: 2010-09-19 11:56:42 -0700 (Sun, 19 Sep 2010)
New Revision: 2311

Modified:
   branches/Cog/image/VMMaker-Squeak4.1.changes
   branches/Cog/image/VMMaker-Squeak4.1.image
   branches/Cog/src/vm/cogit.c
   branches/Cog/src/vm/cogit.h
   branches/Cog/src/vm/cogmethod.h
   branches/Cog/src/vm/cointerp.c
   branches/Cog/src/vm/cointerp.h
   branches/Cog/src/vm/gcc3x-cointerp.c
   branches/Cog/src/vm/interp.h
   branches/Cog/stacksrc/vm/gcc3x-interp.c
   branches/Cog/stacksrc/vm/interp.c
   branches/Cog/stacksrc/vm/interp.h
Log:
OSCogVM source as per VMMaker-oscog.31.  Streamline the booleanCheat interpreter
conditional branch optimization.


Modified: branches/Cog/image/VMMaker-Squeak4.1.changes
===================================================================
--- branches/Cog/image/VMMaker-Squeak4.1.changes 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/image/VMMaker-Squeak4.1.changes 2010-09-19 18:56:42 UTC (rev 2311)
@@ -130676,4 +130676,4077 @@
  rep user: user;
  password: pw ]!
 
-----QUIT----{18 September 2010 . 9:54:29 pm} VMMaker-Squeak4.1.image priorSource: 5252869!
\ No newline at end of file
+----QUIT----{18 September 2010 . 9:54:29 pm} VMMaker-Squeak4.1.image priorSource: 5252869!
+
+----STARTUP----{19 September 2010 . 11:13:16 am} as /Users/eliot/Cog/oscog/Cog.squeakvm.org/image/VMMaker-Squeak4.1.image!
+
+!SequenceableCollection methodsFor: '*Balloon' stamp: 'NS 5/30/2001 20:56' prior: 28844125!
+asPointArray
+ "Answer an PointArray whose elements are the elements of the receiver, in
+ the same order."
+
+ | pointArray |
+ pointArray := PointArray new: self size.
+ 1 to: self size do:[:i| pointArray at: i put: (self at: i)].
+ ^pointArray! !
+!Bezier3Segment class methodsFor: 'examples' stamp: 'ar 9/1/2010 22:14' prior: 17389317!
+example2
+ "draws a cubic bezier on the screen"
+ | c canvas |
+ c := Bezier3Segment new
+ from: 0 @ 0
+ via: 0 @ 100
+ and: 100 @ 0
+ to: 100 @ 100.
+ canvas := Display getCanvas asBalloonCanvas
+ canvas aaLevel: 4.
+ canvas
+ drawBezier3Shape: c asPointArray
+ color: Color transparent
+ borderWidth: 1
+ borderColor: Color black! !
+!Url class methodsFor: 'parsing' stamp: 'ar 9/1/2010 00:28' prior: 32793367!
+urlClassForScheme: scheme
+ (scheme isNil or: [scheme = 'http']) ifTrue: [^HttpUrl].
+ scheme = 'https' ifTrue: [^HttpUrl].
+ scheme = 'ftp' ifTrue: [^FtpUrl].
+ scheme = 'file' ifTrue: [^FileUrl].
+ scheme = 'mailto' ifTrue: [^MailtoUrl].
+ scheme = 'browser' ifTrue: [^BrowserUrl].
+ ^GenericUrl! !
+!String methodsFor: '*network-uuid' stamp: 'mw 1/30/2004 11:53' prior: 30147868!
+asAlphaNumeric: totalSize extraChars: additionallyAllowed mergeUID: minimalSizeOfRandomPart
+ "Generates a String with unique identifier ( UID ) qualities, the difference to a
+ UUID is that its beginning is derived from the receiver, so that it has a meaning
+ for a human reader.
+
+ Answers a String of totalSize, which consists of 3 parts
+ 1.part: the beginning of the receiver only consisting of
+ a-z, A-Z, 0-9 and extraChars in Collection additionallyAllowed ( which can be nil )
+ 2.part: a single _
+ 3.part: a ( random ) UID of size >= minimalSizeOfRandomPart consisting of
+ a-z, A-Z, 0-9
+
+ Starting letters are capitalized.
+ TotalSize must be at least 1.
+ Exactly 1 occurrence of $_ is guaranteed ( unless additionallyAllowed includes $_ ).
+ The random part has even for small sizes good UID qualitites for many practical purposes.
+ If only lower- or uppercase letters are demanded, simply convert the answer with
+ say #asLowercase. The probability of a duplicate will rise only moderately ( see below ).
+
+ Example:
+ size of random part = 10
+ in n generated UIDs the chance p of having non-unique UIDs is
+ n = 10000 ->  p < 1e-10 if answer is reduced to lowerCase: p < 1.4 e-8
+ n = 100000 -> p < 1e-8
+ at the bottom is a snippet for your own calculations  
+ Note: the calculated propabilites are theoretical,
+ for the actually used random generator they may be much worse"
+
+ | stream out sizeOfFirstPart index ascii ch skip array random |
+ totalSize > minimalSizeOfRandomPart
+ ifFalse: [ self errorOutOfBounds ].
+ stream := ReadStream on: self.
+ out := WriteStream on: ( String new: totalSize ).
+ index := 0.
+ skip := true.
+ sizeOfFirstPart := totalSize - minimalSizeOfRandomPart - 1.
+ [ stream atEnd or: [ index >= sizeOfFirstPart ]]
+ whileFalse: [
+ ((( ascii := ( ch := stream next ) asciiValue ) >= 65 and: [ ascii <= 90 ]) or: [
+ ( ascii >= 97 and: [ ascii <= 122 ]) or: [
+ ch isDigit or: [
+ additionallyAllowed notNil and: [ additionallyAllowed includes: ch ]]]])
+ ifTrue: [
+ skip
+ ifTrue: [ out nextPut: ch asUppercase ]
+ ifFalse: [ out nextPut: ch ].
+ index := index + 1.
+ skip := false ]
+ ifFalse: [ skip := true ]].
+ out nextPut: $_.
+ array := Array new: 62.
+ 1 to: 26 do: [ :i |
+ array at: i put: ( i + 64 ) asCharacter.
+ array at: i + 26 put: ( i + 96 ) asCharacter ].
+ 53 to: 62 do: [ :i |
+ array at: i put: ( i - 5 ) asCharacter ].
+ random := UUIDGenerator default randomGenerator.
+ totalSize - index - 1 timesRepeat: [
+ out nextPut: ( array atRandom: random )].
+ ^out contents
+
+ " calculation of probability p for failure of uniqueness in n UIDs
+ Note: if answer will be converted to upper or lower case replace 62 with 36
+ | n i p all |
+ all := 62 raisedTo: sizeOfRandomPart.
+ i := 1.
+ p := 0.0 .
+ n := 10000.
+ [ i <= n ]
+ whileTrue: [
+ p := p + (( i - 1 ) / all ).
+ i := i + 1 ].
+ p  
+
+ approximation formula: n squared / ( 62.0 raisedTo: sizeOfRandomPart ) / 2
+ "
+
+ "'Crop SketchMorphs and Grab Screen Rect to JPG'
+ asAlphaNumeric: 31 extraChars: nil mergeUID: 10  
+ 'CropSketchMorphsAndG_iOw94jquN6'
+ 'Monticello'
+ asAlphaNumeric: 31 extraChars: nil mergeUID: 10    
+ 'Monticello_kp6aV2l0IZK9uBULGOeG'
+ 'version-', ( '1.1.2' replaceAll: $. with: $- )
+ asAlphaNumeric: 31 extraChars: #( $- ) mergeUID: 10    
+ 'Version-1-1-2_kuz2tMg2xX9iRLDVR'"
+ ! !
+!String methodsFor: '*network-url' stamp: 'yo 11/3/2004 19:24' prior: 30160917!
+asUrl
+ "convert to a Url"
+ "'http://www.cc.gatech.edu/' asUrl"
+ "msw://chaos.resnet.gatech.edu:9000/' asUrl"
+ ^Url absoluteFromText: self! !
+!String methodsFor: '*network-url' stamp: 'yo 11/3/2004 19:24' prior: 30161121!
+asUrlRelativeTo: aUrl
+ ^aUrl newFromRelativeText: self! !
+!Socket class methodsFor: 'registry' stamp: 'ul 8/27/2010 23:24' prior: 29465858!
+register: anObject
+
+ ^self registry add: anObject! !
+!Socket class methodsFor: 'registry' stamp: 'ul 8/27/2010 23:24' prior: 29466032!
+registry
+
+ ^Registry ifNil: [ Registry := WeakRegistry new ]! !
+!Socket class methodsFor: 'registry' stamp: 'ul 8/27/2010 23:24' prior: 29466871!
+unregister: anObject
+
+ ^self registry remove: anObject ifAbsent: nil! !
+
+"Network"!
+!Dictionary commentStamp: 'nice 8/26/2010 22:30' prior: 59284901!
+A Dictionary is an unordered collection of values which are indexed by arbitrary keys.
+A Dictionary is accessed via #at: and #at:put: messages like a SequenceableCollection, but instead of being Integer, the keys can be any object that responds to =.
+
+The = message is used to test for the existence of the key in the Dictionary.
+If the key is absent, #at:put: adds a new entry to the Dictionary.
+
+ (Dictionary new)
+ at: 'foo' put: 1;
+ at: 'bar' put: 8;
+ yourself.
+
+Each key is unique: storing another value with #at:put: at an already used key overwrites previously associated value.
+
+ (Dictionary new)
+ at: 'bar' put: 4;
+ at: 'bar' put: 8;
+ at: 'bar'.
+
+The values are not necessarily unique, thus a Dictionary can also be seen as a sort of Bag with this respect.
+
+ (Dictionary new)
+ at: 'foo' put: 8;
+ at: 'bar' put: 8;
+ yourself.
+
+If the key is absent, #at: raises an Error. An alternate block of code can be executed and its value returned in this case using #at:ifAbsent:.
+See also #at:ifAbsentPut:.
+
+ (Dictionary new) at: 'foo' ifAbsent: [nil].
+
+Dictionary is implemented as a HashedCollection of Association (a value is associated to its key et vice et versa).
+Being a HashedCollection enables fast random access indexed by keys.
+Consequently, keys must respond to #hash (see super).
+
+BEWARE: as for every HashedCollection, it is better to not modify an object after it is used as a Dictionary key. The reason is that this might change the #hash code, making the Dictionary unable to find corresponding entry, or make two keys equal violating uniqueness. It's progammer responsibility to take care to not modify the keys, or eventually to send #rehash to the Dictionary if they ever happen to change.
+
+It is possible to grow or shrink a Dictionary using the messages #add: and #remove: with an Association parameter, however the prefered way to do so is using #at:put: and #removeKey:.
+BEWARE: as for super, space reserved in internal storage array can grow but never shrink.
+
+For conveniency, it is also possible to create a Dictionary out of a Collection of associations, as for example in:
+
+    {'foo' -> 1. 'bar' -> 8} as: Dictionary.
+    Dictionary withAll: {'foo' -> 1. 'bar' -> 8}.
+    Dictionary new addAll: {'foo' -> 1. 'bar' -> 8}; yourself.
+
+BEWARE: though a Sequence collection can be considered as a sequence of values with Integer keys (see #keysAndValuesDo: ), it cannot be converted into a Dictionary using these keys, and following message will fail:
+
+ #('foo' 'bar') as: Dictionary.
+
+Enumerating a Dictionary with #do: will only enumerate the values, not the keys.
+Remember, the order of evaluation is arbitrary and can change when you grow or shrink a Dictionary.
+
+    ({'foo' -> 1. 'bar' -> 8} as: Dictionary) do: [:each | Transcript cr; show: each printString].
+
+For enumerating keys and values, use #keysAndValuesDo:, or use #associationsDo: to enumerate the associations.
+#select: #reject: #collect: will operate on values while preserving the keys and thus answer a new Dictionary.
+
+    ({'foo' -> 1. 'bar' -> 8} as: Dictionary) collect: [:each | each squared].
+
+The keys and values of a Dictionary can be extracted by sending #keys and #values message.
+Though the keys are theoretically a Set and values a Bag, for efficiency reasons, these messages will both return an Array of keys
+and an Array of values. A neat feature is that these messages are preserving the arbitrary storage order - in other words, (aDictionary values at: 3) is the value associated to key (aDictionary keys at: 3).!
+!Set commentStamp: 'nice 8/26/2010 22:14' prior: 59413114!
+I represent a set of objects without duplicates.  I can hold anything that responds to
+#hash and #=, except for nil.  My instances will automatically grow, if necessary.
+Note that I rely on #=, not #==.  If you want a set using #==, use IdentitySet.
+
+Instance structure:
+
+  array An array whose non-nil elements are the elements of the set,
+ and whose nil elements are empty slots.  There is always at least one nil.
+ In fact I try to keep my "load" at 75% or less so that hashing will work well.
+
+  tally The number of elements in the set.  The array size is always greater than this.
+
+The core operation is #scanFor:, which either finds the position where an
+object is stored in array, if it is present, or finds a suitable position holding nil, if
+its argument is not present in array.
+
+I can include an UndefinedObject (nil) thanks to a special implementation using a wrapper (see message #asSetElement and class SetElement).
+Indeed, a nil entry in the storage array means vacuity, it cannot mean I contain nil.!
+!IdentitySet commentStamp: 'nice 8/26/2010 22:00' prior: 21647224!
+The same as a Set, except that items are compared using #== instead of #=.
+
+Almost any class named IdentityFoo is the same as Foo except for the way items are compared.  In Foo, #= is used, while in IdentityFoo, #== is used.  That is, identity collections will treat items as the same only if they have the same identity.
+
+For example, note that copies of a string are equal:
+
+ ('abc' copy) = ('abc' copy)
+
+but they are not identical:
+
+ ('abc' copy) == ('abc' copy)
+
+A regular Set will only include equal objects once:
+
+ | aSet |
+ aSet := Set new.
+ aSet add: 'abc' copy.
+ aSet add: 'abc' copy.
+ aSet
+
+
+An IdentitySet will include multiple equal objects if they are not identical:
+
+ | aSet |
+ aSet := IdentitySet new.
+ aSet add: 'abc' copy.
+ aSet add: 'abc' copy.
+ aSet
+!
+!KeyedIdentitySet commentStamp: 'nice 8/26/2010 22:01' prior: 0!
+A KeyedIdentitySet is like a Bag, except that items are compared with #== instead of #= .
+
+See the comment of IdentitySet for more information.!
+!WeakArray commentStamp: '<historical>' prior: 59462610!
+WeakArray is an array which holds only weakly on its elements. This means whenever an object is only referenced by instances of WeakArray it will be garbage collected.!
+!SetElement commentStamp: 'nice 8/26/2010 22:21' prior: 0!
+A SetElement is a special wrapper used to handle addition of some special elements into Set.
+This is necessary mainly for storing an UndefinedObject in a Set, since nil is used in Set algorithm to designate free slots in internal storage.
+
+Instance Variables
+ enclosedElement: <Object>
+
+enclosedElement
+ - the real element we wish to put into the set
+!
+!WeakArray class methodsFor: 'accessing' stamp: 'ul 8/27/2010 23:38' prior: 55043690!
+addWeakDependent: anObject
+
+ FinalizationLock
+ critical: [
+ | emptySlotIndex |
+ emptySlotIndex := FinalizationDependents
+ identityIndexOf: nil
+ ifAbsent: [
+ | newIndex |
+ newIndex := FinalizationDependents size + 1.
+ "Grow linearly"
+ FinalizationDependents := FinalizationDependents grownBy: 10.
+ newIndex ].
+ FinalizationDependents at: emptySlotIndex put: anObject ]
+ ifError: [ :msg :rcvr | rcvr error: msg ]! !
+!WeakArray class methodsFor: 'accessing' stamp: 'ul 8/27/2010 23:28' prior: 33129235!
+isFinalizationSupported
+ "This method is only here for backwards compatibility, all closure VMs support finalization"
+
+ ^true! !
+!WeakArray class methodsFor: 'accessing' stamp: 'ul 8/27/2010 23:25' prior: 33129932!
+removeWeakDependent: anObject
+
+ FinalizationLock critical:[
+ 1 to: FinalizationDependents size do:[:i|
+ ((FinalizationDependents at: i) == anObject) ifTrue:[
+ FinalizationDependents at: i put: nil.
+ ].
+ ].
+ ] ifError:[:msg :rcvr| rcvr error: msg].! !
+!WeakArray class methodsFor: 'private' stamp: 'ul 8/27/2010 23:26' prior: 33131678!
+restartFinalizationProcess
+ "kill any old process, just in case"
+ FinalizationProcess
+ ifNotNil: [FinalizationProcess terminate.
+ FinalizationProcess := nil].
+
+ FinalizationSemaphore := Smalltalk specialObjectsArray at: 42.
+ FinalizationDependents ifNil: [FinalizationDependents := WeakArray new: 10].
+ FinalizationLock := Semaphore forMutualExclusion.
+ FinalizationProcess := [self finalizationProcess]
+ forkAt: Processor userInterruptPriority! !
+
+TranscriptStream removeSelector: #openLabel:!
+
+TranscriptStream removeSelector: #open!
+
+TranscriptStream removeSelector: #codePaneMenu:shifted:!
+
+TranscriptStream removeSelector: #buildWith:!
+
+TranscriptStream class removeSelector: #windowColorSpecification!
+
+TranscriptStream class removeSelector: #openMorphicTranscript!
+
+TranscriptStream class removeSelector: #buildWith:!
+
+TextSqkPageLink removeSelector: #actOnClickFor:!
+
+TextURL removeSelector: #actOnClickFor:!
+!Duration methodsFor: 'private' stamp: 'dtl 8/29/2010 11:31' prior: 50966158!
+seconds: secondCount nanoSeconds: nanoCount
+ "Private - only used by Duration class"
+
+ seconds := secondCount.
+ nanos := nanoCount rounded.
+ "normalize if signs do not match"
+ [ nanos < 0 and: [ seconds > 0 ] ]
+ whileTrue: [ seconds := seconds - 1.
+ nanos := nanos + NanosInSecond ].
+ [ seconds < 0 and: [ nanos > 0 ] ]
+ whileTrue: [ seconds := seconds + 1.
+ nanos := nanos - NanosInSecond ]
+
+! !
+!ParseNodeEnumerator commentStamp: 'eem 8/31/2010 11:41' prior: 59364589!
+ParseNodeEnumerator implements ParseNode>>nodesDo:.  It can be used to enumerate an entire tree via
+ aParseNode accept: (ParseNodeEnumerator ofBlock: aBlock)
+or selectively, excluding the node and subnodes for which selectBlock answers false, via
+ aParseNode accept: (ParseNodeEnumerator
+ ofBlock: aBlock
+ select: selectBlock)
+
+Here's a doIt that generates and compiles the visiting methods:
+
+self superclass selectors do:
+ [:s|
+ self compile: (String streamContents:
+ [:str| | arg |
+ arg := 'a', (s allButFirst: 5) allButLast.
+ str nextPutAll: s, ' ', arg; crtab;
+ nextPutAll: '(theSelectBlock isNil or: [theSelectBlock value: '; nextPutAll: arg; nextPutAll: ']) ifFalse:'; crtab;
+ tab: 2; nextPutAll: '[^nil].'; crtab;
+ nextPutAll: 'theBlock value: '; nextPutAll: arg; nextPut: $.; crtab;
+ nextPutAll: '^super '; nextPutAll: s, ' ', arg])]!
+!Compiler methodsFor: 'private' stamp: 'eem 8/30/2010 17:57' prior: 50780337!
+format: aStream noPattern: noPattern ifFail: failBlock
+ ^(self parser
+ parse: aStream
+ class: class
+ noPattern: noPattern
+ context: context
+ notifying: requestor
+ ifFail: [^failBlock value]) preen! !
+!Decompiler methodsFor: 'public access' stamp: 'eem 8/30/2010 17:57' prior: 50896691!
+decompile: aSelector in: aClass method: aMethod using: aConstructor
+
+ | block node |
+ constructor := aConstructor.
+ method := aMethod.
+ self initSymbols: aClass.  "create symbol tables"
+ method isQuick
+ ifTrue: [block := self quickMethod]
+ ifFalse:
+ [stack := OrderedCollection new: method frameSize.
+ caseExits := OrderedCollection new.
+ statements := OrderedCollection new: 20.
+ numLocalTemps := 0.
+ super method: method pc: method initialPC.
+ "skip primitive error code store if necessary"
+ (method primitive ~= 0 and: [self willStore]) ifTrue:
+ [pc := pc + 2.
+ tempVars := tempVars asOrderedCollection].
+ block := self blockTo: method endPC + 1.
+ stack isEmpty ifFalse: [self error: 'stack not empty']].
+ node := constructor
+ codeMethod: aSelector
+ block: block
+ tempVars: tempVars
+ primitive: method primitive
+ class: aClass.
+ method primitive > 0 ifTrue:
+ [node removeAndRenameLastTempIfErrorCode].
+ ^node preen! !
+!ParseNode methodsFor: 'testing' stamp: 'eem 8/31/2010 11:34'!
+isOnlySubnodeOf: aSubtree "<ParseNode>" in: aParseTree "<ParseNode>"
+ "Answer if the receiver only occurs within aSubtree of aParseTree, not in the rest of aParseTree.
+ Assumes that aSubtree is in fact a subnode of aParseTree."
+ | isSubnode |
+ isSubnode := false.
+ aSubtree accept: (ParseNodeEnumerator
+ ofBlock: [:node| node == self ifTrue: [isSubnode := true]]).
+ isSubnode ifFalse:
+ [^false].
+ aParseTree accept: (ParseNodeEnumerator
+ ofBlock: [:node| node == self ifTrue: [^false]]
+ select: [:node| node ~= aSubtree]).
+ ^true! !
+!BlockNode methodsFor: 'accessing' stamp: 'eem 8/31/2010 12:31' prior: 50469596!
+arguments
+ ^arguments ifNil: [#()]! !
+!BlockNode methodsFor: 'accessing' stamp: 'eem 8/31/2010 12:30' prior: 50454220!
+temporaries
+ ^temporaries ifNil: [#()]! !
+!MethodNode methodsFor: 'converting' stamp: 'eem 8/31/2010 11:54'!
+preen
+ "Preen for pretty-printing and/or decompilation.
+ i.e. post-process to cover up for inadequacies in both algorithms.
+ Currently one case, hiding the assignment to the arg of an inlined block arg to ifNotNil:,
+ (var := expr) ifNil: [...] ifNotNil: [...]    =>    expr ifNil: [...] ifNotNil: [:var| ...]."
+
+ self preenLocalIfNotNilArg! !
+!MethodNode methodsFor: 'converting' stamp: 'eem 8/31/2010 12:36'!
+preenLocalIfNotNilArg
+ "Try and spot a (var := expr) ifNil: [...] ifNotNil: [...] where var is only used in the ifNotNil: block
+ and convert it to expr ifNil: [...] ifNotNil: [:var| ...].  Deal both with the pretty-print case where
+ the block already declares the variable and the decompile case where it does not."
+
+ | varsToHide |
+ varsToHide := Set new.
+ self nodesDo:
+ [:node| | variable |
+ (node isMessageNode
+ and: [node macroPrinter == #printIfNilNotNil:indent:
+ and: [node receiver isMessageNode
+ and: [node receiver selector key == #==
+ and: [node receiver receiver isAssignmentNode
+ and: [(variable := node receiver receiver variable) isTemp
+ and: [variable isRemote not
+ and: [variable isOnlySubnodeOf: node in: self]]]]]]]) ifTrue:
+ [node arguments last arguments isEmpty
+ ifTrue: [node arguments last arguments: { variable }.
+ varsToHide add: variable]
+ ifFalse: [self assert: node arguments last arguments asArray =  { variable }].
+ node receiver receiver: node receiver receiver value]].
+ varsToHide notEmpty ifTrue:
+ [self nodesDo:
+ [:node|
+ ((node == self or: [node isBlockNode])
+ and: [node temporaries anySatisfy: [:temp| varsToHide includes: temp]]) ifTrue:
+ [node temporaries: (node temporaries reject: [:temp| varsToHide includes: temp])]]]! !
+!ParseNodeEnumerator class methodsFor: 'instance creation' stamp: 'eem 8/31/2010 11:43'!
+ofBlock: aBlock select: selectBlock
+ ^self new ofBlock: aBlock select: selectBlock! !
+!ParseNodeEnumerator methodsFor: 'initialize-release' stamp: 'eem 8/31/2010 11:24'!
+ofBlock: aBlock select: aSelectBlock
+ theBlock := aBlock.
+ theSelectBlock := aSelectBlock! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52070231!
+visitAssignmentNode: anAssignmentNode
+ (theSelectBlock isNil or: [theSelectBlock value: anAssignmentNode]) ifFalse:
+ [^nil].
+ theBlock value: anAssignmentNode.
+ ^super visitAssignmentNode: anAssignmentNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52071703!
+visitBlockNode: aBlockNode
+ (theSelectBlock isNil or: [theSelectBlock value: aBlockNode]) ifFalse:
+ [^nil].
+ theBlock value: aBlockNode.
+ ^super visitBlockNode: aBlockNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52071535!
+visitBraceNode: aBraceNode
+ (theSelectBlock isNil or: [theSelectBlock value: aBraceNode]) ifFalse:
+ [^nil].
+ theBlock value: aBraceNode.
+ ^super visitBraceNode: aBraceNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52072844!
+visitCascadeNode: aCascadeNode
+ (theSelectBlock isNil or: [theSelectBlock value: aCascadeNode]) ifFalse:
+ [^nil].
+ theBlock value: aCascadeNode.
+ ^super visitCascadeNode: aCascadeNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52072463!
+visitCommentNode: aCommentNode
+ (theSelectBlock isNil or: [theSelectBlock value: aCommentNode]) ifFalse:
+ [^nil].
+ theBlock value: aCommentNode.
+ ^super visitCommentNode: aCommentNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52073368!
+visitFieldNode: aFieldNode
+ (theSelectBlock isNil or: [theSelectBlock value: aFieldNode]) ifFalse:
+ [^nil].
+ theBlock value: aFieldNode.
+ ^super visitFieldNode: aFieldNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52071006!
+visitFutureNode: aFutureNode
+ (theSelectBlock isNil or: [theSelectBlock value: aFutureNode]) ifFalse:
+ [^nil].
+ theBlock value: aFutureNode.
+ ^super visitFutureNode: aFutureNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52071871!
+visitInstanceVariableNode: anInstanceVariableNode
+ (theSelectBlock isNil or: [theSelectBlock value: anInstanceVariableNode]) ifFalse:
+ [^nil].
+ theBlock value: anInstanceVariableNode.
+ ^super visitInstanceVariableNode: anInstanceVariableNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52071179!
+visitLiteralNode: aLiteralNode
+ (theSelectBlock isNil or: [theSelectBlock value: aLiteralNode]) ifFalse:
+ [^nil].
+ theBlock value: aLiteralNode.
+ ^super visitLiteralNode: aLiteralNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52073536!
+visitLiteralVariableNode: aLiteralVariableNode
+ (theSelectBlock isNil or: [theSelectBlock value: aLiteralVariableNode]) ifFalse:
+ [^nil].
+ theBlock value: aLiteralVariableNode.
+ ^super visitLiteralVariableNode: aLiteralVariableNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52071357!
+visitMessageNode: aMessageNode
+ (theSelectBlock isNil or: [theSelectBlock value: aMessageNode]) ifFalse:
+ [^nil].
+ theBlock value: aMessageNode.
+ ^super visitMessageNode: aMessageNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52070610!
+visitMessageNodeInCascade: aMessageNodeInCascade
+ (theSelectBlock isNil or: [theSelectBlock value: aMessageNodeInCascade]) ifFalse:
+ [^nil].
+ theBlock value: aMessageNodeInCascade.
+ ^super visitMessageNodeInCascade: aMessageNodeInCascade! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52070833!
+visitMethodNode: aMethodNode
+ (theSelectBlock isNil or: [theSelectBlock value: aMethodNode]) ifFalse:
+ [^nil].
+ theBlock value: aMethodNode.
+ ^super visitMethodNode: aMethodNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52072280!
+visitNewArrayNode: aNewArrayNode
+ (theSelectBlock isNil or: [theSelectBlock value: aNewArrayNode]) ifFalse:
+ [^nil].
+ theBlock value: aNewArrayNode.
+ ^super visitNewArrayNode: aNewArrayNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52073022!
+visitRemoteTempVectorNode: aRemoteTempVectorNode
+ (theSelectBlock isNil or: [theSelectBlock value: aRemoteTempVectorNode]) ifFalse:
+ [^nil].
+ theBlock value: aRemoteTempVectorNode.
+ ^super visitRemoteTempVectorNode: aRemoteTempVectorNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52073754!
+visitReturnNode: aReturnNode
+ (theSelectBlock isNil or: [theSelectBlock value: aReturnNode]) ifFalse:
+ [^nil].
+ theBlock value: aReturnNode.
+ ^super visitReturnNode: aReturnNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52070427!
+visitSelectorNode: aSelectorNode
+ (theSelectBlock isNil or: [theSelectBlock value: aSelectorNode]) ifFalse:
+ [^nil].
+ theBlock value: aSelectorNode.
+ ^super visitSelectorNode: aSelectorNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52072641!
+visitTempVariableNode: aTempVariableNode
+ (theSelectBlock isNil or: [theSelectBlock value: aTempVariableNode]) ifFalse:
+ [^nil].
+ theBlock value: aTempVariableNode.
+ ^super visitTempVariableNode: aTempVariableNode! !
+!ParseNodeEnumerator methodsFor: 'visiting' stamp: 'eem 8/31/2010 11:13' prior: 52072097!
+visitVariableNode: aVariableNode
+ (theSelectBlock isNil or: [theSelectBlock value: aVariableNode]) ifFalse:
+ [^nil].
+ theBlock value: aVariableNode.
+ ^super visitVariableNode: aVariableNode! !
+
+ParseNode removeSelector: #optimizedBlockHoistTempsInto:!
+
+ExceptionsTest removeSelector: #testHandlerReentrancy!
+
+Smalltalk removeClassNamed: #ExceptionsTest!
+
+"Exceptions"!
+!StandardFileStream class methodsFor: 'file creation' stamp: 'nice 8/27/2010 21:45' prior: 29796703!
+forceNewFileNamed: fileName
+ "Create a new file with the given name, and answer a stream opened
+ for writing on that file. If the file already exists, delete it without
+ asking before creating the new file."
+ | dir localName fullName f |
+ fullName := self fullName: fileName.
+ (self isAFileNamed: fullName)
+ ifFalse:
+ [f := self new open: fullName forWrite: true.
+ ^ f
+ ifNil: ["Failed to open the file"
+ (FileDoesNotExistException fileName: fullName) signal]].
+ dir := FileDirectory forFileName: fullName.
+ localName := FileDirectory localNameFor: fullName.
+ dir
+ deleteFileNamed: localName
+ ifAbsent: [(CannotDeleteFileException new
+ messageText: 'Could not delete the old version of file ' , fullName) signal].
+ f := self new open: fullName forWrite: true.
+ ^ f
+ ifNil: ["Failed to open the file"
+ (FileDoesNotExistException fileName: fullName) signal]! !
+!StandardFileStream class methodsFor: 'file creation' stamp: 'jmv 3/2/2010 16:35' prior: 29799140!
+readOnlyFileNamed: fileName
+ "Open an existing file with the given name for reading."
+
+ | fullName f |
+ fullName := self fullName: fileName.
+ f := self new open: fullName forWrite: false.
+ ^ f
+ ifNil: ["File does not exist..."
+ ((FileDoesNotExistException fileName: fullName) readOnly: true) signal].
+
+ "StandardFileStream readOnlyFileNamed: 'kjsd.txt' "! !
+!StandardFileStream class methodsFor: 'registry' stamp: 'ul 8/27/2010 23:24' prior: 29799604!
+register: anObject
+
+ ^self registry add: anObject! !
+!StandardFileStream class methodsFor: 'registry' stamp: 'ul 8/27/2010 23:24' prior: 29799790!
+registry
+
+ ^Registry ifNil: [ Registry := WeakRegistry new ]! !
+!StandardFileStream class methodsFor: 'registry' stamp: 'ul 8/27/2010 23:25' prior: 29800692!
+unregister: anObject
+
+ ^self registry remove: anObject ifAbsent: nil! !
+
+"Files"!
+!MCMcmUpdater commentStamp: 'cbc 8/26/2010 16:42' prior: 38580144!
+MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations.
+
+When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration.
+
+Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have.  Success is not assured.  Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility.
+
+If you wish to not have MCMcmUpdater update packages, there are two ways to handle this:
+
+1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false:
+ MCMcmUpdater updateMissingPackages: false
+ Note that any new packages added to the repositories will not be picked up when this is turned off.
+2) To have MCMcmUpdater not update a specific package, evaluate
+ MCMcmUpdater disableUpdatesOfPackage: <packageName>
+
+Class Variables definitions:
+
+DefaultUpdateURL - String: the URL that will be checked by default for updates.  This would be set for a common standard location to check.
+
+LastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository.  Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update.
+
+SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default).
+
+UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages.  If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater.  (This can be dangerous if packages are split - use at your own risk).
+!
+!MCMcmUpdater class methodsFor: 'updating' stamp: 'cbc 8/25/2010 10:27'!
+disableUpdatesOfPackage: packageName
+ self skipPackages add: packageName! !
+!MCMcmUpdater class methodsFor: 'updating' stamp: 'cbc 8/25/2010 10:29'!
+enableUpdatesForAllPackages
+ SkipPackages := Set new! !
+!MCMcmUpdater class methodsFor: 'updating' stamp: 'cbc 8/25/2010 10:27'!
+enableUpdatesOfPackage: packageName
+ self skipPackages remove: packageName ifAbsent: [].! !
+!MCMcmUpdater class methodsFor: 'updating' stamp: 'cbc 8/25/2010 08:14'!
+skipPackages
+ ^SkipPackages ifNil: [SkipPackages := Set new]! !
+!MCMcmUpdater class methodsFor: 'updating' stamp: 'cbc 8/25/2010 09:13' prior: 38580801!
+updateFromRepositories: repositoryUrls
+ "MCMcmUpdater updateFromRepositories: #(
+ 'http://squeaksource.com/MCUpdateTest'
+ )"
+
+ | repos config |
+ Preferences enable: #upgradeIsMerge.
+ LastUpdateMap ifNil:[LastUpdateMap := Dictionary new].
+ "The list of repositories to consult in order"
+ repos := repositoryUrls collect:[:url|
+ MCRepositoryGroup default repositories
+ detect:[:r| r description = url]
+ ifNone:[ | r |
+ r := MCHttpRepository location: url user: '' password: ''.
+ MCRepositoryGroup default addRepository: r.
+ r]].
+
+ "The list of updates-author.version.mcm sorted by version"
+ repos do:[:r| r cacheAllFileNamesDuring:[
+ | minVersion updateList allNames |
+ updateList := SortedCollection new.
+ minVersion := LastUpdateMap at: r description ifAbsent:[0].
+ "Find all the updates-author.version.mcm files"
+ 'Checking ', r description
+ displayProgressAt: Sensor cursorPoint
+ from: 0 to: 1 during:[:bar|
+ bar value: 0.
+ allNames := r allFileNames.
+ ].
+ allNames do:[:versionedName| | version base parts author type |
+ parts := versionedName findTokens: '.-'.
+ parts size = 4 ifTrue:[
+ base := parts at: 1.
+ author := parts at: 2.
+ version := [(parts at: 3) asNumber] on: Error do:[:ex| ex return: 0].
+ type := parts at: 4.
+ ].
+ (base = 'update' and:[version >= minVersion and:[type = 'mcm']])
+ ifTrue:[updateList add: version -> versionedName]].
+
+ "Proceed only if there are updates available at all."
+ updateList ifNotEmpty: [
+ "Now process each update file. Check if we have all dependencies and if not,
+ load the entire configuration (this is mostly to skip older updates quickly)"
+ updateList do:[:assoc|
+ ProgressNotification signal: '' extra: 'Processing ', assoc value.
+ config := r versionFromFileNamed: assoc value.
+ "Skip packages that were specifically unloaded"
+ config dependencies: (config dependencies
+ reject: [:dep| self skipPackages includes: dep package name]).
+ self updateMissingPackages ifFalse:[
+ "Skip packages that are not in the image"
+ config dependencies: (config dependencies
+ select: [:dep| dep package hasWorkingCopy])].
+ (config dependencies allSatisfy:[:dep| dep isFulfilled])
+ ifFalse:[config upgrade].
+ LastUpdateMap at: r description put: assoc key.
+ ] displayingProgress: 'Processing configurations'.
+ "We've loaded all the provided update configurations.
+ Use the latest configuration to update all the remaining packages."
+ config updateFromRepositories.
+ config upgrade.
+ ]].
+ ].
+ ^config! !
+
+"MonticelloConfigurations"!
+!SystemNavigation commentStamp: 'mha 8/26/2010 09:02' prior: 30675278!
+I support the navigation of the system. I act as a facade but as I could require some state
+or different way of navigating the system all my behavior are on the instance side.
+
+
+For example if you want to look at all methods you have written or changed in the current image do
+
+SystemNavigation new browseAllSelect: [ :method |
+       method fileIndex > 1 "only look at changes file"
+       and: [ method timeStamp beginsWith: 'your-initials-here' ] ].
+
+!
+!SecureHashAlgorithm class methodsFor: 'class initialization' stamp: 'nice 8/28/2010 22:39' prior: 55360142!
+initialize
+ "SecureHashAlgorithm initialize"
+ "For the curious, here's where these constants come from:
+  #(2 3 5 10) collect: [:x | ((x sqrt / 4.0) * (2.0 raisedTo: 32)) truncated hex]"
+
+ K1 := ThirtyTwoBitRegister fromInteger: 16r5A827999.
+ K2 := ThirtyTwoBitRegister fromInteger: 16r6ED9EBA1.
+ K3 := ThirtyTwoBitRegister fromInteger: 16r8F1BBCDC.
+ K4 := ThirtyTwoBitRegister fromInteger: 16rCA62C1D6.
+! !
+!SecureHashAlgorithm methodsFor: 'private' stamp: 'nice 8/28/2010 22:43' prior: 52438278!
+expandedBlock: aByteArray
+ "Convert the given 64 byte buffer into 80 32-bit registers and answer the result."
+ | out src v |
+ out := Array new: 80.
+ src := 1.
+ 1 to: 16 do: [:i |
+ out at: i put: (ThirtyTwoBitRegister fromByteArray: aByteArray at: src).
+ src := src + 4].
+
+ 17 to: 80 do: [:i |
+ v := (out at: i - 3) copy.
+ v bitXor: (out at: i - 8);
+ bitXor: (out at: i - 14);
+ bitXor: (out at: i - 16);
+ leftRotateBy: 1.
+ out at: i put: v].
+ ^ out
+! !
+!SecureHashAlgorithm methodsFor: 'public' stamp: 'nice 8/28/2010 22:40' prior: 52435342!
+hashInteger: aPositiveInteger seed: seedInteger
+ "Hash the given positive integer. The integer to be hashed should have 512 or fewer bits. This entry point is used in the production of random numbers"
+
+ | buffer dstIndex |
+ "Initialize totalA through totalE to their seed values."
+ totalA := ThirtyTwoBitRegister
+ fromInteger: ((seedInteger bitShift: -128) bitAnd: 16rFFFFFFFF).
+ totalB := ThirtyTwoBitRegister
+ fromInteger: ((seedInteger bitShift: -96) bitAnd: 16rFFFFFFFF).
+ totalC := ThirtyTwoBitRegister
+ fromInteger: ((seedInteger bitShift: -64) bitAnd: 16rFFFFFFFF).
+ totalD := ThirtyTwoBitRegister
+ fromInteger: ((seedInteger bitShift: -32) bitAnd: 16rFFFFFFFF).
+ totalE := ThirtyTwoBitRegister
+ fromInteger: (seedInteger bitAnd: 16rFFFFFFFF).
+ self initializeTotalsArray.
+
+ "pad integer with zeros"
+ buffer := ByteArray new: 64.
+ dstIndex := 0.
+ aPositiveInteger digitLength to: 1 by: -1 do: [:i |
+ buffer at: (dstIndex := dstIndex + 1) put: (aPositiveInteger digitAt: i)].
+
+ "process that one block"
+ self processBuffer: buffer.
+
+ ^ self finalHash
+! !
+!SecureHashAlgorithm methodsFor: 'private' stamp: 'nice 8/28/2010 22:39' prior: 52434816!
+initializeTotals
+ "Initialize totalA through totalE to their seed values."
+
+ "total registers for use when primitives are absent"
+ totalA := ThirtyTwoBitRegister fromInteger: 16r67452301.
+ totalB := ThirtyTwoBitRegister fromInteger: 16rEFCDAB89.
+ totalC := ThirtyTwoBitRegister fromInteger: 16r98BADCFE.
+ totalD := ThirtyTwoBitRegister fromInteger: 16r10325476.
+ totalE := ThirtyTwoBitRegister fromInteger: 16rC3D2E1F0.
+ self initializeTotalsArray.
+! !
+!SecureHashAlgorithm methodsFor: 'private' stamp: 'nice 8/28/2010 22:28' prior: 52438830!
+processBuffer: aByteArray
+ "Process given 64-byte buffer, accumulating the results in totalA through totalE."
+
+ | a b c d e w tmp |
+ self primHasSecureHashPrimitive
+ ifTrue: [^ self processBufferUsingPrimitives: aByteArray]
+ ifFalse: [totals := nil].
+
+ "initialize registers a through e from the current totals"
+ a := totalA copy.
+ b := totalB copy.
+ c := totalC copy.
+ d := totalD copy.
+ e := totalE copy.
+
+ "expand and process the buffer"
+ w := self expandedBlock: aByteArray.
+ 1 to: 80 do: [:i |
+ tmp := (a copy leftRotateBy: 5)
+ += (self hashFunction: i of: b with: c with: d);
+ += e;
+ += (w at: i);
+ += (self constantForStep: i).
+ e := d.
+ d := c.
+ c := b leftRotateBy: 30.
+ b := a.
+ a := tmp].
+
+ "add a through e into total accumulators"
+ totalA += a.
+ totalB += b.
+ totalC += c.
+ totalD += d.
+ totalE += e.
+! !
+!SmalltalkImage class methodsFor: 'class initialization' stamp: 'eem 8/31/2010 10:37' prior: 58600030!
+startUp
+ SystemChangeNotifier uniqueInstance notify: Smalltalk ofAllSystemChangesUsing: #event:! !
+!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'eem 8/31/2010 10:38' prior: 58518807!
+processShutDownList: quitting
+ "Send #shutDown to each class that needs to wrap up before a snapshot.
+ Also void the endianness chace;  this can't safely be done on start-up because
+ Smalltalk is too late in the start-up sequence."
+
+ EndianCache := nil.
+ self send: #shutDown: toClassesNamedIn: ShutDownList with: quitting! !
+!SmalltalkImage methodsFor: 'shrinking' stamp: 'cbc 8/26/2010 16:26' prior: 37381927!
+unloadAllKnownPackages
+ "Unload all packages we know how to unload and reload"
+
+ "Prepare unloading"
+ Smalltalk zapMVCprojects.
+ Flaps disableGlobalFlaps: false.
+ StandardScriptingSystem removeUnreferencedPlayers.
+ Project removeAllButCurrent.
+ #('Morphic-UserObjects' 'EToy-UserObjects' 'Morphic-Imported' )
+ do: [:each | SystemOrganization removeSystemCategory: each].
+ Smalltalk at: #ServiceRegistry ifPresent:[:aClass|
+ SystemChangeNotifier uniqueInstance
+ noMoreNotificationsFor: aClass.
+ ].
+ World removeAllMorphs.
+
+ "Go unloading"
+ #( 'ReleaseBuilder' 'ScriptLoader'
+ '311Deprecated' '39Deprecated'
+ 'Universes' 'SMLoader' 'SMBase' 'Installer-Core'
+ 'VersionNumberTests' 'VersionNumber'
+ 'Services-Base' 'PreferenceBrowser' 'Nebraska'
+ 'ToolBuilder-MVC' 'ST80'
+ 'CollectionsTests' 'GraphicsTests' 'KernelTests'  'MorphicTests'
+ 'MultilingualTests' 'NetworkTests' 'ToolsTests' 'TraitsTests'
+ 'SystemChangeNotification-Tests' 'FlexibleVocabularies'
+ 'EToys' 'Protocols' 'XML-Parser' 'Tests' 'SUnitGUI'
+ ) do: [:pkgName|
+ (MCPackage named: pkgName) unload.
+ MCMcmUpdater disableUpdatesOfPackage: pkgName.
+ ].
+ "Traits use custom unload"
+ Smalltalk at: #Trait ifPresent:[:aClass| aClass unloadTraits].
+
+ "Post-unload cleanup"
+ MCWorkingCopy flushObsoletePackageInfos.
+ SystemOrganization removeSystemCategory: 'UserObjects'.
+ Presenter defaultPresenterClass: nil.
+ World dumpPresenter.
+ ScheduledControllers := nil.
+ Preferences removePreference: #allowEtoyUserCustomEvents.
+ SystemOrganization removeEmptyCategories.
+ ChangeSet removeChangeSetsNamedSuchThat:[:cs | (cs == ChangeSet current) not].
+ Undeclared removeUnreferencedKeys.
+ StandardScriptingSystem initialize.
+ MCFileBasedRepository flushAllCaches.
+ MCDefinition clearInstances.
+ Behavior flushObsoleteSubclasses.
+ ChangeSet current clear.
+ ChangeSet current name: 'Unnamed1'.
+ Smalltalk flushClassNameCache.
+ Smalltalk at: #Browser ifPresent:[:br| br initialize].
+ DebuggerMethodMap voidMapCache.
+ DataStream initialize.
+ Smalltalk forgetDoIts.
+ AppRegistry removeObsolete.
+ FileServices removeObsolete.
+ Preferences removeObsolete.
+ TheWorldMenu removeObsolete.
+ Smalltalk garbageCollect.
+ Symbol compactSymbolTable.
+ TheWorldMainDockingBar updateInstances.
+ MorphicProject defaultFill: (Color gray: 0.9).
+ World color: (Color gray: 0.9).
+! !
+!ThirtyTwoBitRegister class methodsFor: 'instance creation' stamp: 'nice 8/28/2010 22:42'!
+fromByteArray: aByteArray at: startIndex
+ "Answer a new instance whose initial contents is copied from next four bytes from aByteArray starting at startIndex..
+ Convention is Most Significant Byte first (aka big endian)."
+
+ ^ self basicNew loadFrom: aByteArray at: startIndex
+! !
+!ThirtyTwoBitRegister class methodsFor: 'instance creation' stamp: 'nice 8/28/2010 22:38'!
+fromInteger: aPositiveInteger
+ "Answer a new instance whose initial contents is copied from aPositiveInteger.
+ It is required that aPositiveInteger has no more than 32 bits."
+
+ ^ self basicNew load: aPositiveInteger
+! !
+!ThirtyTwoBitRegister methodsFor: 'accumulator ops' stamp: 'nice 8/28/2010 21:03' prior: 52998655!
+leftRotateBy: bits
+ "Rotate my contents left by the given number of bits, retaining exactly 32 bits."
+ "Details: Perform this operation with as little LargeInteger arithmetic as possible."
+
+ | bitCount s1 s2 newHi |
+ "ensure bitCount is in range [0..31]"
+ bitCount := bits \\ 32.
+ bitCount > 16
+ ifTrue: [
+ s1 := bitCount - 16.
+ s2 := s1 - 16.
+ newHi := ((low bitShift: s1) bitAnd: 16rFFFF) bitOr: (hi bitShift: s2).
+ low := ((hi bitShift: s1) bitAnd: 16rFFFF) bitOr: (low bitShift: s2).
+ hi := newHi]
+ ifFalse: [
+ s1 := bitCount.
+ s2 := s1 - 16.
+ newHi := ((hi bitShift: s1) bitAnd: 16rFFFF) bitOr: (low bitShift: s2).
+ low := ((low bitShift: s1) bitAnd: 16rFFFF) bitOr: (hi bitShift: s2).
+ hi := newHi]
+! !
+!ThirtyTwoBitRegister methodsFor: 'accessing' stamp: 'nice 8/28/2010 22:34' prior: 53000647!
+load: anInteger
+ "Set my contents to the value of given integer."
+
+ (anInteger positive and: [anInteger digitLength <= 4])
+ ifFalse: [self error: 'out of range: ', anInteger printString].
+ low := anInteger bitAnd: 16rFFFF.
+ hi := (anInteger bitShift: -16) bitAnd: 16rFFFF
+! !
+!WindowColorSpec class methodsFor: 'instance creation' stamp: 'sw 2/26/2002 13:40' prior: 33207580!
+classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg
+ "Answer a new instance of the receiver with the given slots filled in"
+
+ ^ self new classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg! !
+!WindowColorSpec methodsFor: 'access' stamp: 'sw 2/26/2002 15:00' prior: 33206242!
+brightColor
+ "Answer the brightColor"
+
+ ^ brightColor! !
+!WindowColorSpec methodsFor: 'access' stamp: 'sw 2/26/2002 14:59' prior: 33206367!
+classSymbol
+ "Answer the classSymbol"
+
+ ^ classSymbol! !
+!WindowColorSpec methodsFor: 'initialization' stamp: 'sw 2/26/2002 13:39' prior: 53151454!
+classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg
+ "Initialize the receiver's instance variables"
+
+ classSymbol := sym.
+ wording := wrd.
+ brightColor := brCol.
+ pastelColor := paCol.
+ helpMessage := hlpMsg! !
+!WindowColorSpec methodsFor: 'access' stamp: 'sw 2/26/2002 15:00' prior: 33206492!
+helpMessage
+ "Answer the helpMessage"
+
+ ^ helpMessage! !
+!WindowColorSpec methodsFor: 'access' stamp: 'sw 2/26/2002 15:00' prior: 33206617!
+pastelColor
+ "Answer the pastelColor"
+
+ ^ pastelColor! !
+!WindowColorSpec methodsFor: 'printing' stamp: 'sw 4/21/2002 07:42' prior: 33207177!
+printOn: aStream
+ "Print the receiver on a stream"
+
+ super printOn: aStream.
+ classSymbol printOn: aStream.
+ aStream nextPutAll: ' bright: ', brightColor printString, ' pastel: ', pastelColor printString! !
+!WindowColorSpec methodsFor: 'access' stamp: 'sw 2/26/2002 14:59' prior: 33206742!
+wording
+ "Answer the wording"
+
+ ^ wording! !
+!DigitalSignatureAlgorithm methodsFor: 'large integer arithmetic' stamp: 'nice 8/28/2010 21:16' prior: 50928812!
+inverseOf: x mod: n
+ "Answer the inverse of x modulus n. That is, the integer y such that (x * y) \\ n is 1. Both x and n must be positive, and it is assumed that x < n and that x and n are integers."
+ "Details: Use the extended Euclidean algorithm, Schneier, p. 247."
+
+ | v u u1 u2 u3 t1 t2 t3 tmp |
+ ((x <= 0) or: [n <= 0]) ifTrue: [self error: 'x and n must be greater than zero'].
+ x >= n ifTrue: [self error: 'x must be < n'].
+
+ v := x.
+ u := n.
+ (x even and: [n even]) ifTrue: [self error: 'no inverse'].
+
+ u1 := 1. u2 := 0. u3 := u.
+ t1 := v. t2 := u - 1. t3 := v.
+ [ [u3 even ifTrue: [
+ ((u1 odd) or: [u2 odd]) ifTrue: [
+ u1 := u1 + v.
+ u2 := u2 + u].
+ u1 := u1 bitShift: -1.
+ u2 := u2 bitShift: -1.
+ u3 := u3 bitShift: -1].
+ ((t3 even) or: [u3 < t3]) ifTrue: [
+ tmp := u1. u1 := t1. t1 := tmp.
+ tmp := u2. u2 := t2. t2 := tmp.
+ tmp := u3. u3 := t3. t3 := tmp].
+ u3 even and: [u3 > 0]] whileTrue: ["loop while u3 is even"].
+
+ [((u1 < t1) or: [u2 < t2]) and: [u1 > 0]] whileTrue: [
+ u1 := u1 + v.
+ u2 := u2 + u].
+
+ u1 := u1 - t1.
+ u2 := u2 - t2.
+ u3 := u3 - t3.
+ t3 > 0] whileTrue: ["loop while t3 > 0"].
+
+ [u1 >= v and: [u2 >= u]] whileTrue: [
+ u1 := u1 - v.
+ u2 := u2 - u].
+
+ u3 = 1 ifFalse: [self error: 'no inverse'].
+ ^ u - u2
+! !
+!DigitalSignatureAlgorithm methodsFor: 'large integer arithmetic' stamp: 'nice 8/28/2010 21:21' prior: 50923879!
+isProbablyPrime: p
+ "Answer true if p is prime with very high probability. Such a number is sometimes called an 'industrial grade prime'--a large number that is so extremely likely to be prime that it can assumed that it actually is prime for all practical purposes. This implementation uses the Rabin-Miller algorithm (Schneier, p. 159)."
+
+ | iterations factor pMinusOne b m r a j z couldBePrime |
+ iterations := 50.  "Note: The DSA spec requires >50 iterations; Schneier says 5 are enough (p. 260)"
+
+ "quick elimination: check for p divisible by a small prime"
+ SmallPrimes ifNil: [  "generate list of small primes > 2"
+ SmallPrimes := Integer primesUpTo: 2000.
+ SmallPrimes := SmallPrimes copyFrom: 2 to: SmallPrimes size].
+ factor := SmallPrimes detect: [:f | (p \\ f) = 0] ifNone: [nil].
+ factor ifNotNil: [^ p = factor].
+
+ pMinusOne := p - 1.
+ b := self logOfLargestPowerOfTwoDividing: pMinusOne.
+ m := pMinusOne bitShift: b negated.
+ "Assert: pMinusOne = m * (2 raisedTo: b) and m is odd"
+
+ Transcript show: '      Prime test pass '.
+ r := Random new.
+ 1 to: iterations do: [:i |
+ Transcript show: i printString; space.
+ a := (r next * 16rFFFFFF) truncated.
+ j := 0.
+ z := (a raisedTo: m modulo: p) normalize.
+ couldBePrime := z = 1.
+ [couldBePrime] whileFalse: [
+ z = 1 ifTrue: [Transcript show: 'failed!!'; cr. ^ false].  "not prime"
+ z = pMinusOne
+ ifTrue: [couldBePrime := true]
+ ifFalse: [
+ (j := j + 1) < b
+ ifTrue: [z := (z * z) \\ p]
+ ifFalse: [Transcript show: 'failed!!'; cr. ^ false]]]].  "not prime"
+
+ Transcript show: 'passed!!'; cr.
+ ^ true  "passed all tests; probably prime"
+! !
+!DigitalSignatureAlgorithm methodsFor: 'private' stamp: 'nice 8/28/2010 21:04' prior: 50932159!
+logOfLargestPowerOfTwoDividing: aPositiveInteger
+ "Answer the base-2 log of the largest power of two that divides the given integer. For example, the largest power of two that divides 24 is 8, whose log base-2 is 3. Do this efficiently even when the given number is a large integer. Assume that the given integer is > 0."
+ "DigitalSignatureAlgorithm new logOfLargestPowerOfTwoDividing: (32 * 3)"
+
+ ^aPositiveInteger lowBit - 1! !
+!PluggableTextMorph methodsFor: 'model access' stamp: 'jmv 3/2/2010 16:21' prior: 26510078!
+getSelection
+ "Answer the model's selection interval."
+
+ getSelectionSelector ifNil: [^1 to: 0]. "null selection"
+ ^model perform: getSelectionSelector! !
+!PluggableTextMorph methodsFor: 'model access' stamp: 'jmv 3/2/2010 16:22' prior: 26510318!
+getText
+ "Retrieve the current model text"
+
+ | newText |
+ getTextSelector ifNil: [^Text new].
+ newText := model perform: getTextSelector.
+ newText ifNil: [^Text new].
+ ^newText shallowCopy! !
+!PluggableListMorph methodsFor: 'events' stamp: 'jmv 3/2/2010 16:21' prior: 58705997!
+doubleClick: event
+ | index |
+ doubleClickSelector ifNil: [^super doubleClick: event].
+ index := self rowAtLocation: event position.
+ index = 0 ifTrue: [^super doubleClick: event].
+ "selectedMorph ifNil: [self setSelectedMorph: aMorph]."
+ ^ self model perform: doubleClickSelector! !
+!PluggableListMorph methodsFor: 'model access' stamp: 'jmv 3/2/2010 16:21' prior: 26396901!
+getCurrentSelectionIndex
+ "Answer the index of the current selection."
+
+ getIndexSelector ifNil: [^0].
+ ^model perform: getIndexSelector! !
+!Morph methodsFor: 'printing' stamp: 'jmv 3/2/2010 16:15' prior: 24332115!
+colorString: aColor
+ aColor ifNil: [^'nil'].
+ Color colorNames
+ do: [:colorName | aColor = (Color perform: colorName) ifTrue: [^'Color ' , colorName]].
+ ^aColor storeString! !
+!Morph methodsFor: 'dropping/grabbing' stamp: 'jmv 3/2/2010 16:16' prior: 24128410!
+formerOwner: aMorphOrNil
+ aMorphOrNil
+ ifNil: [self removeProperty: #formerOwner]
+ ifNotNil: [self setProperty: #formerOwner toValue: aMorphOrNil]! !
+!Morph methodsFor: 'dropping/grabbing' stamp: 'jmv 3/2/2010 16:16' prior: 24128767!
+formerPosition: formerPosition
+ formerPosition
+ ifNil: [self removeProperty: #formerPosition]
+ ifNotNil: [self setProperty: #formerPosition toValue: formerPosition]! !
+!GrafPort methodsFor: 'copying' stamp: 'jmv 3/2/2010 16:02' prior: 21300030!
+copyBits
+ "Override copybits to do translucency if desired"
+
+ (combinationRule >= 30 and: [combinationRule <= 31])
+ ifTrue: [
+ self copyBitsTranslucent: (alpha ifNil: [255])]
+ ifFalse: [super copyBits]! !
+!ScrollBar methodsFor: 'scroll timing' stamp: 'jmv 3/2/2010 16:29' prior: 28637730!
+waitForDelay1: delay1 delay2: delay2
+ "Return true if an appropriate delay has passed since the last scroll operation.
+ The delay decreases exponentially from delay1 to delay2."
+
+ | now scrollDelay |
+ timeOfLastScroll ifNil: [self resetTimer]. "Only needed for old instances"
+ now := Time millisecondClockValue.
+ (scrollDelay := currentScrollDelay) isNil
+ ifTrue: [scrollDelay := delay1 "initial delay"].
+ currentScrollDelay := scrollDelay * 9 // 10 max: delay2. "decrease the delay"
+ timeOfLastScroll := now.
+ ^true! !
+!TextMorph methodsFor: 'geometry' stamp: 'jmv 3/2/2010 16:42' prior: 31340084!
+privateMoveBy: delta
+ super privateMoveBy: delta.
+ editor
+ ifNil: [ paragraph ifNotNil: [paragraph moveBy: delta]]
+ ifNotNil: [
+ "When moving text with an active editor, save and restore all state."
+ paragraph moveBy: delta.
+ self installEditorToReplace: editor]! !
+!MenuMorph methodsFor: 'accessing' stamp: 'nice 8/27/2010 22:00' prior: 23633477!
+lastSelection
+ "Return the label of the last selected item or nil."
+
+ ^selectedItem ifNotNil: [selectedItem selector]! !
+!PluggableButtonMorph methodsFor: 'private' stamp: 'jmv 3/2/2010 16:21' prior: 26313281!
+getModelState
+ "Answer the result of sending the receiver's model the getStateSelector message."
+
+ ^ getStateSelector
+ ifNil: [false]
+ ifNotNil: [model perform: getStateSelector]! !
+!HaloMorph methodsFor: 'geometry testing' stamp: 'jmv 3/2/2010 16:02' prior: 21421111!
+containsPoint: aPoint
+ "This method is overridden so that, once up, the handles will stay up as long as the mouse is within the box that encloses all the handles even if it is not over any handle or over its owner."
+
+ ^target
+ ifNil: [super containsPoint: aPoint]
+ ifNotNil: [false]! !
+!MorphExtension methodsFor: 'accessing - other properties' stamp: 'jmv 7/28/2009 18:15' prior: 51866310!
+privateOtherProperties: anIdentityDictionary
+ "private - change the receiver's otherProperties"
+ otherProperties := anIdentityDictionary ! !
+!MenuItemMorph methodsFor: 'accessing' stamp: 'jmv 3/2/2010 16:11' prior: 23606027!
+contentString: aString
+ aString
+ ifNil: [self removeProperty: #contentString]
+ ifNotNil: [self setProperty: #contentString toValue: aString]! !
+!PolygonMorph methodsFor: 'smoothing' stamp: 'jmv 3/2/2010 16:22' prior: 26635957!
+computeNextToEndPoints
+ | pointAfterFirst pointBeforeLast |
+ pointAfterFirst := nil.
+ self lineSegmentsDo:
+ [:p1 :p2 |
+ pointAfterFirst ifNil: [pointAfterFirst := p2 asIntegerPoint].
+ pointBeforeLast := p1 asIntegerPoint].
+ curveState at: 2 put: pointAfterFirst.
+ curveState at: 3 put: pointBeforeLast! !
+!TextEditor methodsFor: 'accessing' stamp: 'jmv 3/2/2010 17:20' prior: 57304452!
+replaceSelectionWith: aText
+ "Remember the selection text in UndoSelection.
+ Deselect, and replace the selection text by aText.
+ Remember the resulting selectionInterval in UndoInterval and PriorInterval.
+ Set up undo to use UndoReplace."
+
+ beginTypeInBlock ifNotNil: [^self zapSelectionWith: aText]. "called from old code"
+ UndoSelection := self selection.
+ self zapSelectionWith: aText.
+ self undoer: #undoReplace! !
+!TextURL methodsFor: '*Morphic' stamp: 'rbb 2/18/2005 09:24'!
+actOnClickFor: anObject
+ "Do what you can with this URL.  Later a web browser."
+
+ | response m |
+
+ (url beginsWith: 'sqPr://') ifTrue: [
+ ProjectLoading thumbnailFromUrl: (url copyFrom: 8 to: url size).
+ ^self "should not get here, but what the heck"
+ ].
+ "if it's a web browser, tell it to jump"
+ anObject isWebBrowser
+ ifTrue: [anObject jumpToUrl: url. ^ true]
+ ifFalse: [((anObject respondsTo: #model) and: [anObject model isWebBrowser])
+ ifTrue: [anObject model jumpToUrl: url. ^ true]].
+
+ "if it's a morph, see if it is contained in a web browser"
+ (anObject isKindOf: Morph) ifTrue: [
+ m := anObject.
+ [ m ~= nil ] whileTrue: [
+ (m isWebBrowser) ifTrue: [
+ m  jumpToUrl: url.
+ ^true ].
+ (m hasProperty: #webBrowserView) ifTrue: [
+ m model jumpToUrl: url.
+ ^true ].
+ m := m owner. ]
+ ].
+
+ "no browser in sight.  ask if we should start a new browser"
+ ((self confirm: 'open a browser to view this URL?' translated) and: [WebBrowser default notNil]) ifTrue: [
+ WebBrowser default openOnUrl: url.
+ ^ true ].
+
+ "couldn't display in a browser.  Offer to put up just the source"
+
+ response := (UIManager default
+ chooseFrom: (Array with: 'View web page as source' translated
+ with: 'Cancel' translated)
+ title:  'Couldn''t find a web browser. View\page as source?' withCRs translated).
+ response = 1 ifTrue: [HTTPSocket httpShowPage: url].
+ ^ true! !
+!PasteUpMorph methodsFor: 'structure' stamp: 'jmv 3/2/2010 16:10' prior: 25884968!
+world
+ worldState ifNil: [^super world].
+ ^self! !
+!MorphicAlarm methodsFor: 'evaluating' stamp: 'jmv 3/2/2010 16:18' prior: 57430207!
+value: anArgument
+ | nArgs |
+ numArgs ifNil:[numArgs := selector numArgs].
+ nArgs := arguments ifNil:[0] ifNotNil:[arguments size].
+ nArgs = numArgs ifTrue:[
+ "Ignore extra argument"
+ ^self value].
+ ^arguments
+ ifNil: [ receiver perform: selector with: anArgument]
+ ifNotNil: [ receiver perform: selector withArguments: (arguments copyWith: anArgument)]! !
+!UTF8TextConverter commentStamp: '<historical>' prior: 59455539!
+Text converter for UTF-8.  Since the BOM is used to distinguish the MacRoman code and UTF-8 code, BOM is written for UTF-8 by #writeBOMOn: which is called by client.!
+!UTF8TextConverter class methodsFor: 'conversion' stamp: 'ar 9/1/2010 18:11' prior: 59036298!
+decodeByteString: aByteString
+ "Convert the given string from UTF-8 using the fast path if converting to Latin-1"
+
+ | outStream lastIndex nextIndex byte1 byte2 byte3 byte4 unicode |
+ lastIndex := 1.
+ (nextIndex := ByteString findFirstInString: aByteString inSet: latin1Map startingAt: lastIndex) = 0
+ ifTrue: [ ^aByteString ].
+ outStream := (String new: aByteString size) writeStream.
+ [
+ outStream next: nextIndex - lastIndex putAll: aByteString startingAt: lastIndex.
+ byte1 := aByteString byteAt: nextIndex.
+ (byte1 bitAnd: 16rE0) = 192 ifTrue: [ "two bytes"
+ byte2 := aByteString byteAt: (nextIndex := nextIndex + 1).
+ (byte2 bitAnd: 16rC0) = 16r80 ifFalse:[ ^self errorMalformedInput: aByteString ].
+ unicode := ((byte1 bitAnd: 31) bitShift: 6) + (byte2 bitAnd: 63)].
+ (byte1 bitAnd: 16rF0) = 224 ifTrue: [ "three bytes"
+ byte2 := aByteString byteAt: (nextIndex := nextIndex + 1).
+ (byte2 bitAnd: 16rC0) = 16r80 ifFalse:[ ^self errorMalformedInput: aByteString ].
+ byte3 := aByteString byteAt: (nextIndex := nextIndex + 1).
+ (byte3 bitAnd: 16rC0) = 16r80 ifFalse:[ ^self errorMalformedInput: aByteString ].
+ unicode := ((byte1 bitAnd: 15) bitShift: 12) + ((byte2 bitAnd: 63) bitShift: 6)
+ + (byte3 bitAnd: 63)].
+ (byte1 bitAnd: 16rF8) = 240 ifTrue: [ "four bytes"
+ byte2 := aByteString byteAt: (nextIndex := nextIndex + 1).
+ (byte2 bitAnd: 16rC0) = 16r80 ifFalse:[ ^self errorMalformedInput: aByteString ].
+ byte3 := aByteString byteAt: (nextIndex := nextIndex + 1).
+ (byte3 bitAnd: 16rC0) = 16r80 ifFalse:[ ^self errorMalformedInput: aByteString ].
+ byte4 := aByteString byteAt: (nextIndex := nextIndex + 1).
+ (byte4 bitAnd: 16rC0) = 16r80 ifFalse:[ ^self errorMalformedInput: aByteString ].
+ unicode := ((byte1 bitAnd: 16r7) bitShift: 18) +
+ ((byte2 bitAnd: 63) bitShift: 12) +
+ ((byte3 bitAnd: 63) bitShift: 6) +
+ (byte4 bitAnd: 63)].
+ unicode ifNil: [ ^self errorMalformedInput: aByteString ].
+ unicode = 16rFEFF ifFalse: [ "Skip byte order mark"
+ outStream nextPut: (Unicode value: unicode) ].
+ lastIndex := nextIndex + 1.
+ (nextIndex := ByteString findFirstInString: aByteString inSet: latin1Map startingAt: lastIndex) = 0 ] whileFalse.
+ ^outStream
+ next: aByteString size - lastIndex + 1 putAll: aByteString startingAt: lastIndex;
+ contents
+! !
+!UTF8TextConverter class methodsFor: 'utilities' stamp: 'ar 9/1/2010 18:16'!
+errorMalformedInput: aString
+ "Invalid UTF-8 input has been detected in the given string.
+ Raise an error if strict conversions are enabled, otherwise allow
+ the original string to be returned."
+
+ self strictUtf8Conversions ifTrue:[
+ self error: 'Invalid utf8: ', aString
+ ].
+
+ ^aString! !
+!UTF8TextConverter class methodsFor: 'utilities' stamp: 'ar 9/1/2010 18:16'!
+strictUtf8Conversions
+ "Preference setter for strict utf-8 conversions"
+
+ <preference: 'Strict utf8 conversions'
+ category: 'general' "should this be localization?"
+ description: 'If true, invalid utf-8 input will raise errors. If false, invalid utf-8 input will be allowed to pass through the conversion unchanged'
+ type: #Boolean>
+
+ ^StrictUtf8Conversions ifNil:[true]
+! !
+!UTF8TextConverter class methodsFor: 'utilities' stamp: 'ar 9/1/2010 18:16'!
+strictUtf8Conversions: aBool
+ "Preference setter for strict utf-8 conversions"
+
+ StrictUtf8Conversions := aBool.
+
+! !
+!UTF8TextConverter methodsFor: 'conversion' stamp: 'ar 9/1/2010 18:21'!
+errorMalformedInput: aString
+ "Invalid UTF-8 input has been detected in the given string.
+ Raise an error if strict conversions are enabled, otherwise allow
+ the original string to be returned."
+
+ ^self class errorMalformedInput: aString! !
+!UTF8TextConverter methodsFor: 'conversion' stamp: 'ar 9/1/2010 18:21' prior: 38408314!
+nextFromStream: aStream
+
+ | char1 value1 char2 value2 unicode char3 value3 char4 value4 |
+ aStream isBinary ifTrue: [^ aStream basicNext].
+ char1 := aStream basicNext.
+ char1 ifNil:[^ nil].
+ value1 := char1 asciiValue.
+ value1 <= 127 ifTrue: [
+ "1-byte char"
+ ^ char1
+ ].
+
+ "at least 2-byte char"
+ char2 := aStream basicNext.
+ char2 ifNil:[^self errorMalformedInput: (String with: char1)].
+ value2 := char2 asciiValue.
+
+ (value1 bitAnd: 16rE0) = 192 ifTrue: [
+ ^ Unicode value: ((value1 bitAnd: 31) bitShift: 6) + (value2 bitAnd: 63).
+ ].
+
+ "at least 3-byte char"
+ char3 := aStream basicNext.
+ char3 ifNil:[^self errorMalformedInput: (String with: char1 with: char2)].
+ value3 := char3 asciiValue.
+ (value1 bitAnd: 16rF0) = 224 ifTrue: [
+ unicode := ((value1 bitAnd: 15) bitShift: 12) + ((value2 bitAnd: 63) bitShift: 6)
+ + (value3 bitAnd: 63).
+ ].
+
+ (value1 bitAnd: 16rF8) = 240 ifTrue: [
+ "4-byte char"
+ char4 := aStream basicNext.
+ char4 ifNil:[^self errorMalformedInput: (String with: char1 with: char2 with: char3)].
+ value4 := char4 asciiValue.
+ unicode := ((value1 bitAnd: 16r7) bitShift: 18) +
+ ((value2 bitAnd: 63) bitShift: 12) +
+ ((value3 bitAnd: 63) bitShift: 6) +
+ (value4 bitAnd: 63).
+ ].
+
+ unicode ifNil:[^self errorMalformedInput: (String with: char1 with: char2 with: char3)].
+ unicode > 16r10FFFD ifTrue: [
+ ^self errorMalformedInput: (String with: char1 with: char2 with: char3).
+ ].
+
+ unicode = 16rFEFF ifTrue: [^ self nextFromStream: aStream].
+ ^ Unicode value: unicode.
+! !
+
+UTF8TextConverter removeSelector: #errorMalformedInput!
+
+UTF8TextConverter class removeSelector: #errorMalformedInput!
+
+"Multilingual"!
+!TestResource class methodsFor: 'accessing' stamp: 'nice 8/27/2010 18:02' prior: 31122770!
+current
+ ^ current ifNil: [ current := self new]
+ ! !
+!TestResource class methodsFor: 'Creation' stamp: 'nice 8/27/2010 18:02' prior: 31123063!
+reset
+ current ifNotNil: [:oldCurrent |
+ current := nil.
+ oldCurrent tearDown]! !
+!TestResource methodsFor: 'accessing' stamp: 'jmv 3/2/2010 16:40' prior: 31121337!
+description
+
+ ^description ifNil: [ '' ]! !
+!TestResource methodsFor: 'accessing' stamp: 'jmv 3/2/2010 16:40' prior: 31121541!
+name
+
+ ^name ifNil: [ self printString]! !
+!SUnitExtensionsTest methodsFor: 'accessing' stamp: 'nice 8/27/2010 21:01' prior: 28086301!
+stream
+ ^stream ifNil: [stream := WriteStream on: String new]! !
+!TestSuite methodsFor: 'Accessing' stamp: 'nice 8/27/2010 17:59' prior: 31151324!
+resources
+ ^ resources ifNil: [resources := self defaultResources]
+ ! !
+!TestSuite methodsFor: 'Accessing' stamp: 'nice 8/27/2010 17:59' prior: 31151540!
+tests
+ ^ tests ifNil: [tests := OrderedCollection new]
+ ! !
+
+"SUnit"!
+!CodeHolder methodsFor: 'diffs' stamp: 'sw 2/3/2001 00:10'!
+showingTiles
+ "Answer whether the receiver is currently showing tiles"
+
+ ^ contentsSymbol == #tiles
+! !
+!TranscriptStream class methodsFor: '*Tools' stamp: 'dtl 10/4/2009 23:44'!
+buildWith: aBuilder
+ ^(Smalltalk at: #Transcript) buildWith: aBuilder! !
+!TranscriptStream class methodsFor: '*Tools' stamp: 'ar 8/7/2009 22:24'!
+openMorphicTranscript
+ "Have the current project's transcript open up as a morph"
+
+ ^ToolBuilder open: self! !
+!TranscriptStream class methodsFor: '*Tools' stamp: 'sw 2/26/2002 14:46'!
+windowColorSpecification
+ "Answer a WindowColorSpec object that declares my preference"
+
+ ^ WindowColorSpec classSymbol: self name wording: 'Transcript' brightColor: #lightOrange pastelColor: #paleOrange helpMessage: 'The system transcript'! !
+!TranscriptStream methodsFor: '*Tools' stamp: 'ar 2/11/2005 20:36'!
+buildWith: builder
+ | windowSpec textSpec |
+ windowSpec := builder pluggableWindowSpec new.
+ windowSpec model: self.
+ windowSpec label: 'Transcript'.
+ windowSpec children: OrderedCollection new.
+
+ textSpec := builder pluggableTextSpec new.
+ textSpec
+ model: self;
+ menu: #codePaneMenu:shifted:;
+ frame: (0@0corner: 1@1).
+ windowSpec children add: textSpec.
+
+ ^builder build: windowSpec! !
+!TranscriptStream methodsFor: '*Tools' stamp: 'di 5/27/1998 16:44'!
+codePaneMenu: aMenu shifted: shifted
+ "Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items"
+ ^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted
+! !
+!TranscriptStream methodsFor: '*Tools' stamp: 'mp 2/2/2010 20:36'!
+open
+ | openCount |
+ openCount := self countOpenTranscripts.
+ openCount = 0
+ ifTrue: [self openLabel: 'Transcript']
+ ifFalse: [self openLabel: 'Transcript #' , (openCount+1) printString]! !
+!TranscriptStream methodsFor: '*Tools' stamp: 'ar 8/7/2009 22:28'!
+openLabel: aString
+ "Open a window on this transcriptStream"
+ ^ToolBuilder open: self label: aString! !
+
+"Tools"!
+!Url commentStamp: '<historical>' prior: 32785903!
+A Uniform Resource Locator.  It specifies the location of a document on the Internet.  The base class is abstract; child classes break different types of URLs down in ways appropriate for that type.!
+!Url class methodsFor: 'class initialization' stamp: 'fbs 9/2/2010 12:55'!
+initialize
+ super initialize.
+ SchemeRegistry := Dictionary new.
+ SchemeRegistry
+ at: 'browser' put: BrowserUrl;
+ at: 'file' put: FileUrl;
+ at: 'ftp' put: FtpUrl;
+ at: 'http' put: HttpUrl;
+ at: 'https' put: HttpUrl;
+ at: 'mailto' put: MailtoUrl.! !
+!Url class methodsFor: 'class initialization' stamp: 'fbs 9/2/2010 12:55'!
+registerUrlClass: aClass forScheme: aString
+ SchemeRegistry at: aString put: aClass.! !
+!Url class methodsFor: 'parsing' stamp: 'fbs 9/2/2010 12:56' prior: 38852081!
+urlClassForScheme: scheme
+ ^ SchemeRegistry at: scheme ifAbsent: [GenericUrl].! !
+!ImageReadWriter class methodsFor: '*network' stamp: 'nice 12/27/2009 03:11' prior: 55004018!
+formFromServerFile: fileName
+ "Answer a ColorForm stored on the file with the given name.  Meant to be called from during the getting of updates from the server.  That assures that (Utilities serverUrls) returns the right group of servers."
+
+ | urls |
+ urls := Utilities serverUrls collect:
+ [:url | url, fileName].  " fileName starts with: 'updates/'  "
+ urls do: [:aURL | | form doc |
+ (fileName findTokens: '.') last asLowercase = 'gif' ifTrue: [
+ form := HTTPSocket httpGif: aURL.
+ form = (ColorForm extent: 20@20 depth: 8)
+ ifTrue: [self inform: 'The file ',aURL,' is ill formed.'].
+ ^ form].
+ (fileName findTokens: '.') last asLowercase = 'bmp' ifTrue: [
+ doc := HTTPSocket httpGet: aURL accept: 'image/bmp'.
+ form := Form fromBMPFile: doc.
+ doc close.
+ form ifNil: [self inform: 'The file ',aURL,' is ill formed.'. ^ Form new]
+ ifNotNil: [^ form]].
+ self inform: 'File ', fileName, 'does not end with .gif or .bmp'].
+ self inform: 'That file not found on any server we know'.! !
+!Text methodsFor: '*network-url' stamp: 'ls 7/14/1998 03:17' prior: 31179685!
+asUrl
+ ^self asString asUrl! !
+!Text methodsFor: '*network-url' stamp: 'ls 7/14/1998 03:20' prior: 31179777!
+asUrlRelativeTo: aUrl
+ ^self asString asUrlRelativeTo: aUrl! !
+!HTTPSocket class methodsFor: 'get the page' stamp: 'ar 9/4/2010 10:47' prior: 35650470!
+httpRequest: method url: urlString headers: hdrs content: contentOrNil response: responseBlock
+
+ "Sends an HTTP request to the server. Returns a MIMEDocument if successful,
+ a string indicating the error otherwise. If a response block is provided, the
+ response is fed into into so that the sender can see all the headers.
+ The url string is assumed to be properly escaped by the sender."
+
+ | index serverAndPort server port rawUrl stream resp code headers
+  contentLength contentType contentStream |
+
+ (urlString beginsWith: 'http://') ifFalse:[self error: 'Not a http url'].
+
+ "Extract server, port, and url"
+ index := urlString indexOf: $/ startingAt: 8 ifAbsent:[urlString size+1]. "past http://"
+ serverAndPort := urlString copyFrom: 8 to: index-1.
+ server := serverAndPort copyUpTo: $:.
+ port := ((serverAndPort copyAfter: $:) ifEmpty:['80']) asNumber.
+
+ "Prepare the request URI"
+ rawUrl := urlString copyFrom: index to: urlString size.
+ (rawUrl beginsWith: '/') ifFalse:[rawUrl := '/', rawUrl].
+
+ "Check for proxy"
+ (self shouldUseProxy: server) ifTrue:[
+ self httpProxyServer ifNotEmpty:[
+ rawUrl := 'http://', serverAndPort, rawUrl. "per RFC 2616"
+ server := self httpProxyServer.
+ port := self httpProxyPort.
+ ].
+ ].
+
+ "Fire off the request"
+ stream := SocketStream openConnectionToHostNamed: server port: port.
+ stream nextPutAll: method; space; nextPutAll: rawUrl; space; nextPutAll: 'HTTP/1.0'; crlf.
+ stream nextPutAll: 'Host: ', serverAndPort; crlf.
+ stream nextPutAll: 'Connection: close'; crlf.
+ stream nextPutAll: 'User-Agent: ', self userAgentString; crlf.
+ stream nextPutAll: hdrs.
+ stream crlf.
+
+ contentOrNil ifNotNil:[
+ "Upload request content"
+ contentStream := contentOrNil readStream.
+ [contentStream atEnd] whileFalse:[
+ (HTTPProgress new) total: contentOrNil size;
+ amount: contentStream position; signal: 'Uploading...'.
+ stream nextPutAll: (contentStream next: 4096).
+ stream flush.
+ ].
+ ].
+
+ stream flush.
+
+ "Read the response"
+ resp := stream upToAll: String crlfcrlf.
+ "Extract the response code"
+ code := ((resp copyUpTo: String cr) findTokens: ' ') second asNumber.
+ "And the response headers"
+ headers := Dictionary new.
+ resp lines allButFirst allButLast do:[:nextLine|
+ headers at: (nextLine copyUpTo: $:) asLowercase
+ put: (nextLine copyAfter: $:) withBlanksTrimmed.
+ ].
+
+ "Read response content"
+ contentLength := headers at: 'content-length' ifAbsent:[nil].
+ contentType := headers at: 'content-type' ifAbsent:['application/octet-stream'].
+ "Fixme - Provide HTTProgress"
+ contentLength
+ ifNil:[contentStream := WriteStream with: stream upToEnd]
+ ifNotNil:[
+ contentLength := contentLength asNumber.
+ contentStream := (String new: contentLength) writeStream.
+ [contentStream position < contentLength] whileTrue:[
+ contentStream nextPutAll:
+ (stream next: (contentLength - contentStream position min: 4096)).
+ (HTTPProgress new) total: contentLength;
+ amount: contentStream position; signal: 'Downloading...'.
+ ].
+ ].
+ stream close.
+
+ responseBlock ifNotNil:[responseBlock value: resp].
+
+ ^(code between: 200 and: 299)
+ ifTrue:[MIMEDocument contentType: contentType
+ content: contentStream contents url: urlString]
+ ifFalse:[resp asString, contentStream contents].
+! !
+!FileStream class methodsFor: '*network' stamp: 'stephaneducasse 2/4/2006 20:32' prior: 20689308!
+httpPostDocument: url args: argsDict
+ | argString |
+ argString := argsDict
+ ifNotNil: [argString := HTTPSocket argString: argsDict]
+ ifNil: [''].
+ ^self post: argString url: url , argString ifError: [self halt]! !
+!FileStream class methodsFor: '*network' stamp: 'nice 12/27/2009 03:11' prior: 55069650!
+httpPostMultipart: url args: argsDict
+ | mimeBorder argsStream crLf resultStream result |
+ " do multipart/form-data encoding rather than x-www-urlencoded "
+
+ crLf := String crlf.
+ mimeBorder := '----squeak-', Time millisecondClockValue printString, '-stuff-----'.
+ "encode the arguments dictionary"
+ argsStream := WriteStream on: String new.
+ argsDict associationsDo: [:assoc |
+ assoc value do: [ :value | | fieldValue |
+ "print the boundary"
+ argsStream nextPutAll: '--', mimeBorder, crLf.
+ " check if it's a non-text field "
+ argsStream nextPutAll: 'Content-disposition: form-data; name="', assoc key, '"'.
+ (value isKindOf: MIMEDocument)
+ ifFalse: [fieldValue := value]
+ ifTrue: [argsStream nextPutAll: ' filename="', value url pathForFile, '"', crLf, 'Content-Type: ', value contentType.
+ fieldValue := (value content
+ ifNil: [(FileStream fileNamed: value url pathForFile) contentsOfEntireFile]
+ ifNotNil: [value content]) asString].
+" Transcript show: 'field=', key, '; value=', fieldValue; cr. "
+ argsStream nextPutAll: crLf, crLf, fieldValue, crLf.
+ ]].
+ argsStream nextPutAll: '--', mimeBorder, '--'.
+
+ resultStream := self
+ post:
+ ('Content-type: multipart/form-data; boundary=', mimeBorder, crLf,
+ 'Content-length: ', argsStream contents size printString, crLf, crLf,
+ argsStream contents)
+ url: url ifError: [^'Error in post ' url asString].
+ "get the header of the reply"
+ result := resultStream upToEnd.
+ ^MIMEDocument content: result! !
+!FileStream class methodsFor: '*network' stamp: 'mir 2/2/2001 14:23' prior: 20691173!
+post: data target: target url: url ifError: errorBlock
+ ^self concreteStream new post: data target: target url: url ifError: errorBlock! !
+!FileStream class methodsFor: '*network' stamp: 'mir 2/2/2001 14:23' prior: 20691391!
+post: data url: url ifError: errorBlock
+ ^self post: data target: nil url: url ifError: errorBlock! !
+!FileStream class methodsFor: '*network' stamp: 'stephaneducasse 2/4/2006 20:32' prior: 20691584!
+requestURL: url target: target
+ "FileStream requestURL:'http://isgwww.cs.uni-magdeburg.de/~raab' target: ':=blank' "
+ ^self concreteStream new requestURL: url target: target! !
+!FileStream class methodsFor: '*network' stamp: '' prior: 20691812!
+requestURLStream: url
+ "FileStream requestURLStream:'http://isgwww.cs.uni-magdeburg.de/~raab'"
+ ^self concreteStream new requestURLStream: url! !
+!FileStream class methodsFor: '*network' stamp: '' prior: 20692009!
+requestURLStream: url ifError: errorBlock
+ "FileStream requestURLStream:'http://isgwww.cs.uni-magdeburg.de/~raab'"
+ ^self concreteStream new requestURLStream: url ifError: errorBlock! !
+!FileStream methodsFor: '*network-url' stamp: 'gk 2/10/2004 13:21' prior: 20683608!
+asUrl
+ "Convert my path into a file:// type url - a FileUrl."
+
+ ^FileUrl pathParts: (self directory pathParts copyWith: self localName)! !
+!FileDirectory methodsFor: '*network-url' stamp: 'gk 2/10/2004 13:22' prior: 20473909!
+asUrl
+ "Convert my path into a file:// type url - a FileUrl."
+
+ ^FileUrl pathParts: (self pathParts copyWith: '')! !
+!String methodsFor: '*network-url' stamp: 'ar 9/4/2010 11:23'!
+urlEncoded
+ "Encode the receiver, which is assumed to be URL, properly.
+ This method is specific to URLs in such that it will parse
+ the url and perform a semantically correct substitution, for example:
+
+ 'http://squeak.org/name with space?and=value' encodeForHTTP.
+ => 'http%3A%2F%2Fsqueak.org%2Fname%20with%20space%3Fand%3Dvalue'
+
+ 'http://squeak.org/name with space?and=value' urlEncoded.
+ => 'http://squeak.org/name%20with%20space?and=value"
+
+ ^self asUrl asString! !
+
+"Network"!
+!PositionableStream methodsFor: '*Compression' stamp: 'ar 1/2/2000 15:32' prior: 26698527!
+asZLibReadStream
+ ^ZLibReadStream on: collection from: position+1 to: readLimit! !
+!StandardFileStream methodsFor: '*Compression' stamp: 'stephaneducasse 2/4/2006 20:32' prior: 29784283!
+compressFile
+ "Write a new file that has the data in me compressed in GZip format."
+ | zipped buffer |
+
+ self readOnly; binary.
+ zipped := self directory newFileNamed: (self name, FileDirectory dot, 'gz').
+ zipped binary; setFileTypeToObject.
+ "Type and Creator not to be text, so can be enclosed in an email"
+ zipped := GZipWriteStream on: zipped.
+ buffer := ByteArray new: 50000.
+ 'Compressing ', self fullName displayProgressAt: Sensor cursorPoint
+ from: 0 to: self size
+ during: [:bar |
+ [self atEnd] whileFalse: [
+ bar value: self position.
+ zipped nextPutAll: (self nextInto: buffer)].
+ zipped close.
+ self close].
+ ^zipped! !
+!ReadWriteStream methodsFor: '*Compression' stamp: 'yo 7/16/2003 14:59' prior: 27509617!
+asUnZippedStream
+ | isGZip outputStream first strm archive which |
+ "Decompress this file if needed, and return a stream.  No file is written.  File extension may be .gz or anything else.  Also works on archives (.zip, .gZip)."
+
+ strm := self binary.
+ strm isZipArchive ifTrue: [
+ archive := ZipArchive new readFrom: strm.
+ which := archive members detect: [:any | any fileName asLowercase endsWith: '.ttf']
+ ifNone: [nil].
+ which ifNil: [archive close.
+ ^ self error: 'Can''t find .ttf file in archive'].
+ strm := which contentStream.
+ archive close].
+
+ first := strm next.
+ isGZip := (strm next * 256 + first) = (GZipConstants gzipMagic).
+ strm skip: -2.
+ isGZip
+ ifTrue: [outputStream := (MultiByteBinaryOrTextStream with:
+ (GZipReadStream on: strm) upToEnd) reset.
+ strm close]
+ ifFalse: [outputStream := strm].
+ ^ outputStream! !
+!ReadWriteStream methodsFor: '*Compression' stamp: 'nk 8/21/2004 15:47' prior: 27515844!
+isZipArchive
+ "Determine if this appears to be a valid Zip archive"
+ | sig |
+ self binary.
+ sig := self next: 4.
+ self position: self position - 4. "rewind"
+ ^ZipArchive validSignatures includes: sig! !
+!ZipArchive class methodsFor: 'constants' stamp: 'ar 9/6/2010 15:29' prior: 33409300!
+findEndOfCentralDirectoryFrom: stream
+ "Seek in the given stream to the end, then read backwards until we find the
+ signature of the central directory record. Leave the file positioned right
+ before the signature.
+
+ Answers the file position of the EOCD, or 0 if not found."
+
+ | data fileLength seekOffset pos maxOffset |
+ stream setToEnd.
+ fileLength := stream position.
+ "If the file length is less than 18 for the EOCD length plus 4 for the signature, we have a problem"
+ fileLength < 22 ifTrue: [^ self error: 'file is too short'].
+
+ seekOffset := 0.
+ pos := 0.
+ data := ByteArray new: 4100.
+ maxOffset := 40960 min: fileLength. "limit search range to 40K"
+
+ [
+ seekOffset := (seekOffset + 4096) min: fileLength.
+ stream position: fileLength - seekOffset.
+ data := stream next: (4100 min: seekOffset) into: data startingAt: 1.
+ pos := self lastIndexOfPKSignature: EndOfCentralDirectorySignature in: data.
+ pos = 0 and: [seekOffset < maxOffset]
+ ] whileTrue.
+
+ ^ pos > 0
+ ifTrue: [ | newPos | stream position: (newPos := (stream position + pos - seekOffset - 1)). newPos]
+ ifFalse: [0]! !
+!ZipArchive class methodsFor: 'constants' stamp: 'ar 9/6/2010 15:28'!
+lastIndexOfPKSignature: aSignature in: data
+ "Answer the last index in data where aSignature (4 bytes long) occurs, or 0 if not found"
+ | a b c d |
+ a := aSignature first.
+ b := aSignature second.
+ c := aSignature third.
+ d := aSignature fourth.
+ (data size - 3) to: 1 by: -1 do: [ :i |
+ (((data at: i) = a)
+ and: [ ((data at: i + 1) = b)
+ and: [ ((data at: i + 2) = c)
+ and: [ ((data at: i + 3) = d) ]]])
+ ifTrue: [ ^i ]
+ ].
+ ^0! !
+!GZipWriteStream class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 08:39' prior: 21242540!
+initialize
+ FileServices registerFileReader: self! !
+!GZipWriteStream class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 08:39' prior: 21242678!
+unload
+ FileServices unregisterFileReader: self! !
+!FileStream methodsFor: '*Compression' stamp: 'ar 9/5/2010 08:55' prior: 54525658!
+viewGZipContents
+ "View the contents of a gzipped file"
+
+ | stringContents |
+ self binary.
+ stringContents := self contentsOfEntireFile.
+ stringContents := Cursor wait showWhile: [(GZipReadStream on: stringContents) upToEnd].
+ stringContents := stringContents asString withSqueakLineEndings.
+
+ UIManager default
+ edit: stringContents;
+ label: 'Decompressed contents of: ', self localName! !
+!String methodsFor: '*Compression' stamp: 'yo 11/3/2004 19:24' prior: 30178708!
+unzipped
+ | magic1 magic2 |
+ magic1 := (self at: 1) asInteger.
+ magic2 := (self at: 2) asInteger.
+ (magic1 = 16r1F and:[magic2 = 16r8B]) ifFalse:[^self].
+ ^(GZipReadStream on: self) upToEnd! !
+!String methodsFor: '*Compression' stamp: 'dgd 11/26/2005 21:19' prior: 30184675!
+zipped
+ | stream gzstream |
+
+ stream := RWBinaryOrTextStream on: String new.
+
+ gzstream := GZipWriteStream on: stream.
+ gzstream nextPutAll: self.
+ gzstream close.
+ stream reset.
+
+ ^ stream contents.
+! !
+!GZipReadStream class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 08:39' prior: 21228916!
+unload
+
+ FileServices unregisterFileReader: self ! !
+
+"Compression"!
+
+ByteArray removeSelector: #lastIndexOfPKSignature:!
+
+String removeSelector: #lastIndexOfPKSignature:!
+!MCMenuSpec commentStamp: 'tfel 6/12/2010 14:57' prior: 0!
+A MCMenuSpec holds information to add menu entries to the monticello browser menus from external classes.
+Required is the entry string (#entry), the call target and the selector be called.
+An external class may use the MCWorkingCopyBrowser class>>addMenuSpec: method to add it's own menu entry to the monticello browser context menu.
+
+Note that MCMenuSpecs are compared via their menu entry string and if multiple MCMenuSpecs are added to the MCWorkingCopyBrowser, the last one takes precedence.!
+!MCMenuSpec methodsFor: 'comparing' stamp: 'tfel 6/12/2010 11:43'!
+= aMCMenuSpec
+
+ ^ self class == aMCMenuSpec class and: [self entry = aMCMenuSpec entry].! !
+!MCMenuSpec methodsFor: 'accessing' stamp: 'tfel 6/12/2010 11:38'!
+entry
+
+ ^entry! !
+!MCMenuSpec methodsFor: 'accessing' stamp: 'tfel 6/12/2010 11:38'!
+entry: anObject
+
+ entry := anObject! !
+!MCMenuSpec methodsFor: 'comparing' stamp: 'tfel 6/12/2010 11:42'!
+hash
+
+ ^ self entry hash! !
+!MCMenuSpec methodsFor: 'accessing' stamp: 'tfel 6/12/2010 11:38'!
+selector
+
+ ^selector! !
+!MCMenuSpec methodsFor: 'accessing' stamp: 'tfel 6/12/2010 11:38'!
+selector: anObject
+
+ selector := anObject! !
+!MCMenuSpec methodsFor: 'accessing' stamp: 'tfel 6/12/2010 11:38'!
+target
+
+ ^target! !
+!MCMenuSpec methodsFor: 'accessing' stamp: 'tfel 6/12/2010 11:38'!
+target: anObject
+
+ target := anObject! !
+!MCWorkingCopyBrowser class methodsFor: 'hooks' stamp: 'tfel 6/12/2010 14:55'!
+addMenuSpec: aMCMenuSpec
+ "Register a context menu entry in the monticello browser from an external package.
+ The MCWorkingCopyBrowser model is passed as argument."
+ self externalMenuEntries
+ remove: aMCMenuSpec
+ ifAbsent: ["Remove any previous entry with description string"];
+ add: aMCMenuSpec.! !
+!MCWorkingCopyBrowser class methodsFor: 'hooks' stamp: 'tfel 6/12/2010 11:44'!
+externalMenuEntries
+
+ ExternalMenuEntries ifNil: [ExternalMenuEntries := Set new].
+ ^ ExternalMenuEntries! !
+!MCWorkingCopyBrowser methodsFor: 'morphic ui' stamp: 'tfel 6/12/2010 13:47'!
+insertExternalMenuEntries: aMenu
+
+ self class externalMenuEntries ifNotEmpty: [
+ aMenu addLine.
+ self class externalMenuEntries do: [:each |
+ aMenu
+ add: each entry
+ target: each target
+ selector: each selector
+ argument: self]].! !
+!MCWorkingCopyBrowser methodsFor: 'morphic ui' stamp: 'tfel 6/12/2010 11:22' prior: 23231997!
+workingCopyListMenu: aMenu
+ workingCopy ifNil: [^ aMenu].
+ self fillMenu: aMenu fromSpecs:
+ #(('add required package' #addRequiredPackage)
+ ('clear required packages' #clearRequiredPackages)
+ ('browse package' #browseWorkingCopy)
+ ('view changes' #viewChanges)
+ ('view history' #viewHistory)
+ ('recompile package' #recompilePackage)
+ ('revert package...' #revertPackage)
+ ('unload package' #unloadPackage)
+ ('delete working copy' #deleteWorkingCopy)).
+ (Smalltalk includesKey: #SARMCPackageDumper) ifTrue: [
+ aMenu add: 'make SAR' target: self selector: #fileOutAsSAR
+ ].
+ self insertExternalMenuEntries: aMenu.
+ ^aMenu! !
+
+"Monticello"!
+!Month commentStamp: 'cbr 7/28/2010 18:11' prior: 24041091!
+I represent a month.
+
+For example, to get the number of days this month, you can evaluate the following expression:
+
+Month current daysInMonth!
+!Week commentStamp: 'cbr 7/28/2010 18:11' prior: 33165309!
+I represent a week.
+
+To find out what days of the week on which Squeak is fun, select the following expression, and print it:
+
+Week dayNames!
+!Year commentStamp: 'cbr 7/28/2010 18:10' prior: 59467077!
+I represent a year.
+
+Try me!! Select the following expression and print it:
+
+Year current daysInYear "Try me again next leap year!!"!
+!DateAndTime class methodsFor: 'squeak protocol' stamp: 'spd 8/5/2010 09:17' prior: 57383492!
+readFrom: aStream
+
+ | offset date time ch |
+
+ date := Date readFrom: aStream.
+ [aStream peek isDigit]
+ whileFalse: [aStream next].
+ time := Time readFrom: aStream.
+ aStream atEnd
+ ifTrue: [ offset := self localOffset ]
+ ifFalse: [
+ ch := aStream next.
+ ch = $+ ifTrue: [ch := Character space].
+ offset := Duration fromString: ch asString, '0:', aStream upToEnd, ':0'].
+
+ ^ self
+ year: date year
+ month: date monthIndex
+ day: date dayOfMonth
+ hour: time hour
+ minute: time minute
+ second: time second
+ nanoSecond: time nanoSecond
+ offset: offset
+
+
+ " '-1199-01-05T20:33:14.321-05:00' asDateAndTime
+ ' 2002-05-16T17:20:45.1+01:01' asDateAndTime
+
+ ' 2002-05-16T17:20:45.02+01:01' asDateAndTime
+
+ ' 2002-05-16T17:20:45.003+01:01' asDateAndTime
+
+ ' 2002-05-16T17:20:45.0004+01:01' asDateAndTime
+   ' 2002-05-16T17:20:45.00005' asDateAndTime
+ ' 2002-05-16T17:20:45.000006+01:01' asDateAndTime
+
+ ' 2002-05-16T17:20:45.0000007+01:01' asDateAndTime
+ ' 2002-05-16T17:20:45.00000008-01:01' asDateAndTime  
+ ' 2002-05-16T17:20:45.000000009+01:01' asDateAndTime  
+ ' 2002-05-16T17:20:45.0000000001+01:01' asDateAndTime  
+
+ ' 2002-05-16T17:20' asDateAndTime
+ ' 2002-05-16T17:20:45' asDateAndTime
+ ' 2002-05-16T17:20:45+01:57' asDateAndTime
+ ' 2002-05-16T17:20:45-02:34' asDateAndTime
+ ' 2002-05-16T17:20:45+00:00' asDateAndTime
+ ' 1997-04-26T01:02:03+01:02:3' asDateAndTime
+ "! !
+!Integer methodsFor: 'arithmetic' stamp: 'nice 9/2/2010 21:29'!
+reciprocalModulo: n
+ "Answer an integer x such that (self * x) \\ n = 1, x > 0, x < n.
+ Raise an error if there is no such integer.
+ The algorithm is a non extended euclidean modular inversion called NINV.
+ It is described in this article:
+ 'Using an RSA Accelerator for Modular Inversion'
+ by Martin Seysen. See http://www.iacr.org/archive/ches2005/017.pdf"
+
+ | u v f fPlusN b result result2 |
+ ((self <= 0) or: [n <= 0]) ifTrue: [self error: 'self and n must be greater than zero'].
+ self >= n ifTrue: [self error: 'self must be < n'].
+
+ b := n highBit + 1.
+ f := 1 bitShift: b.
+ v := (self bitShift: b) + 1.
+ u := n bitShift: b.
+ fPlusN := f + n.
+ [v >= fPlusN] whileTrue:
+ [v := u \\\ (u := v)].
+ result := v - f.
+ (result2 := result + n) > 0
+ ifFalse: [self error: 'no inverse'].
+ ^result positive
+ ifTrue: [result]
+ ifFalse: [result2]! !
+
+Object removeSelector: #undoFromCapturedState:!
+
+Object removeSelector: #rememberUndoableAction:named:!
+
+Object removeSelector: #rememberCommand:!
+
+Object removeSelector: #refineUndoTarget:selector:arguments:in:!
+
+Object removeSelector: #refineRedoTarget:selector:arguments:in:!
+
+Object removeSelector: #redoFromCapturedState:!
+
+Object removeSelector: #purgeAllCommands!
+
+Object removeSelector: #propertyList!
+
+Object removeSelector: #openAsMorph!
+
+Object removeSelector: #descriptionForPartsBin!
+
+Object removeSelector: #commandHistory!
+
+Object removeSelector: #capturedState!
+
+Object removeSelector: #asTextMorph!
+
+Object removeSelector: #asStringMorph!
+
+Object removeSelector: #asMorph!
+
+Object removeSelector: #asDraggableMorph!
+!FileStream class methodsFor: 'initialize-release' stamp: 'ar 9/5/2010 08:54' prior: 20696528!
+initialize
+
+ FileServices registerFileReader: self! !
+!FileStream class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 08:54' prior: 20692280!
+unload
+
+ FileServices unregisterFileReader: self ! !
+!DirectoryEntry methodsFor: 'services' stamp: 'ar 9/5/2010 08:51' prior: 58764195!
+services
+ "Answer the same collection of SimpleServiceEntry's accessed by the FileList."
+ ^ FileServices itemsForFile: self fullName! !
+
+FileDirectory removeSelector: #hasEToyUserList!
+
+FileDirectory removeSelector: #eToyUserName:!
+
+FileDirectory removeSelector: #eToyUserListUrl:!
+
+FileDirectory removeSelector: #eToyUserListUrl!
+
+FileDirectory removeSelector: #eToyUserList!
+
+FileDirectory removeSelector: #eToyBaseFolderSpec:!
+
+FileDirectory removeSelector: #eToyBaseFolderSpec!
+
+FileDirectory class removeSelector: #searchAllFilesForAString!
+
+FileStream removeSelector: #fileIntoNewChangeSet!
+
+FileStream removeSelector: #edit!
+
+"Files"!
+!TextStyle class methodsFor: 'mime file in/out' stamp: 'ar 9/5/2010 09:02' prior: 55350187!
+replaceFontsIn: oldFontArray with: newStyle
+ "
+ TextStyle replaceFontsIn: (TextStyle looseFontsFromFamily: #Accuny) with: (TextStyle named: #Accuny)
+ "
+ "Try to find corresponding fonts in newStyle and substitute them for the fonts in oldFontArray"
+
+ newStyle fontArray do: [ :newFont | newFont releaseCachedState ].
+
+ oldFontArray do: [ :oldFont | | newFont |
+ oldFont reset.
+ newFont := (newStyle fontOfPointSize: oldFont pointSize) emphasis: oldFont emphasis.
+ oldFont becomeForward: newFont ].
+
+ Smalltalk at: #StringMorph ifPresent:[:cls| cls allSubInstancesDo: [ :s | s layoutChanged]].
+ Smalltalk at: #TextMorph ifPresent:[:cls| cls allSubInstancesDo: [ :s | s layoutChanged]].
+ Smalltalk at: #SystemWindow ifPresent:[:cls|
+ cls allInstancesDo: [ :w | [ w update: #relabel ] on: Error do: [ :ex | ] ]].
+ World ifNotNil: [ :w | w changed ].! !
+!Form class methodsFor: 'initialize-release' stamp: 'ar 9/5/2010 09:09' prior: 21087485!
+initialize
+
+ FileServices registerFileReader: self! !
+!Form class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 09:09' prior: 21075980!
+unload
+
+ FileServices unregisterFileReader: self ! !
+!StrikeFont class methodsFor: 'accessing' stamp: 'ar 9/6/2010 11:33' prior: 55426291!
+defaultSized: aNumber
+ | fonts f |
+ "This used to be the default textstyle, but it needs to be a StrikeFont and not a TTCFont and sometimes the default textstyle is a TTCFont.  So, we use a typical StrikeFont as the default fallback font."
+ fonts := (TextConstants at: #Accuny ifAbsent:[TextStyle default]) fontArray.
+ f := fonts first.
+ 1 to: fonts size do: [:i |
+ aNumber > (fonts at: i) height ifTrue: [f := fonts at: i].
+ ].
+ ^f
+! !
+!BDFFontReader class methodsFor: 'resource download' stamp: 'ar 9/5/2010 09:08' prior: 56377424!
+downloadFonts  "BDFFontReader downloadFonts"
+ "Download a standard set of BDF sources from x.org.  
+ The combined size of these source files is around 1.2M; after conversion
+ to .sf2 format they may be deleted."
+
+ | heads tails filenames baseUrl basePath |
+ heads := #( 'charR' 'courR' 'helvR' 'lubR' 'luRS' 'lutRS' 'ncenR' 'timR' ).
+ tails := #( '08' '10' '12' '14' '18' '24').
+
+ filenames := OrderedCollection new.
+ heads do: [:head |
+ filenames addAll: (tails collect: [:tail | head , tail , '.bdf'])
+ ].
+
+ baseUrl := 'http://ftp.x.org/pub/R6.4/xc/fonts/bdf/75dpi/' asUrl.
+ basePath := baseUrl path.
+
+ filenames do: [:filename | | document f newPath newUrl |
+ newUrl := baseUrl clone.
+ newPath := OrderedCollection newFrom: basePath.
+
+ newPath addLast: filename.
+ newUrl path: newPath.
+
+ Utilities informUser: 'Fetching ' , filename during:
+ [document := newUrl retrieveContents].
+
+ f := CrLfFileStream newFileNamed: filename.
+ f nextPutAll: document content.
+ f close.
+ ].
+! !
+
+PNMReadWriter class removeSelector: #testMultiFile:!
+
+PNMReadWriter class removeSelector: #testFromString!
+
+PNMReadWriter class removeSelector: #testFromSEFile:!
+
+PNGReadWriter class removeSelector: #test1!
+
+PNGReadWriter class removeSelector: #createAFormFrom:!
+
+Pen removeSelector: #arrowHeadFrom:to:forPlayer:!
+
+Pen removeSelector: #arrowHeadFrom:to:arrowSpec:!
+
+Pen removeSelector: #arrowHeadForArrowSpec:!
+
+Pen removeSelector: #arrowHead!
+
+Form removeSelector: #morphEdit!
+
+Form removeSelector: #asMorph!
+!SmalltalkImage methodsFor: 'shrinking' stamp: 'ar 9/6/2010 11:34'!
+unloadFonts "Smalltalk unloadFonts"
+
+ "Unloads all fonts except the style specified initially."
+
+ | fontName fontSize textStyle |
+ "Three good choices here:
+ * Atlanta 11: Absolutely minimal font.
+ * Accuny 10: A few extra sizes over Atlanta.
+ * Bitmap DejaVu Sans 9: Nicest fonts but relatively large.
+ "
+ fontName := #'Bitmap DejaVu Sans'.
+ fontSize := 9.
+
+ "Nuke everything other than the desired text style"
+ textStyle := TextStyle named: fontName.
+ TextStyle defaultFamilyNames do:[:styleName|
+ TextConstants at: styleName put: textStyle
+ ].
+ TextStyle actualTextStyles keys do:[:styleName|
+ TextConstants removeKey: styleName
+ ].
+ TextConstants at: fontName put: textStyle.
+
+ "Use it everywhere"
+ Preferences setDefaultFonts: {
+ {#setSystemFontTo:. fontName. fontSize}.
+ {#setListFontTo:. fontName. fontSize}.
+ {#setFlapsFontTo:. fontName. fontSize}.
+ {#setEToysFontTo:. fontName. fontSize}.
+ {#setEToysTitleFontTo: . fontName. fontSize}.
+ {#setPaintBoxButtonFontTo:. fontName. fontSize}.
+ {#setMenuFontTo:. fontName. fontSize}.
+ {#setWindowTitleFontTo:. fontName. fontSize}.
+ {#setBalloonHelpFontTo:. fontName. fontSize}.
+ {#setCodeFontTo:. fontName. fontSize}.
+ {#setButtonFontTo:. fontName. fontSize}.
+ }.
+
+ "Clean out afterwards"
+ Smalltalk at: #TextEditor ifPresent:[:aClass| aClass initialize].
+ Smalltalk at: #SmalltalkEditor ifPresent:[:aClass| aClass initialize].
+ Smalltalk at: #SystemProgressMorph ifPresent:[:aClass| aClass reset].
+ Smalltalk at: #TTCFont ifPresent:[:aClass| aClass registry removeAll].
+ Smalltalk at: #Flaps ifPresent:[:aClass | aClass disableGlobalFlaps: false].
+ Smalltalk at: #TTFontDescription ifPresent:[:aClass| aClass clearDefault].
+ Smalltalk at: #TTFontDescription ifPresent:[:aClass| aClass clearDescriptions].
+! !
+!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'ar 9/5/2010 21:57' prior: 30554525!
+selector: selector recategorizedFrom: oldCategory to: newCategory inClass: aClass
+
+ self trigger: (RecategorizedEvent
+ selector: selector
+ method: (aClass compiledMethodAt: selector ifAbsent: [nil])
+ protocol: newCategory
+ class: aClass
+ oldProtocol: oldCategory)! !
+!DefaultExternalDropHandler methodsFor: 'event handling' stamp: 'ar 9/5/2010 08:52' prior: 19652787!
+handle: dropStream in: pasteUp dropEvent: anEvent
+ "the file was just droped, let's do our job"
+ | fileName services theOne chosen |
+ fileName := dropStream name.
+ services := self servicesForFileNamed: fileName.
+
+ "no service, default behavior"
+ services isEmpty
+ ifTrue: [^UIManager default edit: dropStream contentsOfEntireFile].
+
+ chosen := self chooseServiceFrom: services.
+ chosen ifNotNil:[theOne performServiceFor: dropStream]! !
+!SystemNavigation methodsFor: 'query' stamp: 'eem 8/30/2010 10:42'!
+allCallsOn: aSymbol localTo: aClass
+ "Answer a Set of MethodReferences for all the methods
+ that call on aSymbol in, above or below the given class."
+
+ | aSet special byte enum |
+ aSet := Set new.
+ special := Smalltalk hasSpecialSelector: aSymbol ifTrueSetByte: [:b | byte := b].
+ enum := [:behavior|
+ (behavior whichSelectorsReferTo: aSymbol special: special byte: byte) do:
+ [:sel | aSet add: (MethodReference new setStandardClass: behavior  methodSymbol: sel)]].
+ aClass theNonMetaClass withAllSuperAndSubclassesDoGently: enum.
+ aClass theNonMetaClass class withAllSuperAndSubclassesDoGently: enum.
+ ^aSet! !
+!SystemNavigation methodsFor: 'query' stamp: 'eem 8/30/2010 10:47'!
+allCallsOn: aLiteral localToPackage: packageNameOrInfo
+ "Answer a Set of MethodReferences for all the methods
+ that call on aSymbol in the given package."
+
+ | aSet special byte |
+ aSet := Set new.
+ special := Smalltalk hasSpecialSelector: aLiteral ifTrueSetByte: [:b | byte := b].
+ Cursor wait showWhile:
+ [(self packageInfoFor: packageNameOrInfo) actualMethodsDo:
+ [:method |
+ ((method hasLiteral: aLiteral) or: [special and: [method scanFor: byte]]) ifTrue:
+ [((aLiteral isVariableBinding) not
+ or: [method literals allButLast includes: aLiteral])
+ ifTrue: [aSet add: method methodReference]]].].
+ ^aSet! !
+!SystemNavigation methodsFor: 'query' stamp: 'eem 8/30/2010 10:33'!
+allImplementorsOf: aSelector  localToPackage: packageNameOrInfo
+ "Answer a SortedCollection of all the methods that implement the message
+ aSelector in the given package."
+
+ | aSet |
+ aSet := Set new.
+ Cursor wait showWhile:
+ [(self packageInfoFor: packageNameOrInfo) actualMethodsDo:
+ [:m |
+ (m selector = aSelector) ifTrue:
+ [aSet add: m methodReference]]].
+ ^aSet! !
+!SystemNavigation methodsFor: 'query' stamp: 'eem 8/30/2010 10:38'!
+allMethodsSelect: aBlock localToPackage: packageNameOrInfo
+ "Answer a SortedCollection of each method in the given package
+ for which the evaluation of aBlock with the metnod answers true."
+
+ | aSet |
+ aSet := Set new.
+ Cursor wait showWhile:
+ [(self packageInfoFor: packageNameOrInfo) actualMethodsDo:
+ [:aMethod |
+ (aBlock value: aMethod) ifTrue:
+ [aSet add: aMethod methodReference]]].
+ ^aSet! !
+!SystemNavigation methodsFor: 'browse' stamp: 'eem 8/30/2010 11:05' prior: 30676618!
+browseAllCallsOn: aLiteral
+ "Create and schedule a message browser on each method that refers to
+ aLiteral. For example, SystemNavigation new browseAllCallsOn: #open:label:."
+ self headingAndAutoselectForLiteral: aLiteral do:
+ [:label :autoSelect|
+ self
+ browseMessageList: (self allCallsOn: aLiteral) asSortedCollection
+ name: label
+ autoSelect: autoSelect]! !
+!SystemNavigation methodsFor: 'browse' stamp: 'eem 8/30/2010 11:27' prior: 52732581!
+browseAllCallsOn: aLiteral from: aBehavior
+ "Create and schedule a Message Set browser for
+ all the methods that call on aLiteral within aBehavior."
+
+ "self new browseAllCallsOn: #/ from: Number"
+
+ ^self headingAndAutoselectForLiteral: aLiteral do:
+ [:label :autoSelect|
+ self
+ browseMessageList: (self  allCallsOn: aLiteral from: aBehavior)
+ name: label, ' from ', aBehavior name
+ autoSelect: autoSelect]
+
+ ! !
+!SystemNavigation methodsFor: 'browse' stamp: 'eem 8/30/2010 11:15' prior: 30678139!
+browseAllCallsOn: aLiteral localTo: aClass
+ "Create and schedule a message browser on each method in or below the given class that refers to
+ aLiteral. For example, SystemNavigation new browseAllCallsOn: #open:label: localTo: CodeHolder."
+
+ aClass ifNil: [ ^self inform: 'no selected class' ].
+ self headingAndAutoselectForLiteral: aLiteral do:
+ [:label :autoSelect|
+ self browseMessageList: (aClass allLocalCallsOn: aLiteral) asSortedCollection
+ name: label, ' local to ', aClass name
+ autoSelect: autoSelect]! !
+!SystemNavigation methodsFor: 'browse' stamp: 'eem 8/30/2010 11:16'!
+browseAllCallsOn: aLiteral localToPackage: packageNameOrInfo
+ "Create and schedule a message browser on each method in the given package
+ that refers to aLiteral. For example,
+ SystemNavigation new browseAllCallsOn: #open:label: localToPackage: 'Tools'."
+
+ self headingAndAutoselectForLiteral: aLiteral do:
+ [:label :autoSelect|
+ self browseMessageList: (self allCallsOn: aLiteral localToPackage: packageNameOrInfo) asSortedCollection
+ name: label, ' local to package ', (self packageInfoFor: packageNameOrInfo) name
+ autoSelect: autoSelect]! !
+!SystemNavigation methodsFor: 'browse' stamp: 'eem 8/30/2010 11:13'!
+browseAllImplementorsOf: selector localToPackage: packageNameOrInfo
+ "Create and schedule a message browser on each method in the given package
+ that implements the message whose selector is the argument, selector. For example,
+ SystemNavigation new browseAllImplementorsOf: #at:put: localToPackage: 'Collections'."
+
+ self browseMessageList: (self
+ allImplementorsOf: selector
+ localToPackage: packageNameOrInfo) asSortedCollection
+ name: 'Implementors of ' , selector,
+ ' local to package ', (self packageInfoFor: packageNameOrInfo) name! !
+!SystemNavigation methodsFor: 'private' stamp: 'eem 8/30/2010 11:02'!
+headingAndAutoselectForLiteral: aLiteral do: binaryBlock
+ "Evaluate aBlock with either Users of ... or Senders of ... plus the auto-select string
+ for the given literal.  aLiteral can be a Symbol, a VariableBinding or an arbitrary object."
+
+ | autoSelect |
+ ^aLiteral isSymbol
+ ifTrue: [binaryBlock value: 'Senders of ', aLiteral value: aLiteral keywords first]
+ ifFalse:
+ [autoSelect := aLiteral isVariableBinding
+ ifTrue: [aLiteral key]
+ ifFalse: [aLiteral printString].
+ binaryBlock value: 'Users of ', autoSelect value: autoSelect]! !
+!SystemNavigation methodsFor: 'private' stamp: 'eem 8/30/2010 10:34'!
+packageInfoFor: packageInfoOrString
+ ^packageInfoOrString isString
+ ifTrue: [PackageInfo named: packageInfoOrString]
+ ifFalse: [packageInfoOrString]! !
+!RecategorizedEvent class methodsFor: 'instance creation' stamp: 'ar 9/5/2010 21:56'!
+selector: aSelector method: aMethod protocol: prot class: aClass oldProtocol: oldName
+
+ ^(self method: aMethod protocol: prot class: aClass)
+ itemSelector: aSelector;
+ oldCategory: oldName;
+ yourself! !
+!DigitalSignatureAlgorithm methodsFor: 'public' stamp: 'nice 9/2/2010 21:48' prior: 50923162!
+computeSignatureForMessageHash: hash privateKey: privateKey
+ "Answer the digital signature of the given message hash using the given private key. A signature is a pair of large integers. The private key is an array of four large integers: (p, q, g, x)."
+
+ | p q g x r s k tmp |
+ p := privateKey first.
+ q := privateKey second.
+ g := privateKey third.
+ x := privateKey fourth.
+
+ r := s := 0.
+ [r = 0 or: [s = 0]] whileTrue: [
+ k := self nextRandom160 \\ q.
+ r := (g raisedTo: k modulo: p) \\ q.
+ tmp := (hash + (x * r)) \\ q.
+ s := ((k reciprocalModulo: q) * tmp) \\ q].
+
+ ^ Array with: r with: s
+! !
+!DigitalSignatureAlgorithm methodsFor: 'public' stamp: 'nice 9/2/2010 21:48' prior: 50927902!
+verifySignature: aSignature ofMessageHash: hash publicKey: publicKey
+ "Answer true if the given signature is the authentic signature of the given message hash. That is, if the signature must have been computed using the private key set corresponding to the given public key. The public key is an array of four large integers: (p, q, g, y)."
+
+ | p q g y r s w u1 u2 v0 v |
+ p := publicKey first.
+ q := publicKey second.
+ g := publicKey third.
+ y := publicKey fourth.
+ r := aSignature first.
+ s := aSignature last.
+ ((r > 0) and: [r < q]) ifFalse: [^ false].  "reject"
+ ((s > 0) and: [s < q]) ifFalse: [^ false].  "reject"
+
+ w := s reciprocalModulo: q.
+ u1 := (hash * w) \\ q.
+ u2 := (r * w) \\ q.
+ v0 := (g raisedTo: u1 modulo: p) * (y raisedTo: u2 modulo: p).
+ v := ( v0 \\ p) \\ q.
+ ^ v = r
+! !
+!Object methodsFor: '*morphic' stamp: 'ar 8/8/2009 12:01'!
+asDraggableMorph
+ "Converts the receiver into a Morph suitable for dragging"
+ ^(StringMorph contents: (
+ (self respondsTo: #dragLabel)
+ ifTrue:[self dragLabel]
+ ifFalse:[self printString]))
+ color: Color white;
+ yourself! !
+!Object methodsFor: '*morphic' stamp: 'nk 2/26/2004 13:33'!
+asMorph
+ "Open a morph, as best one can, on the receiver"
+
+ ^ self asStringMorph
+
+ "
+234 asMorph
+(ScriptingSystem formAtKey: #TinyMenu) asMorph
+'fred' asMorph
+"
+
+! !
+!Object methodsFor: '*morphic' stamp: 'nk 2/26/2004 13:35'!
+asStringMorph
+ "Open a StringMorph, as best one can, on the receiver"
+
+ ^ self asStringOrText asStringMorph
+! !
+!Object methodsFor: '*morphic' stamp: 'nk 2/26/2004 13:35'!
+asTextMorph
+ "Open a TextMorph, as best one can, on the receiver"
+
+ ^ TextMorph new contentsAsIs: self asStringOrText
+! !
+!Object methodsFor: '*morphic' stamp: 'sw 1/29/2002 21:45'!
+openAsMorph
+ "Open a morph, as best one can, on the receiver"
+
+ ^ self asMorph openInHand
+
+"
+234 openAsMorph
+(ScriptingSystem formAtKey: #TinyMenu) openAsMorph
+'fred' openAsMorph
+"! !
+!Form methodsFor: '*Morphic' stamp: 'ar 11/7/1999 20:29'!
+asMorph
+ ^ImageMorph new image: self! !
+
+Number removeSelector: #isNonZero!
+
+Object removeSelector: #isNonZero!
+!TTCFont class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 09:18' prior: 30926222!
+initialize
+"
+ self initialize
+"
+
+ | tt |
+ self allSubInstancesDo:[:fnt| fnt flushCache].
+ GlyphCacheSize := 512.
+ GlyphCacheData := Array new: GlyphCacheSize.
+ GlyphCacheIndex := 0.
+ GlyphCacheReady := true.
+
+ tt := TTFontDescription default.
+ tt ifNotNil: [self newTextStyleFromTT: tt].
+ FileServices registerFileReader: self.
+
+ Smalltalk addToShutDownList: self.! !
+!TTCFont class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 09:18' prior: 30926995!
+unload
+
+ FileServices unregisterFileReader: self! !
+
+"Multilingual"!
+!FatBitsPaint methodsFor: 'menu' stamp: 'ar 9/5/2010 09:06' prior: 20408301!
+editSelection
+
+       FatBitsPaint new openWith: (self selectionAsForm ifNil: [^ nil])! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'di 9/11/2000 20:32'!
+capturedState
+ "May be overridden in subclasses."
+
+ ^ self shallowCopy
+! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'di 9/11/2000 20:29'!
+commandHistory
+ "Return the command history for the receiver"
+ | w |
+ (w := self currentWorld) ifNotNil: [^ w commandHistory].
+ ^ CommandHistory new. "won't really record anything but prevent breaking things"! !
+!Object methodsFor: '*MorphicExtras-PartsBin' stamp: 'sw 10/24/2001 16:34'!
+descriptionForPartsBin
+ "If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help.  When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result.  The parameters used in the implementation below are for documentation purposes only!!"
+
+ ^ DescriptionForPartsBin
+ formalName: 'PutFormalNameHere'
+ categoryList: #(PutACategoryHere MaybePutAnotherCategoryHere)
+ documentation: 'Put the balloon help here'
+ globalReceiverSymbol: #PutAGlobalHere
+ nativitySelector: #PutASelectorHere! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'di 12/12/2000 15:01'!
+purgeAllCommands
+ "Purge all commands for this object"
+ Preferences useUndo ifFalse: [^ self]. "get out quickly"
+ self commandHistory purgeAllCommandsSuchThat: [:cmd | cmd undoTarget == self].
+! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'di 9/12/2000 08:15'!
+redoFromCapturedState: st
+ "May be overridden in subclasses.  See also capturedState"
+
+ self undoFromCapturedState: st  "Simple cases are symmetric"
+! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'sw 11/16/2000 14:42'!
+refineRedoTarget: target selector: aSymbol arguments: arguments in: refineBlock
+ "Any object can override this method to refine its redo specification"
+
+ ^ refineBlock
+ value: target
+ value: aSymbol
+ value: arguments! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'sw 11/16/2000 14:42'!
+refineUndoTarget: target selector: aSymbol arguments: arguments in: refineBlock
+ "Any object can override this method to refine its undo specification"
+
+ ^ refineBlock
+ value: target
+ value: aSymbol
+ value: arguments! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'di 9/11/2000 20:30'!
+rememberCommand: aCommand
+ "Remember the given command for undo"
+ Preferences useUndo ifFalse: [^ self]. "get out quickly"
+ ^ self commandHistory rememberCommand: aCommand! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'di 9/11/2000 20:30'!
+rememberUndoableAction: actionBlock named: caption
+ | cmd result |
+ cmd := Command new cmdWording: caption.
+ cmd undoTarget: self selector: #undoFromCapturedState: argument: self capturedState.
+ result := actionBlock value.
+ cmd redoTarget: self selector: #redoFromCapturedState: argument: self capturedState.
+ self rememberCommand: cmd.
+ ^ result! !
+!Object methodsFor: '*MorphicExtras-Undo' stamp: 'di 9/11/2000 20:32'!
+undoFromCapturedState: st
+ "May be overridden in subclasses.  See also capturedState"
+
+ self copyFrom: st
+! !
+
+"MorphicExtras"!
+!PackageInfo methodsFor: 'enumerating' stamp: 'eem 8/30/2010 10:28'!
+actualMethodsDo: aBlock
+ "Evaluate aBlock with the actual method objects in this package."
+ | enum |
+ self extensionMethods do:
+ [:mr|
+ aBlock value: mr compiledMethod].
+ enum := [:behavior|
+ behavior organization categories do:
+ [:cat|
+ (self isForeignClassExtension: cat) ifFalse:
+ [(behavior organization listAtCategoryNamed: cat) do:
+ [:s|
+ aBlock value: (behavior compiledMethodAt: s)]]]].
+ self classes do:
+ [:c| enum value: c; value: c classSide]
+ ! !
+
+"PackageInfo-Base"!
+!ScorePlayerMorph class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 09:25' prior: 28239382!
+initialize
+
+ FileServices registerFileReader: self! !
+!ScorePlayerMorph class methodsFor: 'initialize-release' stamp: 'ar 9/5/2010 09:25' prior: 28240623!
+unload
+
+ FileServices unregisterFileReader: self ! !
+!ArchiveViewer methodsFor: 'member operations' stamp: 'ar 9/2/2010 08:49' prior: 17015980!
+addMemberFromClipboard
+ | string newName |
+ self canAddMember ifFalse: [ ^self ].
+ string := Clipboard clipboardText asString.
+ newName := UIManager default
+ request: 'New name for member:'
+ initialAnswer: 'clipboardText'.
+ newName notEmpty ifTrue: [
+ (archive addString: string as: newName) desiredCompressionMethod: ZipArchive compressionDeflated.
+ self memberIndex: self members size.
+ self changed: #memberList.
+ ]
+! !
+!ArchiveViewer methodsFor: 'archive operations' stamp: 'ar 9/2/2010 08:50' prior: 17000366!
+commentArchive
+ | newName |
+ archive ifNil: [ ^self ].
+ newName := UIManager default
+ request: 'New comment for archive:'
+ initialAnswer: archive zipFileComment.
+ archive zipFileComment: newName.! !
+!ArchiveViewer methodsFor: 'member operations' stamp: 'ar 9/2/2010 08:50' prior: 17017553!
+commentMember
+ | newName |
+ newName := UIManager default
+ request: 'New comment for member:'
+ initialAnswer: self selectedMember fileComment.
+ self selectedMember fileComment: newName.! !
+!ArchiveViewer methodsFor: 'member operations' stamp: 'ar 9/2/2010 08:50' prior: 17018918!
+renameMember
+ | newName |
+ self canRenameMember ifFalse: [ ^self ].
+ newName := UIManager default
+ request: 'New name for member:'
+ initialAnswer: self selectedMember fileName.
+ newName notEmpty ifTrue: [
+ self selectedMember fileName: newName.
+ self changed: #memberList
+ ]! !
+!FileStream methodsFor: '*Tools-Changes' stamp: 'ar 9/6/2010 10:34'!
+fileIntoNewChangeSet
+ "File all of my contents into a new change set."
+
+ self readOnly.
+ ChangesOrganizer newChangesFromStream: self named: self localName! !
+
+CodeHolder removeSelector: #regularDiffButton!
+
+CodeHolder removeSelector: #prettyDiffButton!
+
+CodeHolder removeSelector: #menuButton!
+
+CodeHolder removeSelector: #diffButton!
+
+CodeHolder removeSelector: #codePaneProvenanceButton!
+
+CodeHolder removeSelector: #addOptionalAnnotationsTo:at:plus:!
+
+"Tools"!
+!TTFontReader class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 09:38' prior: 30994992!
+initialize
+ "self initialize"
+
+ FileServices registerFileReader: self! !
+!TTFontReader class methodsFor: 'class initialization' stamp: 'ar 9/5/2010 09:38' prior: 30995707!
+unload
+
+ FileServices unregisterFileReader: self ! !
+
+"TrueType"!
+!HelpOnHelp class methodsFor: 'pages' stamp: 'sd 5/12/2010 23:12' prior: 35691442!
+introduction
+ "This method was automatically generated. Edit it using:"
+ "HelpOnHelp edit: #introduction"
+ ^HelpTopic
+ title: 'Introduction'
+ contents:
+'WELCOME TO THE HELP SYSTEM
+
+The help system is a simple user interface to display help contents to the user. It can be accessed from the world menu using "Tools" -> "Help Browser" or by evaluating ''HelpBrowser open'' in a workspace.
+
+There is a predefined mechanism allowing you to have help contents stored as source code using methods in specific help provider classes. This allows you to manage the help texts using the standard development tools. But this is only one possible representation.
+
+Yes, this is a good solution.
+!!' readStream nextChunkText! !
+
+"HelpSystem-Core"!
+!SqueakToolsWorkspaceHelp class methodsFor: 'pages' stamp: 'sd 5/12/2010 23:01' prior: 37512534!
+openWorkspace
+ ^HelpTopic
+ title: 'Open a Workspace'
+ contents: 'You can open a Workspace window in any of the following ways:
+
+- Keyboard Shortcut: while pointing at an empty part of the Squeak window, press alt-k (in Windows) or cmd-k (on a Mac)
+- World Menu: select "Workspace"
+- Tools Flap: click on the Tools Flap. When it comes out, drag the Workspace icon out.
+- Doit: select inside the following quote and doit: "Workspace open"'! !
+!SqueakToolsWorkspaceHelp class methodsFor: 'pages' stamp: 'sd 5/12/2010 22:48' prior: 37513425!
+workspace
+ ^HelpTopic
+ title: 'What is a Workspace'
+ contents: 'A Workspace is a window used as a scratchpad area where fragments of Smalltalk code can be entered, stored, edited, and evaluated.'! !
+
+"Help-Squeak-Project"!
+!ZipArchiveTests methodsFor: 'tests' stamp: 'ar 9/16/2010 20:15'!
+testCreateWithRelativeNames
+ "Test creating a zip with a relative tree of files, so that the tree will
+ be created whereever the ."
+ | subdir zip |
+ subdir := FileDirectory default / '_test-zip-dir'.
+ self deny: subdir exists.
+ subdir assureExistence.
+ [ subdir
+ fileNamed: '_test-zip-file'
+ do: [ : stream | stream nextPutAll: 'file contents' ].
+ zip := ZipArchive new.
+ zip
+ addDirectory: subdir fullName
+ as: subdir localName.
+ zip
+ addFile: (subdir fullNameFor: '_test-zip-file')
+ as: '_test-zip-dir' , FileDirectory slash , '_test-zip-file'.
+ zip writeToFileNamed: (FileDirectory default fullNameFor: '_test.zip') ]
+ ensure:[
+ zip close.
+ subdir ifNotNil: [ subdir recursiveDelete ].
+ FileDirectory default deleteFileNamed: '_test.zip'.
+ ]! !
+!ZipDirectoryMember methodsFor: 'private' stamp: 'cmm 9/16/2010 18:59'!
+writeDataTo: aStream
+       "Write nothing. Directories have no contents to write."! !
+
+"Compression"!
+!ByteArray methodsFor: 'accessing' stamp: 'ul 9/12/2010 03:47'!
+indexOf: anInteger startingAt: start
+
+ (anInteger isInteger and: [
+ anInteger >= 0 and: [
+ anInteger <= 255 ] ]) ifFalse: [ ^0 ].
+ ^ByteString indexOfAscii: anInteger inString: self startingAt: start! !
+!WeakSet methodsFor: 'public' stamp: 'ul 9/12/2010 03:37' prior: 57541171!
+do: aBlock after: anElement
+
+ | index endIndex |
+ tally = 0 ifTrue: [ ^self ].
+ anElement
+ ifNil: [ index := 0 ]
+ ifNotNil: [
+ index := self scanFor: anElement.
+ (array at: index) == flag ifTrue: [
+ index := 0 ] ].
+ endIndex := array size.
+ [ (index := index + 1) <= endIndex ] whileTrue: [
+ (array at: index) ifNotNil: [ :object |
+ object == flag ifFalse: [
+ aBlock value: object enclosedSetElement] ] ]! !
+!SequenceableCollection methodsFor: 'accessing' stamp: 'ul 9/12/2010 04:34'!
+indexOf: anElement startingAt: start
+ "Answer the index of the first occurence of anElement after start
+ within the receiver. If the receiver does not contain anElement,
+ answer 0."
+
+ ^self indexOf: anElement startingAt: start ifAbsent: 0! !
+!String class methodsFor: 'primitives' stamp: 'ul 9/12/2010 04:08' prior: 30218429!
+compare: string1 with: string2 collated: order
+ "Return 1, 2 or 3, if string1 is <, =, or > string2, with the collating order of characters given by the order array."
+
+ | len1 len2 c1 c2 |
+ order == nil ifTrue: [
+ len1 := string1 size.
+ len2 := string2 size.
+ 1 to: (len1 min: len2) do:[:i |
+ c1 := string1 basicAt: i.
+ c2 := string2 basicAt: i.
+ c1 = c2 ifFalse: [c1 < c2 ifTrue: [^ 1] ifFalse: [^ 3]].
+ ].
+ len1 = len2 ifTrue: [^ 2].
+ len1 < len2 ifTrue: [^ 1] ifFalse: [^ 3].
+ ].
+ len1 := string1 size.
+ len2 := string2 size.
+ 1 to: (len1 min: len2) do:[:i |
+ c1 := string1 basicAt: i.
+ c2 := string2 basicAt: i.
+ c1 < 256 ifTrue: [c1 := order at: c1 + 1].
+ c2 < 256 ifTrue: [c2 := order at: c2 + 1].
+ c1 = c2 ifFalse:[c1 < c2 ifTrue: [^ 1] ifFalse: [^ 3]].
+ ].
+ len1 = len2 ifTrue: [^ 2].
+ len1 < len2 ifTrue: [^ 1] ifFalse: [^ 3].
+! !
+!String class methodsFor: 'primitives' stamp: 'ul 9/12/2010 04:07' prior: 30219680!
+findFirstInString: aString inSet: inclusionMap startingAt: start
+ "Trivial, non-primitive version"
+
+ | i stringSize ascii more |
+ inclusionMap size ~= 256 ifTrue: [^ 0].
+ stringSize := aString size.
+ more := true.
+ i := start - 1.
+ [more and: [(i := i + 1) <= stringSize]] whileTrue: [
+ ascii := aString basicAt: i.
+ more := ascii < 256 ifTrue: [(inclusionMap at: ascii + 1) = 0] ifFalse: [true].
+ ].
+
+ i > stringSize ifTrue: [^ 0].
+ ^ i! !
+!String class methodsFor: 'primitives' stamp: 'ul 9/12/2010 04:06' prior: 30220201!
+indexOfAscii: anInteger inString: aString startingAt: start
+ "Trivial, non-primitive version"
+
+ start to: aString size do: [ :index |
+ (aString basicAt: index) = anInteger ifTrue: [ ^index ] ].
+ ^0
+! !
+!String class methodsFor: 'primitives' stamp: 'ul 9/12/2010 04:02' prior: 30220512!
+stringHash: aString initialHash: speciesHash
+
+ | stringSize hash low |
+ stringSize := aString size.
+ hash := speciesHash bitAnd: 16r0FFFFFFF.
+ 1 to: stringSize do: [ :pos |
+ hash := hash + (aString basicAt: pos).
+ "Begin hashMultiply"
+ low := hash bitAnd: 16383.
+ hash := (16r260D * low + ((16r260D * (hash // 16384) + (16r0065 * low) bitAnd: 16383) * 16384)) bitAnd: 16r0FFFFFFF ].
+ ^hash.
+
+
+! !
+!String class methodsFor: 'primitives' stamp: 'ul 9/12/2010 04:09' prior: 30220990!
+translate: aString from: start  to: stop  table: table
+ "Trivial, non-primitive version"
+
+ start to: stop do: [ :i |
+ | char |
+ (char := aString basicAt: i) < 256 ifTrue: [
+ aString at: i put: (table at: char+1) ] ].
+! !
+!Symbol class methodsFor: 'class initialization' stamp: 'ul 9/12/2010 03:25' prior: 30357696!
+allSymbolTablesDo: aBlock after: aSymbol
+
+ (NewSymbols includes: aSymbol)
+ ifTrue: [
+ NewSymbols do: aBlock after: aSymbol.
+ SymbolTable do: aBlock after: aSymbol ]
+ ifFalse: [
+ SymbolTable do: aBlock after: aSymbol.
+ NewSymbols do: aBlock after: aSymbol ]
+ ! !
+!MCVersionNameAndMessageRequest methodsFor: 'as yet unclassified' stamp: 'bf 9/4/2010 15:38' prior: 23188894!
+defaultAction
+ ^ MCSaveVersionDialog new
+ versionName: suggestion;
+ logMessage: initialMessage;
+ showModally! !
+!MCVersionNameAndMessageRequest methodsFor: 'as yet unclassified' stamp: 'bf 9/4/2010 15:28'!
+initialMessage
+ ^ initialMessage! !
+!MCVersionNameAndMessageRequest methodsFor: 'as yet unclassified' stamp: 'bf 9/4/2010 15:28'!
+initialMessage: aString
+ initialMessage := aString! !
+!MCWorkingCopy methodsFor: 'operations' stamp: 'bf 9/4/2010 18:54' prior: 53866520!
+newVersion
+ ^ (self requestVersionNameAndMessageWithSuggestion: self uniqueVersionName
+ initialMessage: self patchMessageSuggestion) ifNotNil:
+ [:pair |
+ self newVersionWithName: pair first
+ message: (self patchMessageStripped: pair last)].
+! !
+!MCWorkingCopy methodsFor: 'operations' stamp: 'bf 9/4/2010 18:31'!
+patchMessageChanges
+ | changes parentInfo parentSnapshot |
+ parentInfo := self ancestors
+ ifEmpty: [nil]
+ ifNotEmpty: [self ancestors first].
+ parentSnapshot := self findSnapshotWithVersionInfo: parentInfo.
+ changes := package snapshot patchRelativeToBase: parentSnapshot.
+ ^ (MCPatchMessage new patch: changes) message! !
+!MCWorkingCopy methodsFor: 'operations' stamp: 'bf 9/4/2010 19:00'!
+patchMessageChangesDelimiter
+ ^'=== text below is ignored ==='! !
+!MCWorkingCopy methodsFor: 'operations' stamp: 'bf 9/4/2010 19:04'!
+patchMessageChangesHeader
+ ^ancestry summary, String cr,
+ 'Added, Modified, Deleted',
+ (self ancestors ifEmpty: [''] ifNotEmpty: [' vs. ', self ancestors first name]), ':'! !
+!MCWorkingCopy methodsFor: 'operations' stamp: 'bf 9/4/2010 18:15'!
+patchMessageDefault
+ ^ 'empty log message'! !
+!MCWorkingCopy methodsFor: 'operations' stamp: 'bf 9/4/2010 18:31'!
+patchMessageStripped: aString
+ | pos |
+ pos := aString findString: self patchMessageChangesDelimiter.
+ ^ (pos > 0
+ ifTrue: [aString first: pos - 1]
+ ifFalse: [aString]) withBlanksTrimmed! !
+!MCWorkingCopy methodsFor: 'operations' stamp: 'bf 9/4/2010 18:35'!
+patchMessageSuggestion
+ ^ self patchMessageDefault, String cr, String cr,
+ self patchMessageChangesDelimiter, String cr,
+ self patchMessageChangesHeader, String cr,
+ self patchMessageChanges! !
+!MCWorkingCopy methodsFor: 'private' stamp: 'bf 9/4/2010 15:29'!
+requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString
+ ^ (MCVersionNameAndMessageRequest new
+ suggestedName: nameString;
+ initialMessage: msgString
+ ) signal! !
+!MCPatchMessage methodsFor: 'patch operations' stamp: 'bf 9/4/2010 18:48'!
+addDefinition: aDefinition
+ stream nextPutAll: 'A'; tab; nextPutAll: aDefinition summary; cr! !
+!MCPatchMessage methodsFor: 'accessing' stamp: 'bf 9/4/2010 16:29'!
+message
+ ^stream contents
+! !
+!MCPatchMessage methodsFor: 'patch operations' stamp: 'bf 9/4/2010 18:57'!
+modifyDefinition: oldDefinition to: newDefinition
+ stream nextPutAll: 'M'; tab; nextPutAll: newDefinition summary; cr! !
+!MCPatchMessage methodsFor: 'accessing' stamp: 'bf 9/4/2010 17:44'!
+patch: aPatch
+ stream ifNil: [stream := WriteStream on: (String new: 100)].
+ aPatch operations asSortedCollection
+ do: [:op | op applyTo: self]! !
+!MCPatchMessage methodsFor: 'patch operations' stamp: 'bf 9/4/2010 18:57'!
+removeDefinition: aDefinition
+ stream nextPutAll: 'D'; tab; nextPutAll: aDefinition summary; cr! !
+
+MCWorkingCopy removeSelector: #requestVersionNameAndMessageWithSuggestion:!
+
+"Monticello"!
+!DateAndTime methodsFor: 'ansi protocol' stamp: 'klc 9/12/2010 15:29' prior: 35376036!
+= aDateAndTimeOrTimeStamp
+ self == aDateAndTimeOrTimeStamp ifTrue: [ ^ true ].
+ ((aDateAndTimeOrTimeStamp isKindOf: self class)
+ or: [aDateAndTimeOrTimeStamp isKindOf: DateAndTime orOf: TimeStamp])
+ ifFalse: [ ^ false ].
+ ^ self offset = aDateAndTimeOrTimeStamp offset
+ ifTrue: [ self hasEqualTicks: aDateAndTimeOrTimeStamp ]
+ ifFalse: [ self asUTC ticks = aDateAndTimeOrTimeStamp asUTC ticks ]! !
+!DateAndTime methodsFor: 'squeak protocol' stamp: 'klc 9/12/2010 15:56' prior: 50870003!
+asDate
+
+
+ ^ Date starting: self asDateAndTime! !
+!TimeStamp methodsFor: 'squeak protocol' stamp: 'klc 9/12/2010 16:10'!
+asDateAndTime
+ "Answer the receiver as an instance of DateAndTime."
+
+ ^ DateAndTime new setJdn: jdn seconds: seconds nano: nanos offset: offset! !
+!BlockClosure methodsFor: 'evaluating' stamp: 'nice 9/10/2010 20:54' prior: 50399091!
+bench
+ "See how many times I can value in 5 seconds.  I'll answer a meaningful description."
+
+ | startTime endTime count roundTo3Digits |
+ roundTo3Digits := [:num |
+ | rounded lowDigit |
+ rounded := (num * 1000) rounded. "round to 1/1000"
+ lowDigit := (rounded numberOfDigitsInBase: 10) - 3. "keep only first 3 digits"
+ rounded := rounded roundTo:(10 raisedTo: lowDigit).
+ (lowDigit >= 3 or: [rounded \\ 1000 = 0]) "display fractional part only when needed"
+ ifTrue: [(rounded // 1000) asStringWithCommas]
+ ifFalse: [(rounded / 1000.0) printString]].
+ count := 0.
+ endTime := Time millisecondClockValue + 5000.
+ startTime := Time millisecondClockValue.
+ [ Time millisecondClockValue > endTime ] whileFalse: [ self value.  count := count + 1 ].
+ endTime := Time millisecondClockValue.
+ ^count = 1
+ ifTrue: [ (roundTo3Digits value: (endTime - startTime) / 1000) , ' seconds.' ]
+ ifFalse:
+ [ (roundTo3Digits value: (count * 1000) / (endTime - startTime)) , ' per second.' ]! !
+!MessageNode methodsFor: 'macro transformations' stamp: 'eem 9/7/2010 14:56' prior: 36595164!
+transformToDo: encoder
+ " var := rcvr. L1: [var <= arg1] Bfp(L2) [block body. var := var + inc]
+Jmp(L1) L2: "
+ | limit increment block initStmt test incStmt limitInit blockVar myRange blockRange limitIsAssignedTo |
+ "First check for valid arguments"
+ ((arguments last isMemberOf: BlockNode)
+  and: [arguments last numberOfArguments = 1
+  and: [arguments last firstArgument isVariableReference "As with debugger remote vars"]]) ifFalse:
+ [^false].
+ arguments size = 3
+ ifTrue: [increment := arguments at: 2.
+ (increment isConstantNumber
+ and: [increment literalValue ~= 0]) ifFalse: [^false]]
+ ifFalse: [increment := encoder encodeLiteral: 1].
+ (limit := arguments at: 1) isVariableReference ifTrue:
+ [limitIsAssignedTo := false.
+ arguments last nodesDo:
+ [:node|
+ (node isAssignmentNode and: [node variable = limit]) ifTrue:
+ [limitIsAssignedTo := true]].
+ limitIsAssignedTo ifTrue:
+ [^false]].
+ arguments size < 3 ifTrue:   "transform to full form"
+ [selector := SelectorNode new key: #to:by:do: code: #macro].
+
+ "Now generate auxiliary structures"
+ myRange := encoder rawSourceRanges at: self ifAbsent: [1 to: 0].
+ block := arguments last.
+ blockRange := encoder rawSourceRanges at: block ifAbsent: [1 to: 0].
+ blockVar := block firstArgument.
+ initStmt := AssignmentNode new variable: blockVar value: receiver.
+ limit isVariableReference | limit isConstantNumber
+ ifTrue: [limitInit := nil]
+ ifFalse:  "Need to store limit in a var"
+ [limit := encoder bindBlockArg: blockVar key, 'LimiT' within: block.
+ limit scope: -2.  "Already done parsing block; flag so it won't print"
+ block addArgument: limit.
+ limitInit := AssignmentNode new
+ variable: limit
+ value: arguments first].
+ test := MessageNode new
+ receiver: blockVar
+ selector: (increment key > 0 ifTrue: [#<=] ifFalse: [#>=])
+ arguments: (Array with: limit)
+ precedence: precedence from: encoder
+ sourceRange: (myRange first to: blockRange first).
+ incStmt := AssignmentNode new
+ variable: blockVar
+ value: (MessageNode new
+ receiver: blockVar selector: #+
+ arguments: (Array with: increment)
+ precedence: precedence from: encoder)
+ from: encoder
+ sourceRange: (myRange last to: myRange last).
+ arguments := (Array with: limit with: increment with: block),
+ (Array with: initStmt with: test with: incStmt with: limitInit).
+ block noteOptimizedIn: self.
+ ^true! !
+!FileDirectory methodsFor: 'file directory' stamp: 'bf 9/5/2010 00:02' prior: 20472619!
+assureExistence
+ "Make sure the current directory exists. If necessary, create all parts in between"
+
+ self exists ifFalse: [
+ self containingDirectory
+ assureExistence;
+ createDirectory: self localName]! !
+!FileDirectory methodsFor: 'file directory' stamp: 'bf 9/9/2010 12:37' prior: 20472874!
+assureExistenceOfPath: lPath
+ "Make sure the local directory exists. If necessary, create all parts in between"
+ | localPath |
+ localPath := lPath.
+ localPath isEmpty ifTrue: [ ^self ]. "Assumed to exist"
+ self assureExistence.
+ (self directoryExists: localPath) ifTrue: [^ self]. "exists"
+ self createDirectory: localPath! !
+
+"Files"!
+!Project class methodsFor: 'utilities' stamp: 'fm 9/11/2010 01:15' prior: 54934514!
+interruptName: labelString
+ "Create a Notifier on the active scheduling process with the given label."
+
+ self flag: #toRemove. "after restarting the user interrupt watcher process"
+ ^ self current interruptName: labelString
+! !
+!Project methodsFor: 'scheduling' stamp: 'fm 9/11/2010 00:56' prior: 53736656!
+interruptName: labelString
+ "Create a Notifier on the active scheduling process with the given label."
+
+ ^ self subclassResponsibility
+! !
+!FileServices class methodsFor: 'accessing' stamp: 'nk 12/7/2002 12:52'!
+suffixOf: aName
+ "Answer the file extension of the given file"
+ ^ aName
+ ifNil:
+ ['']
+ ifNotNil:
+ [(FileDirectory extensionFor: aName) asLowercase]! !
+!TheWorldMainDockingBar methodsFor: 'submenu - help' stamp: 'laza 9/16/2010 22:42' prior: 38392170!
+extendingTheSystem
+ ^'"Note: Please edit this workspace and add your own contributions.
+To submit it to the inbox open the Monticello browser and submit it from there.
+Save the package ''* Morphic'' to the inbox."
+
+"Updating your system:
+The following will set the default update URL to receive development updates.
+For developers and dare-devils only."
+
+MCMcmUpdater defaultUpdateURL: ''http://source.squeak.org/trunk''.
+
+"Installing new packages:
+The following expression show how to load many interesting packages into Squeak."
+
+"FFI: http://source.squeak.org/FFI.html"
+(Installer repository: ''http://source.squeak.org/FFI'')
+ install: ''FFI-Pools'';
+ install: ''FFI-Kernel'';
+ install: ''FFI-Tests'';
+ install: ''FFI-Win32'';
+ install: ''FFI-MacOS'';
+ install: ''FFI-Unix''.
+
+"Omnibrowser"
+(Installer wiresong project: ''ob'')
+    install: ''OmniBrowser'';
+    install: ''OB-Morphic'';
+    install: ''OB-Standard'';
+    install: ''OB-Shout'';
+    install: ''OB-SUnitIntegration''.
+
+"Refactoring engine and OB integration"
+(Installer ss project: ''rb'')
+ install: ''AST'';
+ install: ''Refactoring-Core'';
+ install: ''Refactoring-Spelling'';
+ project: ''Regex'';
+ install: ''VB-Regex''.
+(Installer wiresong project: ''ob'')
+ install: ''OB-Refactory'';
+ install: ''OB-Regex''.
+
+"Seaside 2.8 http://www.seaside.st"
+(Installer ss project: ''MetacelloRepository'') install: ''ConfigurationOfSeaside28''.
+"WAKom startOn: 9090"
+
+"Seaside 2.8 Examples http://www.seaside.st"
+(Installer ss project: ''MetacelloRepository'') install: ''ConfigurationOfSeaside28Examples''.
+(Smalltalk at: #ConfigurationOfSeaside28Examples) load.
+
+"Seaside 3.0 http://www.seaside.st"
+(Installer ss project: ''MetacelloRepository'') install: ''ConfigurationOfSeaside30''.
+(Smalltalk at: #ConfigurationOfSeaside30) load.
+(Smalltalk at: #WAPharoServerAdaptorBrowser) open.
+
+"Pier CMS: http://www.piercms.com"
+(Installer ss project: ''MetacelloRepository'') install: ''ConfigurationOfPier2''.
+(Smalltalk at: #ConfigurationOfPier2) load.
+
+(Installer lukas project: ''pier2'') install: ''Pier-Blog''.
+(Installer lukas project: ''pier2'') install: ''Pier-Book''.
+(Installer lukas project: ''pier2addons'') install: ''Pier-Setup''.
+(Smalltalk at: #PRDistribution)  new register.
+!!
+]style[(189 2 139 15 17 1 32 3 108 2 40 12 11 1 30 3 8 1 11 3 8 1 12 3 8 1 11 3 8 1 11 3 8 1 11 3 8 1 10 3 13 12 8 1 8 1 4 7 8 1 13 7 8 1 12 7 8 1 13 7 8 1 10 7 8 1 21 4 39 12 2 1 8 1 4 3 8 1 5 3 8 1 18 3 8 1 22 3 8 1 7 3 8 1 10 13 8 1 8 1 4 3 8 1 14 3 8 1 10 3 35 12 2 1 8 1 21 2 8 1 26 2 21 2 44 12 2 1 8 1 21 2 8 1 34 13 3 1 33 2 4 3 35 12 2 1 8 1 21 2 8 1 26 13 3 1 25 2 4 13 3 1 28 2 4 3 34 12 2 1 8 1 21 2 8 1 22 13 3 1 21 2 4 14 5 1 8 1 7 2 8 1 11 13 5 1 8 1 7 2 8 1 11 13 5 1 8 1 13 2 8 1 12 13 3 1 15 3 3 1 8 2)c000125125,cblack;,c000125125,cblack;,c000000125,cblack;,c125000125,cblack;,c000125125,cblack;,c000125125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000125125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000125125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000125125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000125125,cblack;,c000125125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000125125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000125125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c125000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;,c000000125,cblack;!!' readStream nextChunkText! !
+!MorphicProject methodsFor: 'scheduling' stamp: 'fm 9/11/2010 00:54'!
+interruptName: labelString
+ "Create a Notifier on the active scheduling process with the given label."
+
+ ^ self interruptName: labelString preemptedProcess: nil! !
+!ToolBuilder methodsFor: 'opening' stamp: 'dtl 9/11/2010 18:56'!
+openDebugger: aSpec
+ "Build and open a debugger from the given spec.
+ Answer the widget opened. Subclasses can override this
+ method if opening a debugger has specific requirements
+ different from opening other widgets."
+
+ self open: aSpec
+! !
+!ToolBuilder methodsFor: 'opening' stamp: 'dtl 9/11/2010 18:59'!
+openDebugger: aSpec label: aString
+ "Build and open a debugger from the given spec, labeling it appropriately.
+ Answer the widget opened. Subclasses can override this
+ method if opening a debugger has specific requirements
+ different from opening other widgets."
+
+ self open: aSpec label: aString
+! !
+
+"ToolBuilder-Kernel"!
+!StringHolder methodsFor: '*Tools' stamp: 'eem 9/7/2010 12:04' prior: 30250406!
+selectMessageAndEvaluate: aBlock
+ "Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any"
+
+ | selector method |
+ (selector := self selectedMessageName) ifNil: [^ self].
+ method := (self selectedClassOrMetaClass ifNil: [^aBlock value: selector])
+ compiledMethodAt: selector
+ ifAbsent: [].
+ method isNil ifTrue: [^aBlock value: selector].
+ ^self withSelectorAndMessagesIn: method evaluate: aBlock! !
+!StringHolder methodsFor: '*Tools' stamp: 'eem 9/7/2010 12:02'!
+withSelectorAndMessagesIn: aCompiledMethod evaluate: aBlock
+ "Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any"
+
+ | selectorOrNil litGetter messages |
+ selectorOrNil := aCompiledMethod selector.
+ messages := Preferences thoroughSenders
+ ifTrue:
+ [litGetter := [:set :l|
+ (l isSymbol and: [l size > 0 and: [l first isLowercase]]) ifTrue:
+ [set add: l].
+ l isArray ifTrue:
+ [l inject: set into: litGetter copy].
+ set].
+ aCompiledMethod allLiterals
+ , (aCompiledMethod pragmas collect: [:pragma| pragma keyword])
+ inject: aCompiledMethod messages into: litGetter copy]
+ ifFalse: [aCompiledMethod messages].
+ (messages isEmpty "if no messages, use only selector"
+ or: [messages size == 1 and: [messages includes: selectorOrNil]]) ifTrue:
+ [^selectorOrNil ifNotNil: [aBlock value: selectorOrNil]].  "If only one item, there is no choice"
+
+ self systemNavigation
+ showMenuOf: messages
+ withFirstItem: selectorOrNil
+ ifChosenDo: [:sel | aBlock value: sel]! !
+!Browser methodsFor: 'class functions' stamp: 'eem 7/27/2010 11:14' prior: 56567255!
+classListMenu: aMenu shifted: shifted
+ "Set up the menu to apply to the receiver's class list, honoring the #shifted boolean"
+ (self menuHook: aMenu named: #classListMenu shifted: shifted) ifTrue:[^aMenu].
+ shifted ifTrue:[^ self shiftedClassListMenu: aMenu].
+ aMenu addList: #(
+ -
+ ('browse full (b)' browseMethodFull)
+ ('browse hierarchy (h)' spawnHierarchy)
+ ('browse protocol (p)' browseFullProtocol)
+ -
+ ('printOut' printOutClass)
+ ('fileOut' fileOutClass)
+ -
+ ('show hierarchy' hierarchy)
+ ('show definition' editClass)
+ ('show comment' editComment)
+ -
+ ('inst var refs...' browseInstVarRefs)
+ ('inst var defs...' browseInstVarDefs)
+ -
+ ('class var refs...' browseClassVarRefs)
+ ('class vars' browseClassVariables)
+ ('class refs (N)' browseClassRefs)
+ -
+ ('rename class ...' renameClass)
+ ('copy class' copyClass)
+ ('remove class (x)' removeClass)
+ -
+ ('find method...' findMethod)
+ -
+ ('more...' offerShiftedClassListMenu)).
+ ^ aMenu
+! !
+!Debugger class methodsFor: 'opening' stamp: 'fm 9/9/2010 00:54' prior: 38730764!
+openOn: process context: context label: title contents: contentsStringOrNil fullView: bool
+ "Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger."
+
+ | controller errorWasInUIProcess debugger |
+ Smalltalk isMorphic
+ ifTrue: [errorWasInUIProcess := Project spawnNewProcessIfThisIsUI: process]
+ ifFalse: [
+ controller := ScheduledControllers activeControllerProcess == process
+ ifTrue: [ScheduledControllers activeController].
+ [
+ debugger := self new process: process controller: controller context: context.
+ bool
+ ifTrue: [debugger openFullNoSuspendLabel: title]
+ ifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].
+ Preferences logDebuggerStackToFile ifTrue: [
+ Smalltalk logError: title inContext: context to: 'SqueakDebug.log'].
+ ] on: Error do: [:ex |
+ self primitiveError:
+ 'Orginal error: ',
+ title asString, '.
+ Debugger error: ',
+ ([ex description] on: Error do: ['a ', ex class printString]), ':'
+ ]].
+ WorldState addDeferredUIMessage: [
+ "schedule debugger in deferred UI message to address redraw
+ problems after opening a debugger e.g. from the testrunner."
+ [
+ debugger := self new process: process controller: nil context: context.
+ bool
+ ifTrue: [debugger openFullNoSuspendLabel: title]
+ ifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].
+ debugger errorWasInUIProcess: errorWasInUIProcess.
+ Preferences logDebuggerStackToFile ifTrue: [
+ Smalltalk logError: title inContext: context to: 'SqueakDebug.log'].
+ ] on: Error do: [:ex |
+ self primitiveError:
+ 'Orginal error: ',
+ title asString, '.
+ Debugger error: ',
+ ([ex description] on: Error do: ['a ', ex class printString]), ':'
+ ]
+ ].
+ process suspend.
+! !
+!Debugger methodsFor: 'context stack menu' stamp: 'eem 9/7/2010 12:10' prior: 19552595!
+browseMessages
+ "Present a menu of all messages sent by the currently selected message.
+ Open a message set browser of all implementors of the message chosen.
+ Do nothing if no message is chosen."
+
+ contextStackIndex = 0 ifTrue: [^ self].
+ self withSelectorAndMessagesIn: currentCompiledMethod
+ evaluate: [:selector| self systemNavigation browseAllImplementorsOf: selector]! !
+!Debugger methodsFor: 'context stack menu' stamp: 'eem 9/7/2010 12:11' prior: 19552934!
+browseSendersOfMessages
+ "Present a menu of the currently selected message, as well as all
+ messages sent by it.  Open a message set browser of all senders
+ of the message chosen."
+
+ contextStackIndex = 0 ifTrue: [^ self].
+ self withSelectorAndMessagesIn: currentCompiledMethod
+ evaluate: [:selector| self systemNavigation browseAllCallsOn: selector]! !
+!Debugger methodsFor: 'context stack menu' stamp: 'eem 9/7/2010 12:16' prior: 19553270!
+browseVersions
+ "Create and schedule a message set browser on all versions of the
+ currently selected message selector."
+
+ | class selector |
+ class := self selectedClassOrMetaClass.
+ selector := self selectedMessageName.
+ VersionsBrowser
+ browseVersionsOf: (class compiledMethodAt: selector
+ ifAbsent: [^self changed: #flash])
+ class: self selectedClass theNonMetaClass
+ meta: class isMeta
+ category: self selectedMessageCategoryName
+ selector: selector! !
+!Debugger methodsFor: 'initialize' stamp: 'dtl 9/11/2010 21:52' prior: 53609208!
+openFullNoSuspendLabel: aString
+ "Create and schedule a full debugger with the given label. Do not terminate the current active process."
+
+ | oldContextStackIndex |
+ oldContextStackIndex := contextStackIndex.
+ self expandStack. "Sets contextStackIndex to zero."
+ ToolBuilder default openDebugger: self label: aString.
+ self toggleContextStackIndex: oldContextStackIndex.! !
+!Debugger methodsFor: 'initialize' stamp: 'dtl 9/11/2010 21:38' prior: 53620259!
+openNotifierContents: msgString label: label
+ "Create and schedule a notifier view with the given label and message. A notifier view shows just the message or the first several lines of the stack, with a menu that allows the user to open a full debugger if so desired."
+ "NOTE: When this method returns, a new process has been scheduled to run the windows, and thus this notifier, but the previous active porcess has not been suspended.  The sender will do this."
+ | msg builder spec |
+ Sensor flushKeyboard.
+ savedCursor := Sensor currentCursor.
+ Sensor currentCursor: Cursor normal.
+ (label beginsWith: 'Space is low')
+ ifTrue: [msg := self lowSpaceChoices, (msgString ifNil: [''])]
+ ifFalse: [msg := msgString].
+ builder := ToolBuilder default.
+ spec := self buildNotifierWith: builder label: label message: msg.
+ self expandStack.
+ builder openDebugger: spec.
+ errorWasInUIProcess := Project spawnNewProcessIfThisIsUI: interruptedProcess.
+! !
+
+Browser removeSelector: #findMethodWithWildcard!
+
+"Tools"!
+!StackInterpreter methodsFor: 'utilities' stamp: 'eem 9/19/2010 00:17' prior: 37609818!
+booleanCheat: cond
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ <inline: true>
+
+ cond
+ ifTrue: [self booleanCheatTrue]
+ ifFalse: [self booleanCheatFalse]! !
+
+----End fileIn of a stream----!
+!CCodeGenerator methodsFor: 'inlining' stamp: 'eem 7/5/2010 15:45' prior: 34292652!
+doInlining: inlineFlag
+ "Inline the bodies of all methods that are suitable for inlining."
+ "Modified slightly for the core VM translator, since the first level of inlining for the interpret loop must be performed in order that the instruction implementations can easily discover their addresses. Remember to inline the bytecode routines as well"
+
+ | removed |
+ inlineFlag ifFalse: [
+ self inlineDispatchesInMethodNamed: #interpret localizingVars: #().
+ self pruneUnreachableMethods.
+ ^ self].
+
+ self doBasicInlining: inlineFlag.
+
+ vmClass ifNil: [^self].
+
+ 'Inlining bytecodes'
+ displayProgressAt: Sensor cursorPoint
+ from: 1 to: 2
+ during: [:bar |
+ self inlineDispatchesInMethodNamed: #interpret
+ localizingVars: vmClass namesOfVariablesToLocalize.
+ bar value: 1.
+ removed := self removeMethodsReferingToGlobals: vmClass namesOfVariablesToLocalize
+ except: #interpret.
+ bar value: 2].
+
+ "only prune when generating the interpreter itself"
+ self pruneUnreachableMethods.
+
+ self reportShouldNotBeRemoved: removed  varList: vmClass namesOfVariablesToLocalize! !
+!MessageNode methodsFor: '*VMMaker-C translation' stamp: 'anon 9/19/2010 11:02' prior: 36598168!
+asTranslatorNodeIn: aTMethod
+ "make a CCodeGenerator equivalent of me"
+ "selector is sometimes a Symbol, sometimes a SelectorNode!!
+ On top of this, numArgs is needed due to the (truly grody) use of
+ arguments as a place to store the extra expressions needed to generate
+ code for in-line to:by:do:, etc.  see below, where it is used."
+ | sel args |
+ sel := (selector isSymbol) ifTrue: [selector] ifFalse: [selector key].
+ (sel = #cCode:inSmalltalk: "extracting here rather than in translation allows inlining in the block."
+ and: [arguments first isBlockNode]) ifTrue:
+ [| block |
+ ^(block := arguments first asTranslatorNodeIn: aTMethod) statements size = 1
+ ifTrue: [block statements first]
+ ifFalse: [block]].
+ args := (1 to: sel numArgs) collect:
+ [:i | (arguments at: i) asTranslatorNodeIn: aTMethod].
+ (sel = #to:by:do: and: [arguments size = 7 and: [(arguments at: 7) notNil]])
+ ifTrue: ["Restore limit expr that got moved by transformToDo:"
+ args at: 1 put: ((arguments at: 7) value asTranslatorNodeIn: aTMethod)].
+ (sel = #or: and: [arguments size = 2 and: [(arguments at: 2) notNil]])
+ ifTrue: ["Restore argument block that got moved by transformOr:"
+ args at: 1 put: ((arguments at: 2) asTranslatorNodeIn: aTMethod)].
+ (sel = #ifFalse: and: [arguments size = 2 and: [(arguments at: 2) notNil]])
+ ifTrue: ["Restore argument block that got moved by transformIfFalse:"
+ args at: 1 put: ((arguments at: 2) asTranslatorNodeIn: aTMethod)].
+ ^ TSendNode new
+ setSelector: sel
+ receiver: (receiver ~~ nil ifTrue: [receiver asTranslatorNodeIn: aTMethod])
+ arguments: args! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'anon 9/19/2010 11:10'!
+booleanCheatFalse
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode offset |
+ <sharedCodeNamed: 'booleanCheatFalse' inCase: 179>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue:  "short jumpIfFalse"
+ [^self jump: bytecode - 151].
+
+ bytecode = 172 ifTrue:  "long jumpIfFalse"
+ [offset := self fetchByte.
+ ^self jump: offset].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ self internalPush: trueObj! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'anon 9/19/2010 11:10'!
+booleanCheatTrue
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode |
+ <sharedCodeNamed: 'booleanCheatTrue' inCase: 178>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue:  "short jumpIfFalse"
+ [^self fetchNextBytecode].
+
+ bytecode = 172 ifTrue: "long jumpIfFalse"
+ [self fetchByte.
+ ^self fetchNextBytecode].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ self internalPush: trueObj! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 10:04' prior: 38802242!
+bytecodePrimGreaterOrEqual
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ ^self cCode: [self booleanCheat: rcvr >= arg]
+ inSmalltalk: [self booleanCheat: (self integerValueOf: rcvr) >= (self integerValueOf: arg)]].
+
+ self initPrimCall.
+ aBool := self primitiveFloatGreaterOrEqual: rcvr toArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 5.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 10:04' prior: 37772337!
+bytecodePrimGreaterThan
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ ^self cCode: [self booleanCheat: rcvr > arg]
+ inSmalltalk: [self booleanCheat: (self integerValueOf: rcvr) > (self integerValueOf: arg)]].
+
+ self initPrimCall.
+ aBool := self primitiveFloatGreater: rcvr thanArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 3.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 16:38' prior: 38803015!
+bytecodePrimLessOrEqual
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ ^self cCode: [self booleanCheat: rcvr <= arg]
+ inSmalltalk: [self booleanCheat: (self integerValueOf: rcvr) <= (self integerValueOf: arg)]].
+
+ self initPrimCall.
+ aBool := self primitiveFloatLessOrEqual: rcvr toArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 4.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 10:03' prior: 37773893!
+bytecodePrimLessThan
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ ^self cCode: [self booleanCheat: rcvr < arg]
+ inSmalltalk: [self booleanCheat: (self integerValueOf: rcvr) < (self integerValueOf: arg)]].
+
+ self initPrimCall.
+ aBool := self primitiveFloatLess: rcvr thanArg: arg.
+ self successful ifTrue: [^ self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 2.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'eem 9/19/2010 00:20' prior: 38993729!
+booleanCheatFalse
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode offset |
+ <sharedCodeNamed: 'booleanCheatFalse' inCase: 179>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue:  "short jumpIfFalse"
+ [^self jump: bytecode - 151].
+
+ bytecode = 172 ifTrue:  "long jumpIfFalse"
+ [offset := self fetchByte.
+ ^self jump: offset].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ self internalPush: self falseObject! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'eem 9/19/2010 00:18' prior: 38994543!
+booleanCheatTrue
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode |
+ <sharedCodeNamed: 'booleanCheatTrue' inCase: 178>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue:  "short jumpIfFalse"
+ [^self fetchNextBytecode].
+
+ bytecode = 172 ifTrue: "long jumpIfFalse"
+ [self fetchByte.
+ ^self fetchNextBytecode].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ self internalPush: self trueObject! !
+
+| user pw |
+Utilities setAuthorInitials.
+user := UIManager default request: 'Repository user name'.
+pw := UIManager default requestPassword: 'Monticello password'.
+MCHttpRepository allSubInstancesDo: [ : rep |
+ rep user: user;
+ password: pw ].
+user = 'anon' ifTrue: [MCFileBasedRepository flushAllCaches]!
+!MessageNode methodsFor: '*VMMaker-C translation' stamp: 'eem 9/19/2010 11:23' prior: 38992054!
+asTranslatorNodeIn: aTMethod
+ "make a CCodeGenerator equivalent of me"
+ "selector is sometimes a Symbol, sometimes a SelectorNode!!
+ On top of this, numArgs is needed due to the (truly grody) use of
+ arguments as a place to store the extra expressions needed to generate
+ code for in-line to:by:do:, etc.  see below, where it is used."
+ | sel args |
+ sel := (selector isSymbol) ifTrue: [selector] ifFalse: [selector key].
+ (sel = #cCode:inSmalltalk: "extracting here rather than in translation allows inlining in the block."
+ and: [arguments first isBlockNode]) ifTrue:
+ [| block |
+ ^(block := arguments first asTranslatorNodeIn: aTMethod) statements size = 1
+ ifTrue: [block statements first]
+ ifFalse: [block]].
+ args := (1 to: sel numArgs) collect:
+ [:i | (arguments at: i) asTranslatorNodeIn: aTMethod].
+ (sel = #to:by:do: and: [arguments size = 7 and: [(arguments at: 7) notNil]])
+ ifTrue: ["Restore limit expr that got moved by transformToDo:"
+ args at: 1 put: ((arguments at: 7) value asTranslatorNodeIn: aTMethod)].
+ (sel = #or: and: [arguments size = 2 and: [(arguments at: 2) notNil]])
+ ifTrue: ["Restore argument block that got moved by transformOr:"
+ args at: 1 put: ((arguments at: 2) asTranslatorNodeIn: aTMethod)].
+ (sel = #ifFalse: and: [arguments size = 2 and: [(arguments at: 2) notNil]])
+ ifTrue: ["Restore argument block that got moved by transformIfFalse:"
+ args at: 1 put: ((arguments at: 2) asTranslatorNodeIn: aTMethod)].
+ ^ TSendNode new
+ setSelector: sel
+ receiver: (receiver ~~ nil ifTrue: [receiver asTranslatorNodeIn: aTMethod])
+ arguments: args! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'eem 9/19/2010 11:23' prior: 38999245!
+booleanCheatTrue
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode |
+ <sharedCodeNamed: 'booleanCheatTrue' inCase: 178>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue:  "short jumpIfFalse"
+ [^self fetchNextBytecode].
+
+ bytecode = 172 ifTrue: "long jumpIfFalse"
+ [self fetchByte.
+ ^self fetchNextBytecode].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ self internalPush: self trueObject! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'eem 9/19/2010 11:23' prior: 38998407!
+booleanCheatFalse
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode offset |
+ <sharedCodeNamed: 'booleanCheatFalse' inCase: 179>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue:  "short jumpIfFalse"
+ [^self jump: bytecode - 151].
+
+ bytecode = 172 ifTrue:  "long jumpIfFalse"
+ [offset := self fetchByte.
+ ^self jump: offset].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ self internalPush: self falseObject! !
+
+"VMMaker"!
+
+| user pw |
+Utilities setAuthorInitials.
+user := UIManager default request: 'Repository user name'.
+pw := UIManager default requestPassword: 'Monticello password'.
+MCHttpRepository allSubInstancesDo: [ : rep |
+ rep user: user;
+ password: pw ].
+user = 'anon' ifTrue: [MCFileBasedRepository flushAllCaches]!
+
+----QUIT----{19 September 2010 . 11:33:26 am} VMMaker-Squeak4.1.image priorSource: 5296592!
+
+----STARTUP----{19 September 2010 . 11:35:27 am} as /Users/eliot/Cog/oscog/Cog.squeakvm.org/image/VMMaker-Squeak4.1.image!
+
+!CCodeGenerator methodsFor: 'inlining' stamp: 'eem (auto rename) 6/18/2008 12:17' prior: 38990872!
+doInlining: inlineFlag
+ "Inline the bodies of all methods that are suitable for inlining."
+ "Modified slightly for the core VM translator, since the first level of inlining for the interpret loop must be performed in order that the instruction implementations can easily discover their addresses. Remember to inline the bytecode routines as well"
+
+ | removed |
+ inlineFlag ifFalse: [
+ self inlineDispatchesInMethodNamed: #interpret localizingVars: #().
+ ^ self].
+
+ self doBasicInlining: inlineFlag.
+
+ vmClass ifNil: [^self].
+
+ 'Inlining bytecodes'
+ displayProgressAt: Sensor cursorPoint
+ from: 1 to: 2
+ during: [:bar |
+ self inlineDispatchesInMethodNamed: #interpret
+ localizingVars: vmClass namesOfVariablesToLocalize.
+ bar value: 1.
+ removed := self removeMethodsReferingToGlobals: vmClass namesOfVariablesToLocalize
+ except: #interpret.
+ bar value: 2].
+
+ "only prune when generating the interpreter itself"
+ self pruneUnreachableMethods.
+
+ self reportShouldNotBeRemoved: removed  varList: vmClass namesOfVariablesToLocalize! !
+!MessageNode methodsFor: '*VMMaker-C translation' stamp: 'eem 10/2/2009 11:26' prior: 39000379!
+asTranslatorNodeIn: aTMethod
+ "make a CCodeGenerator equivalent of me"
+ "selector is sometimes a Symbol, sometimes a SelectorNode!!
+ On top of this, numArgs is needed due to the (truly grody) use of
+ arguments as a place to store the extra expressions needed to generate
+ code for in-line to:by:do:, etc.  see below, where it is used."
+ | sel args |
+ sel := (selector isSymbol) ifTrue: [selector] ifFalse: [selector key].
+ args := (1 to: sel numArgs) collect:
+ [:i | (arguments at: i) asTranslatorNodeIn: aTMethod].
+ (sel = #to:by:do: and: [arguments size = 7 and: [(arguments at: 7) notNil]])
+ ifTrue: ["Restore limit expr that got moved by transformToDo:"
+ args at: 1 put: ((arguments at: 7) value asTranslatorNodeIn: aTMethod)].
+ (sel = #or: and: [arguments size = 2 and: [(arguments at: 2) notNil]])
+ ifTrue: ["Restore argument block that got moved by transformOr:"
+ args at: 1 put: ((arguments at: 2) asTranslatorNodeIn: aTMethod)].
+ (sel = #ifFalse: and: [arguments size = 2 and: [(arguments at: 2) notNil]])
+ ifTrue: ["Restore argument block that got moved by transformIfFalse:"
+ args at: 1 put: ((arguments at: 2) asTranslatorNodeIn: aTMethod)].
+ ^ TSendNode new
+ setSelector: sel
+ receiver: (receiver ~~ nil ifTrue: [receiver asTranslatorNodeIn: aTMethod])
+ arguments: args! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'tpr (auto pragmas 12/08) 3/15/2004 19:44' prior: 38990448!
+booleanCheat: cond
+"cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode offset |
+ <inline: true>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue: [  "short jumpIfFalse"
+ cond
+ ifTrue: [^ self fetchNextBytecode]
+ ifFalse: [^ self jump: bytecode - 151]].
+
+ bytecode = 172 ifTrue: [  "long jumpIfFalse"
+ offset := self fetchByte.
+ cond
+ ifTrue: [^ self fetchNextBytecode]
+ ifFalse: [^ self jump: offset]].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ cond
+ ifTrue: [self internalPush: trueObj]
+ ifFalse: [self internalPush: falseObj].
+! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 09:59' prior: 38995366!
+bytecodePrimGreaterOrEqual
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ self cCode: '' inSmalltalk: [^self booleanCheat: (self integerValueOf: rcvr) >= (self integerValueOf: arg)].
+ ^self booleanCheat: rcvr >= arg].
+
+ self initPrimCall.
+ aBool := self primitiveFloatGreaterOrEqual: rcvr toArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 5.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 1/6/2009 10:12' prior: 38996137!
+bytecodePrimGreaterThan
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ self cCode: '' inSmalltalk: [^self booleanCheat: (self integerValueOf: rcvr) > (self integerValueOf: arg)].
+ ^self booleanCheat: rcvr > arg].
+
+ self initPrimCall.
+ aBool := self primitiveFloatGreater: rcvr thanArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 3.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 09:59' prior: 38996898!
+bytecodePrimLessOrEqual
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ self cCode: '' inSmalltalk: [^self booleanCheat: (self integerValueOf: rcvr) <= (self integerValueOf: arg)].
+ ^ self booleanCheat: rcvr <= arg].
+
+ self initPrimCall.
+ aBool := self primitiveFloatLessOrEqual: rcvr toArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 4.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 1/6/2009 10:07' prior: 38997663!
+bytecodePrimLessThan
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ self cCode: '' inSmalltalk: [^self booleanCheat: (self integerValueOf: rcvr) < (self integerValueOf: arg)].
+ ^ self booleanCheat: rcvr < arg].
+
+ self initPrimCall.
+ aBool := self primitiveFloatLess: rcvr thanArg: arg.
+ self successful ifTrue: [^ self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 2.
+ argumentCount := 1.
+ self normalSend! !
+
+StackInterpreter removeSelector: #booleanCheatTrue!
+
+StackInterpreter removeSelector: #booleanCheatFalse!
+
+"VMMaker"!
+
+| user pw |
+Utilities setAuthorInitials.
+user := UIManager default request: 'Repository user name'.
+pw := UIManager default requestPassword: 'Monticello password'.
+MCHttpRepository allSubInstancesDo: [ : rep |
+ rep user: user;
+ password: pw ].
+user = 'anon' ifTrue: [MCFileBasedRepository flushAllCaches]!
+!CCodeGenerator methodsFor: 'inlining' stamp: 'eem 7/5/2010 15:45' prior: 39004274!
+doInlining: inlineFlag
+ "Inline the bodies of all methods that are suitable for inlining."
+ "Modified slightly for the core VM translator, since the first level of inlining for the interpret loop must be performed in order that the instruction implementations can easily discover their addresses. Remember to inline the bytecode routines as well"
+
+ | removed |
+ inlineFlag ifFalse: [
+ self inlineDispatchesInMethodNamed: #interpret localizingVars: #().
+ self pruneUnreachableMethods.
+ ^ self].
+
+ self doBasicInlining: inlineFlag.
+
+ vmClass ifNil: [^self].
+
+ 'Inlining bytecodes'
+ displayProgressAt: Sensor cursorPoint
+ from: 1 to: 2
+ during: [:bar |
+ self inlineDispatchesInMethodNamed: #interpret
+ localizingVars: vmClass namesOfVariablesToLocalize.
+ bar value: 1.
+ removed := self removeMethodsReferingToGlobals: vmClass namesOfVariablesToLocalize
+ except: #interpret.
+ bar value: 2].
+
+ "only prune when generating the interpreter itself"
+ self pruneUnreachableMethods.
+
+ self reportShouldNotBeRemoved: removed  varList: vmClass namesOfVariablesToLocalize! !
+!MessageNode methodsFor: '*VMMaker-C translation' stamp: 'eem 9/19/2010 11:23' prior: 39005422!
+asTranslatorNodeIn: aTMethod
+ "make a CCodeGenerator equivalent of me"
+ "selector is sometimes a Symbol, sometimes a SelectorNode!!
+ On top of this, numArgs is needed due to the (truly grody) use of
+ arguments as a place to store the extra expressions needed to generate
+ code for in-line to:by:do:, etc.  see below, where it is used."
+ | sel args |
+ sel := (selector isSymbol) ifTrue: [selector] ifFalse: [selector key].
+ (sel = #cCode:inSmalltalk: "extracting here rather than in translation allows inlining in the block."
+ and: [arguments first isBlockNode]) ifTrue:
+ [| block |
+ ^(block := arguments first asTranslatorNodeIn: aTMethod) statements size = 1
+ ifTrue: [block statements first]
+ ifFalse: [block]].
+ args := (1 to: sel numArgs) collect:
+ [:i | (arguments at: i) asTranslatorNodeIn: aTMethod].
+ (sel = #to:by:do: and: [arguments size = 7 and: [(arguments at: 7) notNil]])
+ ifTrue: ["Restore limit expr that got moved by transformToDo:"
+ args at: 1 put: ((arguments at: 7) value asTranslatorNodeIn: aTMethod)].
+ (sel = #or: and: [arguments size = 2 and: [(arguments at: 2) notNil]])
+ ifTrue: ["Restore argument block that got moved by transformOr:"
+ args at: 1 put: ((arguments at: 2) asTranslatorNodeIn: aTMethod)].
+ (sel = #ifFalse: and: [arguments size = 2 and: [(arguments at: 2) notNil]])
+ ifTrue: ["Restore argument block that got moved by transformIfFalse:"
+ args at: 1 put: ((arguments at: 2) asTranslatorNodeIn: aTMethod)].
+ ^ TSendNode new
+ setSelector: sel
+ receiver: (receiver ~~ nil ifTrue: [receiver asTranslatorNodeIn: aTMethod])
+ arguments: args! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'eem 9/19/2010 00:17' prior: 39006834!
+booleanCheat: cond
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ <inline: true>
+
+ cond
+ ifTrue: [self booleanCheatTrue]
+ ifFalse: [self booleanCheatFalse]! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'eem 9/19/2010 11:23'!
+booleanCheatFalse
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode offset |
+ <sharedCodeNamed: 'booleanCheatFalse' inCase: 179>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue:  "short jumpIfFalse"
+ [^self jump: bytecode - 151].
+
+ bytecode = 172 ifTrue:  "long jumpIfFalse"
+ [offset := self fetchByte.
+ ^self jump: offset].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ self internalPush: self falseObject! !
+!StackInterpreter methodsFor: 'utilities' stamp: 'eem 9/19/2010 11:23'!
+booleanCheatTrue
+ "cheat the interpreter out of the pleasure of handling the next bytecode IFF it is a jump-on-boolean. Which it is, often enough when the current bytecode is something like bytecodePrimEqual"
+ | bytecode |
+ <sharedCodeNamed: 'booleanCheatTrue' inCase: 178>
+
+ bytecode := self fetchByte.  "assume next bytecode is jumpIfFalse (99%)"
+ self internalPop: 2.
+ (bytecode < 160 and: [bytecode > 151]) ifTrue:  "short jumpIfFalse"
+ [^self fetchNextBytecode].
+
+ bytecode = 172 ifTrue: "long jumpIfFalse"
+ [self fetchByte.
+ ^self fetchNextBytecode].
+
+ "not followed by a jumpIfFalse; undo instruction fetch and push boolean result"
+ localIP := localIP - 1.
+ self fetchNextBytecode.
+ self internalPush: self trueObject! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 10:04' prior: 39007817!
+bytecodePrimGreaterOrEqual
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ ^self cCode: [self booleanCheat: rcvr >= arg]
+ inSmalltalk: [self booleanCheat: (self integerValueOf: rcvr) >= (self integerValueOf: arg)]].
+
+ self initPrimCall.
+ aBool := self primitiveFloatGreaterOrEqual: rcvr toArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 5.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 10:04' prior: 39008589!
+bytecodePrimGreaterThan
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ ^self cCode: [self booleanCheat: rcvr > arg]
+ inSmalltalk: [self booleanCheat: (self integerValueOf: rcvr) > (self integerValueOf: arg)]].
+
+ self initPrimCall.
+ aBool := self primitiveFloatGreater: rcvr thanArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 3.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 16:38' prior: 39009352!
+bytecodePrimLessOrEqual
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ ^self cCode: [self booleanCheat: rcvr <= arg]
+ inSmalltalk: [self booleanCheat: (self integerValueOf: rcvr) <= (self integerValueOf: arg)]].
+
+ self initPrimCall.
+ aBool := self primitiveFloatLessOrEqual: rcvr toArg: arg.
+ self successful ifTrue: [^self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 4.
+ argumentCount := 1.
+ self normalSend! !
+!StackInterpreter methodsFor: 'common selector sends' stamp: 'eem 9/18/2010 10:03' prior: 39010119!
+bytecodePrimLessThan
+ | rcvr arg aBool |
+ rcvr := self internalStackValue: 1.
+ arg := self internalStackValue: 0.
+ (self areIntegers: rcvr and: arg) ifTrue:
+ ["The C code can avoid detagging since tagged integers are still signed.
+ But this means the simulator must override to do detagging."
+ ^self cCode: [self booleanCheat: rcvr < arg]
+ inSmalltalk: [self booleanCheat: (self integerValueOf: rcvr) < (self integerValueOf: arg)]].
+
+ self initPrimCall.
+ aBool := self primitiveFloatLess: rcvr thanArg: arg.
+ self successful ifTrue: [^ self booleanCheat: aBool].
+
+ messageSelector := self specialSelector: 2.
+ argumentCount := 1.
+ self normalSend! !
+
+"VMMaker"!
+
+| user pw |
+Utilities setAuthorInitials.
+user := UIManager default request: 'Repository user name'.
+pw := UIManager default requestPassword: 'Monticello password'.
+MCHttpRepository allSubInstancesDo: [ : rep |
+ rep user: user;
+ password: pw ].
+user = 'anon' ifTrue: [MCFileBasedRepository flushAllCaches]!
+
+----QUIT----{19 September 2010 . 11:50:03 am} VMMaker-Squeak4.1.image priorSource: 5449524!
\ No newline at end of file

Modified: branches/Cog/image/VMMaker-Squeak4.1.image
===================================================================
(Binary files differ)

Modified: branches/Cog/src/vm/cogit.c
===================================================================
--- branches/Cog/src/vm/cogit.c 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/src/vm/cogit.c 2010-09-19 18:56:42 UTC (rev 2311)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGenerator VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGenerator VMMaker-oscog.30 uuid: 6aea7874-dba6-4e67-965d-d9dd239be673
    from
- SimpleStackBasedCogit VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ SimpleStackBasedCogit VMMaker-oscog.30 uuid: 6aea7874-dba6-4e67-965d-d9dd239be673
  */
-static char __buildInfo[] = "SimpleStackBasedCogit VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645 " __DATE__ ;
+static char __buildInfo[] = "SimpleStackBasedCogit VMMaker-oscog.30 uuid: 6aea7874-dba6-4e67-965d-d9dd239be673 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 

Modified: branches/Cog/src/vm/cogit.h
===================================================================
--- branches/Cog/src/vm/cogit.h 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/src/vm/cogit.h 2010-09-19 18:56:42 UTC (rev 2311)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGenerator VMMaker-oscog.30 uuid: 6aea7874-dba6-4e67-965d-d9dd239be673
  */
 
 

Modified: branches/Cog/src/vm/cogmethod.h
===================================================================
--- branches/Cog/src/vm/cogmethod.h 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/src/vm/cogmethod.h 2010-09-19 18:56:42 UTC (rev 2311)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGenerator VMMaker-oscog.30 uuid: 6aea7874-dba6-4e67-965d-d9dd239be673
  */
 
 typedef struct {

Modified: branches/Cog/src/vm/cointerp.c
===================================================================
--- branches/Cog/src/vm/cointerp.c 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/src/vm/cointerp.c 2010-09-19 18:56:42 UTC (rev 2311)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGeneratorGlobalStructure VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
    from
- CoInterpreter VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CoInterpreter VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
  */
-static char __buildInfo[] = "CoInterpreter VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1083,10 +1083,10 @@
 _iss usqInt newMethod;
 _iss usqInt endOfMemory;
 _iss sqInt rootTableCount;
-_iss sqInt trueObj;
-_iss sqInt falseObj;
 _iss StackPage * pages;
 _iss sqInt remapBufferCount;
+_iss sqInt trueObj;
+_iss sqInt falseObj;
 _iss sqInt traceLogIndex;
 _iss sqLong nextProfileTick;
 _iss char * stackLimit;
@@ -1813,7 +1813,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.29]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.31]";
 static volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -3922,7 +3922,7 @@
  ? ((longAt(localFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
  : (byteAt((localFP + FoxIFrameFlags) + 3)) != 0))) {
  goto commonCallerReturn;
- goto l95;
+ goto l94;
  }
  closure = longAt(localFP + ((FoxCallerSavedIP + BytesPerWord) + ((((((usqInt)(longAt(localFP + FoxMethod)))) < heapBase
  ? (mframeCogMethod(localFP)->cmNumArgs)
@@ -3959,11 +3959,11 @@
  theMethod = longAt((home + BaseHeaderSize) + (MethodIndex << ShiftForWord));
  if ((primitiveIndexOf(theMethod)) == 198) {
  unwindContextOrNilOrZero = home;
- goto l96;
+ goto l95;
  }
  }
  unwindContextOrNilOrZero = ctxtOrNilOrZero;
- l96: /* end internalFindUnwindThroughContext: */;
+ l95: /* end internalFindUnwindThroughContext: */;
  if (unwindContextOrNilOrZero == GIV(nilObj)) {
  /* begin internalCannotReturn: */
  VM_LABEL(0internalCannotReturn);
@@ -3974,10 +3974,10 @@
  : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
  assert(isContext(frameContext(localFP)));
  ourContext = longAt(localFP + FoxThisContext);
- goto l97;
+ goto l96;
  }
  ourContext = marryFrameSP(localFP, localSP);
- l97: /* end ensureFrameIsMarried:SP: */;
+ l96: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext);
  /* begin internalPush: */
@@ -3985,7 +3985,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l95;
+ goto l94;
  }
  if (unwindContextOrNilOrZero != 0) {
  /* begin internalAboutToReturn:through: */
@@ -3997,10 +3997,10 @@
  : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
  assert(isContext(frameContext(localFP)));
  ourContext1 = longAt(localFP + FoxThisContext);
- goto l98;
+ goto l97;
  }
  ourContext1 = marryFrameSP(localFP, localSP);
- l98: /* end ensureFrameIsMarried:SP: */;
+ l97: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext1);
  /* begin internalPush: */
@@ -4010,7 +4010,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorAboutToReturn << ShiftForWord));
  GIV(argumentCount) = 2;
  goto normalSend;
- goto l95;
+ goto l94;
  }
  contextToReturnTo = null;
  if (((longAt((home + BaseHeaderSize) + (SenderIndex << ShiftForWord))) & 1)) {
@@ -4064,10 +4064,10 @@
  : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
  assert(isContext(frameContext(localFP)));
  ourContext2 = longAt(localFP + FoxThisContext);
- goto l99;
+ goto l98;
  }
  ourContext2 = marryFrameSP(localFP, localSP);
- l99: /* end ensureFrameIsMarried:SP: */;
+ l98: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext2);
  /* begin internalPush: */
@@ -4075,7 +4075,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l95;
+ goto l94;
  }
  }
  assert(pageListIsWellFormed());
@@ -4176,7 +4176,7 @@
  GIV(stackPointer) = localSP;
  GIV(framePointer) = localFP;
  ceEnterCogCodePopReceiverReg();
- goto l95;
+ goto l94;
  }
  localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
  }
@@ -4188,7 +4188,7 @@
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l95: /* end case */;
+ l94: /* end case */;
  break;
  case 121:
  /* returnTrue */
@@ -4305,27 +4305,27 @@
  fp = (thePage->headFP);
  if (fp == theFP) {
  frameAbove = 0;
- goto l101;
+ goto l100;
  }
  while (((callerFP = frameCallerFP(fp))) != 0) {
  if (callerFP == theFP) {
  frameAbove = fp;
- goto l101;
+ goto l100;
  }
  fp = callerFP;
  }
  error("did not find theFP in stack page");
  frameAbove = 0;
- l101: /* end findFrameAbove:inPage: */;
+ l100: /* end findFrameAbove:inPage: */;
  /* begin newStackPage */
  lruOrFree = (mostRecentlyUsedPage()->nextPage);
  if (isFree(lruOrFree)) {
  newPage = lruOrFree;
- goto l102;
+ goto l101;
  }
  divorceFramesIn(lruOrFree);
  newPage = lruOrFree;
- l102: /* end newStackPage */;
+ l101: /* end newStackPage */;
  assert(newPage == GIV(stackPage));
  moveFramesInthroughtoPage(thePage, frameAbove, newPage);
  markStackPageMostRecentlyUsed(newPage);
@@ -4349,7 +4349,7 @@
  longAtput(sp2 = GIV(stackPointer) - BytesPerWord, GIV(instructionPointer));
  GIV(stackPointer) = sp2;
  ceSendsupertonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord)), 0, contextToReturnFrom, -1 - 1);
- goto l100;
+ goto l99;
  }
  GIV(instructionPointer) = 0;
  thePage = makeBaseFrameFor(contextToReturnTo);
@@ -4385,7 +4385,7 @@
  GIV(stackPointer) = localSP;
  GIV(framePointer) = localFP;
  ceEnterCogCodePopReceiverReg();
- goto l100;
+ goto l99;
  }
  localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
  }
@@ -4396,7 +4396,7 @@
  longAtPointerput(localSP, localReturnValue);
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l100;
+ goto l99;
  }
  localIP = pointerForOop(frameCallerSavedIP(localFP));
  localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + ((((((usqInt)(longAt(localFP + FoxMethod)))) < heapBase
@@ -4422,7 +4422,7 @@
  GIV(stackPointer) = localSP;
  GIV(framePointer) = localFP;
  ceEnterCogCodePopReceiverReg();
- goto l100;
+ goto l99;
  }
  localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
  }
@@ -4434,7 +4434,7 @@
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l100: /* end case */;
+ l99: /* end case */;
  break;
  case 126:
  case 127:
@@ -4631,17 +4631,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l103;
+ goto l102;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l103;
+ goto l102;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l103;
+ goto l102;
  }
- l103: /* end fetchClassOf: */;
+ l102: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  /* goto commonSend */
  }
@@ -4705,7 +4705,7 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l104;
+ goto l103;
  }
 
  /* second probe */
@@ -4716,7 +4716,7 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l104;
+ goto l103;
  }
  probe = (((usqInt) hash) >> 2) & MethodCacheMask;
  if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector))
@@ -4724,10 +4724,10 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l104;
+ goto l103;
  }
  ok = 0;
- l104: /* end lookupInMethodCacheSel:class: */;
+ l103: /* end lookupInMethodCacheSel:class: */;
  if (ok) {
  /* begin ifAppropriateCompileToNativeCode:selector: */
  methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
@@ -4807,7 +4807,7 @@
  localIP = pointerForOop(GIV(instructionPointer));
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
- goto l106;
+ goto l105;
  }
  if (primitiveFunctionPointer != 0) {
  if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) {
@@ -4821,29 +4821,29 @@
  /* begin internalPop:thenPush: */
  oop = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((localPrimIndex - 264) << ShiftForWord));
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, oop);
- goto l106;
+ goto l105;
  }
  if (localPrimIndex == 256) {
- goto l106;
+ goto l105;
  }
  if (localPrimIndex == 257) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(trueObj));
- goto l106;
+ goto l105;
  }
  if (localPrimIndex == 258) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(falseObj));
- goto l106;
+ goto l105;
  }
  if (localPrimIndex == 259) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(nilObj));
- goto l106;
+ goto l105;
  }
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, (((localPrimIndex - 261) << 1) | 1));
- goto l106;
+ goto l105;
  }
  /* begin externalizeIPandSP */
  assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -4896,7 +4896,7 @@
  if (succeeded) {
  returntoExecutive(popStack(), 0);
  browserPluginReturnIfNeeded();
- goto l106;
+ goto l105;
  }
  }
  /* begin internalActivateNewMethod */
@@ -4955,11 +4955,11 @@
  table = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (PrimErrTableIndex << ShiftForWord));
  if (GIV(primFailCode) <= (((sqInt) (lastPointerOf(table)) >> 2))) {
  errorCode = longAt((table + BaseHeaderSize) + ((GIV(primFailCode) - 1) << ShiftForWord));
- goto l105;
+ goto l104;
  }
  }
  errorCode = ((GIV(primFailCode) << 1) | 1);
- l105: /* end getErrorObjectFromPrimFailCode */;
+ l104: /* end getErrorObjectFromPrimFailCode */;
  longAtPointerput(localSP, errorCode);
  }
  GIV(primFailCode) = 0;
@@ -4981,7 +4981,7 @@
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
  }
- l106: /* end internalExecuteNewMethod */;
+ l105: /* end internalExecuteNewMethod */;
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
@@ -6235,10 +6235,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6250,56 +6246,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(0booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr < arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr < arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr < arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ /* goto booleanCheatTrue */
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l23;
  }
@@ -6434,54 +6386,11 @@
  aBool = rcvr1 < arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(1booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ /* goto booleanCheatTrue */
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l23;
  }
@@ -6491,6 +6400,39 @@
  }
 ;
  l23: /* end case */;
+
+ booleanCheatTrue:
+ /* booleanCheatTrue */
+ {
+ sqInt bytecode;
+
+ VM_LABEL(0booleanCheatTrue);
+
+ /* assume next bytecode is jumpIfFalse (99%) */
+
+ bytecode = byteAtPointer(++localIP);
+ /* begin internalPop: */
+ localSP += 2 * BytesPerWord;
+ if ((bytecode < 160)
+ && (bytecode > 151)) {
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ goto l106;
+ }
+ if (bytecode == 172) {
+ byteAtPointer(++localIP);
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ goto l106;
+ }
+ localIP -= 1;
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ /* begin internalPush: */
+ longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ }
+;
+ l106: /* end case */;
  break;
  case 179:
  /* bytecodePrimGreaterThan */
@@ -6498,10 +6440,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6513,56 +6451,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(2booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr > arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr > arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr > arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ /* goto booleanCheatFalse */
  }
  goto l28;
  }
@@ -6697,54 +6591,11 @@
  aBool = rcvr1 > arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(3booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ /* goto booleanCheatFalse */
  }
  goto l28;
  }
@@ -6754,6 +6605,45 @@
  }
 ;
  l28: /* end case */;
+
+ booleanCheatFalse:
+ /* booleanCheatFalse */
+ {
+ sqInt bytecode;
+ sqInt offset;
+
+ VM_LABEL(0booleanCheatFalse);
+
+ /* assume next bytecode is jumpIfFalse (99%) */
+
+ bytecode = byteAtPointer(++localIP);
+ /* begin internalPop: */
+ localSP += 2 * BytesPerWord;
+ if ((bytecode < 160)
+ && (bytecode > 151)) {
+ /* begin jump: */
+ localIP = (localIP + (bytecode - 151)) + 1;
+ currentBytecode = byteAtPointer(localIP);
+ goto l107;
+ }
+ if (bytecode == 172) {
+
+ /* long jumpIfFalse */
+
+ offset = byteAtPointer(++localIP);
+ /* begin jump: */
+ localIP = (localIP + offset) + 1;
+ currentBytecode = byteAtPointer(localIP);
+ goto l107;
+ }
+ localIP -= 1;
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ /* begin internalPush: */
+ longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ }
+;
+ l107: /* end case */;
  break;
  case 180:
  /* bytecodePrimLessOrEqual */
@@ -6761,10 +6651,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6776,56 +6662,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(4booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr <= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr <= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr <= arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l33;
  }
@@ -6960,54 +6802,11 @@
  aBool = rcvr1 <= arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(5booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l33;
  }
@@ -7024,10 +6823,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -7039,56 +6834,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(6booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr >= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr >= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr >= arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l38;
  }
@@ -7223,54 +6974,11 @@
  aBool = rcvr1 >= arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(7booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l38;
  }
@@ -7287,10 +6995,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -7303,54 +7007,11 @@
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  /* begin booleanCheat: */
- VM_LABEL(8booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr == arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l43;
  }
@@ -7485,54 +7146,11 @@
  aBool = rcvr1 == arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(9booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l43;
  }
@@ -7549,10 +7167,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -7565,54 +7179,11 @@
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  /* begin booleanCheat: */
- VM_LABEL(10booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr != arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr != arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr != arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l48;
  }
@@ -7747,54 +7318,11 @@
  aBool = rcvr1 == arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(11booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (!aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (!aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (!aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l48;
  }
@@ -8940,63 +8468,17 @@
  {
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
 
  VM_LABEL(0bytecodePrimEquivalent);
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  /* begin booleanCheat: */
- VM_LABEL(12booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l82;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l82;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l82;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l82;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr == arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
- l82: /* end booleanCheat: */;
  }
 ;
  break;
@@ -9013,17 +8495,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  oop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l83;
+ goto l82;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  oop = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l83;
+ goto l82;
  }
  else {
  oop = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l83;
+ goto l82;
  }
- l83: /* end fetchClassOf: */;
+ l82: /* end fetchClassOf: */;
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, oop);
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
@@ -9064,7 +8546,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l85;
+ goto l84;
  }
  if (((ccIndex = (((usqInt) (longAt(block))) >> 12) & 31)) == 0) {
  cl = (longAt(block - BaseHeaderSize)) & AllButTypeMask;
@@ -9084,7 +8566,7 @@
  GIV(primFailCode) = 1;
  }
  }
- l85: /* end assertClassOf:is: */;
+ l84: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin externalizeIPandSP */
  assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -9101,13 +8583,13 @@
  if (!(GIV(primFailCode) == 0)) {
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((25 * 2) << ShiftForWord));
  goto normalSend;
- goto l84;
+ goto l83;
  }
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l84: /* end case */;
+ l83: /* end case */;
  break;
  case 202:
  /* bytecodePrimValueWithArg */
@@ -9132,7 +8614,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l87;
+ goto l86;
  }
  if (((ccIndex = (((usqInt) (longAt(block))) >> 12) & 31)) == 0) {
  cl = (longAt(block - BaseHeaderSize)) & AllButTypeMask;
@@ -9152,7 +8634,7 @@
  GIV(primFailCode) = 1;
  }
  }
- l87: /* end assertClassOf:is: */;
+ l86: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin externalizeIPandSP */
  assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -9169,13 +8651,13 @@
  if (!(GIV(primFailCode) == 0)) {
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((26 * 2) << ShiftForWord));
  goto normalSend;
- goto l86;
+ goto l85;
  }
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l86: /* end case */;
+ l85: /* end case */;
  break;
  case 203:
  /* bytecodePrimDo */
@@ -9232,7 +8714,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l89;
+ goto l88;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  cl = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
@@ -9252,20 +8734,20 @@
  GIV(primFailCode) = 1;
  }
  }
- l89: /* end assertClassOf:is: */;
+ l88: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, longAt((rcvr + BaseHeaderSize) + (XIndex << ShiftForWord)));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l88;
+ goto l87;
  }
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((30 * 2) << ShiftForWord));
  GIV(argumentCount) = 0;
  goto normalSend;
  }
 ;
- l88: /* end case */;
+ l87: /* end case */;
  break;
  case 207:
  /* bytecodePrimPointY */
@@ -9289,7 +8771,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l91;
+ goto l90;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  cl = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
@@ -9309,20 +8791,20 @@
  GIV(primFailCode) = 1;
  }
  }
- l91: /* end assertClassOf:is: */;
+ l90: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, longAt((rcvr + BaseHeaderSize) + (YIndex << ShiftForWord)));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l90;
+ goto l89;
  }
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((31 * 2) << ShiftForWord));
  GIV(argumentCount) = 0;
  goto normalSend;
  }
 ;
- l90: /* end case */;
+ l89: /* end case */;
  break;
  case 208:
  case 209:
@@ -9354,17 +8836,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l92;
+ goto l91;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l92;
+ goto l91;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l92;
+ goto l91;
  }
- l92: /* end fetchClassOf: */;
+ l91: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -9400,17 +8882,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l93;
+ goto l92;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l93;
+ goto l92;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l93;
+ goto l92;
  }
- l93: /* end fetchClassOf: */;
+ l92: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -9446,17 +8928,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l94;
+ goto l93;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l94;
+ goto l93;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l94;
+ goto l93;
  }
- l94: /* end fetchClassOf: */;
+ l93: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -9973,7 +9455,6 @@
 
 usqInt
 argumentCountAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(argumentCount))));
 }
 
@@ -16676,7 +16157,6 @@
 
 usqInt
 framePointerAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(framePointer))));
 }
 
@@ -16732,7 +16212,6 @@
 
 usqInt
 freeStartAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(freeStart))));
 }
 
@@ -18668,7 +18147,6 @@
 
 usqInt
 instructionPointerAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(instructionPointer))));
 }
 
@@ -21611,7 +21089,6 @@
 
 usqInt
 newMethodAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(newMethod))));
 }
 
@@ -21639,7 +21116,6 @@
 
 usqInt
 nextProfileTickAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(nextProfileTick))));
 }
 
@@ -22823,7 +22299,6 @@
 
 usqInt
 primFailCodeAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(primFailCode))));
 }
 
@@ -38207,7 +37682,6 @@
 
 void *
 primTraceLogAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return GIV(primTraceLog);
 }
 
@@ -38216,7 +37690,6 @@
 
 usqInt
 primTraceLogIndexAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(primTraceLogIndex))));
 }
 
@@ -39973,12 +39446,10 @@
     void *p5;
     void *p6;
     void *p7;
-    void *p8;
 
  print("page ");
  /* begin printHexPtr: */
- p3 = page;
- printHex(oopForPointer(p3));
+ printHex(oopForPointer(page));
  print(" (");
  printNum(pageIndexFor((page->realStackLimit)));
  print(")  (trace: ");
@@ -39997,16 +39468,16 @@
  /* begin printChar: */
  putchar(' ');
  /* begin printHexPtr: */
- p4 = (page->baseAddress);
- printHex(oopForPointer(p4));
+ p3 = (page->baseAddress);
+ printHex(oopForPointer(p3));
  print(" - ");
  /* begin printHexPtr: */
- p5 = (page->realStackLimit);
- printHex(oopForPointer(p5));
+ p4 = (page->realStackLimit);
+ printHex(oopForPointer(p4));
  print(" - ");
  /* begin printHexPtr: */
- p6 = (page->lastAddress);
- printHex(oopForPointer(p6));
+ p5 = (page->lastAddress);
+ printHex(oopForPointer(p5));
  if (!(isFree(page))) {
  /* begin cr */
  printf("\n");
@@ -40039,8 +39510,8 @@
  putchar(' ');
  print("prev ");
  /* begin printHexPtr: */
- p7 = page->prevPage;
- printHex(oopForPointer(p7));
+ p6 = page->prevPage;
+ printHex(oopForPointer(p6));
  print(" (");
  printNum(pageIndexFor(((page->prevPage)->realStackLimit)));
  /* begin printChar: */
@@ -40050,8 +39521,8 @@
  putchar(' ');
  print("next ");
  /* begin printHexPtr: */
- p8 = page->nextPage;
- printHex(oopForPointer(p8));
+ p7 = page->nextPage;
+ printHex(oopForPointer(p7));
  print(" (");
  printNum(pageIndexFor(((page->nextPage)->realStackLimit)));
  /* begin printChar: */
@@ -40673,7 +40144,7 @@
     sqInt i;
     sqInt *root;
 
- for (i = 1; i <= GIV(extraRootCount); i += 1) {
+ for (i = 1; i <= GIV(extraRootCount); i++) {
  root = GIV(extraRoots)[i];
  if (root == varLoc) {
  GIV(extraRoots)[i] = (GIV(extraRoots)[GIV(extraRootCount)]);
@@ -41083,7 +40554,6 @@
 
 usqInt
 scavengeThresholdAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(scavengeThreshold))));
 }
 
@@ -42202,7 +41672,6 @@
 
 usqInt
 stackPointerAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(stackPointer))));
 }
 
@@ -44177,7 +43646,6 @@
 
 usqInt
 youngStartAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(youngStart))));
 }
 

Modified: branches/Cog/src/vm/cointerp.h
===================================================================
--- branches/Cog/src/vm/cointerp.h 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/src/vm/cointerp.h 2010-09-19 18:56:42 UTC (rev 2311)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGeneratorGlobalStructure VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
  */
 
 

Modified: branches/Cog/src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerp.c 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/src/vm/gcc3x-cointerp.c 2010-09-19 18:56:42 UTC (rev 2311)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGeneratorGlobalStructure VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
    from
- CoInterpreter VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CoInterpreter VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
  */
-static char __buildInfo[] = "CoInterpreter VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1086,10 +1086,10 @@
 _iss usqInt newMethod;
 _iss usqInt endOfMemory;
 _iss sqInt rootTableCount;
-_iss sqInt trueObj;
-_iss sqInt falseObj;
 _iss StackPage * pages;
 _iss sqInt remapBufferCount;
+_iss sqInt trueObj;
+_iss sqInt falseObj;
 _iss sqInt traceLogIndex;
 _iss sqLong nextProfileTick;
 _iss char * stackLimit;
@@ -1816,7 +1816,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.29]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.31]";
 static volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -3926,7 +3926,7 @@
  ? ((longAt(localFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
  : (byteAt((localFP + FoxIFrameFlags) + 3)) != 0))) {
  goto commonCallerReturn;
- goto l95;
+ goto l94;
  }
  closure = longAt(localFP + ((FoxCallerSavedIP + BytesPerWord) + ((((((usqInt)(longAt(localFP + FoxMethod)))) < heapBase
  ? (mframeCogMethod(localFP)->cmNumArgs)
@@ -3963,11 +3963,11 @@
  theMethod = longAt((home + BaseHeaderSize) + (MethodIndex << ShiftForWord));
  if ((primitiveIndexOf(theMethod)) == 198) {
  unwindContextOrNilOrZero = home;
- goto l96;
+ goto l95;
  }
  }
  unwindContextOrNilOrZero = ctxtOrNilOrZero;
- l96: /* end internalFindUnwindThroughContext: */;
+ l95: /* end internalFindUnwindThroughContext: */;
  if (unwindContextOrNilOrZero == GIV(nilObj)) {
  /* begin internalCannotReturn: */
  VM_LABEL(0internalCannotReturn);
@@ -3978,10 +3978,10 @@
  : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
  assert(isContext(frameContext(localFP)));
  ourContext = longAt(localFP + FoxThisContext);
- goto l97;
+ goto l96;
  }
  ourContext = marryFrameSP(localFP, localSP);
- l97: /* end ensureFrameIsMarried:SP: */;
+ l96: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext);
  /* begin internalPush: */
@@ -3989,7 +3989,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l95;
+ goto l94;
  }
  if (unwindContextOrNilOrZero != 0) {
  /* begin internalAboutToReturn:through: */
@@ -4001,10 +4001,10 @@
  : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
  assert(isContext(frameContext(localFP)));
  ourContext1 = longAt(localFP + FoxThisContext);
- goto l98;
+ goto l97;
  }
  ourContext1 = marryFrameSP(localFP, localSP);
- l98: /* end ensureFrameIsMarried:SP: */;
+ l97: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext1);
  /* begin internalPush: */
@@ -4014,7 +4014,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorAboutToReturn << ShiftForWord));
  GIV(argumentCount) = 2;
  goto normalSend;
- goto l95;
+ goto l94;
  }
  contextToReturnTo = null;
  if (((longAt((home + BaseHeaderSize) + (SenderIndex << ShiftForWord))) & 1)) {
@@ -4068,10 +4068,10 @@
  : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
  assert(isContext(frameContext(localFP)));
  ourContext2 = longAt(localFP + FoxThisContext);
- goto l99;
+ goto l98;
  }
  ourContext2 = marryFrameSP(localFP, localSP);
- l99: /* end ensureFrameIsMarried:SP: */;
+ l98: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext2);
  /* begin internalPush: */
@@ -4079,7 +4079,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l95;
+ goto l94;
  }
  }
  assert(pageListIsWellFormed());
@@ -4180,7 +4180,7 @@
  GIV(stackPointer) = localSP;
  GIV(framePointer) = localFP;
  ceEnterCogCodePopReceiverReg();
- goto l95;
+ goto l94;
  }
  localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
  }
@@ -4192,7 +4192,7 @@
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l95: /* end case */;
+ l94: /* end case */;
  BREAK;
  CASE(121)
  /* returnTrue */
@@ -4309,27 +4309,27 @@
  fp = (thePage->headFP);
  if (fp == theFP) {
  frameAbove = 0;
- goto l101;
+ goto l100;
  }
  while (((callerFP = frameCallerFP(fp))) != 0) {
  if (callerFP == theFP) {
  frameAbove = fp;
- goto l101;
+ goto l100;
  }
  fp = callerFP;
  }
  error("did not find theFP in stack page");
  frameAbove = 0;
- l101: /* end findFrameAbove:inPage: */;
+ l100: /* end findFrameAbove:inPage: */;
  /* begin newStackPage */
  lruOrFree = (mostRecentlyUsedPage()->nextPage);
  if (isFree(lruOrFree)) {
  newPage = lruOrFree;
- goto l102;
+ goto l101;
  }
  divorceFramesIn(lruOrFree);
  newPage = lruOrFree;
- l102: /* end newStackPage */;
+ l101: /* end newStackPage */;
  assert(newPage == GIV(stackPage));
  moveFramesInthroughtoPage(thePage, frameAbove, newPage);
  markStackPageMostRecentlyUsed(newPage);
@@ -4353,7 +4353,7 @@
  longAtput(sp2 = GIV(stackPointer) - BytesPerWord, GIV(instructionPointer));
  GIV(stackPointer) = sp2;
  ceSendsupertonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord)), 0, contextToReturnFrom, -1 - 1);
- goto l100;
+ goto l99;
  }
  GIV(instructionPointer) = 0;
  thePage = makeBaseFrameFor(contextToReturnTo);
@@ -4389,7 +4389,7 @@
  GIV(stackPointer) = localSP;
  GIV(framePointer) = localFP;
  ceEnterCogCodePopReceiverReg();
- goto l100;
+ goto l99;
  }
  localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
  }
@@ -4400,7 +4400,7 @@
  longAtPointerput(localSP, localReturnValue);
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l100;
+ goto l99;
  }
  localIP = pointerForOop(frameCallerSavedIP(localFP));
  localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + ((((((usqInt)(longAt(localFP + FoxMethod)))) < heapBase
@@ -4426,7 +4426,7 @@
  GIV(stackPointer) = localSP;
  GIV(framePointer) = localFP;
  ceEnterCogCodePopReceiverReg();
- goto l100;
+ goto l99;
  }
  localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
  }
@@ -4438,7 +4438,7 @@
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l100: /* end case */;
+ l99: /* end case */;
  BREAK;
  CASE(126)
  CASE(127)
@@ -4635,17 +4635,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l103;
+ goto l102;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l103;
+ goto l102;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l103;
+ goto l102;
  }
- l103: /* end fetchClassOf: */;
+ l102: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  /* goto commonSend */
  }
@@ -4709,7 +4709,7 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l104;
+ goto l103;
  }
 
  /* second probe */
@@ -4720,7 +4720,7 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l104;
+ goto l103;
  }
  probe = (((usqInt) hash) >> 2) & MethodCacheMask;
  if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector))
@@ -4728,10 +4728,10 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l104;
+ goto l103;
  }
  ok = 0;
- l104: /* end lookupInMethodCacheSel:class: */;
+ l103: /* end lookupInMethodCacheSel:class: */;
  if (ok) {
  /* begin ifAppropriateCompileToNativeCode:selector: */
  methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
@@ -4811,7 +4811,7 @@
  localIP = pointerForOop(GIV(instructionPointer));
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
- goto l106;
+ goto l105;
  }
  if (primitiveFunctionPointer != 0) {
  if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) {
@@ -4825,29 +4825,29 @@
  /* begin internalPop:thenPush: */
  oop = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((localPrimIndex - 264) << ShiftForWord));
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, oop);
- goto l106;
+ goto l105;
  }
  if (localPrimIndex == 256) {
- goto l106;
+ goto l105;
  }
  if (localPrimIndex == 257) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(trueObj));
- goto l106;
+ goto l105;
  }
  if (localPrimIndex == 258) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(falseObj));
- goto l106;
+ goto l105;
  }
  if (localPrimIndex == 259) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(nilObj));
- goto l106;
+ goto l105;
  }
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, (((localPrimIndex - 261) << 1) | 1));
- goto l106;
+ goto l105;
  }
  /* begin externalizeIPandSP */
  assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -4900,7 +4900,7 @@
  if (succeeded) {
  returntoExecutive(popStack(), 0);
  browserPluginReturnIfNeeded();
- goto l106;
+ goto l105;
  }
  }
  /* begin internalActivateNewMethod */
@@ -4959,11 +4959,11 @@
  table = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (PrimErrTableIndex << ShiftForWord));
  if (GIV(primFailCode) <= (((sqInt) (lastPointerOf(table)) >> 2))) {
  errorCode = longAt((table + BaseHeaderSize) + ((GIV(primFailCode) - 1) << ShiftForWord));
- goto l105;
+ goto l104;
  }
  }
  errorCode = ((GIV(primFailCode) << 1) | 1);
- l105: /* end getErrorObjectFromPrimFailCode */;
+ l104: /* end getErrorObjectFromPrimFailCode */;
  longAtPointerput(localSP, errorCode);
  }
  GIV(primFailCode) = 0;
@@ -4985,7 +4985,7 @@
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
  }
- l106: /* end internalExecuteNewMethod */;
+ l105: /* end internalExecuteNewMethod */;
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
@@ -6239,10 +6239,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6254,56 +6250,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(0booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr < arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr < arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr < arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ /* goto booleanCheatTrue */
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l23;
  }
@@ -6438,54 +6390,11 @@
  aBool = rcvr1 < arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(1booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ /* goto booleanCheatTrue */
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l23;
  }
@@ -6495,6 +6404,39 @@
  }
 ;
  l23: /* end case */;
+
+ booleanCheatTrue:
+ /* booleanCheatTrue */
+ {
+ sqInt bytecode;
+
+ VM_LABEL(0booleanCheatTrue);
+
+ /* assume next bytecode is jumpIfFalse (99%) */
+
+ bytecode = byteAtPointer(++localIP);
+ /* begin internalPop: */
+ localSP += 2 * BytesPerWord;
+ if ((bytecode < 160)
+ && (bytecode > 151)) {
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ goto l106;
+ }
+ if (bytecode == 172) {
+ byteAtPointer(++localIP);
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ goto l106;
+ }
+ localIP -= 1;
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ /* begin internalPush: */
+ longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ }
+;
+ l106: /* end case */;
  BREAK;
  CASE(179)
  /* bytecodePrimGreaterThan */
@@ -6502,10 +6444,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6517,56 +6455,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(2booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr > arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr > arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr > arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ /* goto booleanCheatFalse */
  }
  goto l28;
  }
@@ -6701,54 +6595,11 @@
  aBool = rcvr1 > arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(3booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ /* goto booleanCheatFalse */
  }
  goto l28;
  }
@@ -6758,6 +6609,45 @@
  }
 ;
  l28: /* end case */;
+
+ booleanCheatFalse:
+ /* booleanCheatFalse */
+ {
+ sqInt bytecode;
+ sqInt offset;
+
+ VM_LABEL(0booleanCheatFalse);
+
+ /* assume next bytecode is jumpIfFalse (99%) */
+
+ bytecode = byteAtPointer(++localIP);
+ /* begin internalPop: */
+ localSP += 2 * BytesPerWord;
+ if ((bytecode < 160)
+ && (bytecode > 151)) {
+ /* begin jump: */
+ localIP = (localIP + (bytecode - 151)) + 1;
+ currentBytecode = byteAtPointer(localIP);
+ goto l107;
+ }
+ if (bytecode == 172) {
+
+ /* long jumpIfFalse */
+
+ offset = byteAtPointer(++localIP);
+ /* begin jump: */
+ localIP = (localIP + offset) + 1;
+ currentBytecode = byteAtPointer(localIP);
+ goto l107;
+ }
+ localIP -= 1;
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ /* begin internalPush: */
+ longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ }
+;
+ l107: /* end case */;
  BREAK;
  CASE(180)
  /* bytecodePrimLessOrEqual */
@@ -6765,10 +6655,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6780,56 +6666,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(4booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr <= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr <= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr <= arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l33;
  }
@@ -6964,54 +6806,11 @@
  aBool = rcvr1 <= arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(5booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l33;
  }
@@ -7028,10 +6827,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -7043,56 +6838,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(6booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr >= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr >= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr >= arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l38;
  }
@@ -7227,54 +6978,11 @@
  aBool = rcvr1 >= arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(7booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l38;
  }
@@ -7291,10 +6999,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -7307,54 +7011,11 @@
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  /* begin booleanCheat: */
- VM_LABEL(8booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr == arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l43;
  }
@@ -7489,54 +7150,11 @@
  aBool = rcvr1 == arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(9booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l43;
  }
@@ -7553,10 +7171,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -7569,54 +7183,11 @@
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  /* begin booleanCheat: */
- VM_LABEL(10booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr != arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr != arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr != arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l48;
  }
@@ -7751,54 +7322,11 @@
  aBool = rcvr1 == arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(11booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (!aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (!aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (!aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l48;
  }
@@ -8944,63 +8472,17 @@
  {
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
 
  VM_LABEL(0bytecodePrimEquivalent);
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  /* begin booleanCheat: */
- VM_LABEL(12booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l82;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l82;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l82;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l82;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr == arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
- l82: /* end booleanCheat: */;
  }
 ;
  BREAK;
@@ -9017,17 +8499,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  oop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l83;
+ goto l82;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  oop = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l83;
+ goto l82;
  }
  else {
  oop = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l83;
+ goto l82;
  }
- l83: /* end fetchClassOf: */;
+ l82: /* end fetchClassOf: */;
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, oop);
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
@@ -9068,7 +8550,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l85;
+ goto l84;
  }
  if (((ccIndex = (((usqInt) (longAt(block))) >> 12) & 31)) == 0) {
  cl = (longAt(block - BaseHeaderSize)) & AllButTypeMask;
@@ -9088,7 +8570,7 @@
  GIV(primFailCode) = 1;
  }
  }
- l85: /* end assertClassOf:is: */;
+ l84: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin externalizeIPandSP */
  assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -9105,13 +8587,13 @@
  if (!(GIV(primFailCode) == 0)) {
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((25 * 2) << ShiftForWord));
  goto normalSend;
- goto l84;
+ goto l83;
  }
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l84: /* end case */;
+ l83: /* end case */;
  BREAK;
  CASE(202)
  /* bytecodePrimValueWithArg */
@@ -9136,7 +8618,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l87;
+ goto l86;
  }
  if (((ccIndex = (((usqInt) (longAt(block))) >> 12) & 31)) == 0) {
  cl = (longAt(block - BaseHeaderSize)) & AllButTypeMask;
@@ -9156,7 +8638,7 @@
  GIV(primFailCode) = 1;
  }
  }
- l87: /* end assertClassOf:is: */;
+ l86: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin externalizeIPandSP */
  assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -9173,13 +8655,13 @@
  if (!(GIV(primFailCode) == 0)) {
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((26 * 2) << ShiftForWord));
  goto normalSend;
- goto l86;
+ goto l85;
  }
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l86: /* end case */;
+ l85: /* end case */;
  BREAK;
  CASE(203)
  /* bytecodePrimDo */
@@ -9236,7 +8718,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l89;
+ goto l88;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  cl = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
@@ -9256,20 +8738,20 @@
  GIV(primFailCode) = 1;
  }
  }
- l89: /* end assertClassOf:is: */;
+ l88: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, longAt((rcvr + BaseHeaderSize) + (XIndex << ShiftForWord)));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l88;
+ goto l87;
  }
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((30 * 2) << ShiftForWord));
  GIV(argumentCount) = 0;
  goto normalSend;
  }
 ;
- l88: /* end case */;
+ l87: /* end case */;
  BREAK;
  CASE(207)
  /* bytecodePrimPointY */
@@ -9293,7 +8775,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l91;
+ goto l90;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  cl = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
@@ -9313,20 +8795,20 @@
  GIV(primFailCode) = 1;
  }
  }
- l91: /* end assertClassOf:is: */;
+ l90: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, longAt((rcvr + BaseHeaderSize) + (YIndex << ShiftForWord)));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l90;
+ goto l89;
  }
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((31 * 2) << ShiftForWord));
  GIV(argumentCount) = 0;
  goto normalSend;
  }
 ;
- l90: /* end case */;
+ l89: /* end case */;
  BREAK;
  CASE(208)
  CASE(209)
@@ -9358,17 +8840,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l92;
+ goto l91;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l92;
+ goto l91;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l92;
+ goto l91;
  }
- l92: /* end fetchClassOf: */;
+ l91: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -9404,17 +8886,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l93;
+ goto l92;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l93;
+ goto l92;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l93;
+ goto l92;
  }
- l93: /* end fetchClassOf: */;
+ l92: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -9450,17 +8932,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l94;
+ goto l93;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l94;
+ goto l93;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l94;
+ goto l93;
  }
- l94: /* end fetchClassOf: */;
+ l93: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -9977,7 +9459,6 @@
 
 usqInt
 argumentCountAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(argumentCount))));
 }
 
@@ -16680,7 +16161,6 @@
 
 usqInt
 framePointerAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(framePointer))));
 }
 
@@ -16736,7 +16216,6 @@
 
 usqInt
 freeStartAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(freeStart))));
 }
 
@@ -18672,7 +18151,6 @@
 
 usqInt
 instructionPointerAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(instructionPointer))));
 }
 
@@ -21615,7 +21093,6 @@
 
 usqInt
 newMethodAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(newMethod))));
 }
 
@@ -21643,7 +21120,6 @@
 
 usqInt
 nextProfileTickAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(nextProfileTick))));
 }
 
@@ -22827,7 +22303,6 @@
 
 usqInt
 primFailCodeAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(primFailCode))));
 }
 
@@ -38211,7 +37686,6 @@
 
 void *
 primTraceLogAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return GIV(primTraceLog);
 }
 
@@ -38220,7 +37694,6 @@
 
 usqInt
 primTraceLogIndexAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(primTraceLogIndex))));
 }
 
@@ -39977,12 +39450,10 @@
     void *p5;
     void *p6;
     void *p7;
-    void *p8;
 
  print("page ");
  /* begin printHexPtr: */
- p3 = page;
- printHex(oopForPointer(p3));
+ printHex(oopForPointer(page));
  print(" (");
  printNum(pageIndexFor((page->realStackLimit)));
  print(")  (trace: ");
@@ -40001,16 +39472,16 @@
  /* begin printChar: */
  putchar(' ');
  /* begin printHexPtr: */
- p4 = (page->baseAddress);
- printHex(oopForPointer(p4));
+ p3 = (page->baseAddress);
+ printHex(oopForPointer(p3));
  print(" - ");
  /* begin printHexPtr: */
- p5 = (page->realStackLimit);
- printHex(oopForPointer(p5));
+ p4 = (page->realStackLimit);
+ printHex(oopForPointer(p4));
  print(" - ");
  /* begin printHexPtr: */
- p6 = (page->lastAddress);
- printHex(oopForPointer(p6));
+ p5 = (page->lastAddress);
+ printHex(oopForPointer(p5));
  if (!(isFree(page))) {
  /* begin cr */
  printf("\n");
@@ -40043,8 +39514,8 @@
  putchar(' ');
  print("prev ");
  /* begin printHexPtr: */
- p7 = page->prevPage;
- printHex(oopForPointer(p7));
+ p6 = page->prevPage;
+ printHex(oopForPointer(p6));
  print(" (");
  printNum(pageIndexFor(((page->prevPage)->realStackLimit)));
  /* begin printChar: */
@@ -40054,8 +39525,8 @@
  putchar(' ');
  print("next ");
  /* begin printHexPtr: */
- p8 = page->nextPage;
- printHex(oopForPointer(p8));
+ p7 = page->nextPage;
+ printHex(oopForPointer(p7));
  print(" (");
  printNum(pageIndexFor(((page->nextPage)->realStackLimit)));
  /* begin printChar: */
@@ -40677,7 +40148,7 @@
     sqInt i;
     sqInt *root;
 
- for (i = 1; i <= GIV(extraRootCount); i += 1) {
+ for (i = 1; i <= GIV(extraRootCount); i++) {
  root = GIV(extraRoots)[i];
  if (root == varLoc) {
  GIV(extraRoots)[i] = (GIV(extraRoots)[GIV(extraRootCount)]);
@@ -41087,7 +40558,6 @@
 
 usqInt
 scavengeThresholdAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(scavengeThreshold))));
 }
 
@@ -42206,7 +41676,6 @@
 
 usqInt
 stackPointerAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(stackPointer))));
 }
 
@@ -44181,7 +43650,6 @@
 
 usqInt
 youngStartAddress(void) {
-DECL_MAYBE_SQ_GLOBAL_STRUCT
  return ((usqInt)((&GIV(youngStart))));
 }
 

Modified: branches/Cog/src/vm/interp.h
===================================================================
--- branches/Cog/src/vm/interp.h 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/src/vm/interp.h 2010-09-19 18:56:42 UTC (rev 2311)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGeneratorGlobalStructure VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
  */
 
 #define COGVM 1

Modified: branches/Cog/stacksrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/stacksrc/vm/gcc3x-interp.c 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/stacksrc/vm/gcc3x-interp.c 2010-09-19 18:56:42 UTC (rev 2311)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGeneratorGlobalStructure VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
    from
- StackInterpreter VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ StackInterpreter VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
  */
-static char __buildInfo[] = "StackInterpreter VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -886,11 +886,11 @@
 _iss sqInt messageSelector;
 _iss usqInt endOfMemory;
 _iss sqInt rootTableCount;
-_iss sqInt trueObj;
-_iss sqInt falseObj;
 _iss usqInt instructionPointer;
 _iss usqInt newMethod;
 _iss sqInt remapBufferCount;
+_iss sqInt trueObj;
+_iss sqInt falseObj;
 _iss usqInt reserveStart;
 _iss StackPage * pages;
 _iss char * stackLimit;
@@ -1598,7 +1598,7 @@
  0 };
 char * breakSelector;
 sqInt breakSelectorLength = -1;
-const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker-oscog.29]";
+const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker-oscog.31]";
 static volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -3677,7 +3677,7 @@
  VM_LABEL(0commonReturn);
  if (!((byteAt((localFP + FoxFrameFlags) + 3)) != 0)) {
  goto commonCallerReturn;
- goto l93;
+ goto l92;
  }
  closure = longAt(localFP + ((FoxCallerSavedIP + BytesPerWord) + ((byteAt((localFP + FoxFrameFlags) + 1)) << ShiftForWord)));
 
@@ -3711,11 +3711,11 @@
  theMethod = longAt((home + BaseHeaderSize) + (MethodIndex << ShiftForWord));
  if ((primitiveIndexOf(theMethod)) == 198) {
  unwindContextOrNilOrZero = home;
- goto l94;
+ goto l93;
  }
  }
  unwindContextOrNilOrZero = ctxtOrNilOrZero;
- l94: /* end internalFindUnwindThroughContext: */;
+ l93: /* end internalFindUnwindThroughContext: */;
  if (unwindContextOrNilOrZero == GIV(nilObj)) {
  /* begin internalCannotReturn: */
  VM_LABEL(0internalCannotReturn);
@@ -3723,10 +3723,10 @@
  if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) {
  assert(isContext(frameContext(localFP)));
  ourContext = longAt(localFP + FoxThisContext);
- goto l95;
+ goto l94;
  }
  ourContext = marryFrameSP(localFP, localSP);
- l95: /* end ensureFrameIsMarried:SP: */;
+ l94: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext);
  /* begin internalPush: */
@@ -3734,7 +3734,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l93;
+ goto l92;
  }
  if (unwindContextOrNilOrZero != 0) {
  /* begin internalAboutToReturn:through: */
@@ -3743,10 +3743,10 @@
  if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) {
  assert(isContext(frameContext(localFP)));
  ourContext1 = longAt(localFP + FoxThisContext);
- goto l96;
+ goto l95;
  }
  ourContext1 = marryFrameSP(localFP, localSP);
- l96: /* end ensureFrameIsMarried:SP: */;
+ l95: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext1);
  /* begin internalPush: */
@@ -3756,7 +3756,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorAboutToReturn << ShiftForWord));
  GIV(argumentCount) = 2;
  goto normalSend;
- goto l93;
+ goto l92;
  }
  contextToReturnTo = null;
  if (((longAt((home + BaseHeaderSize) + (SenderIndex << ShiftForWord))) & 1)) {
@@ -3794,28 +3794,28 @@
  if (!(((contextToReturnTo & 1) == 0)
  && (((((usqInt) (longAt(contextToReturnTo))) >> 12) & 31) == ClassMethodContextCompactIndex))) {
  frameToReturnTo = 0;
- goto l98;
+ goto l97;
  }
  if (((longAt((contextToReturnTo + BaseHeaderSize) + (SenderIndex << ShiftForWord))) & 1)) {
  if (isWidowedContext(contextToReturnTo)) {
  frameToReturnTo = 0;
- goto l98;
+ goto l97;
  }
  /* begin frameOfMarriedContext: */
  value2 = longAt((contextToReturnTo + BaseHeaderSize) + (SenderIndex << ShiftForWord));
  /* begin withoutSmallIntegerTags: */
  assert((value2 & 1));
  frameToReturnTo = pointerForOop(value2 - 1);
- goto l98;
+ goto l97;
  }
  if (!(((longAt((contextToReturnTo + BaseHeaderSize) + (InstructionPointerIndex << ShiftForWord))) & 1))) {
  frameToReturnTo = 0;
- goto l98;
+ goto l97;
  }
  thePage1 = makeBaseFrameFor(contextToReturnTo);
  markStackPageMostRecentlyUsed(thePage1);
  frameToReturnTo = (thePage1->baseFP);
- l98: /* end establishFrameForContextToReturnTo: */;
+ l97: /* end establishFrameForContextToReturnTo: */;
  if (frameToReturnTo == 0) {
  /* begin internalCannotReturn: */
  VM_LABEL(1internalCannotReturn);
@@ -3823,10 +3823,10 @@
  if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) {
  assert(isContext(frameContext(localFP)));
  ourContext2 = longAt(localFP + FoxThisContext);
- goto l97;
+ goto l96;
  }
  ourContext2 = marryFrameSP(localFP, localSP);
- l97: /* end ensureFrameIsMarried:SP: */;
+ l96: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext2);
  /* begin internalPush: */
@@ -3834,7 +3834,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l93;
+ goto l92;
  }
  }
  assert(pageListIsWellFormed());
@@ -3907,7 +3907,7 @@
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l93: /* end case */;
+ l92: /* end case */;
  BREAK;
  CASE(121)
  /* returnTrue */
@@ -4006,18 +4006,18 @@
  fp = (thePage->headFP);
  if (fp == theFP) {
  frameAbove = 0;
- goto l100;
+ goto l99;
  }
  while (((callerFP = frameCallerFP(fp))) != 0) {
  if (callerFP == theFP) {
  frameAbove = fp;
- goto l100;
+ goto l99;
  }
  fp = callerFP;
  }
  error("did not find theFP in stack page");
  frameAbove = 0;
- l100: /* end findFrameAbove:inPage: */;
+ l99: /* end findFrameAbove:inPage: */;
  moveFramesInthroughtoPage(thePage, frameAbove, GIV(stackPage));
  theFP = (thePage->headFP);
  theSP = (thePage->headSP);
@@ -4032,10 +4032,10 @@
  if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) {
  assert(isContext(frameContext(localFP)));
  ourContext = longAt(localFP + FoxThisContext);
- goto l101;
+ goto l100;
  }
  ourContext = marryFrameSP(localFP, localSP);
- l101: /* end ensureFrameIsMarried:SP: */;
+ l100: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext);
  /* begin internalPush: */
@@ -4043,7 +4043,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l99;
+ goto l98;
  }
  thePage = makeBaseFrameFor(contextToReturnTo);
  theFP = (thePage->headFP);
@@ -4066,7 +4066,7 @@
  assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, localFP));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l99;
+ goto l98;
  }
  /* begin frameCallerSavedIP: */
  localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP));
@@ -4079,7 +4079,7 @@
  GIV(method) = longAt(localFP + FoxMethod);
  }
 ;
- l99: /* end case */;
+ l98: /* end case */;
  BREAK;
  CASE(126)
  CASE(127)
@@ -4276,17 +4276,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l102;
+ goto l101;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l102;
+ goto l101;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l102;
+ goto l101;
  }
- l102: /* end fetchClassOf: */;
+ l101: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  /* goto commonSend */
  }
@@ -4331,7 +4331,7 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l103;
+ goto l102;
  }
 
  /* second probe */
@@ -4342,7 +4342,7 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l103;
+ goto l102;
  }
  probe = (((usqInt) hash) >> 2) & MethodCacheMask;
  if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector))
@@ -4350,10 +4350,10 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l103;
+ goto l102;
  }
  ok = 0;
- l103: /* end lookupInMethodCacheSel:class: */;
+ l102: /* end lookupInMethodCacheSel:class: */;
  if (!(ok)) {
  /* begin externalizeIPandSP */
  GIV(instructionPointer) = oopForPointer(localIP);
@@ -4379,30 +4379,30 @@
  /* begin internalPop:thenPush: */
  oop = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((localPrimIndex - 264) << ShiftForWord));
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, oop);
- goto l105;
+ goto l104;
  }
  if (localPrimIndex == 256) {
- goto l105;
+ goto l104;
  }
  if (localPrimIndex == 257) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(trueObj));
- goto l105;
+ goto l104;
  }
  if (localPrimIndex == 258) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(falseObj));
- goto l105;
+ goto l104;
  }
  if (localPrimIndex == 259) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(nilObj));
- goto l105;
+ goto l104;
  }
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, (((localPrimIndex - 261) << 1) | 1));
- l105: /* end internalQuickPrimitiveResponse */;
- goto l104;
+ l104: /* end internalQuickPrimitiveResponse */;
+ goto l103;
  }
  /* begin externalizeIPandSP */
  GIV(instructionPointer) = oopForPointer(localIP);
@@ -4446,7 +4446,7 @@
  localFP = pointerForOop(GIV(framePointer));
  if (succeeded) {
  browserPluginReturnIfNeeded();
- goto l104;
+ goto l103;
  }
  }
  /* begin internalActivateNewMethod */
@@ -4501,11 +4501,11 @@
  table = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (PrimErrTableIndex << ShiftForWord));
  if (GIV(primFailCode) <= (((sqInt) (lastPointerOf(table)) >> 2))) {
  errorCode = longAt((table + BaseHeaderSize) + ((GIV(primFailCode) - 1) << ShiftForWord));
- goto l106;
+ goto l105;
  }
  }
  errorCode = ((GIV(primFailCode) << 1) | 1);
- l106: /* end getErrorObjectFromPrimFailCode */;
+ l105: /* end getErrorObjectFromPrimFailCode */;
  longAtPointerput(localSP, errorCode);
  }
  GIV(primFailCode) = 0;
@@ -4524,7 +4524,7 @@
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
  }
- l104: /* end internalExecuteNewMethod */;
+ l103: /* end internalExecuteNewMethod */;
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
@@ -5693,10 +5693,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -5708,56 +5704,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(0booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr < arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr < arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr < arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ /* goto booleanCheatTrue */
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l23;
  }
@@ -5892,54 +5844,11 @@
  aBool = rcvr1 < arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(1booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ /* goto booleanCheatTrue */
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l23;
  }
@@ -5949,6 +5858,39 @@
  }
 ;
  l23: /* end case */;
+
+ booleanCheatTrue:
+ /* booleanCheatTrue */
+ {
+ sqInt bytecode;
+
+ VM_LABEL(0booleanCheatTrue);
+
+ /* assume next bytecode is jumpIfFalse (99%) */
+
+ bytecode = byteAtPointer(++localIP);
+ /* begin internalPop: */
+ localSP += 2 * BytesPerWord;
+ if ((bytecode < 160)
+ && (bytecode > 151)) {
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ goto l106;
+ }
+ if (bytecode == 172) {
+ byteAtPointer(++localIP);
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ goto l106;
+ }
+ localIP -= 1;
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ /* begin internalPush: */
+ longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ }
+;
+ l106: /* end case */;
  BREAK;
  CASE(179)
  /* bytecodePrimGreaterThan */
@@ -5956,10 +5898,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -5971,56 +5909,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(2booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr > arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr > arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr > arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ /* goto booleanCheatFalse */
  }
  goto l28;
  }
@@ -6155,54 +6049,11 @@
  aBool = rcvr1 > arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(3booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ /* goto booleanCheatFalse */
  }
  goto l28;
  }
@@ -6212,6 +6063,45 @@
  }
 ;
  l28: /* end case */;
+
+ booleanCheatFalse:
+ /* booleanCheatFalse */
+ {
+ sqInt bytecode;
+ sqInt offset;
+
+ VM_LABEL(0booleanCheatFalse);
+
+ /* assume next bytecode is jumpIfFalse (99%) */
+
+ bytecode = byteAtPointer(++localIP);
+ /* begin internalPop: */
+ localSP += 2 * BytesPerWord;
+ if ((bytecode < 160)
+ && (bytecode > 151)) {
+ /* begin jump: */
+ localIP = (localIP + (bytecode - 151)) + 1;
+ currentBytecode = byteAtPointer(localIP);
+ goto l107;
+ }
+ if (bytecode == 172) {
+
+ /* long jumpIfFalse */
+
+ offset = byteAtPointer(++localIP);
+ /* begin jump: */
+ localIP = (localIP + offset) + 1;
+ currentBytecode = byteAtPointer(localIP);
+ goto l107;
+ }
+ localIP -= 1;
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ /* begin internalPush: */
+ longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ }
+;
+ l107: /* end case */;
  BREAK;
  CASE(180)
  /* bytecodePrimLessOrEqual */
@@ -6219,10 +6109,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6234,56 +6120,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(4booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr <= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr <= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr <= arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l33;
  }
@@ -6418,54 +6260,11 @@
  aBool = rcvr1 <= arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(5booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l33;
  }
@@ -6482,10 +6281,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6497,56 +6292,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(6booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr >= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr >= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr >= arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l38;
  }
@@ -6681,54 +6432,11 @@
  aBool = rcvr1 >= arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(7booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l38;
  }
@@ -6745,10 +6453,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6761,54 +6465,11 @@
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  /* begin booleanCheat: */
- VM_LABEL(8booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr == arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l43;
  }
@@ -6943,54 +6604,11 @@
  aBool = rcvr1 == arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(9booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l43;
  }
@@ -7007,10 +6625,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -7023,54 +6637,11 @@
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  /* begin booleanCheat: */
- VM_LABEL(10booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr != arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr != arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr != arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l48;
  }
@@ -7205,54 +6776,11 @@
  aBool = rcvr1 == arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(11booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (!aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (!aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (!aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l48;
  }
@@ -8326,63 +7854,17 @@
  {
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
 
  VM_LABEL(0bytecodePrimEquivalent);
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  /* begin booleanCheat: */
- VM_LABEL(12booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l80;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l80;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l80;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l80;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr == arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
- l80: /* end booleanCheat: */;
  }
 ;
  BREAK;
@@ -8399,17 +7881,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  oop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l81;
+ goto l80;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  oop = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l81;
+ goto l80;
  }
  else {
  oop = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l81;
+ goto l80;
  }
- l81: /* end fetchClassOf: */;
+ l80: /* end fetchClassOf: */;
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, oop);
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
@@ -8450,7 +7932,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l83;
+ goto l82;
  }
  if (((ccIndex = (((usqInt) (longAt(block))) >> 12) & 31)) == 0) {
  cl = (longAt(block - BaseHeaderSize)) & AllButTypeMask;
@@ -8470,7 +7952,7 @@
  GIV(primFailCode) = 1;
  }
  }
- l83: /* end assertClassOf:is: */;
+ l82: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin externalizeIPandSP */
  GIV(instructionPointer) = oopForPointer(localIP);
@@ -8485,13 +7967,13 @@
  if (!(GIV(primFailCode) == 0)) {
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((25 * 2) << ShiftForWord));
  goto normalSend;
- goto l82;
+ goto l81;
  }
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l82: /* end case */;
+ l81: /* end case */;
  BREAK;
  CASE(202)
  /* bytecodePrimValueWithArg */
@@ -8516,7 +7998,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l85;
+ goto l84;
  }
  if (((ccIndex = (((usqInt) (longAt(block))) >> 12) & 31)) == 0) {
  cl = (longAt(block - BaseHeaderSize)) & AllButTypeMask;
@@ -8536,7 +8018,7 @@
  GIV(primFailCode) = 1;
  }
  }
- l85: /* end assertClassOf:is: */;
+ l84: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin externalizeIPandSP */
  GIV(instructionPointer) = oopForPointer(localIP);
@@ -8551,13 +8033,13 @@
  if (!(GIV(primFailCode) == 0)) {
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((26 * 2) << ShiftForWord));
  goto normalSend;
- goto l84;
+ goto l83;
  }
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l84: /* end case */;
+ l83: /* end case */;
  BREAK;
  CASE(203)
  /* bytecodePrimDo */
@@ -8614,7 +8096,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l87;
+ goto l86;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  cl = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
@@ -8634,20 +8116,20 @@
  GIV(primFailCode) = 1;
  }
  }
- l87: /* end assertClassOf:is: */;
+ l86: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, longAt((rcvr + BaseHeaderSize) + (XIndex << ShiftForWord)));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l86;
+ goto l85;
  }
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((30 * 2) << ShiftForWord));
  GIV(argumentCount) = 0;
  goto normalSend;
  }
 ;
- l86: /* end case */;
+ l85: /* end case */;
  BREAK;
  CASE(207)
  /* bytecodePrimPointY */
@@ -8671,7 +8153,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l89;
+ goto l88;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  cl = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
@@ -8691,20 +8173,20 @@
  GIV(primFailCode) = 1;
  }
  }
- l89: /* end assertClassOf:is: */;
+ l88: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, longAt((rcvr + BaseHeaderSize) + (YIndex << ShiftForWord)));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l88;
+ goto l87;
  }
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((31 * 2) << ShiftForWord));
  GIV(argumentCount) = 0;
  goto normalSend;
  }
 ;
- l88: /* end case */;
+ l87: /* end case */;
  BREAK;
  CASE(208)
  CASE(209)
@@ -8736,17 +8218,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l90;
+ goto l89;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l90;
+ goto l89;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l90;
+ goto l89;
  }
- l90: /* end fetchClassOf: */;
+ l89: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -8782,17 +8264,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l91;
+ goto l90;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l91;
+ goto l90;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l91;
+ goto l90;
  }
- l91: /* end fetchClassOf: */;
+ l90: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -8828,17 +8310,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l92;
+ goto l91;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l92;
+ goto l91;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l92;
+ goto l91;
  }
- l92: /* end fetchClassOf: */;
+ l91: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -34810,12 +34292,10 @@
     void *p5;
     void *p6;
     void *p7;
-    void *p8;
 
  print("page ");
  /* begin printHexPtr: */
- p3 = page;
- printHex(oopForPointer(p3));
+ printHex(oopForPointer(page));
  print(" (");
  printNum(pageIndexFor((page->realStackLimit)));
  print(")  (trace: ");
@@ -34834,16 +34314,16 @@
  /* begin printChar: */
  putchar(' ');
  /* begin printHexPtr: */
- p4 = (page->baseAddress);
- printHex(oopForPointer(p4));
+ p3 = (page->baseAddress);
+ printHex(oopForPointer(p3));
  print(" - ");
  /* begin printHexPtr: */
- p5 = (page->realStackLimit);
- printHex(oopForPointer(p5));
+ p4 = (page->realStackLimit);
+ printHex(oopForPointer(p4));
  print(" - ");
  /* begin printHexPtr: */
- p6 = (page->lastAddress);
- printHex(oopForPointer(p6));
+ p5 = (page->lastAddress);
+ printHex(oopForPointer(p5));
  if (!(((page->baseFP)) == 0)) {
  /* begin cr */
  printf("\n");
@@ -34876,8 +34356,8 @@
  putchar(' ');
  print("prev ");
  /* begin printHexPtr: */
- p7 = page->prevPage;
- printHex(oopForPointer(p7));
+ p6 = page->prevPage;
+ printHex(oopForPointer(p6));
  print(" (");
  printNum(pageIndexFor(((page->prevPage)->realStackLimit)));
  /* begin printChar: */
@@ -34887,8 +34367,8 @@
  putchar(' ');
  print("next ");
  /* begin printHexPtr: */
- p8 = page->nextPage;
- printHex(oopForPointer(p8));
+ p7 = page->nextPage;
+ printHex(oopForPointer(p7));
  print(" (");
  printNum(pageIndexFor(((page->nextPage)->realStackLimit)));
  /* begin printChar: */
@@ -35420,7 +34900,7 @@
     sqInt i;
     sqInt *root;
 
- for (i = 1; i <= GIV(extraRootCount); i += 1) {
+ for (i = 1; i <= GIV(extraRootCount); i++) {
  root = GIV(extraRoots)[i];
  if (root == varLoc) {
  GIV(extraRoots)[i] = (GIV(extraRoots)[GIV(extraRootCount)]);

Modified: branches/Cog/stacksrc/vm/interp.c
===================================================================
--- branches/Cog/stacksrc/vm/interp.c 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/stacksrc/vm/interp.c 2010-09-19 18:56:42 UTC (rev 2311)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGeneratorGlobalStructure VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
    from
- StackInterpreter VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ StackInterpreter VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
  */
-static char __buildInfo[] = "StackInterpreter VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -883,11 +883,11 @@
 _iss sqInt messageSelector;
 _iss usqInt endOfMemory;
 _iss sqInt rootTableCount;
-_iss sqInt trueObj;
-_iss sqInt falseObj;
 _iss usqInt instructionPointer;
 _iss usqInt newMethod;
 _iss sqInt remapBufferCount;
+_iss sqInt trueObj;
+_iss sqInt falseObj;
 _iss usqInt reserveStart;
 _iss StackPage * pages;
 _iss char * stackLimit;
@@ -1595,7 +1595,7 @@
  0 };
 char * breakSelector;
 sqInt breakSelectorLength = -1;
-const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker-oscog.29]";
+const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker-oscog.31]";
 static volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -3673,7 +3673,7 @@
  VM_LABEL(0commonReturn);
  if (!((byteAt((localFP + FoxFrameFlags) + 3)) != 0)) {
  goto commonCallerReturn;
- goto l93;
+ goto l92;
  }
  closure = longAt(localFP + ((FoxCallerSavedIP + BytesPerWord) + ((byteAt((localFP + FoxFrameFlags) + 1)) << ShiftForWord)));
 
@@ -3707,11 +3707,11 @@
  theMethod = longAt((home + BaseHeaderSize) + (MethodIndex << ShiftForWord));
  if ((primitiveIndexOf(theMethod)) == 198) {
  unwindContextOrNilOrZero = home;
- goto l94;
+ goto l93;
  }
  }
  unwindContextOrNilOrZero = ctxtOrNilOrZero;
- l94: /* end internalFindUnwindThroughContext: */;
+ l93: /* end internalFindUnwindThroughContext: */;
  if (unwindContextOrNilOrZero == GIV(nilObj)) {
  /* begin internalCannotReturn: */
  VM_LABEL(0internalCannotReturn);
@@ -3719,10 +3719,10 @@
  if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) {
  assert(isContext(frameContext(localFP)));
  ourContext = longAt(localFP + FoxThisContext);
- goto l95;
+ goto l94;
  }
  ourContext = marryFrameSP(localFP, localSP);
- l95: /* end ensureFrameIsMarried:SP: */;
+ l94: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext);
  /* begin internalPush: */
@@ -3730,7 +3730,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l93;
+ goto l92;
  }
  if (unwindContextOrNilOrZero != 0) {
  /* begin internalAboutToReturn:through: */
@@ -3739,10 +3739,10 @@
  if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) {
  assert(isContext(frameContext(localFP)));
  ourContext1 = longAt(localFP + FoxThisContext);
- goto l96;
+ goto l95;
  }
  ourContext1 = marryFrameSP(localFP, localSP);
- l96: /* end ensureFrameIsMarried:SP: */;
+ l95: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext1);
  /* begin internalPush: */
@@ -3752,7 +3752,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorAboutToReturn << ShiftForWord));
  GIV(argumentCount) = 2;
  goto normalSend;
- goto l93;
+ goto l92;
  }
  contextToReturnTo = null;
  if (((longAt((home + BaseHeaderSize) + (SenderIndex << ShiftForWord))) & 1)) {
@@ -3790,28 +3790,28 @@
  if (!(((contextToReturnTo & 1) == 0)
  && (((((usqInt) (longAt(contextToReturnTo))) >> 12) & 31) == ClassMethodContextCompactIndex))) {
  frameToReturnTo = 0;
- goto l98;
+ goto l97;
  }
  if (((longAt((contextToReturnTo + BaseHeaderSize) + (SenderIndex << ShiftForWord))) & 1)) {
  if (isWidowedContext(contextToReturnTo)) {
  frameToReturnTo = 0;
- goto l98;
+ goto l97;
  }
  /* begin frameOfMarriedContext: */
  value2 = longAt((contextToReturnTo + BaseHeaderSize) + (SenderIndex << ShiftForWord));
  /* begin withoutSmallIntegerTags: */
  assert((value2 & 1));
  frameToReturnTo = pointerForOop(value2 - 1);
- goto l98;
+ goto l97;
  }
  if (!(((longAt((contextToReturnTo + BaseHeaderSize) + (InstructionPointerIndex << ShiftForWord))) & 1))) {
  frameToReturnTo = 0;
- goto l98;
+ goto l97;
  }
  thePage1 = makeBaseFrameFor(contextToReturnTo);
  markStackPageMostRecentlyUsed(thePage1);
  frameToReturnTo = (thePage1->baseFP);
- l98: /* end establishFrameForContextToReturnTo: */;
+ l97: /* end establishFrameForContextToReturnTo: */;
  if (frameToReturnTo == 0) {
  /* begin internalCannotReturn: */
  VM_LABEL(1internalCannotReturn);
@@ -3819,10 +3819,10 @@
  if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) {
  assert(isContext(frameContext(localFP)));
  ourContext2 = longAt(localFP + FoxThisContext);
- goto l97;
+ goto l96;
  }
  ourContext2 = marryFrameSP(localFP, localSP);
- l97: /* end ensureFrameIsMarried:SP: */;
+ l96: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext2);
  /* begin internalPush: */
@@ -3830,7 +3830,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l93;
+ goto l92;
  }
  }
  assert(pageListIsWellFormed());
@@ -3903,7 +3903,7 @@
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l93: /* end case */;
+ l92: /* end case */;
  break;
  case 121:
  /* returnTrue */
@@ -4002,18 +4002,18 @@
  fp = (thePage->headFP);
  if (fp == theFP) {
  frameAbove = 0;
- goto l100;
+ goto l99;
  }
  while (((callerFP = frameCallerFP(fp))) != 0) {
  if (callerFP == theFP) {
  frameAbove = fp;
- goto l100;
+ goto l99;
  }
  fp = callerFP;
  }
  error("did not find theFP in stack page");
  frameAbove = 0;
- l100: /* end findFrameAbove:inPage: */;
+ l99: /* end findFrameAbove:inPage: */;
  moveFramesInthroughtoPage(thePage, frameAbove, GIV(stackPage));
  theFP = (thePage->headFP);
  theSP = (thePage->headSP);
@@ -4028,10 +4028,10 @@
  if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) {
  assert(isContext(frameContext(localFP)));
  ourContext = longAt(localFP + FoxThisContext);
- goto l101;
+ goto l100;
  }
  ourContext = marryFrameSP(localFP, localSP);
- l101: /* end ensureFrameIsMarried:SP: */;
+ l100: /* end ensureFrameIsMarried:SP: */;
  /* begin internalPush: */
  longAtPointerput(localSP -= BytesPerWord, ourContext);
  /* begin internalPush: */
@@ -4039,7 +4039,7 @@
  GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
  GIV(argumentCount) = 1;
  goto normalSend;
- goto l99;
+ goto l98;
  }
  thePage = makeBaseFrameFor(contextToReturnTo);
  theFP = (thePage->headFP);
@@ -4062,7 +4062,7 @@
  assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, localFP));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l99;
+ goto l98;
  }
  /* begin frameCallerSavedIP: */
  localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP));
@@ -4075,7 +4075,7 @@
  GIV(method) = longAt(localFP + FoxMethod);
  }
 ;
- l99: /* end case */;
+ l98: /* end case */;
  break;
  case 126:
  case 127:
@@ -4272,17 +4272,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l102;
+ goto l101;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l102;
+ goto l101;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l102;
+ goto l101;
  }
- l102: /* end fetchClassOf: */;
+ l101: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  /* goto commonSend */
  }
@@ -4327,7 +4327,7 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l103;
+ goto l102;
  }
 
  /* second probe */
@@ -4338,7 +4338,7 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l103;
+ goto l102;
  }
  probe = (((usqInt) hash) >> 2) & MethodCacheMask;
  if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector))
@@ -4346,10 +4346,10 @@
  GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
  primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
  ok = 1;
- goto l103;
+ goto l102;
  }
  ok = 0;
- l103: /* end lookupInMethodCacheSel:class: */;
+ l102: /* end lookupInMethodCacheSel:class: */;
  if (!(ok)) {
  /* begin externalizeIPandSP */
  GIV(instructionPointer) = oopForPointer(localIP);
@@ -4375,30 +4375,30 @@
  /* begin internalPop:thenPush: */
  oop = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((localPrimIndex - 264) << ShiftForWord));
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, oop);
- goto l105;
+ goto l104;
  }
  if (localPrimIndex == 256) {
- goto l105;
+ goto l104;
  }
  if (localPrimIndex == 257) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(trueObj));
- goto l105;
+ goto l104;
  }
  if (localPrimIndex == 258) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(falseObj));
- goto l105;
+ goto l104;
  }
  if (localPrimIndex == 259) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, GIV(nilObj));
- goto l105;
+ goto l104;
  }
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, (((localPrimIndex - 261) << 1) | 1));
- l105: /* end internalQuickPrimitiveResponse */;
- goto l104;
+ l104: /* end internalQuickPrimitiveResponse */;
+ goto l103;
  }
  /* begin externalizeIPandSP */
  GIV(instructionPointer) = oopForPointer(localIP);
@@ -4442,7 +4442,7 @@
  localFP = pointerForOop(GIV(framePointer));
  if (succeeded) {
  browserPluginReturnIfNeeded();
- goto l104;
+ goto l103;
  }
  }
  /* begin internalActivateNewMethod */
@@ -4497,11 +4497,11 @@
  table = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (PrimErrTableIndex << ShiftForWord));
  if (GIV(primFailCode) <= (((sqInt) (lastPointerOf(table)) >> 2))) {
  errorCode = longAt((table + BaseHeaderSize) + ((GIV(primFailCode) - 1) << ShiftForWord));
- goto l106;
+ goto l105;
  }
  }
  errorCode = ((GIV(primFailCode) << 1) | 1);
- l106: /* end getErrorObjectFromPrimFailCode */;
+ l105: /* end getErrorObjectFromPrimFailCode */;
  longAtPointerput(localSP, errorCode);
  }
  GIV(primFailCode) = 0;
@@ -4520,7 +4520,7 @@
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
  }
- l104: /* end internalExecuteNewMethod */;
+ l103: /* end internalExecuteNewMethod */;
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
@@ -5689,10 +5689,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -5704,56 +5700,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(0booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr < arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr < arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr < arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ /* goto booleanCheatTrue */
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l23;
  }
@@ -5888,54 +5840,11 @@
  aBool = rcvr1 < arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(1booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l23;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l23;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ /* goto booleanCheatTrue */
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l23;
  }
@@ -5945,6 +5854,39 @@
  }
 ;
  l23: /* end case */;
+
+ booleanCheatTrue:
+ /* booleanCheatTrue */
+ {
+ sqInt bytecode;
+
+ VM_LABEL(0booleanCheatTrue);
+
+ /* assume next bytecode is jumpIfFalse (99%) */
+
+ bytecode = byteAtPointer(++localIP);
+ /* begin internalPop: */
+ localSP += 2 * BytesPerWord;
+ if ((bytecode < 160)
+ && (bytecode > 151)) {
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ goto l106;
+ }
+ if (bytecode == 172) {
+ byteAtPointer(++localIP);
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ goto l106;
+ }
+ localIP -= 1;
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ /* begin internalPush: */
+ longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ }
+;
+ l106: /* end case */;
  break;
  case 179:
  /* bytecodePrimGreaterThan */
@@ -5952,10 +5894,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -5967,56 +5905,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(2booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr > arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr > arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr > arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ /* goto booleanCheatFalse */
  }
  goto l28;
  }
@@ -6151,54 +6045,11 @@
  aBool = rcvr1 > arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(3booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l28;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l28;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ /* goto booleanCheatFalse */
  }
  goto l28;
  }
@@ -6208,6 +6059,45 @@
  }
 ;
  l28: /* end case */;
+
+ booleanCheatFalse:
+ /* booleanCheatFalse */
+ {
+ sqInt bytecode;
+ sqInt offset;
+
+ VM_LABEL(0booleanCheatFalse);
+
+ /* assume next bytecode is jumpIfFalse (99%) */
+
+ bytecode = byteAtPointer(++localIP);
+ /* begin internalPop: */
+ localSP += 2 * BytesPerWord;
+ if ((bytecode < 160)
+ && (bytecode > 151)) {
+ /* begin jump: */
+ localIP = (localIP + (bytecode - 151)) + 1;
+ currentBytecode = byteAtPointer(localIP);
+ goto l107;
+ }
+ if (bytecode == 172) {
+
+ /* long jumpIfFalse */
+
+ offset = byteAtPointer(++localIP);
+ /* begin jump: */
+ localIP = (localIP + offset) + 1;
+ currentBytecode = byteAtPointer(localIP);
+ goto l107;
+ }
+ localIP -= 1;
+ /* begin fetchNextBytecode */
+ currentBytecode = byteAtPointer(++localIP);
+ /* begin internalPush: */
+ longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ }
+;
+ l107: /* end case */;
  break;
  case 180:
  /* bytecodePrimLessOrEqual */
@@ -6215,10 +6105,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6230,56 +6116,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(4booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr <= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr <= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr <= arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l33;
  }
@@ -6414,54 +6256,11 @@
  aBool = rcvr1 <= arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(5booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l33;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l33;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l33;
  }
@@ -6478,10 +6277,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6493,56 +6288,12 @@
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
- ;
  /* begin booleanCheat: */
- VM_LABEL(6booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr >= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr >= arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr >= arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l38;
  }
@@ -6677,54 +6428,11 @@
  aBool = rcvr1 >= arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(7booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l38;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l38;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l38;
  }
@@ -6741,10 +6449,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -6757,54 +6461,11 @@
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  /* begin booleanCheat: */
- VM_LABEL(8booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr == arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l43;
  }
@@ -6939,54 +6600,11 @@
  aBool = rcvr1 == arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(9booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l43;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l43;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l43;
  }
@@ -7003,10 +6621,6 @@
  sqInt aBool;
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
- sqInt bytecode1;
- sqInt offset1;
  double arg1;
  double rcvr1;
  double result;
@@ -7019,54 +6633,11 @@
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  /* begin booleanCheat: */
- VM_LABEL(10booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr != arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr != arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr != arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l48;
  }
@@ -7201,54 +6772,11 @@
  aBool = rcvr1 == arg1;
  if (GIV(primFailCode) == 0) {
  /* begin booleanCheat: */
- VM_LABEL(11booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode1 = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode1 < 160)
- && (bytecode1 > 151)) {
- if (!aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode1 - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- if (bytecode1 == 172) {
-
- /* long jumpIfFalse */
-
- offset1 = byteAtPointer(++localIP);
- if (!aBool) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l48;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset1) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l48;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (!aBool) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
  goto l48;
  }
@@ -8322,63 +7850,17 @@
  {
  sqInt arg;
  sqInt rcvr;
- sqInt bytecode;
- sqInt offset;
 
  VM_LABEL(0bytecodePrimEquivalent);
  rcvr = longAtPointer(localSP + (1 * BytesPerWord));
  arg = longAtPointer(localSP + (0 * BytesPerWord));
  /* begin booleanCheat: */
- VM_LABEL(12booleanCheat);
-
- /* assume next bytecode is jumpIfFalse (99%) */
-
- bytecode = byteAtPointer(++localIP);
- /* begin internalPop: */
- localSP += 2 * BytesPerWord;
- if ((bytecode < 160)
- && (bytecode > 151)) {
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l80;
- }
- else {
- /* begin jump: */
- localIP = (localIP + (bytecode - 151)) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l80;
- }
- }
- if (bytecode == 172) {
-
- /* long jumpIfFalse */
-
- offset = byteAtPointer(++localIP);
- if (rcvr == arg) {
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
- goto l80;
- }
- else {
- /* begin jump: */
- localIP = (localIP + offset) + 1;
- currentBytecode = byteAtPointer(localIP);
- goto l80;
- }
- }
- localIP -= 1;
- /* begin fetchNextBytecode */
- currentBytecode = byteAtPointer(++localIP);
  if (rcvr == arg) {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(trueObj));
+ goto booleanCheatTrue;
  }
  else {
- /* begin internalPush: */
- longAtPointerput(localSP -= BytesPerWord, GIV(falseObj));
+ goto booleanCheatFalse;
  }
- l80: /* end booleanCheat: */;
  }
 ;
  break;
@@ -8395,17 +7877,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  oop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l81;
+ goto l80;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  oop = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l81;
+ goto l80;
  }
  else {
  oop = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l81;
+ goto l80;
  }
- l81: /* end fetchClassOf: */;
+ l80: /* end fetchClassOf: */;
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, oop);
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
@@ -8446,7 +7928,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l83;
+ goto l82;
  }
  if (((ccIndex = (((usqInt) (longAt(block))) >> 12) & 31)) == 0) {
  cl = (longAt(block - BaseHeaderSize)) & AllButTypeMask;
@@ -8466,7 +7948,7 @@
  GIV(primFailCode) = 1;
  }
  }
- l83: /* end assertClassOf:is: */;
+ l82: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin externalizeIPandSP */
  GIV(instructionPointer) = oopForPointer(localIP);
@@ -8481,13 +7963,13 @@
  if (!(GIV(primFailCode) == 0)) {
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((25 * 2) << ShiftForWord));
  goto normalSend;
- goto l82;
+ goto l81;
  }
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l82: /* end case */;
+ l81: /* end case */;
  break;
  case 202:
  /* bytecodePrimValueWithArg */
@@ -8512,7 +7994,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l85;
+ goto l84;
  }
  if (((ccIndex = (((usqInt) (longAt(block))) >> 12) & 31)) == 0) {
  cl = (longAt(block - BaseHeaderSize)) & AllButTypeMask;
@@ -8532,7 +8014,7 @@
  GIV(primFailCode) = 1;
  }
  }
- l85: /* end assertClassOf:is: */;
+ l84: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin externalizeIPandSP */
  GIV(instructionPointer) = oopForPointer(localIP);
@@ -8547,13 +8029,13 @@
  if (!(GIV(primFailCode) == 0)) {
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((26 * 2) << ShiftForWord));
  goto normalSend;
- goto l84;
+ goto l83;
  }
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
  }
 ;
- l84: /* end case */;
+ l83: /* end case */;
  break;
  case 203:
  /* bytecodePrimDo */
@@ -8610,7 +8092,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l87;
+ goto l86;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  cl = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
@@ -8630,20 +8112,20 @@
  GIV(primFailCode) = 1;
  }
  }
- l87: /* end assertClassOf:is: */;
+ l86: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, longAt((rcvr + BaseHeaderSize) + (XIndex << ShiftForWord)));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l86;
+ goto l85;
  }
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((30 * 2) << ShiftForWord));
  GIV(argumentCount) = 0;
  goto normalSend;
  }
 ;
- l86: /* end case */;
+ l85: /* end case */;
  break;
  case 207:
  /* bytecodePrimPointY */
@@ -8667,7 +8149,7 @@
  GIV(primFailCode) = 1;
  }
  }
- goto l89;
+ goto l88;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  cl = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
@@ -8687,20 +8169,20 @@
  GIV(primFailCode) = 1;
  }
  }
- l89: /* end assertClassOf:is: */;
+ l88: /* end assertClassOf:is: */;
  if (GIV(primFailCode) == 0) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP += (1 - 1) * BytesPerWord, longAt((rcvr + BaseHeaderSize) + (YIndex << ShiftForWord)));
  /* begin fetchNextBytecode */
  currentBytecode = byteAtPointer(++localIP);
- goto l88;
+ goto l87;
  }
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((31 * 2) << ShiftForWord));
  GIV(argumentCount) = 0;
  goto normalSend;
  }
 ;
- l88: /* end case */;
+ l87: /* end case */;
  break;
  case 208:
  case 209:
@@ -8732,17 +8214,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l90;
+ goto l89;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l90;
+ goto l89;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l90;
+ goto l89;
  }
- l90: /* end fetchClassOf: */;
+ l89: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -8778,17 +8260,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l91;
+ goto l90;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l91;
+ goto l90;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l91;
+ goto l90;
  }
- l91: /* end fetchClassOf: */;
+ l90: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -8824,17 +8306,17 @@
  /* begin fetchClassOf: */
  if ((rcvr & 1)) {
  GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l92;
+ goto l91;
  }
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l92;
+ goto l91;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l92;
+ goto l91;
  }
- l92: /* end fetchClassOf: */;
+ l91: /* end fetchClassOf: */;
  assert(GIV(lkupClass) != GIV(nilObj));
  goto commonSend;
  }
@@ -34806,12 +34288,10 @@
     void *p5;
     void *p6;
     void *p7;
-    void *p8;
 
  print("page ");
  /* begin printHexPtr: */
- p3 = page;
- printHex(oopForPointer(p3));
+ printHex(oopForPointer(page));
  print(" (");
  printNum(pageIndexFor((page->realStackLimit)));
  print(")  (trace: ");
@@ -34830,16 +34310,16 @@
  /* begin printChar: */
  putchar(' ');
  /* begin printHexPtr: */
- p4 = (page->baseAddress);
- printHex(oopForPointer(p4));
+ p3 = (page->baseAddress);
+ printHex(oopForPointer(p3));
  print(" - ");
  /* begin printHexPtr: */
- p5 = (page->realStackLimit);
- printHex(oopForPointer(p5));
+ p4 = (page->realStackLimit);
+ printHex(oopForPointer(p4));
  print(" - ");
  /* begin printHexPtr: */
- p6 = (page->lastAddress);
- printHex(oopForPointer(p6));
+ p5 = (page->lastAddress);
+ printHex(oopForPointer(p5));
  if (!(((page->baseFP)) == 0)) {
  /* begin cr */
  printf("\n");
@@ -34872,8 +34352,8 @@
  putchar(' ');
  print("prev ");
  /* begin printHexPtr: */
- p7 = page->prevPage;
- printHex(oopForPointer(p7));
+ p6 = page->prevPage;
+ printHex(oopForPointer(p6));
  print(" (");
  printNum(pageIndexFor(((page->prevPage)->realStackLimit)));
  /* begin printChar: */
@@ -34883,8 +34363,8 @@
  putchar(' ');
  print("next ");
  /* begin printHexPtr: */
- p8 = page->nextPage;
- printHex(oopForPointer(p8));
+ p7 = page->nextPage;
+ printHex(oopForPointer(p7));
  print(" (");
  printNum(pageIndexFor(((page->nextPage)->realStackLimit)));
  /* begin printChar: */
@@ -35416,7 +34896,7 @@
     sqInt i;
     sqInt *root;
 
- for (i = 1; i <= GIV(extraRootCount); i += 1) {
+ for (i = 1; i <= GIV(extraRootCount); i++) {
  root = GIV(extraRoots)[i];
  if (root == varLoc) {
  GIV(extraRoots)[i] = (GIV(extraRoots)[GIV(extraRootCount)]);

Modified: branches/Cog/stacksrc/vm/interp.h
===================================================================
--- branches/Cog/stacksrc/vm/interp.h 2010-09-19 05:02:37 UTC (rev 2310)
+++ branches/Cog/stacksrc/vm/interp.h 2010-09-19 18:56:42 UTC (rev 2311)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker-oscog.29 uuid: c043454b-2bd2-4f79-8308-9c6c82ecf645
+ CCodeGeneratorGlobalStructure VMMaker-oscog.31 uuid: d80799cf-0dd2-40dd-b3a6-f8bca14bdc3d
  */
 
 #define STACKVM 1