The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"Представлен Portable Native Client для запуска платформонеза..."
Версия для распечатки Пред. тема | След. тема
Форум Разговоры, обсуждение новостей
Исходное сообщение [ Отслеживать ]
Заметили полезную информацию ? Пожалуйста добавьте в FAQ на WIKI.
. "Представлен Portable Native Client для запуска платформонеза..." +/
Сообщение от Xasd (ok), 21-Май-13, 14:40 
> в http://asmjs.org/spec/latest/ никаких упоминаний указателей на переменные нет. Только function pointers упомянуты.

[quote]
The asm.js programming model is built around integer and floating-point arithmetic and a virtual heap represented as a typed array. While JavaScript does not directly provide constructs for dealing with integers, they can be emulated using two tricks:

    integer loads and stores can be performed using the typed arrays API; and
    integer arithmetic is equivalent to the composition of JavaScript's floating-point arithmetic operators with the integer coercions performed by the bitwise operators.

As an example of the former, if we have an Int32Array view of the heap called HEAP32, then we can load the 32-bit integer at byte offset p:

HEAP32[p >> 2]|0

The shift converts the byte offset to a 32-bit element offset, and the bitwise coercion ensures that an out-of-bounds access is coerced from undefined back to an integer.

...
[/quote]

>> в NaCl -- ЕСТЬ доступ к DOM
> не прямой
> C++ code cannot directly manipulate the DOM. however, the NaCl module can use the PostMessage interface to send strings to JavaScript code, which can then do the actual DOM manipulation.

ну.. доступ к DOM через PostMessage . всё нормально. не через libastral же будет доступ из низкоуровневого C/C++ в высокоуровневую среду.

а кстате, как ты вообще себе представляешь -- каким образом ты будешь на Asm.js НАПРЯМУЮ из C/C++_кода_(emscripten) выполнять операции с DOM-деревом?

Google NaCl находится в чуть более дурацком положении чем Mozilla Asm.js -- по отношению к DOM -- по тому что NaCl примотан ПРОВОЛОКОЙ (на соплях) через <embed> к HTML-страничке. но в принципе -- в любом случае -- писать C/C++ программы для выполнения их хоть на NaCl хоть на Asm.js -- и НЕ предназначено для большого удовольствия.

Ответить | Правка | Наверх | Cообщить модератору

Оглавление
Представлен Portable Native Client для запуска платформонеза..., opennews, 18-Май-13, 13:42  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру