mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 22:03:26 +00:00
Delete the univ type_ctor_rep, since we haven't used it in a long time,
Estimated hours taken: 2 Branches: main Delete the univ type_ctor_rep, since we haven't used it in a long time, and add two new type_ctor_reps: one for subgoals, so that they won't have to be treated specially when deconstructed, and one for a future type, stable_c_pointer, which is the same as c_pointer except that it guarantees that the entire data structure it points to, directly and indirectly is read only, which means that its values can be tabled. The intention is to use stable_c_pointers to represent robdds. runtime/mercury_type_info.h: Make the change above. runtime/mercury_construct.c: runtime/mercury_deconstruct.c: runtime/mercury_deep_copy_body.h: runtime/mercury_ml_expand_body.h: runtime/mercury_tabling.c: runtime/mercury_unify_compare_body.h: Handle the two new type_ctor_reps, and delete the code handling univs. compiler/mlds_to_gcc.m: java/runtime/TypeCtorRep.java: library/private_builtin.m: runtime/mercury_mcpp.h: runtime/mercury_mcpp.cpp: Update the list of type_ctor_reps, including fixing some old errors in some files. library/rtti_implementation.m: Update the list of type_ctor_reps, and modify the routines that interpret the RTTI accordingly.
This commit is contained in:
@@ -146,8 +146,10 @@ MR_get_functor_info(MR_TypeInfo type_info, int functor_number,
|
||||
case MR_TYPECTOR_REP_STRING:
|
||||
case MR_TYPECTOR_REP_FUNC:
|
||||
case MR_TYPECTOR_REP_PRED:
|
||||
case MR_TYPECTOR_REP_SUBGOAL:
|
||||
case MR_TYPECTOR_REP_VOID:
|
||||
case MR_TYPECTOR_REP_C_POINTER:
|
||||
case MR_TYPECTOR_REP_STABLE_C_POINTER:
|
||||
case MR_TYPECTOR_REP_TYPEINFO:
|
||||
case MR_TYPECTOR_REP_TYPECTORINFO:
|
||||
case MR_TYPECTOR_REP_TYPEDESC:
|
||||
@@ -167,9 +169,6 @@ MR_get_functor_info(MR_TypeInfo type_info, int functor_number,
|
||||
case MR_TYPECTOR_REP_REFERENCE:
|
||||
return MR_FALSE;
|
||||
|
||||
case MR_TYPECTOR_REP_UNIV:
|
||||
MR_fatal_error("MR_get_functor_info: bad type_ctor_rep");
|
||||
|
||||
case MR_TYPECTOR_REP_UNKNOWN:
|
||||
MR_fatal_error("MR_get_functor_info: unknown type_ctor_rep");
|
||||
}
|
||||
@@ -307,8 +306,10 @@ MR_get_num_functors(MR_TypeInfo type_info)
|
||||
case MR_TYPECTOR_REP_STRING:
|
||||
case MR_TYPECTOR_REP_FUNC:
|
||||
case MR_TYPECTOR_REP_PRED:
|
||||
case MR_TYPECTOR_REP_SUBGOAL:
|
||||
case MR_TYPECTOR_REP_VOID:
|
||||
case MR_TYPECTOR_REP_C_POINTER:
|
||||
case MR_TYPECTOR_REP_STABLE_C_POINTER:
|
||||
case MR_TYPECTOR_REP_TYPEINFO:
|
||||
case MR_TYPECTOR_REP_TYPECTORINFO:
|
||||
case MR_TYPECTOR_REP_TYPEDESC:
|
||||
@@ -328,9 +329,6 @@ MR_get_num_functors(MR_TypeInfo type_info)
|
||||
case MR_TYPECTOR_REP_REFERENCE:
|
||||
return -1;
|
||||
|
||||
case MR_TYPECTOR_REP_UNIV:
|
||||
MR_fatal_error("MR_get_num_functors: bad type_ctor_rep");
|
||||
|
||||
case MR_TYPECTOR_REP_UNKNOWN:
|
||||
MR_fatal_error("MR_get_num_functors: unknown type_ctor_rep");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user