diff options
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/runtime.js b/src/runtime.js index fecd3b68..2ae68279 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -185,10 +185,10 @@ var Runtime = { // type can be a native type or a struct (or null, for structs we only look at size here) getAlignSize: function(type, size, vararg) { // we align i64s and doubles on 64-bit boundaries, unlike x86 -#if TARGET_LE32 == 1 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 1 if (vararg) return 8; #endif -#if TARGET_LE32 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN if (!vararg && (type == 'i64' || type == 'double')) return 8; if (!type) return Math.min(size, 8); // align structures internally to 64 bits #endif @@ -484,6 +484,11 @@ var Runtime = { return ret; } this.processJSString = function processJSString(string) { + /* TODO: use TextEncoder when present, + var encoder = new TextEncoder(); + encoder['encoding'] = "utf-8"; + var utf8Array = encoder['encode'](aMsg.data); + */ string = unescape(encodeURIComponent(string)); var ret = []; for (var i = 0; i < string.length; i++) { |