Blue Book Implementation chapters online...
Dwight Hughes
dwighth at ipa.net
Mon Jan 18 19:15:43 UTC 1999
Eliot & Linda wrote:
>
> Dwight,
>
> > I have put Chapters 26-30 -- the Implementation -- of "Smalltalk-80: The
> > Language and Its Implementation" (the famous and nearly impossible to
> > find Blue Book) online at my site:
> >
> > http://users.ipa.net/~dwighth/
>
> Great! I took the liberty of putting a reference to this on the
> VisualWorks Swiki at UIUC (brain.cs.uiuc.edu:8080/VisualWorks.1, off the
> "Power Users" page.
Sound good.
> There's an old bug in the following which didn't get fixed in the
> reprint:
>
> primitivePerformWithArgs
> | thisReceiver performSelector argumentArray arrayClass
> arraySize index |
> argumentArray := self popStack.
> arraySize := memory fetchWordLengthOf: argumentArray.
> arrayClass := memory fetchClassOf: argumentArray.
> self success: (stackPointer + arraySize)
> < (memory fetchWordLengthOf: activeContext).
> self success: (arrayClass = ClassArrayPointer)
> self success
> ifTrue: [performSelector := messageSelector.
> messageSelector := self popStack.
> thisReceiver := self stackTop.
> argumentCount := arraySize.
> index := 1.
> [index <= argumentCount]
> whileTrue: [self push: (memory fetchPointer:
> index - 1
> ofObject:
> argumentArray).
> index := index + 1].
> self lookupMethodInClass: (memory fetchClassOf:
> thisReceiver).
> self success: (self argumentCountOf: newMethod) =
> argumentCount.
> self success
> ifTrue: [self executeNewMethod]
> > bug > ifFalse: [self unPop: argumentCount.
> self push: messageSelector.
> self push: argumentArray.
> argumentCount := 2.
> messageSelector := performSelector]]
> ifFalse: [self unPop: 1]
>
> "self unPop: argumentCount" should read "self pop: argumentCount". The
> primitive needs to pop the arguments pushed from the argument array if
> the primitive fails here.
> _______________,,,^..^,,,_______________
> Eliot Miranda, ParcPlace
Thanks! I'll post the corrections this evening.
-- Dwight
More information about the Squeak-dev
mailing list
|