From 30245c19b157df641ec8b1c9ff4ef6a11d56f644 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Fri, 22 Jun 2018 09:45:24 +0100 Subject: [PATCH] Avoid duplicate tag nams. Copied from Perforce Change: 194081 --- mps/code/protocol.h | 6 +++--- mps/design/protocol.txt | 27 ++++++++++++++------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/mps/code/protocol.h b/mps/code/protocol.h index 6e569486d48..f3cda2ef08d 100644 --- a/mps/code/protocol.h +++ b/mps/code/protocol.h @@ -1,7 +1,7 @@ /* protocol.h: PROTOCOL INHERITANCE DEFINITIONS * * $Id$ - * Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license. * * See design.mps.protocol. */ @@ -292,7 +292,7 @@ extern void ClassRegister(InstClass klass); * * This should only be used when specialising an instance to be a * member of a subclass, once the instance has been initialized. See - * design.mps.protocol.if.set-class. + * design.mps.protocol.if.set-class-of-poly. */ #define SetClassOfPoly(inst, _class) \ @@ -332,7 +332,7 @@ extern void ClassRegister(InstClass klass); /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2016 Ravenbrook Limited . + * Copyright (C) 2001-2018 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/design/protocol.txt b/mps/design/protocol.txt index 463281c4aed..98a1f4ecd7a 100644 --- a/mps/design/protocol.txt +++ b/mps/design/protocol.txt @@ -395,34 +395,35 @@ functions. ``SuperclassPoly(kind, class)`` -_`.if.superclass`: An introspection function which returns the direct -superclass of class object ``class`` as a class of kind ``kind``. -This may assert if the superclass is not (a subtype of) the kind -requested. +_`.if.superclass-poly`: An introspection function which returns the +direct superclass of class object ``class`` as a class of kind +``kind``. This may assert if the superclass is not (a subtype of) the +kind requested. ``ClassOfPoly(kind, inst)`` -_`.if.class`: An introspection function which returns the class of -which ``inst`` is a direct instance, as a class of kind ``kind``. -This may assert if the class is not (a subtype of) the kind requested. +_`.if.class-of-poly`: An introspection function which returns the +class of which ``inst`` is a direct instance, as a class of kind +``kind``. This may assert if the class is not (a subtype of) the kind +requested. ``SetClassOfPoly(inst, class)`` -_`.if.set-class`: An initialization function that sets the class of -``inst`` to be ``class``. This is intended only for use in +_`.if.set-class-of-poly`: An initialization function that sets the +class of ``inst`` to be ``class``. This is intended only for use in initialization functions, to specialize the instance once its fields -have been initialized. Each Init function should call its superclass +have been initialized. Each Init function should call its superclass init, finally reaching InstInit, and then, once it has set up its fields, use SetClassOfPoly to set the class and check the instance -with its check method. Compare with `design.mps.sig`_. +with its check method. Compare with `design.mps.sig`_. .. _`design.mps.sig`: sig ``IsSubclass(sub, super)`` -_`.if.subclass`: An introspection function which returns a ``Bool`` +_`.if.is-subclass`: An introspection function which returns a ``Bool`` indicating whether ``sub`` is a subclass of ``super``. That is, it is a predicate for testing subclass relationships. @@ -644,7 +645,7 @@ B. Document History C. Copyright and License ------------------------ -Copyright © 2013-2016 Ravenbrook Limited . +Copyright © 2013-2018 Ravenbrook Limited . All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.