本文整理汇总了C++中JSFloat64Array::getByIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ JSFloat64Array::getByIndex方法的具体用法?C++ JSFloat64Array::getByIndex怎么用?C++ JSFloat64Array::getByIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSFloat64Array
的用法示例。
在下文中一共展示了JSFloat64Array::getByIndex方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getOwnPropertySlotByIndex
bool JSFloat64Array::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned index, PropertySlot& slot)
{
JSFloat64Array* thisObject = jsCast<JSFloat64Array*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
if (index < static_cast<Float64Array*>(thisObject->impl())->length()) {
slot.setValue(thisObject->getByIndex(exec, index));
return true;
}
return Base::getOwnPropertySlotByIndex(thisObject, exec, index, slot);
}
示例2:
bool JSFloat64Array::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
JSFloat64Array* thisObject = jsCast<JSFloat64Array*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
if (propertyName < static_cast<Float64Array*>(thisObject->impl())->length()) {
slot.setValue(thisObject->getByIndex(exec, propertyName));
return true;
}
return thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, Identifier::from(exec, propertyName), slot);
}
示例3:
bool JSFloat64Array::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
{
JSFloat64Array* thisObject = jsCast<JSFloat64Array*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
unsigned index = propertyName.asIndex();
if (index != PropertyName::NotAnIndex && index < static_cast<Float64Array*>(thisObject->impl())->length()) {
descriptor.setDescriptor(thisObject->getByIndex(exec, index), DontDelete);
return true;
}
return getStaticValueDescriptor<JSFloat64Array, Base>(exec, getJSFloat64ArrayTable(exec), thisObject, propertyName, descriptor);
}