// --- print_on
void CodeBlob::print_on(outputStream*st)const{
  ResourceMark rm;
  if (!st) { st = tty; }
  // --- Text only dump
  intptr_t o = *(intptr_t*)&_owner;
  if( o && RefPoisoning ) o = ~o;

  const char *methname = methodname();
st->print("((struct CodeBlob*)%p) ={ ((objectRef)%p), %s, %s, sz=%d, frame=%d",
            this, (void*)o, name(), methname ? methname : "(null)", _size_in_bytes, _framesize_bytes );
  if( _oop_maps ) {
st->print(", _oop_maps={");
    _oop_maps->print(this,st);
  }
  st->print_cr("}");
}
Beispiel #2
0
QVariantMap SyncableObject::toVariantMap()
{
    QVariantMap properties;

    const QMetaObject *meta = metaObject();

    // we collect data from properties
    QMetaProperty prop;
    QString propName;
    for (int i = 0; i < meta->propertyCount(); i++) {
        prop = meta->property(i);
        propName = QString(prop.name());
        if (propName == "objectName")
            continue;
        properties[propName] = prop.read(this);
    }

    // ...as well as methods, which have names starting with "init"
    for (int i = 0; i < meta->methodCount(); i++) {
        QMetaMethod method = meta->method(i);
        QString methodname(SignalProxy::ExtendedMetaObject::methodName(method));
        if (!methodname.startsWith("init") || methodname.startsWith("initSet") || methodname.startsWith("initDone"))
            continue;

        QVariant::Type variantType = QVariant::nameToType(method.typeName());
        if (variantType == QVariant::Invalid && !QByteArray(method.typeName()).isEmpty()) {
#if QT_VERSION >= 0x050000
            qWarning() << "SyncableObject::toVariantMap(): cannot fetch init data for:" << this << method.methodSignature() << "- Returntype is unknown to Qt's MetaSystem:" << QByteArray(method.typeName());
#else
            qWarning() << "SyncableObject::toVariantMap(): cannot fetch init data for:" << this << method.signature() << "- Returntype is unknown to Qt's MetaSystem:" << QByteArray(method.typeName());
#endif
            continue;
        }

        QVariant value(variantType, (const void *)0);
        QGenericReturnArgument genericvalue = QGenericReturnArgument(method.typeName(), value.data());
        QMetaObject::invokeMethod(this, methodname.toLatin1(), genericvalue);

        properties[SignalProxy::ExtendedMetaObject::methodBaseName(method)] = value;
    }
    return properties;
}
Beispiel #3
0
 void seenmethodname( iter_t begin, iter_t end )
   {
     std::string methodname( begin, end );
     mcurmethod = methodname;
   };