[m-rev.] diff: (partially) fix library compiliation in grade java
Julien Fischer
juliensf at cs.mu.OZ.AU
Thu Apr 28 15:48:01 AEST 2005
Estimated hours taken: 1
Branches: main, release
Fix compilation of the standard library in grade java.
Compiling the library from Mercury -> Java now works again.
Compiling the resulting Java code -> bytecode is still broken
because of problems in the Java version of the runtime.
Presumably some of the problems below also affect the IL
backend.
compiler/post_term_analysis.m:
Don't look up hlds_type_defns for builtin types that may
not have them (the termination properties for the special
preds for these types are known anyway).
library/term_size_prof_builtin.m:
Fix errors in the default Mercury clauses for some
procedures in this module; there were some module imports
and purity annotations missing.
Julien.
Workspace:/home/jupiter/juliensf/ws-java
Index: compiler/post_term_analysis.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/post_term_analysis.m,v
retrieving revision 1.2
diff -u -r1.2 post_term_analysis.m
--- compiler/post_term_analysis.m 22 Mar 2005 06:40:18 -0000 1.2
+++ compiler/post_term_analysis.m 28 Apr 2005 05:32:37 -0000
@@ -35,6 +35,8 @@
:- import_module backend_libs.
:- import_module backend_libs.foreign.
+:- import_module check_hlds.type_util.
+
:- import_module hlds.goal_form.
:- import_module hlds.goal_util.
:- import_module hlds.hlds_data.
@@ -117,10 +119,14 @@
warn_non_term_user_special_pred(ModuleInfo, TypeTable,
SpecialPredId - TypeCtor, PredId, !IO) :-
%
- % index predicate cannot be defined by the user and should
+ % index predicates cannot be defined by the user and should
% always terminate in any case.
%
- ( SpecialPredId \= index ->
+ BuiltinTypeCtors = builtin_type_ctors_with_no_hlds_type_defn,
+ (
+ SpecialPredId \= index,
+ not list.member(TypeCtor, BuiltinTypeCtors)
+ ->
map.lookup(TypeTable, TypeCtor, TypeDefn),
get_type_defn_status(TypeDefn, ImportStatus),
(
Index: library/term_size_prof_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/term_size_prof_builtin.m,v
retrieving revision 1.3
diff -u -r1.3 term_size_prof_builtin.m
--- library/term_size_prof_builtin.m 15 Feb 2005 05:22:29 -0000 1.3
+++ library/term_size_prof_builtin.m 28 Apr 2005 05:24:43 -0000
@@ -64,10 +64,13 @@
:- impure pred complexity_redo_proc(complexity_slot::in) is failure.
%---------------------------------------------------------------------------%
+%---------------------------------------------------------------------------%
:- implementation.
:- import_module int.
+:- import_module require.
+:- import_module std_util.
:- pragma foreign_decl("C", "
#ifndef MR_TERM_SIZE_PROFILING_GUARD
@@ -152,7 +155,7 @@
}").
increment_size(_Value, _Incr) :-
- private_builtin__imp.
+ impure private_builtin__imp.
%---------------------------------------------------------------------------%
@@ -200,7 +203,7 @@
").
complexity_is_active(IsActive) :-
- private_builtin__imp,
+ impure private_builtin__imp,
( semidet_succeed ->
error("complexity_mark_active: not implemented")
;
@@ -209,19 +212,19 @@
).
complexity_call_proc(Slot) :-
- private_builtin__imp,
+ impure private_builtin__imp,
% Required only to avoid warnings; never executed.
private_builtin__unsafe_type_cast(0, Slot).
complexity_exit_proc(_Slot) :-
- private_builtin__imp.
+ impure private_builtin__imp.
complexity_fail_proc(_Slot) :-
- private_builtin__imp,
+ impure private_builtin__imp,
fail.
complexity_redo_proc(_Slot) :-
- private_builtin__imp,
+ impure private_builtin__imp,
fail.
%---------------------------------------------------------------------------%
--------------------------------------------------------------------------
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