ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Faster/Faster.pm
(Generate patch)

Comparing Faster/Faster.pm (file contents):
Revision 1.11 by root, Fri Mar 10 18:29:08 2006 UTC vs.
Revision 1.17 by root, Fri Mar 10 18:58:35 2006 UTC

31my $LINK = "$Config{ld} $Config{ldflags} $Config{lddlflags} $Config{ccdlflags}"; 31my $LINK = "$Config{ld} $Config{ldflags} $Config{lddlflags} $Config{ccdlflags}";
32my $LIBS = "$Config{libs}"; 32my $LIBS = "$Config{libs}";
33my $_o = $Config{_o}; 33my $_o = $Config{_o};
34my $_so = ".so"; 34my $_so = ".so";
35 35
36# we don't need no steenking PIC on x86
37$COMPILE =~ s/-f(?:PIC|pic)//g
38 if $Config{archname} =~ /^(i[3456]86)-/;
39
36my $opt_assert = 1; 40my $opt_assert = 0;
37 41
38our $source; 42our $source;
39 43
40my @ops; 44my @ops;
41my $op; 45my $op;
64 entereval unsafe noasync todo 68 entereval unsafe noasync todo
65 require unsafe 69 require unsafe
66 70
67 mapstart noasync 71 mapstart noasync
68 grepstart noasync 72 grepstart noasync
69 match noasync todo#whyisitunsafe? unsafe 73 match noasync
70 74
71 last noasync 75 last noasync
72 next noasync 76 next noasync
73 redo noasync 77 redo noasync
74 seq noasync 78 seq noasync
199 $source .= " PUSHMARK (PL_stack_sp);\n"; 203 $source .= " PUSHMARK (PL_stack_sp);\n";
200 204
201 out_next; 205 out_next;
202} 206}
203 207
204if (0 && $Config{useithreads} ne "define") { 208if ($Config{useithreads} ne "define") {
205 # disable optimisations on ithreads 209 # disable optimisations on ithreads
206 210
207 *op_const = sub { 211 *op_const = sub {
208 $source .= " { dSP; XPUSHs ((SV *)${$op->sv}L); PUTBACK; }\n"; 212 $source .= " { dSP; XPUSHs ((SV *)${$op->sv}L); PUTBACK; }\n";
209 213
258 262
259 out_next; 263 out_next;
260 }; 264 };
261} 265}
262 266
267# does kill Crossfire/res2pm
263sub xop_stringify { 268sub op_stringify {
264 $source .= " { dSP; dTARGET; sv_copypv (TARG, TOPs); SETTARG; PUTBACK; }\n"; 269 my $targ = $op->targ;
270
271 $source .= <<EOF;
272 {
273 dSP;
274 SV *targ = PAD_SV ((PADOFFSET)$targ);
275 sv_copypv (TARG, TOPs);
276 SETTARG;
277 PUTBACK;
278 }
279EOF
265 280
266 out_next; 281 out_next;
267} 282}
268 283
269sub op_and { 284sub op_and {
330# pattern const+ (or general push1) 345# pattern const+ (or general push1)
331# pattern pushmark return(?) 346# pattern pushmark return(?)
332# pattern pushmark gv rv2av pushmark padsv+o.ä. aassign 347# pattern pushmark gv rv2av pushmark padsv+o.ä. aassign
333 348
334# pattern const method_named 349# pattern const method_named
335sub xop_method_named { 350sub op_method_named {
336 $source .= <<EOF; 351 $source .= <<EOF;
337 { 352 {
338 static HV *last_stash; 353 static HV *last_stash;
339 static SV *last_cv; 354 static SV *last_cv;
340 static U32 last_sub_generation; 355 static U32 last_sub_generation;
374 out_next; 389 out_next;
375} 390}
376 391
377sub op_grepstart { 392sub op_grepstart {
378 out_callop; 393 out_callop;
394 $op = $op->next;
379 out_cond_jump $op->next->other; 395 out_cond_jump $op->other;
380 out_jump_next; 396 out_jump_next;
381} 397}
382 398
383*op_mapstart = \&op_grepstart; 399*op_mapstart = \&op_grepstart;
384 400

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines