Commit Graph

4 Commits

Author SHA1 Message Date
Julien Fischer
ec3b4b0c0e Fix the dynamic linking examples in extras.
Estimated hours taken: 0.5
Branches: main

Fix the dynamic linking examples in extras.

extras/dynamic_linking/dl_test.m:
extras/dynamic_linking/dl_test2.m:
extras/dynamic_linking/hello.m:
	Conform to name changes in the dl module.

	Clean up the code so that it conforms to our current coding standard.
2007-05-07 04:18:23 +00:00
Fergus Henderson
8a567f3886 Add the function `add3int', which is used by the dl_test.m
Estimated hours taken: 0.1

extras/dynamic_linking/hello.m:
	Add the function `add3int', which is used by the dl_test.m
	test case.  I forgot to commit this with my previous change.
2001-01-12 01:31:52 +00:00
Fergus Henderson
088277135d Fix some problems with dynamic linking for the MLDS back-end.
Estimated hours taken: 2

Fix some problems with dynamic linking for the MLDS back-end.

extras/dynamic_linking/name_mangle.m:
browser/name_mangle.m:
	Fix a bug with the name mangling of the arity for functions;
	the mangling algorithm here didn't match what the compiler
	actually outputs.
	Clarify the documentation about the meaning of the `arity'
	field.

extras/dynamic_linking/dl.m:
	Fix a bug with the arity checks for functions;
	they were always failing.

	For the MLDS back-end, check that the argument type
	isn't `char' or `float'; those are not supported.
	Document that restriction.

extras/dynamic_linking/dl_test.m:
extras/dynamic_linking/dl_test.exp:
extras/dynamic_linking/hello.m:
	Add a test of dynamically linking functions and
	passing and returning floating-point arguments.

NEWS:
	Document the restriction that dl__mercury_sym doesn't support
	argument types `float' or `char' for the MLDS back-end.
2000-12-18 14:11:30 +00:00
Fergus Henderson
8a29f3f391 New module, containing support for dynamic linking
Estimated hours taken: 5

extras/dynamic_linking/dl.m:
	New module, containing support for dynamic linking
	(i.e. a binding to dlopen(), dlsym(), and dlclose()).

extras/dynamic_linking/name_mangle.m:
	New module, containing a representation for Mercury procedure
	specifiers and a function for mangling them into symbol names.

extras/dynamic_linking/dl_test.m:
extras/dynamic_linking/dl_test.exp:
extras/dynamic_linking/hello.m:
	A test case (and sample program) for the use of dynamic linking.

extras/dynamic_linking/README:
	A brief README file describing the files in this directory.

extras/dynamic_linking/Mmakefile:
	A simple Mmakefile to build it all and test it.

NEWS:
	Mention the new dynamic linking support.

compiler/llds_out.m:
	Add some comments warning about code duplication
	between the code here and that in extras/dynamic_linking/name_mangle.m
	(and also profiler/demangle.m and util/mdemangle.c).
1998-12-06 06:17:07 +00:00