aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change
on this file since bee4283 was
bee4283,
checked in by Thierry Delisle <tdelisle@…>, 6 years ago
|
GC files now compile, still working on a compiling example
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[15db1ab] | 1 | #pragma once |
---|
| 2 | |
---|
[f1e42c1] | 3 | #include <stdbool.h> |
---|
[6be0cf9] | 4 | #include <stdint.h> |
---|
| 5 | |
---|
[15db1ab] | 6 | struct gcpointer_t |
---|
| 7 | { |
---|
[6be0cf9] | 8 | intptr_t ptr; |
---|
[15db1ab] | 9 | struct gcpointer_t* next; |
---|
| 10 | }; |
---|
| 11 | |
---|
[bee4283] | 12 | void ?{}(gcpointer_t* this); |
---|
| 13 | void ?{}(gcpointer_t* this, void* address); |
---|
| 14 | void ?{}(gcpointer_t* this, gcpointer_t other); |
---|
| 15 | void ^?{}(gcpointer_t* this); |
---|
| 16 | gcpointer_t* ?=?(gcpointer_t this, gcpointer_t rhs); |
---|
[15db1ab] | 17 | |
---|
| 18 | //Logical operators |
---|
[f1e42c1] | 19 | bool gcpointer_equal(gcpointer_t* this, gcpointer_t* rhs); |
---|
| 20 | bool gcpointer_not_equal(gcpointer_t* this, gcpointer_t* rhs); |
---|
| 21 | bool gcpointer_null(gcpointer_t* this); |
---|
| 22 | |
---|
| 23 | forall(otype T) |
---|
| 24 | struct gcpointer |
---|
| 25 | { |
---|
| 26 | gcpointer_t internal; |
---|
| 27 | }; |
---|
| 28 | |
---|
[bee4283] | 29 | // |
---|
| 30 | forall(otype T) void ?{}(gcpointer(T)* this); |
---|
| 31 | forall(otype T) void ?{}(gcpointer(T)* this, void* address); |
---|
| 32 | forall(otype T) void ctor(gcpointer(T)* this, void* address); |
---|
| 33 | forall(otype T) void ?{}(gcpointer(T)* this, gcpointer(T)* other); |
---|
| 34 | forall(otype T) void ^?{}(gcpointer(T)* this); |
---|
| 35 | forall(otype T) gcpointer(T) ?=?(gcpointer(T) this, gcpointer(T) rhs); |
---|
[f1e42c1] | 36 | |
---|
| 37 | |
---|
[bee4283] | 38 | forall(otype T) T *?(gcpointer(T) this); |
---|
[f1e42c1] | 39 | |
---|
| 40 | //Logical operators |
---|
[bee4283] | 41 | forall(otype T) int ?!=?(gcpointer(T) this, gcpointer(T) rhs); |
---|
| 42 | forall(otype T) int ?==?(gcpointer(T) this, gcpointer(T) rhs); |
---|
Note: See
TracBrowser
for help on using the repository browser.