[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: DECLARE-TYPE-FREE (Version 6)
- To: CL-Cleanup@SAIL.Stanford.EDU
- Subject: Re: Issue: DECLARE-TYPE-FREE (Version 6)
- From: Rob.MacLachlan@WB1.CS.CMU.EDU
- Date: Tue, 06 Dec 88 13:57:12 EST
- Cc: Masinter.pa@Xerox.COM
- In-reply-to: Your message of 05 Dec 88 16:53:00 -0800. <881205-165330-4655@Xerox>
I can't remember the previous proposal, so I don't know if V6 is an
improvement, but it seems to me that there are serious problems in
attempting to invoke dynamic extent in explaining "free" type declarations.
I don't think this proposal is what anyone wants, since it requires the
compiler to prove that any given use isn't within an upward funarg before
it can use the type declaration.
Compilers are much better at understanding static "lexical" relationships
than time relationships. A definition in terms of scope is more useful
than one in terms of extent.
What a compiler writer wants is something like:
Within the scope of the declaration, all references to the variable
will result in a value of the specified type, and all assignments to
the variable will be values of the specified type. This can be modeled
as a source-to-source transformation by wrapping (THE <type> <var>)
around each reference and wrapping (THE <type> <new-value>) around each
expression assigned to the variable.
This version isn't strong enough to ensure that a specialized
representation could be used for the variable within the declaration scope,
since it is possible that the variable is never actually referenced within
the scope, so none of the THE declarations apply.
Perhaps it was the intent of V6 to allow specialized variable