[MLton-devel] cvs commit: card maps and machine IL semantics change

Matthew Fluet fluet@CS.Cornell.EDU
Mon, 29 Jul 2002 23:09:38 -0400 (EDT)


>   #define ArrayOffset(ty, b, i) (*(ty*)((b) + ((i) * sizeof(ty))))
>   
>   is changed to
>   
>   #define ArrayOffset(ty, b, i) ((b) + ((i) * sizeof(ty)))
>   
>   Matthew, can you please make the relevant change to the native codegen.

I'll look at it, but this breaks the way Operands are used.  ArrayOffset
is no longer a location, it's a value.  I'd really suggest that
ArrayOffset become a Statement.t, which is just stuffed in a pseudo-reg.
Or, since array subscripting probably still uses ArrayOffset, that there
be a new Statement.t that computes an ArrayOffset (say,
ComputeArrayOffset), which would be translated into a lea instruction in
the codegen.

I suspect this will hurt code size and probably execution time.




-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel