JavaScriptCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Jul 2006 15:30:03 +0000 (15:30 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Jul 2006 15:30:03 +0000 (15:30 +0000)
commit8775a05182273d9bf87e9afa1c0157ab8c01ae05
tree97b4694466b6908700490069778889db68115bb6
parent29a3d0825bae768749bca777606d0d244c7c2239
JavaScriptCore:

        Reviewed by Geoff.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8395
          <rdar://problem/4613467>
          REGRESSION: RegEx seems broken for hex escaped non breaking space

        Test: fast/js/regexp-extended-characters-more.html

        * pcre/pcre_exec.c:
        (match): Got rid of utf16Length local variable to guarantee there's no
        extra stack usage in recursive calls. Fixed two places in the PCRE_UTF16
        code that were using the length variable, which is the UTF-8 length of
        a character in the pattern, to move in the UTF-16 subject string. Instead
        they hardcode lengths of 1 and 2 since the code already handles BMP
        characters and surrogate pairs separately. Also fixed some DPRINTF so
        I could compile with DEBUG on.
        (pcre_exec): Changed a place that was checking for multibyte characters
        in the subject string to use ISMIDCHAR. Instead it was using hardcoded
        logic that was right for UTF-8 but wrong for UTF-16.

        * pcre/pcre_compile.c: (pcre_compile2): Fixed a DPRINTF so I could compile
        with DEBUG on.

LayoutTests:

        Reviewed by Geoff.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8395
          <rdar://problem/4613467>
          REGRESSION: RegEx seems broken for hex escaped non breaking space

        * fast/js/regexp-extended-characters-more-expected.txt: Added.
        * fast/js/regexp-extended-characters-more.html: Added.
        * fast/js/resources/regexp-extended-characters-more.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/pcre/pcre_compile.c
JavaScriptCore/pcre/pcre_exec.c
LayoutTests/ChangeLog
LayoutTests/fast/js/regexp-extended-characters-more-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/regexp-extended-characters-more.html [new file with mode: 0644]
LayoutTests/fast/js/resources/regexp-extended-characters-more.js [new file with mode: 0644]