Ignore:
Timestamp:
Jan 19, 2021, 8:44:29 PM (4 years ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
dafbde8
Parents:
2f47ea4
Message:

Converting the project to use the new syntax for otype, dtype and ttytpe.

Changed prelude (gen), libcfa and test suite to use it. Added a simple deprecation rule of the old syntax to the parser; we might wish to support both syntaxes "officially," like with an extra CLI switch, but this measure should serve as a simple reminder for our team to try the new syntax.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/zombies/gc_no_raii/bug-repro/push_back.h

    r2f47ea4 rfd54fef  
    11//------------------------------------------------------------------------------
    22//Declaration
    3 trait allocator_c(otype T, otype allocator_t) {
     3trait allocator_c(T, allocator_t) {
    44        void ctor(allocator_t* const);
    55        void dtor(allocator_t* const);
     
    88};
    99
    10 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     10forall(T, allocator_t | allocator_c(T, allocator_t))
    1111struct vector
    1212{
     
    1717//------------------------------------------------------------------------------
    1818//Initialization
    19 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     19forall(T, allocator_t | allocator_c(T, allocator_t))
    2020void vector_ctor(vector(T, allocator_t) *const this);
    2121
    22 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     22forall(T, allocator_t | allocator_c(T, allocator_t))
    2323void dtor(vector(T, allocator_t) *const this);
    2424
    2525//------------------------------------------------------------------------------
    2626//Allocator
    27 forall(otype T)
     27forall(T)
    2828struct heap_allocator
    2929{
     
    3232};
    3333
    34 forall(otype T)
     34forall(T)
    3535void ctor(heap_allocator(T) *const this);
    3636
    37 forall(otype T)
     37forall(T)
    3838void dtor(heap_allocator(T) *const this);
    3939
    40 forall(otype T)
     40forall(T)
    4141void realloc(heap_allocator(T) *const this, size_t size);
    4242
    43 forall(otype T)
     43forall(T)
    4444inline T* data(heap_allocator(T) *const this)
    4545{
     
    4949//------------------------------------------------------------------------------
    5050//Capacity
    51 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     51forall(T, allocator_t | allocator_c(T, allocator_t))
    5252inline bool empty(vector(T, allocator_t) *const this)
    5353{
     
    5555}
    5656
    57 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     57forall(T, allocator_t | allocator_c(T, allocator_t))
    5858inline bool size(vector(T, allocator_t) *const this)
    5959{
     
    6161}
    6262
    63 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     63forall(T, allocator_t | allocator_c(T, allocator_t))
    6464inline void reserve(vector(T, allocator_t) *const this, size_t size)
    6565{
     
    6969//------------------------------------------------------------------------------
    7070//Modifiers
    71 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     71forall(T, allocator_t | allocator_c(T, allocator_t))
    7272void push_back(vector(T, allocator_t) *const this, T value);
Note: See TracChangeset for help on using the changeset viewer.