|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
diff: fix mantis bug 113Fix Mantis bug 113. Unfortunately, even without bug 113, the program
has an error, so there is no simple way to add it as a test case. Getting rid of the error would take away the raison d'etre of the test. compiler/mercury_compile_front_end.m: Call the part of post_typecheck that fixes up the interface of predicates directly from here, not from purity.m. purity.m was calling this part first thing anyway, so there was no point in doing this from purity.m in the first place. Doing it from the top level allows us to stop doing purity checking (and thus post_typecheck) on the definitions of predicates if the program had a type error. Bug 113 was caused by an operation of post_typecheck on a goal that (previously incorrectly, now correctly) assumes the absence of type errors. Move the main (-v) progress messages here from purity.m as well, since here is where they are printed for other compiler passes. compiler/purity.m: Conform to the changes above, and fix some bitrot in old documentation. compiler/post_typecheck.m: Delete an unused predicate, and fix some bad programming style. 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/mercury_compile_front_end.m =================================================================== RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile_front_end.m,v retrieving revision 1.1 diff -u -b -r1.1 mercury_compile_front_end.m --- compiler/mercury_compile_front_end.m 14 Oct 2009 05:28:38 -0000 1.1 +++ compiler/mercury_compile_front_end.m 16 Oct 2009 06:29:09 -0000 @@ -75,6 +75,7 @@ :- import_module check_hlds.mode_constraints. :- import_module check_hlds.modes. :- import_module check_hlds.polymorphism. +:- import_module check_hlds.post_typecheck. :- import_module check_hlds.purity. :- import_module check_hlds.simplify. :- import_module check_hlds.stratify. @@ -97,6 +98,7 @@ :- import_module benchmarking. :- import_module bool. +:- import_module int. :- import_module maybe. :- import_module pair. :- import_module set. @@ -245,21 +247,29 @@ !:FoundError = yes, io.set_exit_status(1, !IO) ; - puritycheck(Verbose, Stats, !HLDS, FoundTypeError, - FoundPostTypecheckError, !Specs, !IO), - maybe_dump_hlds(!.HLDS, 20, "puritycheck", !DumpInfo, !IO), - - !:FoundError = !.FoundError `or` FoundTypeError, + % Only report error messages for unbound type variables if we didn't + % get any type errors already; this avoids a lot of spurious + % diagnostics. + PostTypeCheckReportErrors = bool.not(FoundTypeError), + module_info_predids(PredIds, !HLDS), + post_typecheck_finish_preds(PredIds, PostTypeCheckReportErrors, + NumPostTypeCheckErrors, !HLDS, !Specs), + maybe_dump_hlds(!.HLDS, 19, "post_typecheck", !DumpInfo, !IO), % Stop here if `--typecheck-only' was specified. globals.lookup_bool_option(Globals, typecheck_only, TypecheckOnly), ( - TypecheckOnly = yes + TypecheckOnly = yes, + ( NumPostTypeCheckErrors > 0 -> + !:FoundError = yes + ; + true + ) ; TypecheckOnly = no, ( ( FoundTypeError = yes - ; FoundPostTypecheckError = yes + ; NumPostTypeCheckErrors > 0 ) -> % XXX It would be nice if we could go on and mode-check the @@ -269,6 +279,9 @@ % are not type-correct. !:FoundError = yes ; + puritycheck(Verbose, Stats, !HLDS, !Specs, !IO), + maybe_dump_hlds(!.HLDS, 20, "puritycheck", !DumpInfo, !IO), + % Substitute implementation-defined literals before clauses are % written out to `.opt' files. subst_implementation_defined_literals(Verbose, Stats, !HLDS, @@ -480,17 +493,16 @@ %-----------------------------------------------------------------------------% :- pred puritycheck(bool::in, bool::in, module_info::in, module_info::out, - bool::in, bool::out, list(error_spec)::in, list(error_spec)::out, io::di, io::uo) is det. -puritycheck(Verbose, Stats, !HLDS, FoundTypeError, FoundPostTypecheckError, - !Specs, !IO) :- - puritycheck_module(FoundTypeError, FoundPostTypecheckError, !HLDS, - [], PuritySpecs), +puritycheck(Verbose, Stats, !HLDS, !Specs, !IO) :- + maybe_write_string(Verbose, "% Purity-checking clauses...\n", !IO), + puritycheck_module(!HLDS, [], PuritySpecs), !:Specs = PuritySpecs ++ !.Specs, module_info_get_globals(!.HLDS, Globals), PurityErrors = contains_errors(Globals, PuritySpecs), maybe_write_out_errors(Verbose, Globals, !HLDS, !Specs, !IO), + maybe_report_stats(Stats, !IO), ( PurityErrors = yes, maybe_write_string(Verbose, Index: compiler/post_typecheck.m =================================================================== RCS file: /home/mercury/mercury1/repository/mercury/compiler/post_typecheck.m,v retrieving revision 1.137 diff -u -b -r1.137 post_typecheck.m --- compiler/post_typecheck.m 8 Sep 2009 02:43:36 -0000 1.137 +++ compiler/post_typecheck.m 16 Oct 2009 06:29:09 -0000 @@ -78,14 +78,6 @@ :- pred post_typecheck_finish_imported_pred_no_io(module_info::in, list(proc_id)::out, pred_info::in, pred_info::out) is det. - % For ill-typed preds, we just need to set the modes up correctly - % so that any calls to that pred from correctly-typed predicates - % won't result in spurious mode errors. - % -:- pred post_typecheck_finish_ill_typed_pred(module_info::in, pred_id::in, - pred_info::in, pred_info::out, - list(error_spec)::in, list(error_spec)::out) is det. - % Now that the assertion has finished being typechecked, remove it % from further processing and store it in the assertion_table. % @@ -566,12 +558,6 @@ post_typecheck_finish_pred_no_io(ModuleInfo, ErrorProcs, !PredInfo) :- propagate_types_into_modes(ModuleInfo, ErrorProcs, !PredInfo). -post_typecheck_finish_ill_typed_pred(ModuleInfo, PredId, !PredInfo, !Specs) :- - propagate_types_into_modes(ModuleInfo, ErrorProcs, !PredInfo), - report_unbound_inst_vars(ModuleInfo, PredId, ErrorProcs, !PredInfo, - !Specs), - check_for_indistinguishable_modes(ModuleInfo, PredId, !PredInfo, !Specs). - % For imported preds, we just need to ensure that all constructors % occurring in predicate mode declarations are module qualified. % @@ -875,7 +861,8 @@ pred_info_get_procedures(!.PredInfo, Procs0), ProcIds = pred_info_procids(!.PredInfo), propagate_types_into_proc_modes(ModuleInfo, ProcIds, ArgTypes, - [], ErrorProcIds, Procs0, Procs), + [], RevErrorProcIds, Procs0, Procs), + ErrorProcIds = list.reverse(RevErrorProcIds), pred_info_set_procedures(Procs, !PredInfo). %-----------------------------------------------------------------------------% @@ -884,10 +871,9 @@ list(mer_type)::in, list(proc_id)::in, list(proc_id)::out, proc_table::in, proc_table::out) is det. -propagate_types_into_proc_modes(_, [], _, - ErrorProcIds, list.reverse(ErrorProcIds), !Procs). +propagate_types_into_proc_modes(_, [], _, !RevErrorProcIds, !Procs). propagate_types_into_proc_modes(ModuleInfo, [ProcId | ProcIds], ArgTypes, - !ErrorProcIds, !Procs) :- + !RevErrorProcIds, !Procs) :- map.lookup(!.Procs, ProcId, ProcInfo0), proc_info_get_argmodes(ProcInfo0, ArgModes0), propagate_types_into_mode_list(ModuleInfo, ArgTypes, ArgModes0, ArgModes), @@ -897,13 +883,13 @@ % to be module-qualified; and it needs to be done before mode analysis, % to avoid internal errors.) ( mode_list_contains_inst_var(ArgModes, ModuleInfo, _InstVar) -> - !:ErrorProcIds = [ProcId | !.ErrorProcIds] + !:RevErrorProcIds = [ProcId | !.RevErrorProcIds] ; proc_info_set_argmodes(ArgModes, ProcInfo0, ProcInfo), svmap.det_update(ProcId, ProcInfo, !Procs) ), propagate_types_into_proc_modes(ModuleInfo, ProcIds, ArgTypes, - !ErrorProcIds, !Procs). + !RevErrorProcIds, !Procs). :- pred report_unbound_inst_vars(module_info::in, pred_id::in, list(proc_id)::in, pred_info::in, pred_info::out, Index: compiler/purity.m =================================================================== RCS file: /home/mercury/mercury1/repository/mercury/compiler/purity.m,v retrieving revision 1.134 diff -u -b -r1.134 purity.m --- compiler/purity.m 8 Sep 2009 02:43:37 -0000 1.134 +++ compiler/purity.m 16 Oct 2009 06:29:09 -0000 @@ -51,8 +51,8 @@ % To keep purity/impurity consistent, it is required that every impure % predicate/function be declared so. A predicate is impure if: % -% 1. It's declared impure, or -% 2a. It's not promised pure, and +% 1. It is declared impure, or +% 2a. It is not promised pure, and % 2b. It calls some impure predicates or functions. % % A predicate or function is declared impure by preceding the `pred' or @@ -63,7 +63,7 @@ % directive. % % Calls to impure predicates may not be optimized away. Neither may they be -% reodered relative to any other goals in a given conjunction; ie, an impure +% reordered relative to any other goals in a given conjunction; i.e., an impure % goal cleaves a conjunction into the stuff before it and the stuff after it. % Both of these groups may be reordered separately, but no goal from either % group may move into the other. Similarly for disjunctions. @@ -93,14 +93,13 @@ % This eliminates any need to define some order of evaluation of nested % impure functions. % -% Of course it also eliminates the benefits of using functions to -% cut down on the number of variables introduced. The main use of -% impure functions is to interface nicely with foreign language -% functions. -% -% Any non-variable arguments to the function are flattened into -% unification goals (see unravel_unifications in superhomogeneous.m) -% which are placed as pure goals before the function call itself. +% Of course it also eliminates the benefits of using functions to cut down +% on the number of variables introduced. The main use of impure functions +% is to interface nicely with foreign language functions. +% +% Any non-variable arguments to the function are flattened into unification +% goals (see unravel_unifications in superhomogeneous.m) which are placed +% as pure goals before the function call itself. % % Wishlist: % It would be nice to use impure functions in DCG goals as well as @@ -108,14 +107,13 @@ % % It might be nice to allow % X = impure some_impure_fuc(Arg1, Arg2, ...) -% syntax as well. But there are advantages to having the -% impure/semipure annotation in a regular position (on the left -% hand side of a goal) too. If this is implemented it should -% probably be handled in prog_io, and turned into an impure -% unify item. +% syntax aswell. But there are advantages to having the impure or semipure +% annotation in a regular position (on the left hand side of a goal) too. +% If this is implemented it should probably be handled in prog_io, and +% turned into an impure unify item. % -% It may also be nice to allow semipure function calls to occur -% inline (since ordering is not an issue for them). +% It may also be nice to allow semipure function calls to occur inline +% (since ordering is not an issue for them). % % To do: % Reconsider whether impure parallel conjuncts should be allowed. @@ -132,7 +130,6 @@ :- import_module parse_tree.error_util. :- import_module parse_tree.prog_data. -:- import_module bool. :- import_module list. %-----------------------------------------------------------------------------% @@ -146,8 +143,7 @@ % would cause problems for later passes (if so, we stop compilation after % this pass). % -:- pred puritycheck_module(bool::in, bool::out, - module_info::in, module_info::out, +:- pred puritycheck_module(module_info::in, module_info::out, list(error_spec)::in, list(error_spec)::out) is det. % Rerun purity checking on a procedure after an optimization pass has @@ -207,47 +203,9 @@ :- import_module assoc_list. %-----------------------------------------------------------------------------% -% -% Public Predicates -% - -puritycheck_module(FoundTypeError, PostTypecheckError, !ModuleInfo, !Specs) :- - module_info_get_globals(!.ModuleInfo, Globals), - globals.lookup_bool_option(Globals, statistics, Statistics), - globals.lookup_bool_option(Globals, verbose, Verbose), - - trace [io(!IO)] ( - maybe_write_string(Verbose, "% Purity-checking clauses...\n", !IO) - ), - finish_typecheck_and_check_preds_purity(FoundTypeError, PostTypecheckError, - !ModuleInfo, !Specs), - trace [io(!IO)] ( - maybe_report_stats(Statistics, !IO) - ). - -%-----------------------------------------------------------------------------% - % Purity-check the code for all the predicates in a module. - % -:- pred finish_typecheck_and_check_preds_purity(bool::in, bool::out, - module_info::in, module_info::out, - list(error_spec)::in, list(error_spec)::out) is det. - -finish_typecheck_and_check_preds_purity(FoundTypeError, PostTypecheckError, - !ModuleInfo, !Specs) :- +puritycheck_module(!ModuleInfo, !Specs) :- module_info_predids(PredIds, !ModuleInfo), - - % Only report error messages for unbound type variables if we didn't get - % any type errors already; this avoids a lot of spurious diagnostics. - ReportTypeErrors = bool.not(FoundTypeError), - post_typecheck_finish_preds(PredIds, ReportTypeErrors, NumPostErrors, - !ModuleInfo, !Specs), - ( NumPostErrors > 0 -> - PostTypecheckError = yes - ; - PostTypecheckError = no - ), - check_preds_purity(PredIds, !ModuleInfo, !Specs). :- pred check_preds_purity(list(pred_id)::in, @@ -988,9 +946,8 @@ % Peform purity checking of the actual and declared purity, % and check that promises are consistent. % - % ActualPurity: The inferred purity of the pred - % DeclaredPurity: The declared purity of the pred - % InPragmaCCode: Is this foreign language code? + % ActualPurity: The inferred purity of the pred. + % DeclaredPurity: The declared purity of the pred. % Promised: Did we promise this pred as pure? % :- pred perform_pred_purity_checks(pred_info::in, purity::in, purity::in, 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/analysis cvs diff: Diffing tests/analysis/ctgc cvs diff: Diffing tests/analysis/excp cvs diff: Diffing tests/analysis/ext cvs diff: Diffing tests/analysis/sharing cvs diff: Diffing tests/analysis/table cvs diff: Diffing tests/analysis/trail cvs diff: Diffing tests/analysis/unused_args 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/stm cvs diff: Diffing tests/stm/orig cvs diff: Diffing tests/stm/orig/stm-compiler cvs diff: Diffing tests/stm/orig/stm-compiler/test1 cvs diff: Diffing tests/stm/orig/stm-compiler/test10 cvs diff: Diffing tests/stm/orig/stm-compiler/test2 cvs diff: Diffing tests/stm/orig/stm-compiler/test3 cvs diff: Diffing tests/stm/orig/stm-compiler/test4 cvs diff: Diffing tests/stm/orig/stm-compiler/test5 cvs diff: Diffing tests/stm/orig/stm-compiler/test6 cvs diff: Diffing tests/stm/orig/stm-compiler/test7 cvs diff: Diffing tests/stm/orig/stm-compiler/test8 cvs diff: Diffing tests/stm/orig/stm-compiler/test9 cvs diff: Diffing tests/stm/orig/stm-compiler-par cvs diff: Diffing tests/stm/orig/stm-compiler-par/bm1 cvs diff: Diffing tests/stm/orig/stm-compiler-par/bm2 cvs diff: Diffing tests/stm/orig/stm-compiler-par/stmqueue cvs diff: Diffing tests/stm/orig/stm-compiler-par/test1 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test10 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test11 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test2 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test3 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test4 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test5 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test6 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test7 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test8 cvs diff: Diffing tests/stm/orig/stm-compiler-par/test9 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test1 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test2 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test3 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test4 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test5 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test6 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test7 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test8 cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test9 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@... Administrative Queries: owner-mercury-reviews@... Subscriptions: mercury-reviews-request@... -------------------------------------------------------------------------- |
|
|
Re: diff: fix mantis bug 113On Fri, 16 Oct 2009, Zoltan Somogyi wrote: > Fix Mantis bug 113. Unfortunately, even without bug 113, the program > has an error, That's intentional; the bug was that it wasn't producing a proper error message, but rather a compiler abort. > so there is no simple way to add it as a test case. Can you not add it to tests/invalid and check that it produces the correct (set of) error message(s)? Julien. -------------------------------------------------------------------------- mercury-reviews mailing list Post messages to: mercury-reviews@... Administrative Queries: owner-mercury-reviews@... Subscriptions: mercury-reviews-request@... -------------------------------------------------------------------------- |
|
|
Re: diff: fix mantis bug 113On Fri, 16 Oct 2009, Zoltan Somogyi wrote: > Fix Mantis bug 113. Unfortunately, even without bug 113, the program > has an error, so there is no simple way to add it as a test case. > Getting rid of the error would take away the raison d'etre of the test. > > compiler/mercury_compile_front_end.m: > Call the part of post_typecheck that fixes up the interface of > predicates directly from here, not from purity.m. purity.m was > calling this part first thing anyway, so there was no point in > doing this from purity.m in the first place. Doing it from > the top level allows us to stop doing purity checking (and thus > post_typecheck) on the definitions of predicates if the program > had a type error. Bug 113 was caused by an operation of post_typecheck > on a goal that (previously incorrectly, now correctly) assumes > the absence of type errors. > > Move the main (-v) progress messages here from purity.m as well, > since here is where they are printed for other compiler passes. > > compiler/purity.m: > Conform to the changes above, and fix some bitrot in old documentation. > > compiler/post_typecheck.m: > Delete an unused predicate, and fix some bad programming style. It is possible that this is also a fix for bug #110 - I believe Peter Wang has uploaded a test case for that one to Mantis. Julien. -------------------------------------------------------------------------- mercury-reviews mailing list Post messages to: mercury-reviews@... Administrative Queries: owner-mercury-reviews@... Subscriptions: mercury-reviews-request@... -------------------------------------------------------------------------- |
|
|
Re: diff: fix mantis bug 113On 16-Oct-2009, Julien Fischer <juliensf@...> wrote:
> Can you not add it to tests/invalid and check that it produces the > correct (set of) error message(s)? Thanks; done. I thought of hard_coded, valid and warnings but not invalid. Zoltan. -------------------------------------------------------------------------- mercury-reviews mailing list Post messages to: mercury-reviews@... Administrative Queries: owner-mercury-reviews@... Subscriptions: mercury-reviews-request@... -------------------------------------------------------------------------- |
|
|
Re: diff: fix mantis bug 113On 16-Oct-2009, Julien Fischer <juliensf@...> wrote:
> It is possible that this is also a fix for bug #110 I think that is almost certain, not just possible. > - I believe Peter > Wang has uploaded a test case for that one to Mantis. There is a test case, but it is a compiler module, and not standalone. Zoltan. -------------------------------------------------------------------------- mercury-reviews mailing list Post messages to: mercury-reviews@... Administrative Queries: owner-mercury-reviews@... Subscriptions: mercury-reviews-request@... -------------------------------------------------------------------------- |
|
|
Re: diff: fix mantis bug 113On Fri, 16 Oct 2009, Zoltan Somogyi wrote: > On 16-Oct-2009, Julien Fischer <juliensf@...> wrote: >> It is possible that this is also a fix for bug #110 > > I think that is almost certain, not just possible. > >> - I believe Peter >> Wang has uploaded a test case for that one to Mantis. > > There is a test case, but it is a compiler module, and not standalone. Sorry, I didn't realise that. Julien. -------------------------------------------------------------------------- mercury-reviews mailing list Post messages to: mercury-reviews@... Administrative Queries: owner-mercury-reviews@... Subscriptions: mercury-reviews-request@... -------------------------------------------------------------------------- |
| Free embeddable forum powered by Nabble | Forum Help |