<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 04.04.2013, at 13:25, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Thu, Apr 4, 2013 at 3:17 AM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">&nbsp;<br><div dir="ltr"><div>Yes, I always wanted to ask what oops signed-ness was good for?<br></div></div></blockquote></div></blockquote><div><br></div><div>An undeclared variable in C has the type "int". So in theory you could leave out pretty much all type declarations in the generated code, making it more readable.</div><div><br></div><div>(Not sure if that was actually the reason. Likely the original implementers were not aware of the dangers of signed vs unsigned in C)</div><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; font-family: 'Lucida Grande'; font-size: 12px; "><div style="font-family: Helvetica; ">- Bert -</div><br class="Apple-interchange-newline"></span></div></div><br><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div dir="ltr">IMO, they could simply be declared usqInt.<br>
</div></blockquote><div><br></div><div>+10 raisedTo: SmallInteger maxVal. &nbsp;But the milk is already spilt :)</div><div>&nbsp;</div><div>I'm glad you said that. &nbsp;I'm reminded of House of Cards. &nbsp;"You might think so but I couldn't possibly comment." ;)</div>
<div><br></div><div>It might be worth-while trying to make this change and fixing the very few places where signedness is important (the SmalInteger arithmetic primitives).</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Nicolas</div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/4/4 Esteban Lorenzano <span dir="ltr">&lt;<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
oh, well... I think I have a 100% reproducible case, which is already something &nbsp;:)<br>
<br>
anyway, I will integrate your changes tomorrow or monday :)<br>
<br>
cheers,<br>
Esteban<br>
<div><br>
On Apr 4, 2013, at 1:37 AM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>&gt; wrote:<br>
<br>
&gt; On 4 April 2013 00:37, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Guys, please integrate this asap. &nbsp;This is a horrible bug that is probably<br>
&gt;&gt; causing all sorts of crashes in large images on linux, and should have been<br>
&gt;&gt; generally causing horrible crashes all over the place. &nbsp;Bugs are good at<br>
&gt;&gt; lurking :-/.<br>
&gt;&gt;<br>
&gt;<br>
&gt; Glad we have less and less of them. Thanks for your effort, Eliot!<br>
&gt;<br>
&gt; I am currently at some remote place in Switzerland ;) , and cannot do<br>
&gt; much right now..<br>
&gt; We're also have an interesting bug with pharo VM which (i guess)<br>
&gt; related to some stack (mis)balancing,<br>
&gt; we have a reproducible case where running code given you SmallInteger&gt;&gt;DNU...<br>
&gt; because some SmallInteger pops up on the stack at some point. At least<br>
&gt; it doesn't causing VM crash.<br>
&gt; But i had no time to investigate that. Esteban, do you having any new<br>
&gt; details on that?<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Apr 3, 2013 at 3:27 PM, &lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
&gt;&gt;&gt; <a href="http://source.squeak.org/VMMaker/VMMaker.oscog-eem.281.mcz" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-eem.281.mcz</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ==================== Summary ====================<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Name: VMMaker.oscog-eem.281<br>
&gt;&gt;&gt; Author: eem<br>
&gt;&gt;&gt; Time: 3 April 2013, 3:27:02.058 pm<br>
&gt;&gt;&gt; UUID: 64be55df-6421-4087-a712-5c07419806c7<br>
&gt;&gt;&gt; Ancestors: VMMaker.oscog-eem.280<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cogit: Fix *HORRIBLE* yet ancient bug with the CogObjectRep.<br>
&gt;&gt;&gt; Both CogObjectRepresentationForSqueakV3&gt;&gt;couldBeObject: &amp;<br>
&gt;&gt;&gt; CogObjectRepresentationForSqueakV3&gt;&gt;shouldAnnotateObjectReference:<br>
&gt;&gt;&gt; used signed comparisons for oops and so once the heap size<br>
&gt;&gt;&gt; pushes oops into the upper half of the address space constant<br>
&gt;&gt;&gt; oops in machine code were no longer being updated by the GC.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; StackInterpreter: reqrite the login for printing methods so that<br>
&gt;&gt;&gt; printing the frame of a bad receiver won't seg fault.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; =============== Diff against VMMaker.oscog-eem.280 ===============<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was changed:<br>
&gt;&gt;&gt; &nbsp;----- Method: CogObjectRepresentationForSqueakV3&gt;&gt;couldBeObject: (in<br>
&gt;&gt;&gt; category 'garbage collection') -----<br>
&gt;&gt;&gt; &nbsp;couldBeObject: oop<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;^(objectMemory isNonIntegerObject: oop)<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; and: [self oop: oop isGreaterThanOrEqualTo: objectMemory<br>
&gt;&gt;&gt; nilObject]!<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; and: [oop asUnsignedInteger &gt;= objectMemory nilObject]!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was changed:<br>
&gt;&gt;&gt; &nbsp;----- Method:<br>
&gt;&gt;&gt; CogObjectRepresentationForSqueakV3&gt;&gt;shouldAnnotateObjectReference: (in<br>
&gt;&gt;&gt; category 'garbage collection') -----<br>
&gt;&gt;&gt; &nbsp;shouldAnnotateObjectReference: anOop<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;"self assert: ((objectMemory isIntegerObject: anOop)<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;or: [objectMemory addressCouldBeObj:<br>
&gt;&gt;&gt; anOop])."<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;^(objectMemory isNonIntegerObject: anOop)<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; and: [self oop: anOop isGreaterThan: objectMemory trueObject]!<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; and: [anOop &gt; objectMemory trueObject]!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was changed:<br>
&gt;&gt;&gt; &nbsp;----- Method: StackInterpreter class&gt;&gt;requiredMethodNames (in category<br>
&gt;&gt;&gt; 'translation') -----<br>
&gt;&gt;&gt; &nbsp;requiredMethodNames<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;"return the list of method names that should be retained for<br>
&gt;&gt;&gt; export or other support reasons"<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;| requiredList |<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;requiredList := self exportAPISelectors.<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;requiredList addAll: NewObjectMemory requiredMethodNames.<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;"A number of methods required by VM support code, jitter, specific<br>
&gt;&gt;&gt; platforms etc"<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;requiredList addAll: #(<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;assertValidExecutionPointe:r:s:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;characterForAscii: checkedLongAt:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delayExpired<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; findClassOfMethod:forReceiver: findSelectorOfMethod:<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; findClassOfMethod:forReceiver:<br>
&gt;&gt;&gt; findSelectorOfMethod:forReceiver:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;forceInterruptCheck<br>
&gt;&gt;&gt; forceInterruptCheckFromHeartbeat fullDisplayUpdate<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;getCurrentBytecode getFullScreenFlag getInterruptKeycode<br>
&gt;&gt;&gt; getInterruptPending<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;getSavedWindowSize getThisSessionID<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;highBit:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;interpret<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;loadInitialContext<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oopFromChunk:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;primitiveFail primitiveFailFor:<br>
&gt;&gt;&gt; primitiveFlushExternalPrimitives printAllStacks printCallStack printContext:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printExternalHeadFrame printFramesInPage:<br>
&gt;&gt;&gt; printFrame: printHeadFrame printMemory printOop:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printStackPages printStackPageList<br>
&gt;&gt;&gt; printStackPagesInUse printStackPageListInUse<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;readableFormat: readImageFromFile:HeapSize:StartingAt:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setFullScreenFlag: setInterruptKeycode:<br>
&gt;&gt;&gt; setInterruptPending: setInterruptCheckChain:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setSavedWindowSize: success:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;validInstructionPointer:inMethod:framePointer:).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;"Nice to actually have all the primitives available"<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;requiredList addAll: (self primitiveTable select: [:each| each<br>
&gt;&gt;&gt; isSymbol]).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;"InterpreterProxy is the internal analogue of sqVirtualMachine.c,<br>
&gt;&gt;&gt; so make sure to keep all those"<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;InterpreterProxy organization categories do:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[:cat |<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;((cat ~= 'initialize') and: [cat ~= 'private']) ifTrue:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[requiredList addAll: (InterpreterProxy<br>
&gt;&gt;&gt; organization listAtCategoryNamed: cat)]].<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;^requiredList!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was added:<br>
&gt;&gt;&gt; + ----- Method: StackInterpreter&gt;&gt;addressCouldBeClassObj: (in category<br>
&gt;&gt;&gt; 'debug support') -----<br>
&gt;&gt;&gt; + addressCouldBeClassObj: maybeClassObj<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; "Answer if maybeClassObj looks like a class object"<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &lt;inline: false&gt;<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; ^(objectMemory addressCouldBeObj: maybeClassObj)<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; and: [((objectMemory isPointersNonInt: maybeClassObj) and:<br>
&gt;&gt;&gt; [(objectMemory lengthOf: maybeClassObj) &gt;= 3])<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; and: [(objectMemory isPointersNonInt: (objectMemory<br>
&gt;&gt;&gt; fetchPointer: SuperclassIndex ofObject: maybeClassObj))<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; and: [(objectMemory isPointersNonInt: (objectMemory<br>
&gt;&gt;&gt; fetchPointer: MethodDictionaryIndex ofObject: maybeClassObj))<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; and: [(objectMemory isIntegerObject: (objectMemory fetchPointer:<br>
&gt;&gt;&gt; InstanceSpecificationIndex ofObject: maybeClassObj))]]]]!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was added:<br>
&gt;&gt;&gt; + ----- Method: StackInterpreter&gt;&gt;findClassContainingMethod:startingAt:<br>
&gt;&gt;&gt; (in category 'debug support') -----<br>
&gt;&gt;&gt; + findClassContainingMethod: meth startingAt: classObj<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; | currClass classDict classDictSize methodArray i |<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; currClass := classObj.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; [classDict := objectMemory fetchPointer: MethodDictionaryIndex<br>
&gt;&gt;&gt; ofObject: currClass.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp;classDictSize := objectMemory fetchWordLengthOf: classDict.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp;methodArray := objectMemory fetchPointer: MethodArrayIndex<br>
&gt;&gt;&gt; ofObject: classDict.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp;i := 0.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp;[i &lt; (classDictSize - SelectorStart)] whileTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [meth = (objectMemory fetchPointer: i ofObject:<br>
&gt;&gt;&gt; methodArray) ifTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^currClass].<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i := i + 1].<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp;currClass := self superclassOf: currClass.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp;currClass = objectMemory nilObject] whileFalse.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; ^currClass &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"method not found in superclass chain"!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was changed:<br>
&gt;&gt;&gt; &nbsp;----- Method: StackInterpreter&gt;&gt;findClassOfMethod:forReceiver: (in<br>
&gt;&gt;&gt; category 'debug support') -----<br>
&gt;&gt;&gt; &nbsp;findClassOfMethod: meth forReceiver: rcvr<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; | rclass |<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; (objectMemory addressCouldBeOop: rcvr) ifTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [rclass := objectMemory fetchClassOf: rcvr.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(self addressCouldBeClassObj: rclass) ifTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [rclass := self findClassContainingMethod: meth<br>
&gt;&gt;&gt; startingAt: rclass.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rclass ~= objectMemory nilObject ifTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^rclass]]].<br>
&gt;&gt;&gt; -<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; | rclass currClass classDict classDictSize methodArray i |<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;(objectMemory addressCouldBeObj: meth) ifFalse:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[^objectMemory nilObject].<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; ^self findClassContainingMethod: meth startingAt: (self<br>
&gt;&gt;&gt; methodClassOf: meth)!<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; (objectMemory addressCouldBeOop: rcvr)<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifTrue: [rclass := objectMemory fetchClassOf: rcvr]<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifFalse: [rclass := self methodClassOf: meth].<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; currClass := rclass.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; [classDict := objectMemory fetchPointer: MethodDictionaryIndex<br>
&gt;&gt;&gt; ofObject: currClass.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;classDictSize := objectMemory fetchWordLengthOf: classDict.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;methodArray := objectMemory fetchPointer: MethodArrayIndex<br>
&gt;&gt;&gt; ofObject: classDict.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;i := 0.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;[i &lt; (classDictSize - SelectorStart)] whileTrue:<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [meth = (objectMemory fetchPointer: i ofObject:<br>
&gt;&gt;&gt; methodArray) ifTrue:<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^currClass].<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i := i + 1].<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;currClass := self superclassOf: currClass.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;currClass = objectMemory nilObject] whileFalse.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; ^rclass &nbsp; &nbsp; &nbsp; &nbsp; "method not found in superclass chain"!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was added:<br>
&gt;&gt;&gt; + ----- Method: StackInterpreter&gt;&gt;findSelectorOfMethod: (in category<br>
&gt;&gt;&gt; 'debug support') -----<br>
&gt;&gt;&gt; + findSelectorOfMethod: meth<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; | classObj classDict classDictSize methodArray i |<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; (objectMemory addressCouldBeObj: meth) ifFalse:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^objectMemory nilObject].<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; classObj := self methodClassOf: meth.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; (self addressCouldBeClassObj: classObj) ifTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [classDict := objectMemory fetchPointer:<br>
&gt;&gt;&gt; MethodDictionaryIndex ofObject: classObj.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;classDictSize := objectMemory fetchWordLengthOf:<br>
&gt;&gt;&gt; classDict.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;methodArray := objectMemory fetchPointer:<br>
&gt;&gt;&gt; MethodArrayIndex ofObject: classDict.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i := 0.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[i &lt;= (classDictSize - SelectorStart)] whileTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [meth = (objectMemory fetchPointer: i ofObject:<br>
&gt;&gt;&gt; methodArray) ifTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^(objectMemory fetchPointer: i +<br>
&gt;&gt;&gt; SelectorStart ofObject: classDict)].<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i := i + 1]].<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; ^objectMemory nilObject!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was removed:<br>
&gt;&gt;&gt; - ----- Method: StackInterpreter&gt;&gt;findSelectorOfMethod:forReceiver: (in<br>
&gt;&gt;&gt; category 'debug support') -----<br>
&gt;&gt;&gt; - findSelectorOfMethod: meth forReceiver: rcvr<br>
&gt;&gt;&gt; -<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; | currClass classDict classDictSize methodArray i |<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; (objectMemory addressCouldBeObj: meth) ifFalse:<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^objectMemory nilObject].<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; (objectMemory addressCouldBeOop: rcvr)<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifTrue: [currClass := objectMemory fetchClassOf: rcvr]<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifFalse: [currClass := self methodClassOf: meth].<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; [classDict := objectMemory fetchPointer: MethodDictionaryIndex<br>
&gt;&gt;&gt; ofObject: currClass.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;classDictSize := objectMemory fetchWordLengthOf: classDict.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;methodArray := objectMemory fetchPointer: MethodArrayIndex<br>
&gt;&gt;&gt; ofObject: classDict.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;i := 0.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;[i &lt;= (classDictSize - SelectorStart)] whileTrue:<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [meth = (objectMemory fetchPointer: i ofObject:<br>
&gt;&gt;&gt; methodArray) ifTrue:<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [^(objectMemory fetchPointer: i + SelectorStart<br>
&gt;&gt;&gt; ofObject: classDict)].<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i := i + 1].<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;currClass := self superclassOf: currClass.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp;currClass = objectMemory nilObject] whileFalse.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; ^currClass &nbsp; &nbsp;"method not found in superclass chain"!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was changed:<br>
&gt;&gt;&gt; &nbsp;----- Method:<br>
&gt;&gt;&gt; StackInterpreter&gt;&gt;printActivationNameFor:receiver:isBlock:firstTemporary:<br>
&gt;&gt;&gt; (in category 'debug printing') -----<br>
&gt;&gt;&gt; &nbsp;printActivationNameFor: aMethod receiver: anObject isBlock: isBlock<br>
&gt;&gt;&gt; firstTemporary: maybeMessage<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; | methClass methodSel classObj |<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; | methClass methodSel |<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;inline: false&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;isBlock ifTrue:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[self print: '[] in '].<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;methClass := self findClassOfMethod: aMethod forReceiver:<br>
&gt;&gt;&gt; anObject.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; methodSel := self findSelectorOfMethod: aMethod.<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; ((objectMemory addressCouldBeOop: anObject)<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp;and: [self addressCouldBeClassObj: (classObj := objectMemory<br>
&gt;&gt;&gt; fetchClassOf: anObject)])<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; methodSel := self findSelectorOfMethod: aMethod forReceiver:<br>
&gt;&gt;&gt; anObject.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; (objectMemory addressCouldBeOop: anObject)<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [classObj = methClass<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [(objectMemory fetchClassOf: anObject) = methClass<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [self printNameOfClass: methClass<br>
&gt;&gt;&gt; count: 5]<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse:<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [self printNameOfClass: classObj<br>
&gt;&gt;&gt; count: 5.<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [self printNameOfClass:<br>
&gt;&gt;&gt; (objectMemory fetchClassOf: anObject) count: 5.<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self print: '('.<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self printNameOfClass: methClass<br>
&gt;&gt;&gt; count: 5.<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self print: ')']]<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [self print: 'INVALID RECEIVER'].<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;self print: '&gt;'.<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;(objectMemory addressCouldBeOop: methodSel)<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[methodSel = objectMemory nilObject<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifTrue: [self print: '?']<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [self printStringOf: methodSel]]<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ifFalse: [self print: 'INVALID SELECTOR'].<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;(methodSel = (objectMemory splObj: SelectorDoesNotUnderstand)<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;and: [(objectMemory addressCouldBeObj: maybeMessage)<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;and: [(objectMemory fetchClassOf: maybeMessage) = (objectMemory<br>
&gt;&gt;&gt; splObj: ClassMessage)]]) ifTrue:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;["print arg message selector"<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;methodSel := objectMemory fetchPointer:<br>
&gt;&gt;&gt; MessageSelectorIndex ofObject: maybeMessage.<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self print: ' '.<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self printStringOf: methodSel]!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was changed:<br>
&gt;&gt;&gt; &nbsp;----- Method: StackInterpreter&gt;&gt;selectorOfContext: (in category 'debug<br>
&gt;&gt;&gt; printing') -----<br>
&gt;&gt;&gt; &nbsp;selectorOfContext: aContext<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;(objectMemory isContext: aContext) ifFalse:<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[^nil].<br>
&gt;&gt;&gt; + &nbsp; &nbsp; &nbsp; ^self findSelectorOfMethod: (objectMemory fetchPointer:<br>
&gt;&gt;&gt; MethodIndex ofObject: aContext)!<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; ^self<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; findSelectorOfMethod: (objectMemory fetchPointer:<br>
&gt;&gt;&gt; MethodIndex ofObject: aContext)<br>
&gt;&gt;&gt; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; forReceiver: &nbsp;(objectMemory fetchPointer: ReceiverIndex<br>
&gt;&gt;&gt; ofObject: aContext)!<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; best,<br>
&gt;&gt; Eliot<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Best regards,<br>
&gt; Igor Stasenko.<br>
<br>
</div></blockquote></div><br></div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</blockquote></div><br></body></html>