diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-07 16:04:26 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-07 16:04:26 +0000 |
commit | 9af0acdbd72c7cf7dd9e593b8f5d51dcf0bfa4f7 (patch) | |
tree | 1cfd674246b43b9ed0f449335c8924396b5f1e98 /regcomp.c | |
parent | 023851150e19d9fc4a9b3320c50e7fc5ccec014f (diff) | |
download | perl-9af0acdbd72c7cf7dd9e593b8f5d51dcf0bfa4f7.tar.gz |
Too profiler-happy: with optimization the #7590 actually makes
the test to run 0.5% _slower_. Requires much more instrumentation.
Retract #7590.
p4raw-id: //depot/perl@7591
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -427,8 +427,11 @@ S_scan_commit(pTHX_ scan_data_t *data) STATIC void S_cl_anything(pTHX_ struct regnode_charclass_class *cl) { + int value; + ANYOF_CLASS_ZERO(cl); - ANYOF_BITMAP_SETALL(cl); + for (value = 0; value < 256; ++value) + ANYOF_BITMAP_SET(cl, value); cl->flags = ANYOF_EOS; if (LOC) cl->flags |= ANYOF_LOCALE; @@ -443,8 +446,8 @@ S_cl_is_anything(pTHX_ struct regnode_charclass_class *cl) for (value = 0; value <= ANYOF_MAX; value += 2) if (ANYOF_CLASS_TEST(cl, value) && ANYOF_CLASS_TEST(cl, value + 1)) return 1; - for (value = 0; value < ANYOF_BITMAP_SIZE; ++value) - if (!ANYOF_BITMAP_BYTE(cl, value)) + for (value = 0; value < 256; ++value) + if (!ANYOF_BITMAP_TEST(cl, value)) return 0; return 1; } |