本文整理汇总了C++中PropertyNameArray类的典型用法代码示例。如果您正苦于以下问题:C++ PropertyNameArray类的具体用法?C++ PropertyNameArray怎么用?C++ PropertyNameArray使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PropertyNameArray类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getOwnPropertyNames
void JSFunction::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
if (!isHostFunction() && (mode == IncludeDontEnumProperties)) {
propertyNames.add(exec->propertyNames().arguments);
propertyNames.add(exec->propertyNames().callee);
propertyNames.add(exec->propertyNames().caller);
propertyNames.add(exec->propertyNames().length);
}
Base::getOwnPropertyNames(exec, propertyNames, mode);
}
示例2: getOwnPropertyNames
void StringObject::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
StringObject* thisObject = jsCast<StringObject*>(object);
int size = thisObject->internalValue()->length();
for (int i = 0; i < size; ++i)
propertyNames.add(Identifier(exec, String::number(i)));
if (mode == IncludeDontEnumProperties)
propertyNames.add(exec->propertyNames().length);
return JSObject::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
示例3: getOwnPropertyNames
void RuntimeArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
unsigned length = getLength();
for (unsigned i = 0; i < length; ++i)
propertyNames.add(Identifier::from(exec, i));
if (mode == IncludeDontEnumProperties)
propertyNames.add(exec->propertyNames().length);
JSObject::getOwnPropertyNames(exec, propertyNames, mode);
}
示例4: getOwnPropertyNames
void Arguments::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
for (unsigned i = 0; i < d->numArguments; ++i) {
if (!d->deletedArguments || !d->deletedArguments[i])
propertyNames.add(Identifier(exec, UString::number(i)));
}
if (mode == IncludeDontEnumProperties) {
propertyNames.add(exec->propertyNames().callee);
propertyNames.add(exec->propertyNames().length);
}
JSObject::getOwnPropertyNames(exec, propertyNames, mode);
}
示例5: getOwnPropertyNames
void RuntimeArray::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
RuntimeArray* thisObject = jsCast<RuntimeArray*>(object);
unsigned length = thisObject->getLength();
for (unsigned i = 0; i < length; ++i)
propertyNames.add(Identifier::from(exec, i));
if (mode.includeDontEnumProperties())
propertyNames.add(exec->propertyNames().length);
JSObject::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
示例6: getOwnPropertyNames
void JSTestEventTarget::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
{
auto* thisObject = jsCast<JSTestEventTarget*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)
propertyNames.add(Identifier::from(state, i));
if (mode.includeDontEnumProperties()) {
for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())
propertyNames.add(Identifier::fromString(state, propertyName));
}
Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
}
示例7: getOwnNonIndexPropertyNames
void JSModuleEnvironment::getOwnNonIndexPropertyNames(JSObject* cell, ExecState* exec, PropertyNameArray& propertyNamesArray, EnumerationMode mode)
{
JSModuleEnvironment* thisObject = jsCast<JSModuleEnvironment*>(cell);
if (propertyNamesArray.includeStringProperties()) {
for (const auto& pair : thisObject->moduleRecord()->importEntries()) {
const JSModuleRecord::ImportEntry& importEntry = pair.value;
if (!importEntry.isNamespace(exec->vm()))
propertyNamesArray.add(importEntry.localName);
}
}
return Base::getOwnNonIndexPropertyNames(thisObject, exec, propertyNamesArray, mode);
}
示例8: getOwnPropertyNames
void Arguments::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
Arguments* thisObject = jsCast<Arguments*>(object);
for (unsigned i = 0; i < thisObject->d->numArguments; ++i) {
if (!thisObject->d->deletedArguments || !thisObject->d->deletedArguments[i])
propertyNames.add(Identifier(exec, UString::number(i)));
}
if (mode == IncludeDontEnumProperties) {
propertyNames.add(exec->propertyNames().callee);
propertyNames.add(exec->propertyNames().length);
}
JSObject::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
示例9: getOwnPropertyNames
void JSFunction::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
if (!isHostFunction() && (mode == IncludeDontEnumProperties)) {
// Make sure prototype has been reified.
PropertySlot slot;
getOwnPropertySlotVirtual(exec, exec->propertyNames().prototype, slot);
propertyNames.add(exec->propertyNames().arguments);
propertyNames.add(exec->propertyNames().caller);
propertyNames.add(exec->propertyNames().length);
}
Base::getOwnPropertyNames(exec, propertyNames, mode);
}
示例10: getOwnNonIndexPropertyNames
void JSArrayBufferView::getOwnNonIndexPropertyNames(
JSObject* object, ExecState* exec, PropertyNameArray& array, EnumerationMode mode)
{
JSArrayBufferView* thisObject = jsCast<JSArrayBufferView*>(object);
// length/byteOffset/byteLength are DontEnum, at least in Firefox.
if (mode == IncludeDontEnumProperties) {
array.add(exec->propertyNames().byteOffset);
array.add(exec->propertyNames().byteLength);
array.add(exec->propertyNames().buffer);
}
Base::getOwnNonIndexPropertyNames(thisObject, exec, array, mode);
}
示例11: getOwnPropertyNames
void Arguments::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
Arguments* thisObject = jsCast<Arguments*>(object);
for (unsigned i = 0; i < thisObject->m_numArguments; ++i) {
if (!thisObject->isArgument(i))
continue;
propertyNames.add(Identifier::from(exec, i));
}
if (shouldIncludeDontEnumProperties(mode)) {
propertyNames.add(exec->propertyNames().callee);
propertyNames.add(exec->propertyNames().length);
}
JSObject::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
示例12: getOwnNonIndexPropertyNames
void JSFunction::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSFunction* thisObject = jsCast<JSFunction*>(object);
if (!thisObject->isHostOrBuiltinFunction() && mode.includeDontEnumProperties()) {
VM& vm = exec->vm();
// Make sure prototype has been reified.
PropertySlot slot(thisObject);
thisObject->methodTable(vm)->getOwnPropertySlot(thisObject, exec, vm.propertyNames->prototype, slot);
propertyNames.add(vm.propertyNames->arguments);
propertyNames.add(vm.propertyNames->caller);
propertyNames.add(vm.propertyNames->length);
propertyNames.add(vm.propertyNames->name);
}
Base::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode);
}
示例13: getOwnPropertyNames
void StringObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, bool includeNonEnumerable)
{
int size = internalValue()->value().size();
for (int i = 0; i < size; ++i)
propertyNames.add(Identifier(exec, UString::from(i)));
return JSObject::getOwnPropertyNames(exec, propertyNames);
}
示例14: getPropertyNames
void StringObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
{
int size = internalValue()->value().size();
for (int i = 0; i < size; i++)
propertyNames.add(Identifier(exec, UString::from(i)));
return JSObject::getPropertyNames(exec, propertyNames);
}
示例15: getOwnPropertyNames
void JSTouchList::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
for (unsigned i = 0; i < static_cast<TouchList*>(impl())->length(); ++i)
propertyNames.add(Identifier::from(exec, i));
Base::getOwnPropertyNames(exec, propertyNames, mode);
}