Commit Graph

11 Commits

Author SHA1 Message Date
Peter Wang
88047bbb45 Delete Erlang from tests.
tests/general/float_test.exp3:
tests/general/float_test.m:
tests/general/read_dir_regression.exp4:
tests/general/read_dir_regression.m:
tests/hard_coded/remove_file.exp2:
tests/hard_coded/remove_file.m:
    Delete Erlang backend specific expected outputs.

tests/hard_coded/Mmakefile:
tests/hard_coded/erlang_deconstruct.exp:
tests/hard_coded/erlang_deconstruct.m:
tests/hard_coded/existential_list.exp:
tests/hard_coded/existential_list.m:
tests/valid/Mmakefile:
tests/valid/erl_ite_vars.m:
tests/valid/zf_erlang_bug.m:
    Delete erlang target specific tests.

tests/*:
    Delete Erlang foreign procs and foreign types.
2020-10-27 11:10:11 +11:00
Zoltan Somogyi
2f7c5fb87f Update the programming style of some tests. 2020-10-03 17:43:38 +10:00
Zoltan Somogyi
33eb3028f5 Clean up the tests in half the test directories.
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
    Make these tests use four-space indentation, and ensure that
    each module is imported on its own line. (I intend to use the latter
    to figure out which subdirectories' tests can be executed in parallel.)

    These changes usually move code to different lines. For the debugger tests,
    specify the new line numbers in .inp files and expect them in .exp files.
2015-02-14 20:14:03 +11:00
Julien Fischer
f4139d8d69 Remove support for the old C interface. The parser still recognises the old
pragmas but it now emits an error message saying what pragma in the "new"
foreign language interface to use instead.  (That will be deleted after the
next release.)

Remove support for nondet foreign code from the implementation.

Add some bits from the old C interface chapter of the reference manual,
about linking with C object files and the c_pointer type, to the chapter
on the foreign language interface; delete the rest.

Add an illustration of simulating nondet foreign code with Mercury clauses
and (semi)deterministic foreign_procs.

doc/reference_manual.texi:
	Delete the old C interface chapter.

	Add a section on linking against C object files to the C specific
	section of the foreign language interface chapter.  (The old version of
	this was quite mmake-specific, the new version attempts to minimise
	this.)

	Mention the c_pointer type in section on C foreign types.

	Mention that nondet foreign_procs are not allowed.  Give an example
	to use foreign code and nondeterminism.

compiler/prog_io_pragma.m:
	Emit error messages when any of the pragmas used by the old C interface
	are encountered.

compiler/prog_item.m:
	Delete the parse tree representation of import pragmas.

compiler/gcc.m:
	Replace `:- pragma import' declarations with `:- pragma foreign_proc'
	declarations for C.

compiler/add_heap_ops.m:
compiler/add_trail_ops.m:
compiler/add_pragma.m:
compiler/deep_profiling.m:
compiler/det_analysis.m:
compiler/equiv_type.m:
compiler/erl_call_gen.m:
compiler/foreign.m:
compiler/goal_util.m:
compiler/hlds_out_goal.m:
compiler/make_hlds_passes.m:
compiler/make_hlds_warn.m:
compiler/mercury_to_mercury.m
compiler/ml_code_gen.m:
compiler/module_qual.m:
compiler/modules.m:
compiler/polymorphism.m:
compiler/pragma_c_gen.m:
compiler/proc_gen.m:
compiler/prog_data.m:
compiler/recompilation.version.m:
	Delete stuff related the old C interface.

tests/hard_coded_Mmakefile:
tests/hard_coded/inline_nondet_pragma_c.*:
tests/hard_coded/nondet_c.*:
tests/hard_coded/nondet_pragma_c_bug.*:
tests/hard_coded/pragma_import.*:
	Delete these tests.  The features they exercise are no longer
	supported.

tests/*/*.m:
	Replace uses of the old C interface with the new.
2010-09-10 05:15:05 +00:00
Peter Wang
75771a9b6e Allow testing of java grade. Requires using `mmc --make' for now.
Branches: main

Allow testing of java grade.  Requires using `mmc --make' for now.
This patch does not attempt to fix test failures.

tests/Mmake.common:
        Delete unneeded Java-specific rule, which was broken.

tests/benchmarks/Mmakefile:
tests/general/Mmakefile:
tests/general/string_format/Mmakefile:
tests/grade_subdirs/Mmakefile:
tests/hard_coded/Mmakefile:
tests/recompilation/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
        Don't deliberately disable tests in java grade.

tests/*.m:
        Add Java foreign code.

        Write dummy procedures instead of abusing `:- external'.
2009-08-14 03:21:55 +00:00
Peter Wang
40a21f2d78 Implement some more I/O primitives for Erlang.
Estimated hours taken: 1.5
Branches: main

library/io.m:
	Implement some more I/O primitives for Erlang.

tests/debugger/Mmakefile:
tests/debugger/declarative/Mmakefile:
tests/hard_coded/Mmakefile:
tests/invalid/Mmakefile:
tests/par_conj/Mmakefile:
tests/recompilation/Mmakefile:
tests/valid/Mmakefile:
	Disable test cases which don't apply to the Erlang backend for
	whatever reason.

tests/hard_coded/constraint_order.m:
tests/hard_coded/copy_pred.m:
tests/hard_coded/copy_pred_2.m:
tests/hard_coded/export_test.m:
tests/hard_coded/external_unification_pred.m:
tests/hard_coded/foreign_type3.m:
tests/hard_coded/ho_solns.m:
tests/hard_coded/ho_univ_to_type.m:
tests/hard_coded/intermod_multimode.m:
tests/hard_coded/intermod_poly_mode_2.m:
tests/hard_coded/lookup_disj.m:
tests/hard_coded/multimode.m:
tests/hard_coded/no_inline.m:
tests/hard_coded/pragma_foreign_export.m:
tests/hard_coded/redoip_clobber.m:
tests/hard_coded/rnd.m:
tests/hard_coded/sub-modules/sm_exp_bug.m:
tests/hard_coded/typeclasses/impure_methods.m:
tests/par_conj/dep_par_10.m:
tests/valid/flatten_conj_bug.m:
	Fix test cases which were failing with the Erlang for simple reasons,
	mostly missing foreign procs or foreign types.

tests/general/string_format_test_2.exp5:
tests/general/string_format_test_3.exp5:
tests/hard_coded/exceptions/test_uncaught_exception.exp5:
tests/hard_coded/no_fully_strict.exp5:
	Add expected outputs with stack dumps for Erlang.
2007-06-06 01:48:15 +00:00
Peter Ross
997dd45689 Get the tests in hard_coded to compile in the grade il.
Estimated hours taken: 3
Branches: main

Get the tests in hard_coded to compile in the grade il.  The tests may
still fail because of other reasons.

tests/hard_coded/constraint_order.m:
tests/hard_coded/copy_pred.m:
tests/hard_coded/copy_pred_2.m:
tests/hard_coded/dupcall_impurity.m:
tests/hard_coded/export_test.m:
tests/hard_coded/foreign_import_module.m:
tests/hard_coded/foreign_type3.m:
tests/hard_coded/ho_solns.m:
tests/hard_coded/ho_univ_to_type.m:
tests/hard_coded/impure_foreign.m:
tests/hard_coded/impure_prune.m:
tests/hard_coded/intermod_c_code2.m:
tests/hard_coded/intermod_multimode.m:
tests/hard_coded/multimode.m:
tests/hard_coded/no_inline.m:
tests/hard_coded/rnd.m:
	Provide C# implementation of C code.

tests/hard_coded/existential_types_test.m:
tests/hard_coded/frameopt_pragma_redirect.m:
tests/hard_coded/mode_choice.m:
tests/hard_coded/pragma_c_code.m:
tests/hard_coded/pragma_inline.m:
tests/hard_coded/target_mlobjs.m:
tests/hard_coded/unused_float_box_test.m:
	Provide Mercury implementation of C code.

tests/hard_coded/redoip_clobber.m:
	Provide MC++ implementation of C code.
2002-11-28 16:33:45 +00:00
Simon Taylor
be865dc8e1 Mark a predicate implemented using impure C code as impure
Estimated hours taken: 0.1
Branches: main

tests/hard_coded/no_inline.m:
	Mark a predicate implemented using impure C code as impure
	to avoid duplicate call elimination.
2001-12-07 03:59:42 +00:00
Zoltan Somogyi
56819ab405 Use our own random number generator, since the output of random.m
Estimated hours taken: 0.8

tests/hard_coded/space.{m,out}:
	Use our own random number generator, since the output of random.m
	depends on the wordsize of the machine.

tests/hard_coded/no_inline.{m,out}:
	Use a more direct test of whether the C code is inlined or not.
1998-08-12 04:05:07 +00:00
Simon Taylor
70b21862dc Add explicit `will_not_call_mercury's. Otherwise weird things happen.
Estimated hours taken: 0.25

tests/hard_coded/no_inline.m:
	Add explicit `will_not_call_mercury's. Otherwise weird things happen.
1998-08-12 00:28:41 +00:00
Tyson Dowd
ea6ba74472 Implement `:- pragma no_inline'. This pragma prevents the compiler from
Estimated hours taken: 3

Implement `:- pragma no_inline'. This pragma prevents the compiler from
inlining predicates.

compiler/higher_order.m:
compiler/unused_args.m:
	Create new preds using entire marker list, rather than just
	inlining.

compiler/hlds_out.m:
compiler/mercury_to_mercury.m:
compiler/module_qual.m:
compiler/prog_data.m:
compiler/prog_io_pragma.m:
	Add code to support no_inline marker and pragma.

compiler/hlds_pred.m:
	Add `no_inline' marker.
	Create new preds using entire marker list, rather than just
	inlining.
	Change `pred_info_is_inlined' to `pred_info_requested_inlining',
	as it was inappropriately named, and added
	`pred_info_requested_no_inlining'.

compiler/inlining.m:
	Don't inline predicates with pragma no_inlines

compiler/intermod.m:
	Use `pred_info_requested_inlining'.

compiler/make_hlds.m:
	Add code to check for conflicting markers, check for conflicts
	between `inline' and `no_inline' markers.
	Add `no_inline' markers.
	Rename pragma_set_markers as pragma_add_markers, as it was
	actually adding extra markers to what was already there.

doc/reference_manual.texi:
	Document no_inline.

tests/hard_coded/Mmake:
tests/invalid/Mmake:
tests/hard_coded/no_inline.exp:
tests/hard_coded/no_inline.m:
tests/invalid/inline_conflict.err_exp:
tests/invalid/inline_conflict.m:
	Add test cases for no_inline and conflicts between inline and
	no_inline.
1997-06-27 04:05:22 +00:00