[m-rev.] for post-commit review: avoid warnings for tabled hlc code

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Aug 13 11:27:06 AEST 2007


Fix a problem that was causing warnings from the C compiler for some of the
versions of the Java parser.

There is no test case, since we don't have a test mechanism for C compiler
warnings.

compiler/foreign.m:
	Return MR_Tuple as the C type that represents Mercury tuples in C,
	since the hlc backend requires this. (We used to generate MR_Word,
	which is what lead to the problem.)

	Rename the functions that generated the foreign language type names,
	both to make their names more expressive and to eliminate the ambiguity
	between them.

	Add a comment about my remaining concerns, and note the link between
	this code and code elsewhere.

	Rename some function symbols to avoid ambiguity.

compiler/ml_code_util.m:
	Rename a predicate to avoid an ambiguity.

compiler/*.m:
	Conform to the renamed predicates and functions.

runtime/mercury_types.h:
runtime/mercury_hlc_types.h:
	Move the definition of MR_Tuple from mercury_hlc_types to
	mercury_types, since foreign.m now generates references to it
	for the low level backend as well.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing boehm_gc/windows-untested
cvs diff: Diffing boehm_gc/windows-untested/vc60
cvs diff: Diffing boehm_gc/windows-untested/vc70
cvs diff: Diffing boehm_gc/windows-untested/vc71
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/export.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/export.m,v
retrieving revision 1.113
diff -u -b -r1.113 export.m
--- compiler/export.m	7 Aug 2007 07:09:52 -0000	1.113
+++ compiler/export.m	12 Aug 2007 07:26:12 -0000
@@ -406,7 +406,7 @@
             \+ is_dummy_argument_type(ModuleInfo, RetType)
         ->
             Export_RetType = foreign.to_exported_type(ModuleInfo, RetType),
-            C_RetType = foreign.to_type_string(lang_c, Export_RetType),
+            C_RetType = exported_type_to_string(lang_c, Export_RetType),
             argloc_to_string(RetArgLoc, RetArgString0),
             convert_type_from_mercury(RetArgString0, RetType, RetArgString),
             MaybeDeclareRetval = "\t" ++ C_RetType ++ " return_value;\n",
@@ -506,7 +506,7 @@
         NameThem = no,
         ArgName = ""
     ),
-    TypeString0 = foreign.to_type_string(lang_c, ModuleInfo, Type),
+    TypeString0 = mercury_exported_type_to_string(ModuleInfo, lang_c, Type),
     ( Mode = top_out ->
         % output variables are passed as pointers
         TypeString = TypeString0 ++ " *"
@@ -532,7 +532,7 @@
         % We need to box non-word-sized foreign types
         % before passing them to Mercury code
         ( foreign.is_foreign_type(Export_Type) = yes(_) ->
-            C_Type = foreign.to_type_string(lang_c, Export_Type),
+            C_Type = exported_type_to_string(lang_c, Export_Type),
             string.append_list(["\tMR_MAYBE_BOX_FOREIGN_TYPE(",
                 C_Type, ", ", ArgName, ", ", ArgLocString, ");\n"], InputArg)
         ;
@@ -569,7 +569,7 @@
         % We need to unbox non-word-sized foreign types
         % before returning them to C code
         ( foreign.is_foreign_type(Export_Type) = yes(_) ->
-            C_Type = foreign.to_type_string(lang_c, Export_Type),
+            C_Type = exported_type_to_string(lang_c, Export_Type),
             string.append_list(["\tMR_MAYBE_UNBOX_FOREIGN_TYPE(", C_Type,
                 ", ", ArgLocString, ", * ", ArgName, ");\n"], OutputArg)
         ;
Index: compiler/fact_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/fact_table.m,v
retrieving revision 1.83
diff -u -b -r1.83 fact_table.m
--- compiler/fact_table.m	17 May 2007 03:52:41 -0000	1.83
+++ compiler/fact_table.m	12 Aug 2007 06:33:45 -0000
@@ -3010,7 +3010,7 @@
     string::out) is det.
 
 generate_arg_decl_code(Name, Type, Module, DeclCode) :-
-    C_Type = to_type_string(lang_c, Module, Type),
+    C_Type = mercury_exported_type_to_string(Module, lang_c, Type),
     string.format("\t\t%s %s;\n", [s(C_Type), s(Name)], DeclCode).
 
 :- pred generate_arg_input_code(string::in, mer_type::in, int::in, int::in,
Index: compiler/foreign.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/foreign.m,v
retrieving revision 1.74
diff -u -b -r1.74 foreign.m
--- compiler/foreign.m	7 Aug 2007 07:09:53 -0000	1.74
+++ compiler/foreign.m	13 Aug 2007 01:24:24 -0000
@@ -86,8 +86,9 @@
     % for use with foreign language interfacing (`pragma export' or
     % `pragma foreign_proc').
     %
-:- func to_type_string(foreign_language, exported_type) = string.
-:- func to_type_string(foreign_language, module_info, mer_type) = string.
+:- func exported_type_to_string(foreign_language, exported_type) = string.
+:- func mercury_exported_type_to_string(module_info, foreign_language,
+    mer_type) = string.
 
     % Filter the decls for the given foreign language.
     % The first return value is the list of matches, the second is
@@ -528,14 +529,14 @@
     have_foreign_type_for_backend(target_c, ForeignTypeBody, Result).
 
 :- type exported_type
-    --->    foreign(sym_name, list(foreign_type_assertion))
+    --->    exported_type_foreign(sym_name, list(foreign_type_assertion))
             % A type defined by a pragma foreign_type, and the assertions
             % on that foreign_type.
 
-    ;       mercury(mer_type).
+    ;       exported_type_mercury(mer_type).
             % Any other mercury type.
 
-non_foreign_type(Type) = mercury(Type).
+non_foreign_type(Type) = exported_type_mercury(Type).
 
 to_exported_type(ModuleInfo, Type) = ExportType :-
     module_info_get_type_table(ModuleInfo, Types),
@@ -547,12 +548,12 @@
         ( Body = hlds_foreign_type(ForeignTypeBody) ->
             foreign_type_body_to_exported_type(ModuleInfo, ForeignTypeBody,
                 ForeignTypeName, _, Assertions),
-            ExportType = foreign(ForeignTypeName, Assertions)
+            ExportType = exported_type_foreign(ForeignTypeName, Assertions)
         ;
-            ExportType = mercury(Type)
+            ExportType = exported_type_mercury(Type)
         )
     ;
-        ExportType = mercury(Type)
+        ExportType = exported_type_mercury(Type)
     ).
 
 foreign_type_body_has_user_defined_eq_comp_pred(ModuleInfo, Body,
@@ -634,30 +635,47 @@
         )
     ).
 
-is_foreign_type(foreign(_, Assertions)) = yes(Assertions).
-is_foreign_type(mercury(_)) = no.
+is_foreign_type(exported_type_foreign(_, Assertions)) = yes(Assertions).
+is_foreign_type(exported_type_mercury(_)) = no.
 
-to_type_string(Lang, ModuleInfo, Type) =
-    to_type_string(Lang, to_exported_type(ModuleInfo, Type)).
+mercury_exported_type_to_string(ModuleInfo, Lang, Type) =
+    exported_type_to_string(Lang, to_exported_type(ModuleInfo, Type)).
 
-to_type_string(lang_c, foreign(ForeignType, _)) = Result :-
-    ( ForeignType = unqualified(Result0) ->
+exported_type_to_string(Lang, ExportedType) = Result :-
+    (
+        ExportedType = exported_type_foreign(ForeignType, _),
+        (
+            Lang = lang_c,
+            (
+                ForeignType = unqualified(Result0),
         Result = Result0
     ;
-        unexpected(this_file, "to_type_string: qualified C type")
-    ).
-to_type_string(lang_csharp, foreign(ForeignType, _)) =
-        sym_name_to_string(ForeignType).
-to_type_string(lang_il, foreign(ForeignType, _)) =
-        sym_name_to_string(ForeignType).
-to_type_string(lang_java, foreign(ForeignType, _)) =
-        sym_name_to_string(ForeignType).
-to_type_string(lang_erlang, foreign(ForeignType, _)) =
-        sym_name_to_string(ForeignType).
-
-    % XXX does this do the right thing for high level data?
-to_type_string(lang_c, mercury(Type)) = Result :-
-    ( Type = builtin_type(BuiltinType) ->
+                ForeignType = qualified(_, _),
+                unexpected(this_file,
+                    "exported_type_to_string: qualified C type")
+            )
+        ;
+            ( Lang = lang_csharp
+            ; Lang = lang_il
+            ; Lang = lang_java
+            ; Lang = lang_erlang
+            ),
+            Result = sym_name_to_string(ForeignType)
+        )
+    ;
+        ExportedType = exported_type_mercury(Type),
+        (
+            Lang = lang_c,
+            % With --high-level-code, the value we return here should agree
+            % with what happens is generated (indirectly) through
+            % mercury_type_to_mlds_type.
+            %
+            % XXX I don't think this is yet true in all cases. -zs
+            %
+            % It is possible that in some cases, the right type name may depend
+            % on whether --high-level-code is set.
+            (
+                Type = builtin_type(BuiltinType),
         (
             BuiltinType = builtin_type_int,
             Result = "MR_Integer"
@@ -672,14 +690,34 @@
             Result = "MR_Char"
         )
     ;
+                Type = tuple_type(_, _),
+                Result = "MR_Tuple"
+            ;
+                % XXX Is MR_Word the right thing for any of these kinds of
+                % types for high level code, with or without high level data?
+                ( Type = defined_type(_, _, _)
+                ; Type = higher_order_type(_, _, _, _)
+                ; Type = apply_n_type(_, _, _)
+                ),
         Result = "MR_Word"
-    ).
-to_type_string(lang_csharp, mercury(_Type)) = _ :-
-    sorry(this_file, "to_type_string for csharp").
-to_type_string(lang_il, mercury(_Type)) = _ :-
-    sorry(this_file, "to_type_string for il").
-to_type_string(lang_java, mercury(Type)) = Result :-
-    ( Type = builtin_type(BuiltinType) ->
+            ;
+                Type = type_variable(_, _),
+                Result = "MR_Word"
+            ;
+                Type = kinded_type(_, _),
+                unexpected(this_file,
+                    "exported_type_to_string: kinded type")
+            )
+        ;
+            Lang = lang_csharp,
+            sorry(this_file, "exported_type_to_string for csharp")
+        ;
+            Lang = lang_il,
+            sorry(this_file, "exported_type_to_string for il")
+        ;
+            Lang = lang_java,
+            (
+                Type = builtin_type(BuiltinType),
         (
             BuiltinType = builtin_type_int,
             Result = "int"
@@ -694,10 +732,20 @@
             Result = "char"
         )
     ;
+                ( Type = tuple_type(_, _)
+                ; Type = defined_type(_, _, _)
+                ; Type = higher_order_type(_, _, _, _)
+                ; Type = apply_n_type(_, _, _)
+                ; Type = type_variable(_, _)
+                ; Type = kinded_type(_, _)
+                ),
         Result = "java.lang.Object"
+            )
+        ;
+            Lang = lang_erlang,
+            sorry(this_file, "exported_type_to_string for erlang")
+        )
     ).
-to_type_string(lang_erlang, mercury(_Type)) = _ :-
-    sorry(this_file, "to_type_string for erlang").
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/make_hlds_passes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_hlds_passes.m,v
retrieving revision 1.70
diff -u -b -r1.70 make_hlds_passes.m
--- compiler/make_hlds_passes.m	25 Jul 2007 06:12:19 -0000	1.70
+++ compiler/make_hlds_passes.m	12 Aug 2007 06:34:53 -0000
@@ -1523,7 +1523,7 @@
 
 global_foreign_type_name(yes, _, _, _) = "MR_Word".
 global_foreign_type_name(no, Lang, ModuleInfo, Type) =
-    to_type_string(Lang, ModuleInfo, Type).
+    mercury_exported_type_to_string(ModuleInfo, Lang, Type).
 
 %-----------------------------------------------------------------------------%
 
Index: compiler/ml_closure_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_closure_gen.m,v
retrieving revision 1.50
diff -u -b -r1.50 ml_closure_gen.m
--- compiler/ml_closure_gen.m	7 Aug 2007 07:09:58 -0000	1.50
+++ compiler/ml_closure_gen.m	12 Aug 2007 06:40:02 -0000
@@ -1183,7 +1183,7 @@
     TypeInfoType = mercury_type_to_mlds_type(ModuleInfo, TypeInfoMercuryType),
     ml_gen_var_lval(!.Info, TypeInfoName, TypeInfoType, TypeInfoLval),
     TypeInfoDecl = ml_gen_mlds_var_decl(var(TypeInfoName), TypeInfoType,
-        no_initializer, gc_no_stmt, MLDS_Context),
+        gc_no_stmt, MLDS_Context),
 
     ml_gen_gc_statement_with_typeinfo(VarName, Type,
         lval(TypeInfoLval), Context, GCStatement0, !Info),
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.202
diff -u -b -r1.202 ml_code_gen.m
--- compiler/ml_code_gen.m	7 Aug 2007 07:09:58 -0000	1.202
+++ compiler/ml_code_gen.m	12 Aug 2007 06:42:03 -0000
@@ -2652,7 +2652,7 @@
         SuccessIndicatorDecl = ml_gen_mlds_var_decl(
             var(SuccessIndicatorVarName),
             mlds_native_bool_type,
-            no_initializer, gc_no_stmt, MLDSContext),
+            gc_no_stmt, MLDSContext),
         SuccessIndicatorLval = var(qual(MLDSModuleName, module_qual,
             SuccessIndicatorVarName), mlds_native_bool_type),
         SuccessIndicatorStatement = ml_gen_assign(SucceededLval,
@@ -2868,7 +2868,7 @@
     % this would only be useful if interfacing to
     % IL when compiling to C, which is not yet supported.
     GCStatement = gc_no_stmt,
-    Defn = ml_gen_mlds_var_decl(var(NonMangledVarName), MLDSType,
+    Defn = ml_gen_mlds_var_decl_init(var(NonMangledVarName), MLDSType,
         Initializer, GCStatement, MLDSContext).
 
     % For ordinary (not model_non) pragma c_proc,
@@ -3132,7 +3132,8 @@
             TypeString = "MR_Word"
         ;
             BoxPolicy = native_if_possible,
-            TypeString = foreign.to_type_string(Lang, ModuleInfo, Type)
+            TypeString = mercury_exported_type_to_string(ModuleInfo, Lang,
+                Type)
         ),
         string.format("\t%s %s;\n", [s(TypeString), s(ArgName)], DeclString)
     ;
@@ -3218,7 +3219,7 @@
     % in the code generated by the Mercury compiler's MLDS back-end. We need
     % to convert this to the appropriate type to use for the C interface.
     ExportedType = foreign.to_exported_type(ModuleInfo, OrigType),
-    TypeString = foreign.to_type_string(Lang, ExportedType),
+    TypeString = exported_type_to_string(Lang, ExportedType),
     IsForeign = foreign.is_foreign_type(ExportedType),
     (
         (
@@ -3406,7 +3407,7 @@
     % to convert this to the appropriate type to use for the C interface.
     ml_gen_info_get_module_info(!.Info, ModuleInfo),
     ExportedType = foreign.to_exported_type(ModuleInfo, OrigType),
-    TypeString = foreign.to_type_string(Lang, ExportedType),
+    TypeString = exported_type_to_string(Lang, ExportedType),
     IsForeign = foreign.is_foreign_type(ExportedType),
     (
         (
Index: compiler/ml_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_util.m,v
retrieving revision 1.123
diff -u -b -r1.123 ml_code_util.m
--- compiler/ml_code_util.m	7 Aug 2007 07:09:59 -0000	1.123
+++ compiler/ml_code_util.m	12 Aug 2007 06:42:36 -0000
@@ -278,7 +278,7 @@
     % and initializer, and given the code to trace it for accurate GC
     % (if needed).
     %
-:- func ml_gen_mlds_var_decl(mlds_data_name, mlds_type, mlds_initializer,
+:- func ml_gen_mlds_var_decl_init(mlds_data_name, mlds_type, mlds_initializer,
     mlds_gc_statement, mlds_context) = mlds_defn.
 
     % Generate declaration flags for a local variable.
@@ -1495,11 +1495,11 @@
         GCStatement, mlds_make_context(Context)).
 
 ml_gen_mlds_var_decl(DataName, MLDS_Type, GCStatement, Context) =
-    ml_gen_mlds_var_decl(DataName, MLDS_Type, no_initializer, GCStatement,
+    ml_gen_mlds_var_decl_init(DataName, MLDS_Type, no_initializer, GCStatement,
         Context).
 
-ml_gen_mlds_var_decl(DataName, MLDS_Type, Initializer, GCStatement, Context) =
-        MLDS_Defn :-
+ml_gen_mlds_var_decl_init(DataName, MLDS_Type, Initializer, GCStatement,
+        Context) = MLDS_Defn :-
     Name = entity_data(DataName),
     Defn = mlds_data(MLDS_Type, Initializer, GCStatement),
     DeclFlags = ml_gen_local_var_decl_flags,
@@ -2303,7 +2303,7 @@
         % and we don't need to trace them.
         GCStatement = gc_no_stmt,
         Context = !.Fixup ^ context,
-        VarDecl = ml_gen_mlds_var_decl(var(VarName), VarType, Initializer,
+        VarDecl = ml_gen_mlds_var_decl_init(var(VarName), VarType, Initializer,
             GCStatement, Context),
         !:Fixup = !.Fixup ^ next_id := NextId,
         !:Fixup= !.Fixup ^ locals := !.Fixup ^ locals ++ [VarDecl],
Index: compiler/ml_optimize.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_optimize.m,v
retrieving revision 1.50
diff -u -b -r1.50 ml_optimize.m
--- compiler/ml_optimize.m	7 May 2007 05:21:32 -0000	1.50
+++ compiler/ml_optimize.m	12 Aug 2007 06:40:19 -0000
@@ -357,8 +357,8 @@
             % We don't need to trace the temporary variables for GC, since they
             % are not live across a call or a heap allocation.
             GCStatement = gc_no_stmt,
-            TempDefn = ml_gen_mlds_var_decl(var(TempName), Type, Initializer,
-                GCStatement, OptInfo ^ context),
+            TempDefn = ml_gen_mlds_var_decl_init(var(TempName), Type,
+                Initializer, GCStatement, OptInfo ^ context),
             TempInitStatement = statement(
                 atomic(assign(var(QualTempName, Type), ArgRval)),
                 OptInfo ^ context),
Index: compiler/mlds_to_c.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.219
diff -u -b -r1.219 mlds_to_c.m
--- compiler/mlds_to_c.m	25 Jul 2007 06:12:22 -0000	1.219
+++ compiler/mlds_to_c.m	12 Aug 2007 06:35:35 -0000
@@ -924,7 +924,7 @@
     io.write_string("MR_ArrayPtr", !IO).
 mlds_output_pragma_export_type(prefix, mercury_type(_, _, ExportedType),
         !IO) :-
-    io.write_string(foreign.to_type_string(lang_c, ExportedType), !IO).
+    io.write_string(exported_type_to_string(lang_c, ExportedType), !IO).
 mlds_output_pragma_export_type(prefix, mlds_cont_type(_), !IO) :-
     io.write_string("MR_Word", !IO).
 mlds_output_pragma_export_type(prefix, mlds_commit_type, !IO) :-
Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.187
diff -u -b -r1.187 mlds_to_il.m
--- compiler/mlds_to_il.m	25 Jul 2007 06:12:22 -0000	1.187
+++ compiler/mlds_to_il.m	12 Aug 2007 06:40:31 -0000
@@ -1397,9 +1397,8 @@
             % accurate GC in the IL back-end -- the .NET runtime
             % system itself provides accurate GC.
             GCStatement = gc_no_stmt,
-            RV = ml_gen_mlds_var_decl(
-                var(VN), RT, no_initializer, GCStatement,
-                Context),
+            RV = ml_gen_mlds_var_decl_init(var(VN), RT, no_initializer,
+                GCStatement, Context),
             Lval = var(qual(ModuleName, module_qual, VN), RT)
         ), RetTypes, ReturnVars, 0, _),
 
Index: compiler/pragma_c_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pragma_c_gen.m,v
retrieving revision 1.107
diff -u -b -r1.107 pragma_c_gen.m
--- compiler/pragma_c_gen.m	7 Aug 2007 07:10:03 -0000	1.107
+++ compiler/pragma_c_gen.m	12 Aug 2007 06:35:50 -0000
@@ -1357,7 +1357,8 @@
         MaybeName = yes(Name),
         (
             BoxPolicy = native_if_possible,
-            OrigTypeString = foreign.to_type_string(lang_c, Module, OrigType)
+            OrigTypeString = mercury_exported_type_to_string(Module, lang_c,
+                OrigType)
         ;
             BoxPolicy = always_boxed,
             OrigTypeString = "MR_Word"
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/base64
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/fixed
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_allegro
cvs diff: Diffing extras/graphics/mercury_allegro/examples
cvs diff: Diffing extras/graphics/mercury_allegro/samples
cvs diff: Diffing extras/graphics/mercury_allegro/samples/demo
cvs diff: Diffing extras/graphics/mercury_allegro/samples/mandel
cvs diff: Diffing extras/graphics/mercury_allegro/samples/pendulum2
cvs diff: Diffing extras/graphics/mercury_allegro/samples/speed
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/log4m
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/mopenssl
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/net
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/posix/samples
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_hlc_types.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_hlc_types.h,v
retrieving revision 1.6
diff -u -b -r1.6 mercury_hlc_types.h
--- runtime/mercury_hlc_types.h	29 Mar 2006 08:07:54 -0000	1.6
+++ runtime/mercury_hlc_types.h	12 Aug 2007 14:16:41 -0000
@@ -94,11 +94,6 @@
   typedef MR_Word MR_Mercury_Base_TypeClass_Info;
 #endif
 
-/*
-** Tuples are always just arrays of polymorphic terms.
-*/
-typedef MR_Box *MR_Tuple;
-
 #endif	/* MR_HIGHLEVEL_CODE */
 
 #endif	/* MERCURY_HLC_TYPES_H */
Index: runtime/mercury_types.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_types.h,v
retrieving revision 1.49
diff -u -b -r1.49 mercury_types.h
--- runtime/mercury_types.h	13 Feb 2007 01:59:00 -0000	1.49
+++ runtime/mercury_types.h	12 Aug 2007 14:16:43 -0000
@@ -181,6 +181,16 @@
 #endif
 
 /*
+** Tuples are always just arrays of polymorphic terms.
+*/
+#ifdef MR_HIGHLEVEL_CODE
+  typedef MR_Box    *MR_Tuple;
+#else
+  typedef MR_Word   MR_Tuple;
+#endif
+
+
+/*
 ** These typedefs are forward declarations, used to avoid circular dependencies
 ** between header files.
 */
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/standalone_c
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/solver_types
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/par_conj
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list