Ignore:
Timestamp:
Jan 19, 2021, 8:44:29 PM (17 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr
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.

Location:
tests/zombies/gc_no_raii/bug-repro
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • tests/zombies/gc_no_raii/bug-repro/blockers/explicit_cast.c

    r2f47ea4 rfd54fef  
    99};
    1010
    11 forall(otype T)
     11forall(T)
    1212struct gcpointer
    1313{
     
    1515};
    1616
    17 forall(otype T)
     17forall(T)
    1818static inline gcpointer(T) gcmalloc()
    1919{
  • tests/zombies/gc_no_raii/bug-repro/blockers/recursive_realloc.c

    r2f47ea4 rfd54fef  
    33#include <stdlib.hfa>
    44
    5 trait allocator_c(otype T, otype allocator_t)
     5trait allocator_c(T, allocator_t)
    66{
    77        void realloc(allocator_t* const, size_t);
    88};
    99
    10 forall(otype T)
     10forall(T)
    1111struct heap_allocator
    1212{
     
    1515};
    1616
    17 forall(otype T)
     17forall(T)
    1818inline void realloc(heap_allocator(T) *const this, size_t size)
    1919{
  • tests/zombies/gc_no_raii/bug-repro/deref.c

    r2f47ea4 rfd54fef  
    1     forall(otype T)
     1    forall(T)
    22    struct wrap
    33    {
     
    55    };
    66
    7     forall(otype T)
     7    forall(T)
    88    T *? (wrap(T) rhs)
    99    {
  • tests/zombies/gc_no_raii/bug-repro/field.c

    r2f47ea4 rfd54fef  
    88//------------------------------------------------------------------------------
    99//Declaration
    10 trait allocator_c(otype T, otype allocator_t)
     10trait allocator_c(T, allocator_t)
    1111{
    1212        void ctor(allocator_t* const);
     
    1616};
    1717
    18 forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     18forall(T, allocator_t | allocator_c(T, allocator_t))
    1919struct vector
    2020{
  • tests/zombies/gc_no_raii/bug-repro/malloc.c

    r2f47ea4 rfd54fef  
    1 forall(otype T)
     1forall(T)
    22struct wrapper
    33{
     
    55};
    66
    7 forall(otype T)
     7forall(T)
    88void ctor(wrapper(T)* this)
    99{
     
    1111}
    1212
    13 forall(otype T)
     13forall(T)
    1414wrapper(T) gcmalloc()
    1515{
     
    1919}
    2020
    21 forall(otype T)
     21forall(T)
    2222wrapper(T)* ?=? (wrapper(T)* lhs, wrapper(T)* rhs)
    2323{
  • tests/zombies/gc_no_raii/bug-repro/oddtype.c

    r2f47ea4 rfd54fef  
    1 forall(dtype T)
     1forall(T &)
    22struct wrap {
    33        int i;
    44};
    55
    6 forall(otype T) void ?{}(wrap(T)* this) {}
    7 forall(otype T) void ?=?(wrap(T)* this) {}
    8 forall(otype T) void ^?{}(wrap(T)* this) {}
     6forall(T) void ?{}(wrap(T)* this) {}
     7forall(T) void ?=?(wrap(T)* this) {}
     8forall(T) void ^?{}(wrap(T)* this) {}
    99
    1010struct List_t {
  • 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);
  • tests/zombies/gc_no_raii/bug-repro/realloc.c

    r2f47ea4 rfd54fef  
    11void* realloc(void*, unsigned long int);
    22
    3 forall(otype T)
     3forall(T)
    44struct wrap
    55{
     
    77};
    88
    9 forall(otype T)
     9forall(T)
    1010static inline void realloc(wrap(T) *const this, unsigned long int size)
    1111{
  • tests/zombies/gc_no_raii/bug-repro/return.c

    r2f47ea4 rfd54fef  
    1 forall(otype T)
     1forall(T)
    22struct wrapper
    33{
     
    55};
    66
    7 forall(otype T)
     7forall(T)
    88wrapper(T) create()
    99{
     
    1212}
    1313
    14 forall(otype T)
     14forall(T)
    1515wrapper(T)* ?=?(wrapper(T)* lhs, wrapper(T)* rhs)
    1616{
  • tests/zombies/gc_no_raii/bug-repro/return_template.c

    r2f47ea4 rfd54fef  
    1 forall(otype T)
     1forall(T)
    22struct wrap
    33{
     
    55};
    66
    7 forall(otype T) void ?{}(wrap(T)* this);
    8 forall(otype T) void ?{}(wrap(T)* this, wrap(T)* rhs);
    9 forall(otype T) void ^?{}(wrap(T)* this);
    10 forall(otype T) void ?=?(wrap(T)* this, wrap(T)* rhs);
     7forall(T) void ?{}(wrap(T)* this);
     8forall(T) void ?{}(wrap(T)* this, wrap(T)* rhs);
     9forall(T) void ^?{}(wrap(T)* this);
     10forall(T) void ?=?(wrap(T)* this, wrap(T)* rhs);
    1111
    12 forall(otype T)
     12forall(T)
    1313wrap(T) test()
    1414{
  • tests/zombies/gc_no_raii/bug-repro/slow_malloc.c

    r2f47ea4 rfd54fef  
    11#include <stdlib.hfa>
    22
    3 forall(otype T)
     3forall(T)
    44struct heap_allocator
    55{
  • tests/zombies/gc_no_raii/bug-repro/zero.c

    r2f47ea4 rfd54fef  
    1 forall(otype T)
     1forall(T)
    22struct wrap
    33{
     
    55};
    66
    7 forall(otype T)
     7forall(T)
    88int ?==? (wrap(T) lhs, wrap(T) rhs)
    99{
     
    1414struct wrap(int) 0;
    1515/*/
    16 forall(otype T)
     16forall(T)
    1717struct wrap(T) 0;
    1818//*/
Note: See TracChangeset for help on using the changeset viewer.