Ejemplo n.º 1
0
Value JSAccessorInfo::data() const
  {
#ifdef X_SCRIPT_ENGINE_ENABLE_JAVASCRIPT
  return fromHandle(JSAccessorInfoInternal::val(this).Data());
#else
  return Value();
#endif
  }
Ejemplo n.º 2
0
Value Object::getPrototype() const
  {
#ifdef X_DART
  return XScriptValue();
#else
  const ObjectInternal *internal = ObjectInternal::val(this);
  return fromHandle(internal->_object->GetPrototype());
#endif
  }
Ejemplo n.º 3
0
Value JSArguments::at(xsize i) const
  {
#ifdef X_SCRIPT_ENGINE_ENABLE_JAVASCRIPT
  return fromHandle(JSArgumentsInternal::val(this)[i]);
#else
  (void)i;
  return Value();
#endif
  }
Ejemplo n.º 4
0
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);
}
Ejemplo n.º 5
0
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);
}
Ejemplo n.º 6
0
  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]));
    }
Ejemplo n.º 7
0
void APCObject::Delete(APCHandle* handle) {
  auto const obj = fromHandle(handle);
  obj->~APCObject();
  // No need to run Prop destructors.
  free_huge(obj);
}
Ejemplo n.º 8
0
VertexShaderHandle VertexShaderManager::newVertexShader( VertexShader & shader )
{
    VertexShaderHandle vsh = newHandle();
    fromHandle( vsh ) = shader;
    return vsh;
}
Ejemplo n.º 9
0
intptr_t
omrfile_convert_native_fd_to_omrfile_fd(struct OMRPortLibrary *portLibrary, intptr_t nativeFD)
{
	return fromHandle(portLibrary, (HANDLE) nativeFD);
}