Files
mercury/bytecode
Zoltan Somogyi d6f05747a2 Prepare to make type_info and typeclass_info foreign types by eliminating the
Estimated hours taken: 4
Branches: main

Prepare to make type_info and typeclass_info foreign types by eliminating the
compiler's dependence on their function symbols. At the moment, the compiler
generates type_intos and typeclass_infos by using the function symbols of these
types as cons_ids. However, the function symbols have fake arities, which
demanded special treatment in many places. This change makes the compiler use
the cons_ids type_into_cell_constructor and typeclass_into_cell_constructor
instead, except in insts, which need to know the arity of the constructor.

compiler/hlds_data.m:
	Add the two new cons_ids.

compiler/polymorphism.m:
	Use the two new cons_ids instead of the function symbols of the
	type_info and typeclass_info types, since those function symbols
	will soon be deleted.

compiler/type_util.m:
	Add a type and some predicates to control the representation of
	type_info and typeclass_info cells in one place.

	Since we no longer depend on the representations of the function
	symbols of the type_info and typeclass_info types, do not special
	case their representation.

compiler/hlds_code_util.m:
	Implement the representation of the two new function symbols.

compiler/bytecode.m:
	Add two new cons_ids to parallel the ones in hlds_data.m.

compiler/higher_order.m:
	Look for the two new cons_ids, instead of the old ones.

	Make the code more maintainable.

compiler/*.m:
	Minor changes to conform to the changes above.

library/private_builtin.m:
	Delete the statement that the compiler depends on the functors of the
	type_info and type_ctor_info types.

bytecode/mb_bytecode.h:
	Document that some bytecodes generated by the compiler are not yet
	implemented by the bytecode interpreter.
2003-06-24 14:20:59 +00:00
..
2001-02-19 02:05:59 +00:00

This directory holds the source code for the Mercury bytecode
utilities. `mdis' is the Mercury bytecode disassembler.
`mbi' is the Mercury bytecode interpreter.
`libmbi' is the same thing, minus main().

All exported symbols defined in modules in this directory should be prefixed
with `MB_', for "Mercury Bytecode", to avoid clashes with names defined in
other packages.