32 #ifndef _QORE_INTERN_THREADLOCALVARIABLEDATA_H 33 #define _QORE_INTERN_THREADLOCALVARIABLEDATA_H 35 class ThreadLocalVariableData :
public ThreadLocalData<LocalVarValue> {
39 ThreadLocalVariableData::iterator i(curr);
42 if (n->derefCanThrowException()) {
46 cl->push_back(n.release());
56 while (curr->prev || curr->pos)
60 DLLLOCAL LocalVarValue* instantiate() {
61 if (curr->pos == QORE_THREAD_STACK_BLOCK) {
65 curr->next =
new Block(curr);
70 return &curr->var[curr->pos++];
74 uninstantiateIntern();
76 curr->var[curr->pos].uninstantiate(xsink);
79 DLLLOCAL
void uninstantiateSelf() {
80 uninstantiateIntern();
81 curr->var[curr->pos].uninstantiateSelf();
84 DLLLOCAL
void uninstantiateIntern() {
97 DLLLOCAL LocalVarValue* find(
const char*
id) {
103 LocalVarValue* var = &w->var[p];
104 if (var->id ==
id && !var->frame_boundary)
111 printd(0,
"ThreadLocalVariableData::find() this: %p no local variable '%s' (%p) on stack (pgm: %p) p: %d\n",
this,
id,
id,
getProgram(), p);
113 printd(0,
"var p: %d: %s (%p) (frame_boundary: %d)\n", p, curr->var[p].id, curr->var[p].id, curr->var[p].frame_boundary);
124 DLLLOCAL
void pushFrameBoundary() {
127 LocalVarValue* v = instantiate();
128 v->setFrameBoundary();
131 DLLLOCAL
void popFrameBoundary() {
132 assert(frame_count >= 0);
135 uninstantiateIntern();
136 assert(curr->var[curr->pos].frame_boundary);
137 curr->var[curr->pos].frame_boundary =
false;
140 DLLLOCAL
int getFrame(
int frame, Block*& w,
int& p);
This is the hash or associative list container type in Qore, dynamically allocated only...
Definition: QoreHashNode.h:50
DLLEXPORT QoreProgram * getProgram()
returns the current QoreProgram
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:262
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:46
std::vector< QoreValue > arg_vec_t
vector of value information for default argument lists
Definition: common.h:254
holds an object and dereferences it in the destructor
Definition: QoreValue.h:452