Ignore:
Timestamp:
Jan 19, 2021, 8:44:29 PM (3 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/src/gcpointers.c

    r2f47ea4 rfd54fef  
    113113#endif
    114114
    115 forall(otype T) void ?{}(gcpointer(T)* this) {
     115forall(T) void ?{}(gcpointer(T)* this) {
    116116        (&this->internal) {};
    117117}
    118118
    119 forall(otype T) void ?{}(gcpointer(T)* this, void* address) {
     119forall(T) void ?{}(gcpointer(T)* this, void* address) {
    120120        (&this->internal) { address };
    121121}
    122122
    123 forall(otype T) void ?{}(gcpointer(T)* this, gcpointer(T) other) {
     123forall(T) void ?{}(gcpointer(T)* this, gcpointer(T) other) {
    124124        (&this->internal) { other.internal };
    125125}
    126126
    127 forall(otype T) void ^?{}(gcpointer(T)* this) {
     127forall(T) void ^?{}(gcpointer(T)* this) {
    128128        ^?{}(&this->internal);
    129129}
    130130
    131 forall(otype T) gcpointer(T) ?=?(gcpointer(T)* this, gcpointer(T) rhs) {
     131forall(T) gcpointer(T) ?=?(gcpointer(T)* this, gcpointer(T) rhs) {
    132132        this->internal = rhs.internal;
    133133        return *this;
     
    136136// forall(otype T) T *?(gcpointer(T) this);
    137137
    138 forall(otype T) T* get(gcpointer(T)* this) {
     138forall(T) T* get(gcpointer(T)* this) {
    139139        return (T*)this->internal.ptr;
    140140}
    141141//
    142142// //Logical operators
    143 forall(otype T) int ?!=?(gcpointer(T) this, int zero) {
     143forall(T) int ?!=?(gcpointer(T) this, int zero) {
    144144        return this.internal.ptr != 0;
    145145}
Note: See TracChangeset for help on using the changeset viewer.