Changeset 2c8946b


Ignore:
Timestamp:
May 23, 2024, 5:18:27 PM (3 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
dc74231
Parents:
fbc84ca
Message:

Various whitespace and intentation updates.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • doc/proposals/autogen.md

    rfbc84ca r2c8946b  
    4646
    4747Results in the following autogenerated expands to:
    48     forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
     48        forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
    4949        void ?{}(Cell(T)&);
    50     forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
     50        forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
    5151        void ?{}(Cell(T)&, Cell(T));
    52     forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
     52        forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
    5353        void ^?{}(Cell(T)&);
    54     forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
     54        forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
    5555        void ?=?(Cell(T)&, Cell(T));
    56     forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
     56        forall(T* | { T ?=?(T&, T); void ?{}(T&); void ?{}(T&, T); void ^?{}(T&); })
    5757        void ?{}(Cell(T)&, T);
    5858
    5959If these assertions were reduced to the minimial required assertions the result would instead look something like the:
    60     forall(T* | { void ?{}(T&); })
     60        forall(T* | { void ?{}(T&); })
    6161        void ?{}(Cell(T)&);
    62     forall(T* | { void ?{}(T&, T); })
     62        forall(T* | { void ?{}(T&, T); })
    6363        void ?{}(Cell(T)&, Cell(T));
    64     forall(T* | { void ^?{}(T&); })
     64        forall(T* | { void ^?{}(T&); })
    6565        void ^?{}(Cell(T)&);
    66     forall(T* | { T ?=?(T&, T); })
     66        forall(T* | { T ?=?(T&, T); })
    6767        void ?=?(Cell(T)&, Cell(T));
    68     forall(T* | { void ?{}(T&, T); })
     68        forall(T* | { void ?{}(T&, T); })
    6969        void ?{}(Cell(T)&, T);
    7070
  • src/AST/Attribute.hpp

    rfbc84ca r2c8946b  
    5353        friend node_t * mutate(const node_t * node);
    5454        template<typename node_t>
    55     friend node_t * shallowCopy(const node_t * node);
     55        friend node_t * shallowCopy(const node_t * node);
    5656};
    5757
  • src/AST/Bitfield.hpp

    rfbc84ca r2c8946b  
    6060
    6161template<typename T>
    62 inline bool operator== ( const bitfield<T> & a, const bitfield<T> & b ) {
     62inline bool operator==( const bitfield<T> & a, const bitfield<T> & b ) {
    6363        return a.val == b.val;
    6464}
    6565
    6666template<typename T>
    67 inline bool operator!= ( const bitfield<T> & a, const bitfield<T> & b ) {
     67inline bool operator!=( const bitfield<T> & a, const bitfield<T> & b ) {
    6868        return !(a == b);
    6969}
  • src/AST/FunctionSpec.hpp

    rfbc84ca r2c8946b  
    2222namespace Function {
    2323
    24         /// Bitflags for function specifiers
    25         enum {
    26                 Inline   = 1 << 0,
    27                 Noreturn = 1 << 1,
    28                 Fortran  = 1 << 2,
    29                 NumSpecs      = 3
     24/// Bitflags for function specifiers
     25enum {
     26        Inline   = 1 << 0,
     27        Noreturn = 1 << 1,
     28        Fortran  = 1 << 2,
     29};
     30
     31/// Bitflag type for storage classes
     32struct spec_flags {
     33        union {
     34                unsigned int val;
     35                struct {
     36                        bool is_inline   : 1;
     37                        bool is_noreturn : 1;
     38                        bool is_fortran  : 1;
     39                };
    3040        };
    3141
    32         /// Bitflag type for storage classes
    33         struct spec_flags {
    34                 union {
    35                         unsigned int val;
    36                         struct {
    37                                 bool is_inline   : 1;
    38                                 bool is_noreturn : 1;
    39                                 bool is_fortran  : 1;
    40                         };
     42        constexpr spec_flags( unsigned int val = 0 ) : val(val) {}
     43};
    4144
    42                         // MakeBitfieldPrint( NumSpecs )
    43                 };
     45using Specs = bitfield<spec_flags>;
    4446
    45                 constexpr spec_flags( unsigned int val = 0 ) : val(val) {}
    46         };
     47}
    4748
    48         using Specs = bitfield<spec_flags>;
    49 }
    5049}
    5150
  • src/AST/StorageClasses.hpp

    rfbc84ca r2c8946b  
    2222namespace Storage {
    2323
    24         /// Bitflags for storage classes
    25         enum {
    26                 Extern         = 1 << 0,
    27                 Static         = 1 << 1,
    28                 Auto           = 1 << 2,
    29                 Register       = 1 << 3,
    30                 ThreadLocalGcc = 1 << 4,
    31                 ThreadLocalC11 = 1 << 5,
    32                 NumClasses          = 6
     24/// Bitflags for storage classes
     25enum {
     26        Extern         = 1 << 0,
     27        Static         = 1 << 1,
     28        Auto           = 1 << 2,
     29        Register       = 1 << 3,
     30        ThreadLocalGcc = 1 << 4,
     31        ThreadLocalC11 = 1 << 5,
     32};
     33
     34/// Bitflag type for storage classes
     35struct class_flags {
     36        union {
     37                unsigned int val;
     38                struct {
     39                        bool is_extern         : 1;
     40                        bool is_static         : 1;
     41                        bool is_auto           : 1;
     42                        bool is_register       : 1;
     43                        bool is_threadlocalGcc : 1;
     44                        bool is_threadlocalC11 : 1;
     45                };
    3346        };
    3447
    35         /// Bitflag type for storage classes
    36         struct class_flags {
    37                 union {
    38                         unsigned int val;
    39                         struct {
    40                                 bool is_extern         : 1;
    41                                 bool is_static         : 1;
    42                                 bool is_auto           : 1;
    43                                 bool is_register       : 1;
    44                                 bool is_threadlocalGcc : 1;
    45                                 bool is_threadlocalC11 : 1;
    46                         };
     48        constexpr class_flags( unsigned int val = 0 ) : val(val) {}
    4749
    48                         // MakeBitfieldPrint( NumClasses )
    49                 };
     50        bool is_threadlocal_any() { return this->is_threadlocalC11 || this->is_threadlocalGcc; }
     51};
    5052
    51                 constexpr class_flags( unsigned int val = 0 ) : val(val) {}
     53using Classes = bitfield<class_flags>;
    5254
    53                 bool is_threadlocal_any() { return this->is_threadlocalC11 || this->is_threadlocalGcc; }
    54         };
     55}
    5556
    56         using Classes = bitfield<class_flags>;
    57 }
    5857}
    5958
Note: See TracChangeset for help on using the changeset viewer.