Files
mercury/runtime/mercury_hand_unify_compare_body.h
Mark Brown d465fa53cb Update the COPYING.LIB file and references to it.
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.

COPYING.LIB:
    Add a special linking exception to the LGPL.

*:
    Update references to COPYING.LIB.

    Clean up some minor errors that have accumulated in copyright
    messages.
2018-06-09 17:43:12 +10:00

54 lines
1.6 KiB
C

// vim: ts=4 sw=4 expandtab ft=c
// Copyright (C) 2002, 2004 The University of Melbourne.
// Copyright (C) 2016, 2018 The Mercury team.
// This file is distributed under the terms specified in COPYING.LIB.
// The internals of hand-written unification and comparison routines.
//
// The code that includes this file should define the following macros:
//
// module
// type
// arity
// unify_code
// compare_code
#define proc_label MR_proc_entry_uci_name(module, __Unify__, \
type, arity, 0)
#define proc_layout MR_proc_layout_uci_name(module, __Unify__, \
type, arity, 0)
#define body_code do { unify_code } while (0)
#include "mercury_hand_unify_body.h"
#undef proc_label
#undef proc_layout
#undef body_code
#define proc_label MR_proc_entry_uci_name(module, __Compare__, \
type, arity, 0)
#define proc_layout MR_proc_layout_uci_name(module, __Compare__, \
type, arity, 0)
#define body_code do { compare_code } while (0)
#include "mercury_hand_compare_body.h"
#undef proc_label
#undef proc_layout
#undef body_code
#define proc_label MR_proc_entry_uci_name(module, __CompareRep__, \
type, arity, 0)
#define proc_layout MR_proc_layout_uci_name(module, __CompareRep__, \
type, arity, 0)
#define body_code do { MR_fatal_error( \
"direct type-specific compare_rep call"); \
} while (0)
#include "mercury_hand_compare_body.h"
#undef proc_label
#undef proc_layout
#undef body_code