|
P99
|
This defines some macros that can be used to ensure that certain operations are always executed before entering and after leaving a particular block. More...
Collaboration diagram for Preprocessor Blocks:Modules | |
| Checking code validity | |
| Try, catch and finally blocks | |
Defines | |
| #define | P99_AVOID for (;0;) |
| Only execute the depending statement or block if it is jumped into explicitly from the outer block. | |
| #define | P99_BLK_MARK(X) |
| mark the assembler of a block just before and after | |
| #define | P99_BLOCK(...) P99_PREFER(__VA_ARGS__) P99_NOP |
| Execute the statements in the argument list. | |
| #define | P99_BLOCK_DOCUMENT |
| Add some default documentation and links to the following block macro. | |
| #define | P99_CASERANGE(START, LEN,...) |
| implement a range syntax for case labels. | |
| #define | P99_DO(TYPE, VAR, LOW, LEN, INCR) for(;;) |
| A fortran like do-loop with bounds that are fixed at the beginning. | |
| #define | P99_FORALL(NAME,...) P00_FORALL(P99_NARG(__VA_ARGS__), NAME, __VA_ARGS__) |
A multi-index for loop. | |
| #define | P99_GUARDED_BLOCK(T, NAME, INITIAL, BEFORE, AFTER) |
| A meta-macro to protect a dependent block or statement by a guard variable NAME of type T. | |
| #define | P99_HANDLE_ERRNO |
Handle and reset errno. | |
| #define | P99_INVARIANT(EXPR) P99_PROTECTED_BLOCK(assert((EXPR) && "failed at beginning of block"), assert((EXPR) && "failed at end of block")) |
| Assert runtime condition EXPR when entering or leaving the dependent block. | |
| #define | P99_MARK(X) P99_NOP |
| mark the produced assembler with a comment that contains the source line number and the token X | |
| #define | P99_NOP ((void)0) |
| Do nothing. | |
| #define | P99_PARALLEL_DO(TYPE, VAR, LOW, LEN, INCR) for(;;) |
| as P99_DO but performs the iterations out of order | |
| #define | P99_PARALLEL_FOR _Pragma(P99_PARALLEL_PRAGMA) for |
Declare a for loop for which all iterations can be run independently and out of order. | |
| #define | P99_PARALLEL_FORALL(NAME,...) P00_PARALLEL_FORALL(P99_NARG(__VA_ARGS__), NAME, __VA_ARGS__) |
A multi-index for loop who's dependent statement or block may be executed out of order. | |
| #define | P99_PREFER(...) if (1) { __VA_ARGS__ } else |
| Prefer the statements in the argument list over the statement or block that follows. | |
| #define | P99_PROTECT |
| The pseudo label to which we jump when we unwind the stack with P99_UNWIND. | |
| #define | P99_PROTECTED_BLOCK(BEFORE, AFTER) |
| A meta-macro to protect a dependent block or statement by the statements BEFORE that is executed before the block and AFTER that is executed afterward. | |
| #define | P99_UNCASE P00_UNCASE : |
| A command prefixed with this cannot be a case target from surrounding scopes. | |
| #define | P99_UNWIND(X) p00_unwind(p00_unwind_top, p99_unwind_level, (X)) |
| Preliminary resume from one or several levels of nested P99_UNWIND_PROTECT. | |
| #define | p99_unwind_code ((int)(p00_unwind_top[0].p00_code)) |
| The code an eventual call to P99_UNWIND. | |
| #define | P99_UNWIND_PROTECT |
| Unwind execution from several levels of nesting inside a function. | |
| #define | P99_UNWIND_RETURN |
| Return from the enclosing function after unwinding all levels of nested P99_UNWIND_PROTECT. | |
| #define | P99_XCASE P99_AVOID case |
An exclusive case for a switch statement. | |
| #define | P99_XDEFAULT P99_AVOID default |
| The default case analogous to P99_XCASE. | |
Enumerations | |
| enum | p99_unwind { p99_unwind_level = 0 , p99_unwind_return = INT_MAX } |
This defines some macros that can be used to ensure that certain operations are always executed before entering and after leaving a particular block.
1.7.6.1