Remove deprecated WaitableWaitHandle::getStackTrace()

WaitableWaitHandle::getStackTrace() is not used anymore. The stack trace
is computed on the PHP side using the provided reflection API.
Esse commit está contido em:
Jan Oravec
2013-04-30 14:54:12 -07:00
commit de Sara Golemon
commit 8f3e34430c
4 arquivos alterados com 0 adições e 82 exclusões
-13
Ver Arquivo
@@ -398,19 +398,6 @@
},
"args": [
]
},
{
"name": "getStackTrace",
"desc": "Get stack trace of this wait handle",
"flags": [
"HasDocComment"
],
"return": {
"type": "VariantVec",
"desc": "An array of WaitableWaitHandles representing full stack trace, starting with this wait handle"
},
"args": [
]
}
],
"consts": [
@@ -83,58 +83,6 @@ Array c_WaitableWaitHandle::t_getparents() {
return result;
}
Array c_WaitableWaitHandle::t_getstacktrace() {
// no parent data available if finished
if (isFinished()) {
return Array::Create();
}
/**
* At this point, we have an unfinished wait handle and by definition, all
* recursive parents are unfinished as well. Let's walk thru them up the
* stack and populate the output array. One particularly tricky case is to
* correctly follow cross-context boundaries. Sometimes, a wait handle
* originally created in the parent context gets imported and following
* its original parents may skip one or more context boundaries. To avoid
* this, only parents from the same context are considered. A condition
* where no such parent exists indicates a wait handle that was join()-ed
* from the parent context.
*/
AsioSession* session = AsioSession::Get();
Array result = Array::Create(this);
c_WaitableWaitHandle* curr = this;
while (true) {
// find parent in the same context (context may be null)
context_idx_t ctx_idx = curr->getContextIdx();
curr = curr->getParentInContext(ctx_idx);
// continue up the stack within the same context
if (curr) {
result.append(curr);
continue;
}
// the whole dependency chain is outside of context
if (!ctx_idx) {
return result;
}
// cross the boundary; keep crossing until non-empty context is found
do {
--ctx_idx;
result.append(null_variant);
} while (ctx_idx && !(curr = session->getContext(ctx_idx)->getCurrent()));
// all contexts processed
if (!ctx_idx) {
return result;
}
result.append(curr);
}
}
c_BlockableWaitHandle* c_WaitableWaitHandle::addParent(c_BlockableWaitHandle* parent) {
c_BlockableWaitHandle* prev = m_firstParent;
m_firstParent = parent;
@@ -179,16 +127,6 @@ void c_WaitableWaitHandle::setException(ObjectData* exception) {
}
}
c_BlockableWaitHandle* c_WaitableWaitHandle::getParentInContext(context_idx_t ctx_idx) {
c_BlockableWaitHandle* parent = m_firstParent;
while (parent && parent->getContextIdx() != ctx_idx) {
parent = parent->getNextParent();
}
return parent;
}
// throws on context depth level overflows and cross-context cycles
void c_WaitableWaitHandle::join() {
AsioSession* session = AsioSession::Get();
-2
Ver Arquivo
@@ -192,7 +192,6 @@ class c_WaitableWaitHandle : public c_WaitHandle {
public: int t_getcontextidx();
public: Object t_getcreator();
public: Array t_getparents();
public: Array t_getstacktrace();
public:
@@ -213,7 +212,6 @@ class c_WaitableWaitHandle : public c_WaitHandle {
bool isInContext() { return getContextIdx(); }
c_BlockableWaitHandle* getFirstParent() { return m_firstParent; }
c_BlockableWaitHandle* getParentInContext(context_idx_t ctx_idx);
virtual c_WaitableWaitHandle* getChild();
bool hasCycle(c_WaitableWaitHandle* start);
-5
Ver Arquivo
@@ -24828,11 +24828,6 @@ const char *g_class_map[] = {
(const char *)0x20 /* KindOfArray */, NULL,
NULL,
NULL,
(const char *)0x10006040, "getStackTrace", "", (const char*)0, (const char*)0,
"/**\n * ( excerpt from\n * http://php.net/manual/en/waitablewaithandle.getstacktrace.php )\n *\n * Get stack trace of this wait handle\n *\n * @return vector An array of WaitableWaitHandles representing full\n * stack trace, starting with this wait handle\n */",
(const char *)0x20 /* KindOfArray */, NULL,
NULL,
NULL,
NULL,
NULL,
NULL,