Missing method in VMMaker-oscog-IgorStasenko.122

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

Missing method in VMMaker-oscog-IgorStasenko.122

Dimitry Golubovsky
 
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.

--
Dimitry Golubovsky

Anywhere on the Web
Reply | Threaded
Open this post in threaded view
|

Re: Missing method in VMMaker-oscog-IgorStasenko.122

Igor Stasenko

On 26 August 2011 03:11, Dimitry Golubovsky <[hidden email]> 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
>



--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: Missing method in VMMaker-oscog-IgorStasenko.122

Igor Stasenko
 
So, the fix is quite simple:
move method (noInlineTemporary: offset in: theFP)
from CoInterpreter class higher to StackInterpreter


--
Best regards,
Igor Stasenko AKA sig.