本文整理汇总了C++中JSFloat64Array类的典型用法代码示例。如果您正苦于以下问题:C++ JSFloat64Array类的具体用法?C++ JSFloat64Array怎么用?C++ JSFloat64Array使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JSFloat64Array类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void JSFloat64Array::putByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, JSValue value, bool)
{
JSFloat64Array* thisObject = jsCast<JSFloat64Array*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
thisObject->indexSetter(exec, propertyName, value);
return;
}
示例2:
void JSFloat64Array::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSFloat64Array* thisObject = jsCast<JSFloat64Array*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
for (unsigned i = 0; i < static_cast<Float64Array*>(thisObject->impl())->length(); ++i)
propertyNames.add(Identifier::from(exec, i));
Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
示例3: jsFloat64ArrayPrototypeFunctionSet
EncodedJSValue JSC_HOST_CALL jsFloat64ArrayPrototypeFunctionSet(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSFloat64Array::s_info))
return throwVMTypeError(exec);
JSFloat64Array* castedThis = jsCast<JSFloat64Array*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSFloat64Array::s_info);
return JSValue::encode(setWebGLArrayHelper<Float64Array, double>(exec, castedThis->impl()));
}
示例4: 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);
}
示例5: ASSERT_GC_OBJECT_INHERITS
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);
}
示例6: jsFloat64ArrayPrototypeFunctionFoo
EncodedJSValue JSC_HOST_CALL jsFloat64ArrayPrototypeFunctionFoo(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSFloat64Array::s_info))
return throwVMTypeError(exec);
JSFloat64Array* castedThis = jsCast<JSFloat64Array*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSFloat64Array::s_info);
Float64Array* impl = static_cast<Float64Array*>(castedThis->impl());
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Float32Array* array(toFloat32Array(exec->argument(0)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->foo(array)));
return JSValue::encode(result);
}
示例7: jsFloat64ArrayConstructor
JSValue jsFloat64ArrayConstructor(ExecState* exec, JSValue slotBase, PropertyName)
{
JSFloat64Array* domObject = jsCast<JSFloat64Array*>(asObject(slotBase));
return JSFloat64Array::getConstructor(exec, domObject->globalObject());
}
示例8: jsFloat64ArrayConstructor
JSValue jsFloat64ArrayConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSFloat64Array* domObject = static_cast<JSFloat64Array*>(asObject(slotBase));
return JSFloat64Array::getConstructor(exec, domObject->globalObject());
}