Commit Graph

13 Commits

Author SHA1 Message Date
Zoltan Somogyi
646b23fcf7 Convert (C->T;E) to (if C then T else E). 2015-11-30 10:39:53 +11:00
Julien Fischer
b4c3bb1387 Clean up in unused module imports in the Mercury system detected
Estimated hours taken: 3
Branches: main

Clean up in unused module imports in the Mercury system detected
by --warn-unused-imports.

analysis/*.m:
browser/*.m:
deep_profiler/*.m:
compiler/*.m:
library/*.m:
mdbcomp/*.m:
profiler/*.m:
slice/*.m:
	Remove unused module imports.

	Fix some minor departures from our coding standards.

analysis/Mercury.options:
browser/Mercury.options:
deep_profiler/Mercury.options:
compiler/Mercury.options:
library/Mercury.options:
mdbcomp/Mercury.options:
profiler/Mercury.options:
slice/Mercury.options:
	Set --no-warn-unused-imports for those modules that are used as
	packages or otherwise break --warn-unused-imports, e.g. because they
	contain predicates with both foreign and Mercury clauses and some of
	the imports only depend on the latter.
2006-12-01 15:04:40 +00:00
Zoltan Somogyi
ff386022ae Fix a bunch of deviations from our coding standards.
Estimated hours taken: 1
Branches: main

profiler/*.m:
	Fix a bunch of deviations from our coding standards.

	Rename some predicates to make them better reflect the predicates'
	semantics.
2006-11-10 03:26:28 +00:00
Julien Fischer
459847a064 Move the univ, maybe, pair and unit types from std_util into their own
Estimated hours taken: 18
Branches: main

Move the univ, maybe, pair and unit types from std_util into their own
modules.  std_util still contains the general purpose higher-order programming
constructs.

library/std_util.m:
	Move univ, maybe, pair and unit (plus any other related types
	and procedures) into their own modules.

library/maybe.m:
	New module.  This contains the maybe and maybe_error types and
	the associated procedures.

library/pair.m:
	New module.  This contains the pair type and associated procedures.

library/unit.m:
	New module. This contains the types unit/0 and unit/1.

library/univ.m:
	New module. This contains the univ type and associated procedures.

library/library.m:
	Add the new modules.

library/private_builtin.m:
	Update the declaration of the type_ctor_info struct for univ.

runtime/mercury.h:
	Update the declaration for the type_ctor_info struct for univ.

runtime/mercury_mcpp.h:
runtime/mercury_hlc_types.h:
	Update the definition of MR_Univ.

runtime/mercury_init.h:
	Fix a comment: ML_type_name is now exported from type_desc.m.

compiler/mlds_to_il.m:
	Update the the name of the module that defines univs (which are
	handled specially by the il code generator.)

library/*.m:
compiler/*.m:
browser/*.m:
mdbcomp/*.m:
profiler/*.m:
deep_profiler/*.m:
	Conform to the above changes.  Import the new modules where they
	are needed; don't import std_util where it isn't needed.

	Fix formatting in lots of modules.  Delete duplicate module
	imports.

tests/*:
	Update the test suite to confrom to the above changes.
2006-03-29 08:09:58 +00:00
Zoltan Somogyi
a9a2825ace Replace __ with . as the module qualifier everywhere in all the modules
Estimated hours taken: 0.5
Branches: main

profiler/*.m:
deep_profiler/*.m:
compiler/*.m:
	Replace __ with . as the module qualifier everywhere in all the modules
	of the profiler and deep profiler and in some modules of the compiler.
2006-03-09 04:56:47 +00:00
Zoltan Somogyi
69d84ff1bb Import only one module per line. Misc other updates to bring these
Estimated hours taken: 1
Branches: main

profiler/*.m:
deep_profiler/*.m:
	Import only one module per line. Misc other updates to bring these
	modules closer to being up to date with our current style guidelines.
2005-03-24 01:10:34 +00:00
Julien Fischer
9126f1b06a Clean up most of the profiler and bring it into line
Estimates hours taken: 5
Branches: main

Clean up most of the profiler and bring it into line
with out current coding standards.  There are no changes
to any algorithms.

This reduce the size of the code and also (hopefully)
makes things a little easier to maintain.

XXX The profiler is currently broken on those machines
that compile with intermodule optimization, e.g jupiter.

XXX I haven't cleaned up the demangler much yet either.

profiler/call_graph.m:
profiler/generate_output.m:
profiler/globals.m:
profiler/output.m:
profiler/mercury_profile.m:
profiler/process_file.m:
profiler/output_prof_info.m:
profiler/prof_debug.m:
profiler/prof_info.m:
profiler/propagate.m:
profiler/read.m:
	Bring these modules in line with our current
  	coding standards.

	Replace existing code with code that uses
	higher-order predicates, state variables and
	functions where appropriate.

profiler/demangler.m:
	Replace `is' with `='.
2004-12-02 08:01:11 +00:00
Fergus Henderson
04b720630b Update the copyright messages so that (a) they contain the correct years
and (b) they say "Copyright (C) ... _The_ University of Melbourne".
1997-07-27 15:09:59 +00:00
Tyson Dowd
aeafb09a7b Moved assoc_list and output_prof_info into interface section, where they
Estimated hours taken: 0.05

Moved assoc_list and output_prof_info into interface section, where they
should be.
1996-06-12 07:46:56 +00:00
Fergus Henderson
51c7531923 Comment out `:- import_module writeln'.
Estimated hours taken: 0.25

profiler/{generate_output.m,prof_debug.m,propagate.m}:
	Comment out `:- import_module writeln'.
	Move lots of `:- import_module' declarations from the interface
	to the implementation sections.
1996-04-20 20:06:38 +00:00
Peter Ross
2912f73674 Rewrite of the profiler so that it handles cycles in the call graph more
Estimated hours taken: 20

Rewrite of the profiler so that it handles cycles in the call graph more
gracefully.

profiler/propagate.m:
	Now we build a map of all the cycles as we do a dfs search on the call
	graph.  Then we use this data to fill out the prof_info structure in
	a meaningful manner.

profiler/prof_info.m:
	Divide the prof_info structure into two.  We now have seperate
	structures for cycles and single predicates.

profiler/*.m:
	Minor changes to make sure that we print out the data in the correct
	manner.
1996-04-20 09:46:24 +00:00
Fergus Henderson
1786b1213c Remove some unnecessary imports.
profiler/prof_debug.m:
	Remove some unnecessary imports.
1995-08-04 00:14:15 +00:00
Peter Ross
6f1101ad4b If static call graph not available in the .prof files.
mercury_profile.m:
	If static call graph not available in the .prof files.  The profiler
	now build's the call graph from the dynamic call graph.

	Completed the parent of a predicate output.

debug.m and prof_debug.m
	Effective renaming of debug.m, so that you can use a NU-prolog debug
	version.
1995-07-18 09:45:55 +00:00