[m-dev.] for review:
David Overton
dmo at cs.mu.OZ.AU
Fri May 21 13:08:01 AEST 1999
Hi,
This should ideally be review by Andrew Bromage, if he has time.
Estimated hours taken: 2
compiler/inst_util.m:
Complete the implementation of inst_table_create_sub.
Fix a bug in maybe_inst_table_apply_sub and
maybe_inst_det_table_apply_sub.
Index: inst_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/inst_util.m,v
retrieving revision 1.3.2.18
diff -u -r1.3.2.18 inst_util.m
--- 1.3.2.18 1999/02/21 23:53:12
+++ inst_util.m 1999/05/06 05:17:56
@@ -2418,36 +2418,21 @@
maybe_inst_det_table_apply_sub(UnifyInstTable0, NewUnifyInstTable,
UnifyInstTable, Sub),
-
merge_inst_table_apply_sub(MergeInstTable0, NewMergeInstTable,
MergeInstTable, Sub),
-
substitution_inst_table_apply_sub(SubInstTable0, NewSubInstTable,
SubInstTable, Sub),
-
maybe_inst_det_table_apply_sub(GroundInstTable0, NewGroundInstTable,
GroundInstTable, Sub),
+ maybe_inst_det_table_apply_sub(AnyInstTable0, NewAnyInstTable,
+ AnyInstTable, Sub),
+ maybe_inst_table_apply_sub(SharedInstTable0, NewSharedInstTable,
+ SharedInstTable, Sub),
+ maybe_inst_table_apply_sub(MostlyUniqInstTable0,
+ NewMostlyUniqInstTable, MostlyUniqInstTable, Sub),
+ maybe_inst_table_apply_sub(ClobberedInstTable0,
+ NewClobberedInstTable, ClobberedInstTable, Sub),
- ( map__is_empty(NewAnyInstTable) ->
- AnyInstTable = AnyInstTable0
- ;
- error("NYI: inst_table_create_sub (any_inst_table)")
- ),
- ( map__is_empty(NewSharedInstTable) ->
- SharedInstTable = SharedInstTable0
- ;
- error("NYI: inst_table_create_sub (shared_inst_table)")
- ),
- ( map__is_empty(NewMostlyUniqInstTable) ->
- MostlyUniqInstTable = MostlyUniqInstTable0
- ;
- error("NYI: inst_table_create_sub (mostly_uniq_inst_table)")
- ),
- ( map__is_empty(NewClobberedInstTable) ->
- ClobberedInstTable = ClobberedInstTable0
- ;
- error("NYI: inst_table_create_sub (clobbered_inst_table)")
- ),
inst_table_set_all_tables(InstTable0, SubInstTable, UnifyInstTable,
MergeInstTable, GroundInstTable, AnyInstTable,
SharedInstTable, MostlyUniqInstTable, ClobberedInstTable, IKT,
@@ -2459,7 +2444,7 @@
:- mode maybe_inst_table_apply_sub(in, in, out, in) is det.
maybe_inst_table_apply_sub(Table0, NewTable, Table, Sub) :-
- ( map__is_empty(Table0) ->
+ ( map__is_empty(NewTable) ->
% Optimise common case
Table = Table0
;
@@ -2490,7 +2475,7 @@
:- mode maybe_inst_det_table_apply_sub(in, in, out, in) is det.
maybe_inst_det_table_apply_sub(Table0, NewTable, Table, Sub) :-
- ( map__is_empty(Table0) ->
+ ( map__is_empty(NewTable) ->
% Optimise common case
Table = Table0
;
--
David Overton Department of Computer Science & Software Engineering
MEngSc Student The University of Melbourne, Australia
+61 3 9344 9159 http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
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