Related articles |
---|
Bourne shell script compiler? cek@wsc-sun.boeing.com (1991-02-22) |
Re: Bourne shell script compiler? henry@zoo.toronto.edu (1991-02-23) |
Newsgroups: | comp.compilers |
From: | henry@zoo.toronto.edu (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> cek@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, henry@zoo.toronto.edu utzoo!henry
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.