Closed
Bug 1026438
Opened 10 years ago
Closed 10 years ago
Make irregexp work with Latin1 strings
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(9 files, 2 obsolete files)
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Pass HandleLinearString instead of chars + length, to work better with Latin1 strings and moving GC.
Attachment #8441271 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8441273 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 3•10 years ago
|
||
Allow storing both Latin1 and TwoByte regex JitCode or byteCode.
Attachment #8441308 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 4•10 years ago
|
||
Forgot to qref.
Attachment #8441308 -
Attachment is obsolete: true
Attachment #8441308 -
Flags: review?(bhackett1024)
Attachment #8441311 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8441323 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 6•10 years ago
|
||
Just enough changes to run some simple regexps. There are other places in irregexp that I have to fix, but I think I'll do that as part of fixing jit-tests/jstests.
Attachment #8441386 -
Flags: review?(bhackett1024)
Updated•10 years ago
|
Attachment #8441271 -
Flags: review?(bhackett1024) → review+
Updated•10 years ago
|
Attachment #8441273 -
Flags: review?(bhackett1024) → review+
Comment 7•10 years ago
|
||
Comment on attachment 8441311 [details] [diff] [review] Part 3 - Store Latin1/TwoByte code separately Review of attachment 8441311 [details] [diff] [review]: ----------------------------------------------------------------- Is isCompiled() used anywhere now?
Attachment #8441311 -
Flags: review?(bhackett1024) → review+
Updated•10 years ago
|
Attachment #8441323 -
Flags: review?(bhackett1024) → review+
Comment 8•10 years ago
|
||
Comment on attachment 8441386 [details] [diff] [review] Part 5 - Run regexps Review of attachment 8441386 [details] [diff] [review]: ----------------------------------------------------------------- I think irregexp::InterpretCode can GC via the interrupt callback.
Attachment #8441386 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Parts 1 and 2: https://hg.mozilla.org/integration/mozilla-inbound/rev/93ab210dd907 https://hg.mozilla.org/integration/mozilla-inbound/rev/b0e518026f4b
Keywords: leave-open
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/93ab210dd907 https://hg.mozilla.org/mozilla-central/rev/b0e518026f4b
Assignee | ||
Comment 11•10 years ago
|
||
Parts 3 and 4: https://hg.mozilla.org/integration/mozilla-inbound/rev/ea0a96320d86 https://hg.mozilla.org/integration/mozilla-inbound/rev/bd69b2caad20 (In reply to Brian Hackett (:bhackett) from comment #7) > Is isCompiled() used anywhere now? Yes, an assert in getParenCount: isCompiled() || canStringMatch.
Assignee | ||
Comment 12•10 years ago
|
||
And part 5: https://hg.mozilla.org/integration/mozilla-inbound/rev/4df3e4664b11 (In reply to Brian Hackett (:bhackett) from comment #8) > I think irregexp::InterpretCode can GC via the interrupt callback. Right, good catch! I changed it to use AutoStableStringChars instead for the regex interpreter.
Assignee | ||
Comment 13•10 years ago
|
||
Attachment #8442749 -
Flags: review?(bhackett1024)
Comment 14•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ea0a96320d86 https://hg.mozilla.org/mozilla-central/rev/bd69b2caad20
Updated•10 years ago
|
Attachment #8442749 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 15•10 years ago
|
||
Attachment #8442996 -
Flags: review?(bhackett1024)
https://hg.mozilla.org/mozilla-central/rev/4df3e4664b11 https://hg.mozilla.org/mozilla-central/rev/14bc5bddd097
Assignee | ||
Comment 17•10 years ago
|
||
Part 6: https://hg.mozilla.org/integration/mozilla-inbound/rev/2ca9a7a10ac4
Assignee | ||
Comment 19•10 years ago
|
||
V8 has the code below, but I think it's wrong. Latin1 char 0xff has an upper-case char outside the Latin1 range. This patch is more conservative just to be safe. I'll also see if I can write a testcase that fails with V8. if (!ascii_subject || character <= String::kMaxOneByteCharCode) { return length; } // The standard requires that non-ASCII characters cannot have ASCII // character codes in their equivalence class. return 0;
Attachment #8443735 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 20•10 years ago
|
||
OK, what V8 does is fine (see previous comment), because their FilterASCII code converts 0x178 to 0xff. This patch makes our FilterASCII and GetCaseIndependentLettersbehave work more like theirs, and the test I wrote passes with this.
Attachment #8443735 -
Attachment is obsolete: true
Attachment #8443735 -
Flags: review?(bhackett1024)
Attachment #8443763 -
Flags: review?(bhackett1024)
Updated•10 years ago
|
Attachment #8442996 -
Flags: review?(bhackett1024) → review+
Updated•10 years ago
|
Attachment #8443763 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 21•10 years ago
|
||
Parts 7 and 8: https://hg.mozilla.org/integration/mozilla-inbound/rev/d77d20e48ffe https://hg.mozilla.org/integration/mozilla-inbound/rev/efc771d4648c
Assignee | ||
Comment 22•10 years ago
|
||
Fixes the last regex-related jit-test/jstest failures.
Attachment #8444299 -
Flags: review?(bhackett1024)
Comment 23•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d77d20e48ffe https://hg.mozilla.org/mozilla-central/rev/efc771d4648c
Flags: in-testsuite+
Comment 24•10 years ago
|
||
Comment on attachment 8444299 [details] [diff] [review] Part 9 - CheckNotBackReferenceIgnoreCase Review of attachment 8444299 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/irregexp/NativeRegExpMacroAssembler.cpp @@ +734,5 @@ > + // Save register contents to make the registers available below. After > + // this, the temp0, backtrack_stack_pointer, and current_position > + // registers are available. > + masm.push(current_position); > + masm.push(backtrack_stack_pointer); I think you can use temp2 (which v8's version doesn't have) to avoid one of these pushes.
Attachment #8444299 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 25•10 years ago
|
||
And part 9: https://hg.mozilla.org/integration/mozilla-inbound/rev/61400645a576 (In reply to Brian Hackett (:bhackett) from comment #24) > I think you can use temp2 (which v8's version doesn't have) to avoid one of > these pushes. Ah great, done.
Keywords: leave-open
Comment 26•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/61400645a576
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•