kripken/emscripten — pull request #3106 by sbalko (2014-12-24 03:05:36+00:00)
Title: Let 'allocate' accept static memory that is defined as UTF-8 string with...

... character codepoints being the byte values

This is a small patch to the "allocate" function, which let's it accept a UTF-8 string, defining static memory. The Unicode character code points of that string are the byte values in the to-be-allocated memory. For performance reasons, the patch does not check for (non-Latin 1) code points being outside of the 0...255 range.

In order to turn the static memory regions that are currently defined as integer arrays, I created a quick-and-dirty script, which needs to be run on the emscripten output: https://gist.github.com/anonymous/74196a36efbb4733a6f5