[m-rev.] for review: merge foreign_type pragma on to the main branch
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Oct 31 22:49:55 AEDT 2001
On 24-Oct-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> +++ compiler/ilasm.m
> @@ -701,8 +701,57 @@
> output_simple_type(string, I, I) --> io__write_string("string").
> output_simple_type(refany, I, I) --> io__write_string("refany").
> output_simple_type(class(Name), Info0, Info) -->
> - io__write_string("class "),
> - output_structured_name(Name, Info0, Info).
> + { Name = structured_name(AssemblyName, QualifiedName, _) },
> + % Parition II section 'Built-in Types' (7.2 in Beta2) states
> + % that all builtin types *must* be rereferenced by their
> + % special encoding. See Parition I 'Built-In Types'
> + % (8.2.2 in Beta2) for the list of all builtin types.
> + (
> + { AssemblyName = assembly("mscorlib") },
> + { QualifiedName = ["System", TypeName] }
> + ->
> + ( { TypeName = "Boolean" } ->
> + output_simple_type(bool, Info0, Info)
...
> output_simple_type(value_class(Name), Info0, Info) -->
> io__write_string("valuetype "),
> output_structured_name(Name, Info0, Info).
`bool' is equivalent to `value class [mscorlib]System.Boolean',
not to `class [mscorlib]System.Boolean'.
So shouldn't the tests for "Boolean" and other builtin
value types be in the `value_class/1' clause,
rather than the `class/1' clause?
--
Fergus Henderson <fjh at cs.mu.oz.au> | "... it seems to me that 15 years of
The University of Melbourne | email is plenty for one lifetime."
WWW: <http://www.cs.mu.oz.au/~fjh> | -- Prof. Donald E. Knuth
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list