本文整理汇总了C++中Identifier::toStrictUInt32方法的典型用法代码示例。如果您正苦于以下问题:C++ Identifier::toStrictUInt32方法的具体用法?C++ Identifier::toStrictUInt32怎么用?C++ Identifier::toStrictUInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Identifier
的用法示例。
在下文中一共展示了Identifier::toStrictUInt32方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unMap
void IndexToNameMap::unMap(ExecState* exec, const Identifier& index)
{
bool indexIsNumber;
unsigned indexAsNumber = index.toStrictUInt32(&indexIsNumber);
ASSERT(indexIsNumber && indexAsNumber < m_size);
m_map[indexAsNumber] = exec->propertyNames().nullIdentifier;
}
示例2: unMap
void IndexToNameMap::unMap(const Identifier &index)
{
bool indexIsNumber;
int indexAsNumber = index.toStrictUInt32(&indexIsNumber);
assert(indexIsNumber && indexAsNumber < _size);
_map[indexAsNumber] = CommonIdentifiers::shared()->nullIdentifier;;
}
示例3: deleteProperty
bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyName)
{
if (propertyName == exec->propertyNames().length)
return false;
bool isStrictUInt32;
unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
if (isStrictUInt32 && internalValue()->canGetIndex(i))
return false;
return JSObject::deleteProperty(exec, propertyName);
}
示例4: put
void ObjectPrototype::put(TiExcState* exec, const Identifier& propertyName, TiValue value, PutPropertySlot& slot)
{
TiObject::put(exec, propertyName, value, slot);
if (m_hasNoPropertiesWithUInt32Names) {
bool isUInt32;
propertyName.toStrictUInt32(&isUInt32);
m_hasNoPropertiesWithUInt32Names = !isUInt32;
}
}
示例5: getStringPropertyAttributes
bool JSString::getStringPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const
{
if (propertyName == exec->propertyNames().length) {
attributes = DontEnum | DontDelete | ReadOnly;
return true;
}
bool isStrictUInt32;
unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
if (isStrictUInt32 && i < static_cast<unsigned>(m_value.size())) {
attributes = DontDelete | ReadOnly;
return true;
}
return false;
}
示例6: getStringPropertyDescriptor
bool JSString::getStringPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
if (propertyName == exec->propertyNames().length) {
descriptor.setDescriptor(jsNumber(exec, m_value.size()), DontEnum | DontDelete | ReadOnly);
return true;
}
bool isStrictUInt32;
unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
if (isStrictUInt32 && i < static_cast<unsigned>(m_value.size())) {
descriptor.setDescriptor(jsSingleCharacterSubstring(exec, m_value, i), DontDelete | ReadOnly);
return true;
}
return false;
}
示例7: isMapped
bool IndexToNameMap::isMapped(const Identifier& index) const
{
bool indexIsNumber;
unsigned indexAsNumber = index.toStrictUInt32(&indexIsNumber);
if (!indexIsNumber)
return false;
if (indexAsNumber >= m_size)
return false;
if (m_map[indexAsNumber].isNull())
return false;
return true;
}
示例8: getStringPropertyDescriptor
bool JSString::getStringPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
if (propertyName == exec->propertyNames().length) {
descriptor.setDescriptor(jsNumber(exec, m_length), DontEnum | DontDelete | ReadOnly);
return true;
}
bool isStrictUInt32;
unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
if (isStrictUInt32 && i < m_length) {
descriptor.setDescriptor(getIndex(exec, i), DontDelete | ReadOnly);
return true;
}
return false;
}