Building an interpreter without inlining.
Dan Ingalls
Dan at SqueakLand.org
Fri Oct 5 15:43:24 UTC 2001
> 3. The following function, the '******' line is wrong. I'm not sure how
>to fix this; I just hacked the generated C file.
>
>context: thisCntx hasSender: aContext
> "Does thisCntx have aContext in its sender chain?"
> | s nilOop |
> self inline: true.
> thisCntx == aContext
> ifTrue: [^ false].
> nilOop _ nilObj.
> s _ self fetchPointer: SenderIndex ofObject: thisCntx.
> [s == nilOop]
> whileFalse: [s == aContext
> ifTrue: [^ true].
> s _ s self fetchPointer: SenderIndex ofObject: s].
> ***********************************************
> ^ false
Scott -
Good catch.
I didn't write this method, but I am certain it should read:
> s _ self fetchPointer: SenderIndex ofObject: s].
The loop is simply crawling up the sender chain (as per the comment).
- Dan
More information about the Squeak-dev
mailing list
|