bool eval_get_call_info_static_method_hook(MethodCallPackage &info, bool &foundClass) { if (!hhvm) { ASSERT(!foundClass); ClassEvalState *ce; const MethodStatementWrapper *msw = Eval::RequestEvalState::findMethod(info.rootCls, *info.name, ce, true); foundClass = (ce != NULL); if (msw) { info.ci = msw->m_methodStatement->getCallInfo(); info.extra = (void*)msw; eval_set_callee_alias(*info.name); return true; } if (ce) { if (ce->getAttributes() & ObjectData::HasCallStatic) { info.obj = 0; info.ci = ObjectData::GetCallHandler(); return true; } } } return false; }
bool eval_get_call_info_static_method_hook(MethodCallPackage &info, bool &foundClass) { ASSERT(!foundClass); const MethodStatement *ms = Eval::RequestEvalState::findMethod(info.rootCls->data(), info.name->data(), foundClass, true); if (ms) { info.ci = ms->getCallInfo(); info.extra = (void*)ms; return true; } if (foundClass) { ClassEvalState *ce = Eval::RequestEvalState::findClassState(info.rootCls); if (ce->getAttributes() & ObjectData::HasCallStatic) { info.obj = 0; info.ci = ObjectData::GetCallHandler(); return true; } } return false; }