[m-rev.] diff: IL back-end: fix unknown_type in ml_elim_nested
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Jul 15 05:36:55 AEST 2001
It looks like putting nondet environments on the stack for the IL back-end
will require a fair bit more work. In the mean time, there were a few parts
of the change for that which I posted earlier that are worth extracting out
and committing separately. Here's the first of them.
----------
Estimated hours taken: 1
Branches: main
compiler/ml_elim_nested.m:
Fix up the type of the env_ptr variable, so that it doesn't remain
"mlds__unknown_type".
The old behaviour of leaving the type not filled in properly was
causing problems for the IL back-end, because mlds_type_to_ilds_type
can't handle mlds__unknown_type.
Workspace: /mnt/mars/home/mars/fjh/ws2/mercury
Index: compiler/ml_elim_nested.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_elim_nested.m,v
retrieving revision 1.35
diff -u -d -r1.35 ml_elim_nested.m
--- compiler/ml_elim_nested.m 2001/07/13 10:27:44 1.35
+++ compiler/ml_elim_nested.m 2001/07/14 19:20:07
@@ -1141,6 +1141,15 @@
Tag = yes(0),
Lval = field(Tag, EnvPtr, FieldName, FieldType, EnvPtrVarType)
;
+ % Check for references to the env_ptr itself.
+ % For those, the code generator will have left the
+ % type as mlds__unknown_type, and we need to fill
+ % it in here.
+ ThisVarName = mlds__var_name("env_ptr", no),
+ ThisVarType = mlds__unknown_type
+ ->
+ Lval = var(ThisVar, EnvPtrVarType)
+ ;
%
% leave everything else unchanged
%
--
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