mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 05:12:33 +00:00
Estimated hours taken: 12 Branches: main New implementation of RTTI for the Erlang backend. Currently the RTTI only supports generic compare and unify, deconstruct and construct are still to come. compiler/erl_rtti.m: Add a function which converts rtti_data to erlang_rtti_data. Change rtti_data_list_to_elds to operate on erlang_rtti_data, and output a erlang tuple which represents a type_ctor_info. compiler/erlang_rtti.m: The definition of the RTTI needed for the Erlang backend, for the moment only the type_ctor_info differs from the low-level backends. This was designed in conjunction with zs. compiler/backend_libs.m: Add erlang_rtti. compiler/elds.m: Add a utility predicate which returns the erlang representation of enum type for a given functor. compiler/mercury_compile.m: Call the new erl_rtti predicates. library/builtin.m: Call the erlang_rtti_implementation generic compare and unify predicates. library/erlang_rtti_implementation.m: An implementation of generic compare and unify in Mercury, with some tiny bits of erlang foreign_procs to inspect a type_info and type_ctor_info. library/library.m: Reference the erlang_rtti_implementation module. library/rtti_implementation.m: Remove all the Erlang code as this implementation of RTTI is too low-level.
41 lines
1.3 KiB
Mathematica
41 lines
1.3 KiB
Mathematica
%-----------------------------------------------------------------------------%
|
|
% vim: ft=mercury ts=4 sw=4 et
|
|
%-----------------------------------------------------------------------------%
|
|
% Copyright (C) 2002-2005 The University of Melbourne.
|
|
% This file may only be copied under the terms of the GNU General
|
|
% Public License - see the file COPYING in the Mercury distribution.
|
|
%-----------------------------------------------------------------------------%
|
|
%
|
|
% Back-end libraries.
|
|
%
|
|
% This package contains utility modules that are each used by
|
|
% several different back-ends.
|
|
%
|
|
:- module backend_libs.
|
|
:- interface.
|
|
|
|
% modules that provide functionality used by several different back-ends
|
|
:- include_module base_typeclass_info.
|
|
:- include_module builtin_ops.
|
|
:- include_module bytecode_data.
|
|
:- include_module c_util.
|
|
:- include_module compile_target_code.
|
|
:- include_module erlang_rtti.
|
|
:- include_module export.
|
|
:- include_module foreign.
|
|
:- include_module interval.
|
|
:- include_module matching.
|
|
:- include_module name_mangle.
|
|
:- include_module proc_label.
|
|
:- include_module pseudo_type_info.
|
|
:- include_module rtti.
|
|
:- include_module switch_util.
|
|
:- include_module type_ctor_info.
|
|
:- include_module type_class_info.
|
|
|
|
:- implementation.
|
|
|
|
:- end_module backend_libs.
|
|
|
|
%-----------------------------------------------------------------------------%
|