Faster.pm が 5.10.1 と 5.8.9 でうごくようにしてみた。
5.10.0 でしかうごかないことで有名な Faster.pm ですが、コードをよんでみたところ、ロジックがちがうくさいので、なおしたら 5.10.1 ではうごいた(in_perl の部分)。
あと、global destruction 時にも JIT がうごいてて、これが原因でおちてるくさかったので PL_dirty みるようにした。この変更により、Perl 5.8.9 でもうごくようになった。Global Destruction 時は不安定な動作になるし、そもそも終了処理をかけてる最中に jIT しても意味ないので、これは必要な処理といえる。
2点の変更とも、たまたま perl5.10.0 ではうごいてただけな気がする。
diff --git a/Faster.xs b/Faster.xs
index e568ab2..3c6e174 100644
--- a/Faster.xs
+++ b/Faster.xs
@@ -15,7 +15,7 @@ faster_entersub (pTHX)
{
static int in_perl;
- if (!PL_compcv || in_perl) // only when not compiling, reduces recompiling due to op-address-shift
+ if (!PL_compcv && in_perl==0 && !PL_dirty) // only when not compiling, reduces
recompiling due to op-address-shift, global destruction
{
dSP;
dTOPss;
Published: 2010-02-05(Fri) 00:15