ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 37477ef was
ecfd758,
checked in by Andrew Beach <ajbeach@…>, 3 years ago
|
Major exception update, seperating type-ids from virtual tables. The major interface changes are done. There is a regression of ?Cancelled(T) to Some?Cancelled. There is some bits of code for the new verion of the ?Cancelled(T) interface already there. Not connected yet but I just reached the limit of what I wanted to do in one commit and then spent over a day cleaning up, so it will replace Some?Cancelled in a future commit.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[07c77ce] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // quasiKeyword.cfa -- test that quasi-keywords can be used for variable and functions names, as well as keywords in |
---|
| 5 | // control structures. |
---|
| 6 | // |
---|
| 7 | // Author : Peter A. Buhr |
---|
| 8 | // Created On : Wed Feb 17 10:33:49 2021 |
---|
| 9 | // Last Modified By : Peter A. Buhr |
---|
| 10 | // Last Modified On : Sun Feb 21 15:52:04 2021 |
---|
| 11 | // Update Count : 7 |
---|
| 12 | // |
---|
| 13 | |
---|
| 14 | #include <exception.hfa> |
---|
| 15 | |
---|
[ecfd758] | 16 | EHM_EXCEPTION( E )(); |
---|
[07c77ce] | 17 | |
---|
| 18 | void catch( int i ) {} |
---|
| 19 | void recover( int i ) {} |
---|
| 20 | void catchResume( int i ) {} |
---|
| 21 | void fixup( int i ) {} |
---|
| 22 | void finally( int i ) {} |
---|
| 23 | |
---|
| 24 | int main(int argc, char const *argv[]) { |
---|
| 25 | int catch, recover, catchResume, fixup, finally; |
---|
| 26 | try { |
---|
| 27 | catch = 3; |
---|
| 28 | catch( catch ); |
---|
| 29 | recover = 3; |
---|
| 30 | recover( recover ); |
---|
| 31 | catchResume = 3; |
---|
| 32 | catchResume( catchResume ); |
---|
| 33 | fixup = 3; |
---|
| 34 | fixup( fixup ); |
---|
| 35 | finally = 3; |
---|
| 36 | finally( finally ); |
---|
| 37 | throw (E){}; |
---|
| 38 | report (E){}; |
---|
| 39 | throwResume (E){}; |
---|
| 40 | } catch ( E * ) { |
---|
| 41 | } recover ( E * ) { // same as catch |
---|
| 42 | } catchResume ( E * ) { |
---|
| 43 | } fixup ( E * ) { // same as catchResume |
---|
| 44 | } finally { |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | if ( 3 ) |
---|
| 48 | try { |
---|
| 49 | } fixup ( E * ) { |
---|
| 50 | } finally { |
---|
| 51 | } |
---|
| 52 | else catch = 3; |
---|
| 53 | |
---|
| 54 | #pragma message( "Compiled" ) // force non-empty .expect file |
---|
| 55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.