ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 6a9d4b4 was
bf71cfd,
checked in by Thierry Delisle <tdelisle@…>, 6 years ago
|
Moved up many directories in source
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[15db1ab] | 1 | #pragma once |
---|
| 2 | |
---|
[f1e42c1] | 3 | #include <stdbool.h> |
---|
[6be0cf9] | 4 | #include <stdint.h> |
---|
| 5 | |
---|
[46f1d20] | 6 | forall(dtype T) |
---|
| 7 | struct gcpointer; |
---|
| 8 | |
---|
[15db1ab] | 9 | struct gcpointer_t |
---|
| 10 | { |
---|
[6be0cf9] | 11 | intptr_t ptr; |
---|
[15db1ab] | 12 | struct gcpointer_t* next; |
---|
| 13 | }; |
---|
| 14 | |
---|
[bee4283] | 15 | void ?{}(gcpointer_t* this); |
---|
| 16 | void ?{}(gcpointer_t* this, void* address); |
---|
| 17 | void ?{}(gcpointer_t* this, gcpointer_t other); |
---|
| 18 | void ^?{}(gcpointer_t* this); |
---|
[46f1d20] | 19 | gcpointer_t ?=?(gcpointer_t* this, gcpointer_t rhs); |
---|
[15db1ab] | 20 | |
---|
| 21 | //Logical operators |
---|
[f1e42c1] | 22 | bool gcpointer_equal(gcpointer_t* this, gcpointer_t* rhs); |
---|
| 23 | bool gcpointer_not_equal(gcpointer_t* this, gcpointer_t* rhs); |
---|
[4c1403c] | 24 | bool gcpointer_null(const gcpointer_t* this); |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | #ifndef NDEBUG |
---|
| 28 | bool is_valid(const gcpointer_t* this); |
---|
| 29 | #endif |
---|
[f1e42c1] | 30 | |
---|
[46f1d20] | 31 | forall(dtype T) |
---|
[f1e42c1] | 32 | struct gcpointer |
---|
| 33 | { |
---|
| 34 | gcpointer_t internal; |
---|
| 35 | }; |
---|
| 36 | |
---|
[bee4283] | 37 | // |
---|
| 38 | forall(otype T) void ?{}(gcpointer(T)* this); |
---|
| 39 | forall(otype T) void ?{}(gcpointer(T)* this, void* address); |
---|
[76af36f] | 40 | forall(otype T) void ?{}(gcpointer(T)* this, gcpointer(T) other); |
---|
[bee4283] | 41 | forall(otype T) void ^?{}(gcpointer(T)* this); |
---|
[46f1d20] | 42 | forall(otype T) gcpointer(T) ?=?(gcpointer(T)* this, gcpointer(T) rhs); |
---|
[f1e42c1] | 43 | |
---|
| 44 | |
---|
[46f1d20] | 45 | // forall(otype T) T *?(gcpointer(T) this); |
---|
[6643e72] | 46 | forall(otype T) T* get(gcpointer(T)* this); |
---|
[f1e42c1] | 47 | |
---|
| 48 | //Logical operators |
---|
[46f1d20] | 49 | forall(otype T) int ?!=?(gcpointer(T) this, int zero); |
---|
[bee4283] | 50 | forall(otype T) int ?!=?(gcpointer(T) this, gcpointer(T) rhs); |
---|
| 51 | forall(otype T) int ?==?(gcpointer(T) this, gcpointer(T) rhs); |
---|
Note: See
TracBrowser
for help on using the repository browser.