mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 07:15:19 +00:00
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.
53 lines
1.3 KiB
Java
53 lines
1.3 KiB
Java
//
|
|
// Copyright (C) 2001-2003 The University of Melbourne.
|
|
// Copyright (C) 2018 The Mercury team.
|
|
// This file is distributed under the terms specified in COPYING.LIB.
|
|
//
|
|
|
|
package jmercury.runtime;
|
|
|
|
public class TypeLayout implements java.io.Serializable {
|
|
// This should hold a value of one of the types
|
|
// accessible by the access functions that follow.
|
|
public java.lang.Object layout_init;
|
|
|
|
//
|
|
// In runtime/mercury_type_info.h:
|
|
// typedef MR_DuPtagLayout *MR_DuTypeLayout;
|
|
// so here we just use DuPtagLayout[]
|
|
//
|
|
public DuPtagLayout[] layout_du() {
|
|
return (DuPtagLayout[]) layout_init;
|
|
}
|
|
|
|
//
|
|
// In runtime/mercury_type_info.h:
|
|
// typedef MR_EnumFunctorDesc **EnumTypeLayout;
|
|
// so here we just use EnumFunctorDesc[][]
|
|
//
|
|
public EnumFunctorDesc[] layout_enum() {
|
|
return (EnumFunctorDesc[]) layout_init;
|
|
}
|
|
|
|
//
|
|
// In runtime/mercury_type_info.h:
|
|
// typedef MR_NotagFunctorDesc *MR_NotagTypeLayout;
|
|
// so here we just us NotagFunctorDesc[]
|
|
//
|
|
public NotagFunctorDesc[] layout_notag() {
|
|
return (NotagFunctorDesc[]) layout_init;
|
|
}
|
|
//
|
|
// In runtime/mercury_type_info.h:
|
|
// typedef MR_PseudoTypeInfo MR_EquivType;
|
|
// so here we just use MR_PseudoTypeInfo
|
|
//
|
|
public PseudoTypeInfo layout_equiv() {
|
|
return (PseudoTypeInfo) layout_init;
|
|
}
|
|
|
|
public TypeLayout(java.lang.Object init) {
|
|
layout_init = init;
|
|
}
|
|
}
|