ADTast-experimental
Last change
on this file since 996c8ed was
fd54fef,
checked in by Michael Brooks <mlbrooks@…>, 4 years ago
|
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.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | #pragma once |
---|
2 | |
---|
3 | #include <stdbool.h> |
---|
4 | #include <stdint.h> |
---|
5 | |
---|
6 | forall(T &) |
---|
7 | struct gcpointer; |
---|
8 | |
---|
9 | struct gcpointer_t |
---|
10 | { |
---|
11 | intptr_t ptr; |
---|
12 | struct gcpointer_t* next; |
---|
13 | }; |
---|
14 | |
---|
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); |
---|
19 | gcpointer_t ?=?(gcpointer_t* this, gcpointer_t rhs); |
---|
20 | |
---|
21 | //Logical operators |
---|
22 | bool gcpointer_equal(gcpointer_t* this, gcpointer_t* rhs); |
---|
23 | bool gcpointer_not_equal(gcpointer_t* this, gcpointer_t* rhs); |
---|
24 | bool gcpointer_null(const gcpointer_t* this); |
---|
25 | |
---|
26 | |
---|
27 | #ifndef NDEBUG |
---|
28 | bool is_valid(const gcpointer_t* this); |
---|
29 | #endif |
---|
30 | |
---|
31 | forall(T &) |
---|
32 | struct gcpointer |
---|
33 | { |
---|
34 | gcpointer_t internal; |
---|
35 | }; |
---|
36 | |
---|
37 | // |
---|
38 | forall(T) void ?{}(gcpointer(T)* this); |
---|
39 | forall(T) void ?{}(gcpointer(T)* this, void* address); |
---|
40 | forall(T) void ?{}(gcpointer(T)* this, gcpointer(T) other); |
---|
41 | forall(T) void ^?{}(gcpointer(T)* this); |
---|
42 | forall(T) gcpointer(T) ?=?(gcpointer(T)* this, gcpointer(T) rhs); |
---|
43 | |
---|
44 | |
---|
45 | // forall(otype T) T *?(gcpointer(T) this); |
---|
46 | forall(T) T* get(gcpointer(T)* this); |
---|
47 | |
---|
48 | //Logical operators |
---|
49 | forall(T) int ?!=?(gcpointer(T) this, int zero); |
---|
50 | forall(T) int ?!=?(gcpointer(T) this, gcpointer(T) rhs); |
---|
51 | forall(T) int ?==?(gcpointer(T) this, gcpointer(T) rhs); |
---|
Note: See
TracBrowser
for help on using the repository browser.