[m-rev.] diff: add some comments to mlds.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Jun 17 18:01:00 AEST 2003
Estimated hours taken: 0.25
Branches: main
compiler/mlds.m:
Add some comments about mlds__array_type vs mlds__mercury_array_type.
Workspace: /home/ceres/fjh/mercury
Index: compiler/mlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds.m,v
retrieving revision 1.102
diff -u -d -r1.102 mlds.m
--- compiler/mlds.m 11 Jun 2003 12:55:27 -0000 1.102
+++ compiler/mlds.m 17 Jun 2003 08:00:01 -0000
@@ -612,6 +612,9 @@
% only classify the topmost level of the type, whereas we
% really want to classify the element type for arrays, so
% we can generate int[] for array(int)).
+ % Note that mlds__mercury_array_type/1 is used for representing
+ % Mercury arrays, whereas mlds__array_type/1 (see below)
+ % is used for representing the target language's native arrays.
; mlds__mercury_array_type(mlds__type)
% The type for the continuation functions used
@@ -668,9 +671,23 @@
% These are single-dimensional, and can be indexed
% using the `field' lval with an `offset' field_id;
% indices start at zero.
- % Currently these are used for static constants
- % that would otherwise be allocated with a `new_object'
- % statement.
+ %
+ % Note that mlds__array_type/1 is used for representing
+ % the target language's native arrays, whereas
+ % mlds__mercury_array_type/1 (see above) is used for
+ % representing Mercury arrays.
+ %
+ % Currently MLDS array types are used for
+ % (a) static constants that would otherwise be allocated
+ % with a `new_object', if we're using the low-level
+ % data representation (--no-high-level-data)
+ % (b) for static constants of certain Mercury types which are
+ % always represented using the low-level data
+ % representation, regardless of --high-level-data,
+ % in particular closures and type_infos.
+ % (c) for any other arrays generated internally by the
+ % MLDS code generator, e.g. the arrays used for
+ % string switches.
; mlds__array_type(mlds__type)
% Pointer types.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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