[m-rev.] for review: type_info_cell_constructor

Zoltan Somogyi zs at cs.mu.OZ.AU
Sun Jun 22 20:48:55 AEST 2003


I have already discussed the basic concept with Fergus, and the implementation
is straightforward. However, I would like David to confirm that it is OK for a
compiler-generated inst to refer to a function symbol that is not in the
program at all. (The old code already lied about the arity of function symbols
in insts.)

Zoltan.

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/bytecode.m:
	Add two new cons_ids to parallel the ones in hlds_data.m.

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

bytecode/mb_bytecode.h:
	Document that some bytecodes generated by the compiler are not yet
	implemented by the bytecode interpreter.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list