[m-rev.] diff: rename ml_gen_goal_as_block

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Dec 31 19:13:02 AEDT 2007


comiler/ml_code_gen.m:
	Rename a predicate to avoid a name clash.

compiler/ml_code_util.m:
compiler/ml_string_switch.m:
compiler/ml_switch_gen.m:
compiler/ml_tag_switch.m:
	Conform to the rename.

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/ml_code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.207
diff -u -r1.207 ml_code_gen.m
--- compiler/ml_code_gen.m	23 Nov 2007 07:35:13 -0000	1.207
+++ compiler/ml_code_gen.m	30 Dec 2007 14:11:39 -0000
@@ -727,7 +727,7 @@
     % Return the result as a single statement (which may be a block statement
     % containing nested declarations).
     %
-:- pred ml_gen_goal(code_model::in, hlds_goal::in, statement::out,
+:- pred ml_gen_goal_as_block(code_model::in, hlds_goal::in, statement::out,
     ml_gen_info::in, ml_gen_info::out) is det.
 
     % Generate MLDS code for the specified goal in the specified code model.
@@ -1673,7 +1673,7 @@
     % Return the result as a single statement (which may be a block statement
     % containing nested declarations).
     %
-ml_gen_goal(CodeModel, Goal, Statement, !Info) :-
+ml_gen_goal_as_block(CodeModel, Goal, Statement, !Info) :-
     ml_gen_goal(CodeModel, Goal, Decls, Statements, !Info),
     Goal = hlds_goal(_, GoalInfo),
     Context = goal_info_get_context(GoalInfo),
@@ -3516,8 +3516,8 @@
         %       <Then>
 
         CondCodeModel = model_det,
-        ml_gen_goal(model_det, Cond, CondStatement, !Info),
-        ml_gen_goal(CodeModel, Then, ThenStatement, !Info),
+        ml_gen_goal_as_block(model_det, Cond, CondStatement, !Info),
+        ml_gen_goal_as_block(CodeModel, Then, ThenStatement, !Info),
         Decls = [],
         Statements = [CondStatement, ThenStatement]
     ;
@@ -3536,8 +3536,8 @@
         CondCodeModel = model_semi,
         ml_gen_goal(model_semi, Cond, CondDecls, CondStatements, !Info),
         ml_gen_test_success(!.Info, Succeeded),
-        ml_gen_goal(CodeModel, Then, ThenStatement, !Info),
-        ml_gen_goal(CodeModel, Else, ElseStatement, !Info),
+        ml_gen_goal_as_block(CodeModel, Then, ThenStatement, !Info),
+        ml_gen_goal_as_block(CodeModel, Else, ElseStatement, !Info),
         IfStmt = ml_stmt_if_then_else(Succeeded, ThenStatement,
             yes(ElseStatement)),
         IfStatement = statement(IfStmt, mlds_make_context(Context)),
@@ -3594,7 +3594,7 @@
         ThenContext = goal_info_get_context(ThenGoalInfo),
         ml_gen_set_cond_var(!.Info, CondVar, const(mlconst_true), ThenContext,
             SetCondTrue),
-        ml_gen_goal(CodeModel, Then, ThenStatement, !Info),
+        ml_gen_goal_as_block(CodeModel, Then, ThenStatement, !Info),
         ThenFuncBody = ml_gen_block([], [SetCondTrue, ThenStatement],
             ThenContext),
         % pop nesting level
@@ -3603,7 +3603,7 @@
 
         % Generate `if (!cond_<N>) { <Else> }'.
         ml_gen_test_cond_var(!.Info, CondVar, CondSucceeded),
-        ml_gen_goal(CodeModel, Else, ElseStatement, !Info),
+        ml_gen_goal_as_block(CodeModel, Else, ElseStatement, !Info),
         IfStmt = ml_stmt_if_then_else(
             unop(std_unop(logical_not), CondSucceeded),
             ElseStatement, no),
Index: compiler/ml_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_util.m,v
retrieving revision 1.129
diff -u -r1.129 ml_code_util.m
--- compiler/ml_code_util.m	23 Nov 2007 07:35:13 -0000	1.129
+++ compiler/ml_code_util.m	30 Dec 2007 14:12:06 -0000
@@ -2054,7 +2054,7 @@
     conj_list_to_goal(HLDS_TypeInfoGoals, GoalInfo, Conj),
 
     % Convert this HLDS code to MLDS.
-    ml_gen_goal(model_det, Conj, MLDS_TypeInfoStatement0, !Info),
+    ml_gen_goal_as_block(model_det, Conj, MLDS_TypeInfoStatement0, !Info),
 
     % Replace all heap allocation (new_object instructions) with stack
     % allocation (local variable declarations) in the code to construct
Index: compiler/ml_string_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_string_switch.m,v
retrieving revision 1.34
diff -u -r1.34 ml_string_switch.m
--- compiler/ml_string_switch.m	30 Dec 2007 08:23:48 -0000	1.34
+++ compiler/ml_string_switch.m	30 Dec 2007 14:13:50 -0000
@@ -274,7 +274,7 @@
             unexpected(this_file, "ml_gen_string_hash_slot: string expected")
         ),
         StringRval = const(mlconst_string(String)),
-        ml_gen_goal(CodeModel, Goal, GoalStatement, !Info),
+        ml_gen_goal_as_block(CodeModel, Goal, GoalStatement, !Info),
 
         CommentString = "case """ ++ String ++ """",
         Comment = statement(ml_stmt_atomic(comment(CommentString)),
Index: compiler/ml_switch_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_switch_gen.m,v
retrieving revision 1.35
diff -u -r1.35 ml_switch_gen.m
--- compiler/ml_switch_gen.m	30 Dec 2007 08:23:49 -0000	1.35
+++ compiler/ml_switch_gen.m	30 Dec 2007 14:12:30 -0000
@@ -383,7 +383,7 @@
     ;
         ml_gen_tag_test(Var, ConsId, TagTestDecls, TagTestStatements,
             TagTestExpression, !Info),
-        ml_gen_goal(CodeModel, Goal, GoalStatement, !Info),
+        ml_gen_goal_as_block(CodeModel, Goal, GoalStatement, !Info),
         ml_switch_generate_if_then_else_chain(TaggedCases, Var, CodeModel,
             CanFail, Context, RestDecls, RestStatements, !Info),
         Rest = ml_gen_block(RestDecls, RestStatements, Context),
@@ -483,7 +483,7 @@
         ),
         unexpected(this_file, "ml_switch_gen.m: invalid tag type")
     ),
-    ml_gen_goal(CodeModel, Goal, Statement, !Info),
+    ml_gen_goal_as_block(CodeModel, Goal, Statement, !Info),
     MLDS_Case = mlds_switch_case([match_value(Rval)], Statement).
 
     % Generate an appropriate default for a switch.
Index: compiler/ml_tag_switch.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_tag_switch.m,v
retrieving revision 1.25
diff -u -r1.25 ml_tag_switch.m
--- compiler/ml_tag_switch.m	30 Dec 2007 08:23:49 -0000	1.25
+++ compiler/ml_tag_switch.m	30 Dec 2007 14:13:04 -0000
@@ -129,7 +129,7 @@
             GoalList = [_Stag - TaggedCase],
             TaggedCase = tagged_case(_MainTaggedConsId, _OtherTaggedConsIds,
                 Goal),
-            ml_gen_goal(CodeModel, Goal, Statement, !Info)
+            ml_gen_goal_as_block(CodeModel, Goal, Statement, !Info)
         ;
             GoalList = [_, _ | _],
             unexpected(this_file, "more than one goal for non-shared tag")
@@ -161,7 +161,7 @@
                 Goal),
             % There is only one possible matching goal,
             % so we don't need to switch on it.
-            ml_gen_goal(CodeModel, Goal, Statement, !Info)
+            ml_gen_goal_as_block(CodeModel, Goal, Statement, !Info)
         ;
             gen_stag_switch(GoalList, PrimaryTag, SecTagLocn,
                 Var, CodeModel, CaseCanFail, Context, Statement, !Info)
@@ -220,7 +220,7 @@
 gen_stag_case(Case, CodeModel, MLDS_Case, !Info) :-
     Case = Stag - tagged_case(_MainTaggedConsId, _OtherTaggedConsIds, Goal),
     StagRval = const(mlconst_int(Stag)),
-    ml_gen_goal(CodeModel, Goal, Statement, !Info),
+    ml_gen_goal_as_block(CodeModel, Goal, Statement, !Info),
     MLDS_Case = mlds_switch_case([match_value(StagRval)], Statement).
 
 %-----------------------------------------------------------------------------%
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
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 ssdb
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