Fixing Perl5 Core Bugs: Report for Month 25

No Comments

Dave Mitchell writes:

As per my grant conditions, here is a report for the March period.

Spent the month successfully bringing run-time regex code blocks into the new way of doing things.

My previous work on this had handled the cases where the code appears within a literal regex, e.g.

/ab(?{})/;
$r = qr/xy(?{})/;
/z$r/;

In all the above cases, the code block is parsed and compiled by the perl parser at the same time as the surrounding code is compiled; the compiled blocks are then retained and passed to the regex engine when the pattern is compiled, and preserved when for example a qr is interpolated within another pattern, as above.

My changes this month extend this to run-time patterns, e.g.

use re 'eval';
my $code = '(?{})'; /$code/;
$foo =~ '(?{})'; # this is a string literal, not a regex literal

It does this by making a copy of the pattern string, but with any literal code blocks blanked out and \ and ' escaped; it then calls eval_sv() on an SV containing the string
qr'pattern with \\,\' escapes and literal (?{}) blanked out' then any compiled code blocks are extracted from the qr and added to the pool of code blocks (e.g. from literal code blocks already compiled).

Having reached this point, it means I could then remove all the old-style re_eval compiling code in the core, including the hated sv_compile_2op() function, and considerably simplifying S_doeval().

There are three more things I still need to do: the main one is to fix the way code blocks are invoked, chiefly to give them a proper entry on the context stack so that things like die,next,and caller don't crash, but also to make recursion work properly. The other two things are to do a big list of miscellaneous fixes and tweaks that I've been noting as I go along; and finally, to check that all the tickets attached to the meta-ticket have in fact been fixed by these changes.

Over the last month I have averaged 16 hours per week.

As of 2012/03/31: since the beginning of the grant:

108.4 weeks
1139.9 total hours
10.5 average hours per week

There are now 160 hours left on the grant.

Report for period 2012/03/01 to 2012/03/31 inclusive

Summary

Effort (HH::MM):

0:00 diagnosing bugs
69:10 fixing bugs
0:00 reviewing other people's bug fixes
0:00 reviewing ticket histories
0:00 review the ticket queue (triage)
-----
69:10 Total

Numbers of tickets closed:

1 tickets closed that have been worked on
0 tickets closed related to bugs that have been fixed
0 tickets closed that were reviewed but not worked on (triage)
-----
1 Total

Short Detail

67:40 [perl #34161] METABUG - (?{...}) and (??{...}) regexp issues
1:30 [perl #111974] 5.15.9 breaks Glib

Leave a comment

About TPF

The Perl Foundation - supporting the Perl community since 2000. Find out more at www.perlfoundation.org.

About this Entry

This page contains a single entry by Karen published on April 10, 2012 7:51 AM.

2012Q2: Call for Grant Proposals was the previous entry in this blog.

Improving Perl 5: Grant Report for Month 6 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.38