[M3devel] NEW in RTType.m3

Tony Hosking hosking at cs.purdue.edu
Thu Oct 23 12:10:01 CEST 2008


Could be dangerous depending on module link orderings.  Might be  
better to cache your own lookups in your interpreter.

On 23 Oct 2008, at 09:24, Mika Nystrom wrote:

> Hello Modula-3 people,
>
> Does anyone know whether there is anything that prevents using NEW
> in RTType.m3?
>
> I added a lot of memory recycling to the Scheme interpreter I am
> working on, and now it seems it is spending a lot of time in Typecase
> and IsSubtype.  I was wondering if it is possible to memoize IsSubtype
> inside RTType.m3...  (specifically just replacing IsSubtype with an
> array lookup).
>
> It is the nature of the interpreter that it spends a lot of time
> checking types and narrowing things back and forth, as Scheme and
> Modula-3 references share the same representation.
>
>      Mika




More information about the M3devel mailing list