Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "B::C 3" | |
132 | .TH B::C 3 "2001-09-21" "perl v5.8.8" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | B::C \- Perl compiler's C backend | |
135 | .SH "SYNOPSIS" | |
136 | .IX Header "SYNOPSIS" | |
137 | .Vb 1 | |
138 | \& perl -MO=C[,OPTIONS] foo.pl | |
139 | .Ve | |
140 | .SH "DESCRIPTION" | |
141 | .IX Header "DESCRIPTION" | |
142 | This compiler backend takes Perl source and generates C source code | |
143 | corresponding to the internal structures that perl uses to run | |
144 | your program. When the generated C source is compiled and run, it | |
145 | cuts out the time which perl would have taken to load and parse | |
146 | your program into its internal semi-compiled form. That means that | |
147 | compiling with this backend will not help improve the runtime | |
148 | execution speed of your program but may improve the start-up time. | |
149 | Depending on the environment in which your program runs this may be | |
150 | either a help or a hindrance. | |
151 | .SH "OPTIONS" | |
152 | .IX Header "OPTIONS" | |
153 | If there are any non-option arguments, they are taken to be | |
154 | names of objects to be saved (probably doesn't work properly yet). | |
155 | Without extra arguments, it saves the main program. | |
156 | .IP "\fB\-ofilename\fR" 4 | |
157 | .IX Item "-ofilename" | |
158 | Output to filename instead of \s-1STDOUT\s0 | |
159 | .IP "\fB\-v\fR" 4 | |
160 | .IX Item "-v" | |
161 | Verbose compilation (currently gives a few compilation statistics). | |
162 | .IP "\fB\-\-\fR" 4 | |
163 | .IX Item "--" | |
164 | Force end of options | |
165 | .IP "\fB\-uPackname\fR" 4 | |
166 | .IX Item "-uPackname" | |
167 | Force apparently unused subs from package Packname to be compiled. | |
168 | This allows programs to use eval \*(L"\fIfoo()\fR\*(R" even when sub foo is never | |
169 | seen to be used at compile time. The down side is that any subs which | |
170 | really are never used also have code generated. This option is | |
171 | necessary, for example, if you have a signal handler foo which you | |
172 | initialise with \f(CW\*(C`$SIG{BAR} = "foo"\*(C'\fR. A better fix, though, is just | |
173 | to change it to \f(CW\*(C`$SIG{BAR} = \e&foo\*(C'\fR. You can have multiple \fB\-u\fR | |
174 | options. The compiler tries to figure out which packages may possibly | |
175 | have subs in which need compiling but the current version doesn't do | |
176 | it very well. In particular, it is confused by nested packages (i.e. | |
177 | of the form \f(CW\*(C`A::B\*(C'\fR) where package \f(CW\*(C`A\*(C'\fR does not contain any subs. | |
178 | .IP "\fB\-D\fR" 4 | |
179 | .IX Item "-D" | |
180 | Debug options (concatenated or separate flags like \f(CW\*(C`perl \-D\*(C'\fR). | |
181 | .IP "\fB\-Do\fR" 4 | |
182 | .IX Item "-Do" | |
183 | OPs, prints each \s-1OP\s0 as it's processed | |
184 | .IP "\fB\-Dc\fR" 4 | |
185 | .IX Item "-Dc" | |
186 | COPs, prints COPs as processed (incl. file & line num) | |
187 | .IP "\fB\-DA\fR" 4 | |
188 | .IX Item "-DA" | |
189 | prints \s-1AV\s0 information on saving | |
190 | .IP "\fB\-DC\fR" 4 | |
191 | .IX Item "-DC" | |
192 | prints \s-1CV\s0 information on saving | |
193 | .IP "\fB\-DM\fR" 4 | |
194 | .IX Item "-DM" | |
195 | prints \s-1MAGIC\s0 information on saving | |
196 | .IP "\fB\-f\fR" 4 | |
197 | .IX Item "-f" | |
198 | Force options/optimisations on or off one at a time. You can explicitly | |
199 | disable an option using \fB\-fno\-option\fR. All options default to | |
200 | \&\fBdisabled\fR. | |
201 | .RS 4 | |
202 | .IP "\fB\-fcog\fR" 4 | |
203 | .IX Item "-fcog" | |
204 | Copy\-on\-grow: PVs declared and initialised statically. | |
205 | .IP "\fB\-fsave\-data\fR" 4 | |
206 | .IX Item "-fsave-data" | |
207 | Save package::DATA filehandles ( only available with PerlIO ). | |
208 | .IP "\fB\-fppaddr\fR" 4 | |
209 | .IX Item "-fppaddr" | |
210 | Optimize the initialization of op_ppaddr. | |
211 | .IP "\fB\-fwarn\-sv\fR" 4 | |
212 | .IX Item "-fwarn-sv" | |
213 | Optimize the initialization of cop_warnings. | |
214 | .IP "\fB\-fuse\-script\-name\fR" 4 | |
215 | .IX Item "-fuse-script-name" | |
216 | Use the script name instead of the program name as \f(CW$0\fR. | |
217 | .IP "\fB\-fsave\-sig\-hash\fR" 4 | |
218 | .IX Item "-fsave-sig-hash" | |
219 | Save compile-time modifications to the \f(CW%SIG\fR hash. | |
220 | .RE | |
221 | .RS 4 | |
222 | .RE | |
223 | .IP "\fB\-On\fR" 4 | |
224 | .IX Item "-On" | |
225 | Optimisation level (n = 0, 1, 2, ...). \fB\-O\fR means \fB\-O1\fR. | |
226 | .RS 4 | |
227 | .IP "\fB\-O0\fR" 4 | |
228 | .IX Item "-O0" | |
229 | Disable all optimizations. | |
230 | .IP "\fB\-O1\fR" 4 | |
231 | .IX Item "-O1" | |
232 | Enable \fB\-fcog\fR. | |
233 | .IP "\fB\-O2\fR" 4 | |
234 | .IX Item "-O2" | |
235 | Enable \fB\-fppaddr\fR, \fB\-fwarn\-sv\fR. | |
236 | .RE | |
237 | .RS 4 | |
238 | .RE | |
239 | .IP "\fB\-llimit\fR" 4 | |
240 | .IX Item "-llimit" | |
241 | Some C compilers impose an arbitrary limit on the length of string | |
242 | constants (e.g. 2048 characters for Microsoft Visual \*(C+). The | |
243 | \&\fB\-llimit\fR options tells the C backend not to generate string literals | |
244 | exceeding that limit. | |
245 | .SH "EXAMPLES" | |
246 | .IX Header "EXAMPLES" | |
247 | .Vb 2 | |
248 | \& perl -MO=C,-ofoo.c foo.pl | |
249 | \& perl cc_harness -o foo foo.c | |
250 | .Ve | |
251 | .PP | |
252 | Note that \f(CW\*(C`cc_harness\*(C'\fR lives in the \f(CW\*(C`B\*(C'\fR subdirectory of your perl | |
253 | library directory. The utility called \f(CW\*(C`perlcc\*(C'\fR may also be used to | |
254 | help make use of this compiler. | |
255 | .PP | |
256 | .Vb 1 | |
257 | \& perl -MO=C,-v,-DcA,-l2048 bar.pl > /dev/null | |
258 | .Ve | |
259 | .SH "BUGS" | |
260 | .IX Header "BUGS" | |
261 | Plenty. Current status: experimental. | |
262 | .SH "AUTHOR" | |
263 | .IX Header "AUTHOR" | |
264 | Malcolm Beattie, \f(CW\*(C`mbeattie@sable.ox.ac.uk\*(C'\fR |