Value JSAccessorInfo::data() const { #ifdef X_SCRIPT_ENGINE_ENABLE_JAVASCRIPT return fromHandle(JSAccessorInfoInternal::val(this).Data()); #else return Value(); #endif }
Value Object::getPrototype() const { #ifdef X_DART return XScriptValue(); #else const ObjectInternal *internal = ObjectInternal::val(this); return fromHandle(internal->_object->GetPrototype()); #endif }
Value JSArguments::at(xsize i) const { #ifdef X_SCRIPT_ENGINE_ENABLE_JAVASCRIPT return fromHandle(JSArgumentsInternal::val(this)[i]); #else (void)i; return Value(); #endif }
void APCObject::Delete(APCHandle* handle) { if (handle->isSerializedObj()) { delete APCString::fromHandle(handle); return; } auto const obj = fromHandle(handle); obj->~APCObject(); // No need to run Prop destructors. std::free(obj); }
void APCObject::Delete(APCHandle* handle) { if (handle->isCollection()) { return APCCollection::Delete(handle); } if (!handle->isObj()) { delete APCString::fromHandle(handle); return; } auto const obj = fromHandle(handle); obj->~APCObject(); // No need to run Prop destructors. std::free(obj); }
void callAsConstructor(const Function *fn, Value *result, const internal::JSArguments &argv) { const v8::Arguments &args = JSArgumentsInternal::val(&argv); const int argc = args.Length(); std::vector< v8::Handle<v8::Value> > av(static_cast<size_t>(argc),v8::Undefined()); for( int i = 0; i < argc; ++i ) { av[i] = args[i]; } const FunctionInternal* func = FunctionInternal::val(fn); *result = fromHandle(func->_object->NewInstance(argc, &av[0])); }
void APCObject::Delete(APCHandle* handle) { auto const obj = fromHandle(handle); obj->~APCObject(); // No need to run Prop destructors. free_huge(obj); }
VertexShaderHandle VertexShaderManager::newVertexShader( VertexShader & shader ) { VertexShaderHandle vsh = newHandle(); fromHandle( vsh ) = shader; return vsh; }
intptr_t omrfile_convert_native_fd_to_omrfile_fd(struct OMRPortLibrary *portLibrary, intptr_t nativeFD) { return fromHandle(portLibrary, (HANDLE) nativeFD); }