[M3devel] loophole/copysign

Rodney M. Bates rodney_bates at lcwb.coop
Wed Jul 7 00:41:55 CEST 2010



Tony Hosking wrote:
> A designator is something that can be assigned to as well as read from.  
> It says nothing about it being in memory.  A value cannot be assigned to.
> 

Not necessarily.  There are writable designators and readonly designators.
The only things I find that can spontaneously produce a readonly designator
are a READONLY formal and a FOR local.  Several things produce writable
designators,  Lots of things propagate designator-ness around, and
sometimes writability too.  E.g., subscripting an array propagates each of
these properties independently from the array to the selected element.

ADR, BITSIZE, BYTESIZE, and ADRSIZE can be applied to a readonly designator
(but not to a non-designator).  Assignment, passing to a VAR formal, and DISPOSE
require a writable designator.  Although it is really an implementation-
level distinction, these pretty well imply that a designator will have to
be in memory.  Not necessarily the converse, as, for example, a compiler
could very well store the result of A+B in memory, but the language still
forbids applying ADR to it, etc., leaving the compiler a choice.


> On 5 Jul 2010, at 06:42, Jay K wrote:
> 
>> Tony, et. al.. in m3front/src/exprs/CastExpr.m3..what's the difference between a "designator" and a "value"?
>



More information about the M3devel mailing list