ObjectData *FrameInjection::getObjectV() const { if (isObjectMethodFrame()) { const FrameInjectionObjectMethod* ofi = static_cast<const FrameInjectionObjectMethod*>(this); return ofi->getThis(); } else if (isEvalFrame()) { const Eval::EvalFrameInjection* efi = static_cast<const Eval::EvalFrameInjection*>(this); return efi->getThis(); } else if (m_flags & PseudoMain) { const FrameInjectionFunction *ffi = static_cast<const FrameInjectionFunction*>(this); return ffi->getThis(); } return NULL; }
ObjectData *FrameInjection::getObjectV() const { // Must check first: an EvalFrame can also be // an ObjectMethodFrame (but its still implemented // using EvalFrameInjection). if (UNLIKELY(isEvalFrame())) { const Eval::EvalFrameInjection* efi = static_cast<const Eval::EvalFrameInjection*>(this); return efi->getThis(); } if (LIKELY(isObjectMethodFrame())) { const FrameInjectionObjectMethod* ofi = static_cast<const FrameInjectionObjectMethod*>(this); return ofi->getThis(); } if (m_flags & PseudoMain) { const FrameInjectionFunction *ffi = static_cast<const FrameInjectionFunction*>(this); return ffi->getThis(); } return NULL; }