aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-10-19 20:08:36 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-10-19 20:08:36 -0700
commit81a6e2186ce7326e119a843b72fcd53cc8ad5aab (patch)
treea4820f75c85c1f2bf85de0c55f096d3ed7d3a713 /src/jsifier.js
parentb31ab685bbd0b33e27cf65433ae10c7aa5df538e (diff)
commented-out compiler profiler support
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 6da2b09f..b36e11ed 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -20,6 +20,7 @@ var functionStubSigs = {};
// JSifier
function JSify(data, functionsOnly, givenFunctions) {
+ //B.start('jsifier');
var mainPass = !functionsOnly;
var itemsDict = { type: [], GlobalVariableStub: [], functionStub: [], function: [], GlobalVariable: [], GlobalVariablePostSet: [] };
@@ -67,7 +68,9 @@ function JSify(data, functionsOnly, givenFunctions) {
// Add additional necessary items for the main pass. We can now do this since types are parsed (types can be used through
// generateStructInfo in library.js)
+ //B.start('jsifier-libload');
LibraryManager.load();
+ //B.stop('jsifier-libload');
if (phase == 'pre') {
var libFuncsToInclude;
@@ -504,6 +507,7 @@ function JSify(data, functionsOnly, givenFunctions) {
// function splitter
function functionSplitter(item) {
item.lines.forEach(function(line) {
+ //B.start('jsifier-handle-' + line.intertype);
Framework.currItem = line;
line.funcData = item; // TODO: remove all these, access it globally
switch (line.intertype) {
@@ -538,8 +542,11 @@ function JSify(data, functionsOnly, givenFunctions) {
//if (ASM_JS) assert(line.JS.indexOf('var ') < 0, dump(line));
if (line.assignTo) makeAssign(line);
Framework.currItem = null;
+ //B.stop('jsifier-handle-' + line.intertype);
});
+ //B.start('jsifier-frec');
functionReconstructor(item);
+ //B.stop('jsifier-frec');
}
// function for filtering functions for label debugging
@@ -763,6 +770,7 @@ function JSify(data, functionsOnly, givenFunctions) {
ret += '\n';
} else {
// Reloop multiple blocks using the compiled relooper
+ //B.start('jsifier-reloop');
//Relooper.setDebug(1);
Relooper.init();
@@ -812,6 +820,7 @@ function JSify(data, functionsOnly, givenFunctions) {
}
ret += Relooper.render(blockMap[block.entries[0]]);
Relooper.cleanup();
+ //B.stop('jsifier-reloop');
}
return ret;
}
@@ -1910,8 +1919,6 @@ function JSify(data, functionsOnly, givenFunctions) {
}
PassManager.serialize();
-
- return null;
}
// Data
@@ -1941,13 +1948,18 @@ function JSify(data, functionsOnly, givenFunctions) {
}
}
+ //B.start('jsifier-handle-gv');
sortGlobals(data.globalVariables).forEach(globalVariableHandler);
+ //B.stop('jsifier-handle-gv');
data.aliass.forEach(aliasHandler);
data.functions.forEach(functionSplitter);
}
+ //B.start('jsifier-fc');
finalCombiner();
+ //B.stop('jsifier-fc');
dprint('framework', 'Big picture: Finishing JSifier, main pass=' + mainPass);
+ //B.stop('jsifier');
}