diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-03-20 16:11:02 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-03-20 16:11:02 -0700 |
commit | 43b41b4258c7a3108bb2611257749a3fd57630c2 (patch) | |
tree | 69976d0cf507aa9865c163edcd4f194cefefa3c4 /tools/eliminator | |
parent | 9ce5fac97bcc505a380fc88024492f8c33a2c7eb (diff) |
revert eliminator change due to breakage
Diffstat (limited to 'tools/eliminator')
-rw-r--r-- | tools/eliminator/eliminator.coffee | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/eliminator/eliminator.coffee b/tools/eliminator/eliminator.coffee index 0af57111..b941ccc0 100644 --- a/tools/eliminator/eliminator.coffee +++ b/tools/eliminator/eliminator.coffee @@ -369,10 +369,12 @@ class ExpressionOptimizer # function, then writes the optimized result to stdout. main = -> # Get the parse tree. - src = '' - size = fs.fstatSync(process.stdin.fd).size - if size > 0 - src = fs.readSync(process.stdin.fd, size)[0] + src = fs.readFileSync('/dev/stdin').toString() + # The following seems to work on windows, but fails on linux.. + #src = '' + #size = fs.fstatSync(process.stdin.fd).size + #if size > 0 + # src = fs.readSync(process.stdin.fd, size)[0] throw 'Cannot identify generated functions' if GENERATED_FUNCTIONS_MARKER in src generatedFunctionsLine = src.split('\n').filter (line) -> |