[m-dev.] diff: stack_layout bug fix
Zoltan Somogyi
zs at cs.mu.OZ.AU
Thu Jul 20 15:02:27 AEST 2000
compiler/stack_layout.m:
Fix bug that only occurs if the list of tvars at a location has a hole,
i.e. tvar N is live but tvar N-1 isn't.
Zoltan.
Index: stack_layout.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.46
diff -u -b -r1.46 stack_layout.m
--- stack_layout.m 2000/05/08 13:48:06 1.46
+++ stack_layout.m 2000/07/20 04:57:24
@@ -1086,12 +1086,11 @@
NextSlot, VectorTail),
Vector = [yes(Rval) | VectorTail]
; TVarNum > CurSlot ->
- stack_layout__construct_type_param_locn_vector(TVarLocns,
- NextSlot, VectorTail),
+ stack_layout__construct_type_param_locn_vector(
+ [TVar - Locns | TVarLocns], NextSlot, VectorTail),
% This slot will never be referred to.
Vector = [yes(const(int_const(0))) | VectorTail]
;
-
error("unsorted tvars in construct_type_param_locn_vector")
).
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list