ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since d9f1b2d was
6e3ae00,
checked in by Rob Schluntz <rschlunt@…>, 8 years ago
|
added avl_test to regression suite and changed runTests.sh to use make -j 8
|
-
Property mode set to
100644
|
File size:
288 bytes
|
Rev | Line | |
---|
[6e3ae00] | 1 | #include "avl.h" |
---|
| 2 | |
---|
| 3 | forall(otype T | Comparable(T)) |
---|
| 4 | int ?==?(T t1, T t2) { |
---|
| 5 | return !(t1 < t2) && !(t2 < t1); |
---|
| 6 | } |
---|
| 7 | |
---|
| 8 | forall(otype T | Comparable(T)) |
---|
| 9 | int ?>?(T t1, T t2) { |
---|
| 10 | return t2 < t1; |
---|
| 11 | } |
---|
| 12 | |
---|
| 13 | forall(dtype T | { void ^?{}(T *); }) |
---|
| 14 | void delete(T * x) { |
---|
| 15 | if (x) { |
---|
| 16 | ^?{}(x); |
---|
| 17 | free(x); |
---|
| 18 | } |
---|
| 19 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.