本文整理汇总了C++中AvmCore::isInternedUint方法的典型用法代码示例。如果您正苦于以下问题:C++ AvmCore::isInternedUint方法的具体用法?C++ AvmCore::isInternedUint怎么用?C++ AvmCore::isInternedUint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AvmCore
的用法示例。
在下文中一共展示了AvmCore::isInternedUint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getUintProperty
Atom ScriptObject::getUintProperty(uint32_t i) const
{
// N.B.: a key present in ScriptObject must be interned string;
// thus uninterned implies absent (cf. bugzilla 556023).
AvmCore* core = this->core();
if (!(i&MAX_INTEGER_MASK))
{
if (!traits()->needsHashtable())
{
Stringp interned;
bool present = core->isInternedUint(i, &interned);
if (present)
{
Atom name = interned->atom();
return getAtomPropertyFromProtoChain(name, delegate,
traits());
}
else
{
return undefinedAtom;
}
}
else
{
// dynamic lookup on this object
Atom name = core->uintToAtom (i);
const ScriptObject *o = this;
do
{
// ensure prototype is dynamic
if (!o->vtable->traits->getHashtableOffset())
continue;
Atom const value = o->getTable()->getNonEmpty(name);
if (!InlineHashtable::isEmpty(value))
return value;
}
while ((o = o->delegate) != NULL);
return undefinedAtom;
}
}
else
{
Stringp interned;
bool present;
present = core->isInternedUint(i, &interned);
if (present)
{
return getAtomProperty(interned->atom());
}
else
{
return undefinedAtom;
}
}
}