diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-12 14:47:17 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-12 14:47:17 -0700 |
commit | 6010666be99cd0322babba1174cfbc65c776deb5 (patch) | |
tree | dad63b03b751394c169de61fbf2c195f4faf5344 /src/jsifier.js | |
parent | 38890204ed1f5f8dd34cced7c42fc9cf42dccab5 (diff) | |
parent | f9dff9b3f2e95b2ca8e5b8fd97538f301fd080fe (diff) |
Merge branch 'incoming'
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 38f3bd5e..49f2c564 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -324,11 +324,13 @@ function JSify(data, functionsOnly, givenFunctions) { assert(typeof constant === 'object');//, [typeof constant, JSON.stringify(constant), item.external]); // This is a flattened object. We need to find its idents, so they can be assigned to later + var structTypes = null; constant.forEach(function(value, i) { if (needsPostSet(value)) { // ident, or expression containing an ident + if (!structTypes) structTypes = generateStructTypes(item.type); ret.push({ intertype: 'GlobalVariablePostSet', - JS: makeSetValue(makeGlobalUse(item.ident), i, value, 'i32', false, true) + ';' // ignore=true, since e.g. rtti and statics cause lots of safe_heap errors + JS: makeSetValue(makeGlobalUse(item.ident), i, value, structTypes[i], false, true) + ';' // ignore=true, since e.g. rtti and statics cause lots of safe_heap errors }); constant[i] = '0'; } @@ -1831,7 +1833,7 @@ function JSify(data, functionsOnly, givenFunctions) { } if (CORRUPTION_CHECK) { - assert(!ASM_JS); // cannot monkeypatch asm! + assert(!ASM_JS, 'corruption checker is not compatible with asm.js'); print(processMacros(read('corruptionCheck.js'))); } if (HEADLESS) { @@ -1841,6 +1843,9 @@ function JSify(data, functionsOnly, givenFunctions) { print(read('headless.js').replace("'%s'", "'http://emscripten.org'").replace("'?%s'", "''").replace("'?%s'", "'/'").replace('%s,', 'null,').replace('%d', '0')); print('}'); } + if (PROXY_TO_WORKER) { + print(read('proxyWorker.js')); + } if (RUNTIME_TYPE_INFO) { Types.cleanForRuntime(); print('Runtime.typeInfo = ' + JSON.stringify(Types.types)); |