| 1 |
/** |
/* |
| 2 |
* parpend.h |
* parpend.h |
| 3 |
* by Ben Allan |
* by Ben Allan |
| 4 |
* Jan 5, 1998 |
* Jan 5, 1998 |
| 29 |
* the file named COPYING. |
* the file named COPYING. |
| 30 |
*/ |
*/ |
| 31 |
|
|
| 32 |
/** this file should be resorbed into the parameter list processing |
/** @file |
| 33 |
* code that results when instantiate.c is split up. |
* Pending parameter management? |
| 34 |
* In the meanwhile... |
* <pre> |
| 35 |
|
* When #including parpend.h, make sure these files are #included first: |
| 36 |
|
* #include "utilities/ascConfig.h" |
| 37 |
|
* </pre> |
| 38 |
|
* |
| 39 |
|
* @todo This file should be resorbed into the parameter list processing |
| 40 |
|
* code that results when instantiate.c is split up. |
| 41 |
|
* In the meanwhile... |
| 42 |
*/ |
*/ |
| 43 |
|
|
| 44 |
#ifndef __PARPEND_H_SEEN__ |
#ifndef __PARPEND_H_SEEN__ |
| 45 |
#define __PARPEND_H_SEEN__ |
#define __PARPEND_H_SEEN__ |
| 46 |
|
|
| 47 |
enum ppstatus { |
enum ppstatus { |
| 48 |
pp_ERR =0, |
pp_ERR =0, |
| 49 |
pp_ISA, /** IS_A of simple to be done, from absorbed. */ |
pp_ISA, /**< IS_A of simple to be done, from absorbed. */ |
| 50 |
pp_ISAARR, /** IS_A of array to do, from absorbed and |
pp_ISAARR, /**< IS_A of array to do, from absorbed and |
| 51 |
* gets converted to asar during processing. |
gets converted to asar during processing. */ |
| 52 |
*/ |
pp_ARR, /**< array that's constructed but requires range checking */ |
| 53 |
pp_ARR, /** array that's constructed but requires range checking */ |
pp_ASGN, /**< assignment to do in absorbed objects */ |
| 54 |
pp_ASGN, /** assignment to do in absorbed objects */ |
pp_ASSC, /**< scalar assignment to check in absorbed objects */ |
| 55 |
pp_ASSC, /** scalar assignment to check in absorbed objects */ |
pp_ASAR, /**< Array to be checked for being completely assigned, |
| 56 |
pp_ASAR, /** Array to be checked for being completely assigned, |
but its subscript range is presumed right. */ |
| 57 |
* but its subscript range is presumed right. |
pp_WV, /**< WITH_VALUE to be checked */ |
| 58 |
*/ |
pp_DONE /**< finished statement */ |
|
pp_WV, /** WITH_VALUE to be checked */ |
|
|
pp_DONE /** finished statement */ |
|
| 59 |
}; |
}; |
| 60 |
|
|
| 61 |
struct parpendingentry { |
struct parpendingentry { |
| 62 |
struct Set *arg; /** parameter given in user's IS_A statement */ |
struct Set *arg; /**< parameter given in user's IS_A statement */ |
| 63 |
struct Statement *s; |
struct Statement *s; |
| 64 |
struct Instance *inst; |
struct Instance *inst; |
| 65 |
struct parpendingentry *next; |
struct parpendingentry *next; |
| 66 |
enum ppstatus status; |
enum ppstatus status; |
| 67 |
int argn; /** the psl position if >0, or -(the absorbed position) if <0 */ |
int argn; /**< the psl position if >0, |
| 68 |
/** argn==0 is an error */ |
or -(the absorbed position) if <0. |
| 69 |
|
argn==0 is an error */ |
| 70 |
}; |
}; |
| 71 |
|
|
| 72 |
/** |
/** Allocate a parpending entry. */ |
|
* allocate a parpending entry. |
|
|
*/ |
|
| 73 |
extern struct parpendingentry *CreatePPE(void); |
extern struct parpendingentry *CreatePPE(void); |
| 74 |
|
|
| 75 |
/** |
/** Destroy a parpending entry. */ |
| 76 |
* destroy a parpending entry. |
extern void DestroyPPE(struct parpendingentry *ppe); |
|
*/ |
|
|
extern void DestroyPPE(struct parpendingentry *); |
|
| 77 |
|
|
| 78 |
/** |
/** Starts memory recycle. Do not call twice before stopping recycle. */ |
|
* starts memory recycle. do not call twice before stopping recycle. |
|
|
*/ |
|
| 79 |
extern void ppe_init_pool(void); |
extern void ppe_init_pool(void); |
| 80 |
|
|
| 81 |
/** |
/** Stops memory recycle. Do not call while ANY parpending are outstanding. */ |
|
* stops memory recycle. do not call while ANY parpending are outstanding. |
|
|
*/ |
|
| 82 |
extern void ppe_destroy_pool(void); |
extern void ppe_destroy_pool(void); |
| 83 |
|
|
| 84 |
/** |
/** Write the pool report to ASCERR for the ppe pool. */ |
|
* write the pool report to ASCERR for the ppe pool. |
|
|
*/ |
|
| 85 |
extern void ppe_report_pool(void); |
extern void ppe_report_pool(void); |
| 86 |
|
|
| 87 |
#endif /** __PARPEND_H_SEEN__ */ |
#endif /* __PARPEND_H_SEEN__ */ |
| 88 |
|
|