diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-11-14 15:44:47 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-11-14 15:44:47 -0800 |
commit | 4ab5f3fae94f94ccdb754706c0c65cdf832ab90c (patch) | |
tree | b0bf299ee9dc62687ef01c24d87e51bf8aff52ea | |
parent | 19a8ebc69fc7f0eb1e31f133637c769e18a44929 (diff) |
handle all llvm functions in |store|
-rw-r--r-- | src/intertyper.js | 2 | ||||
-rw-r--r-- | src/jsifier.js | 6 | ||||
-rw-r--r-- | src/settings.js | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/intertyper.js b/src/intertyper.js index c0708daa..99a7d76f 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -6,7 +6,7 @@ var LLVM_STYLE = null; //! want to parse all of them at once, and have all their //! lines and data in memory at the same time. function intertyper(data, parseFunctions) { - //parseFunctions = true; // Uncomment to do all parsing in a single big RAM-heavy pass + //parseFunctions = true; // Uncomment to do all parsing in a single big RAM-heavy pass. Faster, if you have the RAM // Substrate diff --git a/src/jsifier.js b/src/jsifier.js index a86cc2a4..bc54e991 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -12,8 +12,12 @@ function JSify(data, functionsOnly, givenTypes, givenFunctions) { FUNCTIONS[func.ident] = func; }); + var unparsedCounter = 0; data.unparsedFunctions.forEach(function(func) { + dprint('unparsedFunctions', 'processing |' + func.ident + '|, ' + unparsedCounter + '/' + data.unparsedFunctions.length); + unparsedCounter++; func.JS = JSify(analyzer(intertyper(func.lines, true), TYPES), true, TYPES, FUNCTIONS); + // TODO: unlink all other fields of func, to allow GC to work. Also do not do | = func|! do | = true|. }); // type @@ -506,7 +510,7 @@ function JSify(data, functionsOnly, givenTypes, givenFunctions) { if (item.pointer.intertype == 'value') { return makeSetValue(item.ident, 0, value, null, item.valueType) + ';'; } else { - return makeSetValue(0, getGetElementPtrIndexes(item.pointer), value, null, item.valueType) + ';'; + return makeSetValue(0, indexizeFunctions(finalizeLLVMParameter(item.pointer)), value, null, item.valueType) + ';'; } break; default: diff --git a/src/settings.js b/src/settings.js index 7462af7f..aaaee344 100644 --- a/src/settings.js +++ b/src/settings.js @@ -34,7 +34,7 @@ EXCEPTION_DEBUG = 1; // Print out exceptions in emscriptened code EXECUTION_TIMEOUT = -1; // Throw an exception after X seconds - useful to debug infinite loops // Compiler debugging options -DEBUG_TAGS_SHOWING = []; +DEBUG_TAGS_SHOWING = ['unparsedFunctions']; // Some useful items: // enzymatic // gconst |