Hi,
Stack interpreter does not compile because the method
noInlineTemporary: offset in: theFP
defined only in CoIntepreter, yet it is called from StackInterpreter:
------------------------------------------------------------------------------------------
stObject: array at: index "Return what ST would return for <obj> at: index."
| hdr fmt totalLength fixedFields stSize | <inline: false> hdr := objectMemory baseHeader: array. fmt := objectMemory formatOfHeader: hdr. totalLength := objectMemory lengthOf: array baseHeader: hdr format: fmt. fixedFields := objectMemory fixedFieldsOf: array format: fmt length: totalLength. (fmt = 3 and: [self isContextHeader: hdr]) ifTrue: [stSize := self fetchStackPointerOf: array. ((self oop: index isGreaterThanOrEqualTo: 1) and: [(self oop: index isLessThanOrEqualTo: stSize) and: [self isStillMarriedContext: array]]) ifTrue: [^self noInlineTemporary: index - 1 in: (self frameOfMarriedContext: array)]] " <---- here" ifFalse: [stSize := totalLength - fixedFields]. ((self oop: index isGreaterThanOrEqualTo: 1) and: [self oop: index isLessThanOrEqualTo: stSize]) ifTrue: [^self subscript: array with: (index + fixedFields) format: fmt] ifFalse: [self primitiveFailFor: PrimErrBadIndex. ^ 0]
------------------------------------------------------------------------------------------
Thanks.
On 26 August 2011 03:11, Dimitry Golubovsky golubovsky@gmail.com wrote:
Hi,
Stack interpreter does not compile because the method
noInlineTemporary: offset in: theFP
defined only in CoIntepreter, yet it is called from StackInterpreter:
yes, we need to fix that, but i haven't time to do it right now :)
Thanks.
stObject: array at: index "Return what ST would return for <obj> at: index."
| hdr fmt totalLength fixedFields stSize | <inline: false> hdr := objectMemory baseHeader: array. fmt := objectMemory formatOfHeader: hdr. totalLength := objectMemory lengthOf: array baseHeader: hdr format: fmt. fixedFields := objectMemory fixedFieldsOf: array format: fmt length: totalLength. (fmt = 3 and: [self isContextHeader: hdr]) ifTrue: [stSize := self fetchStackPointerOf: array. ((self oop: index isGreaterThanOrEqualTo: 1) and: [(self oop: index isLessThanOrEqualTo: stSize) and: [self isStillMarriedContext: array]]) ifTrue: [^self noInlineTemporary: index - 1 in: (self frameOfMarriedContext: array)]] " <---- here" ifFalse: [stSize := totalLength - fixedFields]. ((self oop: index isGreaterThanOrEqualTo: 1) and: [self oop: index isLessThanOrEqualTo: stSize]) ifTrue: [^self subscript: array with: (index + fixedFields) format: fmt] ifFalse: [self primitiveFailFor: PrimErrBadIndex. ^ 0]
Thanks.
-- Dimitry Golubovsky
Anywhere on the Web
So, the fix is quite simple: move method (noInlineTemporary: offset in: theFP) from CoInterpreter class higher to StackInterpreter
vm-dev@lists.squeakfoundation.org