Re: Bourne shell script compiler? (Henry Spencer)
Sat, 23 Feb 1991 23:38:42 GMT

          From comp.compilers

Related articles
Bourne shell script compiler? (1991-02-22)
Re: Bourne shell script compiler? (1991-02-23)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Henry Spencer)
Keywords: interpreter
Organization: U of Toronto Zoology
References: <791@wsc-sun.BOEING.COM>
Date: Sat, 23 Feb 1991 23:38:42 GMT

In article <791@wsc-sun.BOEING.COM> (Conrad Kimball) writes:
>I'm looking for a Bourne shell script compiler - that is, a compiler that
>accepts a Bourne shell (sh) script as input and produces C code as output.

Based on some experience with a pre-Bourne (!) shell compiler, long ago,
the benefits of such a thing are limited unless it incorporates extensive
knowledge of the more common programs invoked from shell scripts. Running
a shell script comprises parsing, interpretation (variables etc.), and
execution (fork/exec) of programs. A simpleminded shell compiler eliminates
the parsing and streamlines much of the interpretation, but it's the execution
that is usually the bottleneck. You won't see a big win unless the compiler
is smart enough to optimize out some of the execution.
Henry Spencer @ U of Toronto Zoology, utzoo!henry

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.