Defines | |
| #define | ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1)) |
| #define | PUSH(stack, size, type) (ALIGN((stack),sizeof(type)),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type)))) |
| #define | PUSHS(stack, type) (ALIGN((stack),sizeof(long)),(stack)+=(sizeof(type)),(type*)((stack)-(sizeof(type)))) |
| #define | VARDECL(var) var |
| #define | ALLOC(var, size, type) var = PUSH(stack, size, type) |
| #define ALIGN | ( | stack, | |||
| size | ) | ((stack) += ((size) - (long)(stack)) & ((size) - 1)) |
Aligns the stack to a 'size' boundary
| stack | Stack | |
| size | New size boundary |
| #define ALLOC | ( | var, | |||
| size, | |||||
| type | ) | var = PUSH(stack, size, type) |
Allocate 'size' elements of 'type' on stack
| var | Name of variable to allocate | |
| size | Number of elements | |
| type | Type of element |
| #define PUSH | ( | stack, | |||
| size, | |||||
| type | ) | (ALIGN((stack),sizeof(type)),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type)))) |
Allocates 'size' elements of type 'type' on the stack
| stack | Stack | |
| size | Number of elements | |
| type | Type of element |
| #define PUSHS | ( | stack, | |||
| type | ) | (ALIGN((stack),sizeof(long)),(stack)+=(sizeof(type)),(type*)((stack)-(sizeof(type)))) |
Allocates a struct stack
| stack | Stack | |
| type | Struct type |
| #define VARDECL | ( | var | ) | var |
Declare variable on stack
| var | Variable to declare |
1.5.7.1