[m-dev.] [reuse] diff: bugfix -- pragma_foreign_code: don't make it too unsafe
Nancy Mazur
Nancy.Mazur at cs.kuleuven.ac.be
Sat Oct 14 02:30:21 AEDT 2000
Hi,
===================================================================
Estimated hours taken: 0.1
Previously our heuristic when dealing with pragma_foreign_code was a
bit too unsafe: make it a bit safer (still keeping the XXXXXXXX).
pa_run.m:
When checking a pragma_foreign_code: if there is exactly one
output var, the heuristic applies only if there are no
inputvars (with which that one output var could have as many
aliases as it would want to).
Index: pa_run.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_run.m,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 pa_run.m
--- pa_run.m 2000/10/13 13:49:37 1.1.2.5
+++ pa_run.m 2000/10/13 15:26:46
@@ -366,12 +366,13 @@
remove_all_unique_vars( HLDS, Trios, NonUniqueVars),
% keep only the output vars
collect_all_output_vars( HLDS, NonUniqueVars, OutputVars),
+ collect_all_input_vars( HLDS, NonUniqueVars, InputVars),
(
(
OutputVars = []
;
% XXXXXXXXXXXXXXXXX !!
- OutputVars = [_]
+ OutputVars = [_], InputVars = []
)
->
A = Ain
--------------------------------------------------------------------------
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