… | |
… | |
31 | my $LINK = "$Config{ld} $Config{ldflags} $Config{lddlflags} $Config{ccdlflags}"; |
31 | my $LINK = "$Config{ld} $Config{ldflags} $Config{lddlflags} $Config{ccdlflags}"; |
32 | my $LIBS = "$Config{libs}"; |
32 | my $LIBS = "$Config{libs}"; |
33 | my $_o = $Config{_o}; |
33 | my $_o = $Config{_o}; |
34 | my $_so = ".so"; |
34 | my $_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 | |
36 | my $opt_assert = 1; |
40 | my $opt_assert = 0; |
37 | |
41 | |
38 | our $source; |
42 | our $source; |
39 | |
43 | |
40 | my @ops; |
44 | my @ops; |
41 | my $op; |
45 | my $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 | |
204 | if (0 && $Config{useithreads} ne "define") { |
208 | if ($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 |
263 | sub xop_stringify { |
268 | sub 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 | } |
|
|
279 | EOF |
265 | |
280 | |
266 | out_next; |
281 | out_next; |
267 | } |
282 | } |
268 | |
283 | |
269 | sub op_and { |
284 | sub 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 |
335 | sub xop_method_named { |
350 | sub 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 | |
377 | sub op_grepstart { |
392 | sub 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 | |