diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-09-17 09:44:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-09-17 09:44:24 -0700 |
commit | 94332138df01f4d9e9e7eb7c0464e11ffd70c2b0 (patch) | |
tree | d111acc4f97f1965e05105caa92c0487fe4b0532 /src/jsifier.js | |
parent | 460a975de0b75ea8d1546729a94d1908c1f819af (diff) |
generate FUNCTION_TABLE late so it uses aliases in postsets; fixes ammo.js bug
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index ab5c8720..c5a6ec9d 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -938,13 +938,12 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { print('Runtime.structMetadata = ' + JSON.stringify(Types.structMetadata)); } generated.forEach(function(item) { print(indentify(item.JS || '', 2)); }); - print(Functions.generateIndexing()); - var postFile = BUILD_AS_SHARED_LIB ? 'postamble_sharedlib.js' : 'postamble.js'; var postParts = processMacros(preprocess(read(postFile), CONSTANTS)).split('{{GLOBAL_VARS}}'); print(postParts[0]); itemsDict.GlobalVariable.forEach(function(item) { print(indentify(item.JS, 4)); }); itemsDict.GlobalVariablePostSet.forEach(function(item) { print(indentify(item.JS, 4)); }); + print(Functions.generateIndexing()); // done last, as it may rely on aliases set in postsets print(postParts[1]); print(shellParts[1]); return null; |