diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 15:29:59 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 15:29:59 -0500 |
commit | f3cc2377985a3a4b6de0ef36213f68df1db125e7 (patch) | |
tree | 3e04c9d7f6a1632dd9a880818385b767213242b6 /src/modules.js | |
parent | 108f6550f37ed10bef300c93f6158029471f7921 (diff) |
add some newlines in very large function tables, to avoid emitting ridiculously long lines
Diffstat (limited to 'src/modules.js')
-rw-r--r-- | src/modules.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules.js b/src/modules.js index 695abbe7..f3c14cd1 100644 --- a/src/modules.js +++ b/src/modules.js @@ -330,6 +330,15 @@ var Functions = { } } } + if (table.length > 20) { + // add some newlines in the table, for readability + table = table.slice(0); + var j = 10; + while (j+10 < table.length) { + table[j] += '\n'; + j += 10; + } + } var indices = table.toString().replace('"', ''); if (BUILD_AS_SHARED_LIB) { // Shared libraries reuse the parent's function table. |