Lichen

Changeset

950:7124e454ce16
2021-11-06 Paul Boddie raw files shortlog changelog graph Removed superfluous tagging definitions. trailing-data-int-float
templates/native/identity.c (file) templates/types.h (file)
     1.1 --- a/templates/native/identity.c	Fri Nov 05 01:17:14 2021 +0100
     1.2 +++ b/templates/native/identity.c	Sat Nov 06 00:56:03 2021 +0100
     1.3 @@ -28,15 +28,11 @@
     1.4  
     1.5  __attr __fn_native_identity_is_(__attr __self, __attr x, __attr y)
     1.6  {
     1.7 -    /* NOTE: value member assumed equivalent to rawvalue for comparison. */
     1.8 -
     1.9      return x.value == y.value ? __builtins___boolean_True : __builtins___boolean_False;
    1.10  }
    1.11  
    1.12  __attr __fn_native_identity_is_not(__attr __self, __attr x, __attr y)
    1.13  {
    1.14 -    /* NOTE: value member assumed equivalent to rawvalue for comparison. */
    1.15 -
    1.16      return x.value != y.value ? __builtins___boolean_True : __builtins___boolean_False;
    1.17  }
    1.18  
     2.1 --- a/templates/types.h	Fri Nov 05 01:17:14 2021 +0100
     2.2 +++ b/templates/types.h	Sat Nov 06 00:56:03 2021 +0100
     2.3 @@ -87,7 +87,6 @@
     2.4      /* General attribute members. */
     2.5  
     2.6      __ref value;                /* attribute value */
     2.7 -    uintptr_t rawvalue;         /* raw attribute value used to test tagging */
     2.8  
     2.9      /* Special case attribute members. */
    2.10  
    2.11 @@ -128,18 +127,6 @@
    2.12  
    2.13  #define __FRAGMENT_SIZE(NUMBER) ((NUMBER) * sizeof(__attr) + 2 * sizeof(__int))
    2.14  
    2.15 -/* Attribute interpretation. */
    2.16 -
    2.17 -#define __NUM_TAG_BITS      2
    2.18 -#define __TAG_INT           0b01
    2.19 -#define __TAG_FLOAT         0b10
    2.20 -#define __TAG_MASK          0b11
    2.21 -
    2.22 -#if 0
    2.23 -#define __INTEGER(ATTR)     (((ATTR).rawvalue & __TAG_MASK) == __TAG_INT)
    2.24 -#define __FLOAT(ATTR)       (((ATTR).rawvalue & __TAG_MASK) == __TAG_FLOAT)
    2.25 -#endif
    2.26 -
    2.27  /* Attribute value setting. */
    2.28  
    2.29  #define __ATTRVALUE(VALUE)  ((__attr) {.value=(__ref) VALUE})