diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-22 13:08:40 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-22 13:08:40 -0700 |
commit | 247ae2e571575d3f37933de0d76f8cdedc600f2b (patch) | |
tree | 8fef2e6b4b477e0c8e38adcd4c752a905fbea29e /src/parseTools.js | |
parent | 9a37f4ce7d3a36d106a04f2555f02e2e38e25ac5 (diff) |
show clear error message instead of 987 when too many setjmp calls
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 2eb456f1..fe21dfd5 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -2363,3 +2363,13 @@ function getTypeFromHeap(suffix) { } } +// Generates code that prints without printf(), but just putchar (so can be directly inline) +function makePrintChars(s) { + var ret = ''; + for (var i = 0; i < s.length; i++) { + ret += '_putchar(' + s.charCodeAt(i) + ');'; + } + ret += '_putchar(10);'; + return ret; +} + |