#1800 Hook up the new V8 RegExp parser to our JS engine

Open
opened 4 months ago by Moonchild · 1 comments

After our initial import and shimming, this stage of adopting the RegExp parser from V8 will be hooking up the code to our various callsites in JS.

This involves 3 major sections: parsing, compiling and executing.

Overview, so far (to be amended):

This should be all the hooking up bugs.

After our initial import and shimming, this stage of adopting the RegExp parser from V8 will be hooking up the code to our various callsites in JS. This involves 3 major sections: parsing, compiling and executing. Overview, so far (to be amended): - [x] Bug 1626713 - Parse regexps using new irregexp import - [x] Part 1: Remove old engine from ENABLE_NEW_REGEXP builds - [x] Part 2: Add RegExpAPI to have an calling "port of entry" for SM-to-V8 code. - [x] Part 3: Hook up CheckPatternSyntax - [x] Bug 1537978 - Move regular expression-related functionality out of jsapi.h into a new js/public/RegExp.h header - [x] Bug 1539690 - Publicly expose a `JS::RegExpFlag::*` set of constants as flag-bits, `JS::RegExpFlags` as encapsulating bit-set - [x] Part 4: Hook up Syntax errors - [x] Abstract ErrorMetaData so it can be passed to the error function - [x] Add unicode code ppoint counter utility function - [x] Fix broken ErrorReporting. - [x] [Bug 1627838](https://bugzilla.mozilla.org/show_bug.cgi?id=1627838) - Handle simple string matches - [x] [JS-Refact] [Bug 1628751](https://bugzilla.mozilla.org/show_bug.cgi?id=1628751) - Replace use of standard library traits classes by the _v or _t version in the rest of the engine - [x] [JS-Refact] [Bug 1628389](https://bugzilla.mozilla.org/show_bug.cgi?id=1628389) - Replace use of standard library traits classes by the _v or _t version in the GC - [ ] [Bug 1628835](https://bugzilla.mozilla.org/show_bug.cgi?id=1628835) - Interpret regexps - [x] Part 1: Change `parenCount` to `pairCount` and initialize to 1 - [ ] Part 2: Use RegExpShared in JSRegExp - [ ] [Bug 1627356](https://bugzilla.mozilla.org/show_bug.cgi?id=1627356) Remove MatchOnly regexps - [ ] Part 3: Interpreter support - [ ] part 4: Unify result enum - [ ] [Bug 1629670](https://bugzilla.mozilla.org/show_bug.cgi?id=1629670) - Compile regexps - [ ] [Bug 1630383](https://bugzilla.mozilla.org/show_bug.cgi?id=1630383) - Miscellaneous fixes - [ ] [JS-Refact] [Bug 1630090](https://bugzilla.mozilla.org/show_bug.cgi?id=1630090) - Call regexps from Ion This should be all the hooking up bugs.

This is an updated list following commit history up and including the point where they replaced the old version of the parser with the new one:

  • [m-r76] Bug 1626713 - Parse regexps using new irregexp import
  • [m-r77] Bug 1627838 - Handle simple string matches
  • [m-r77] [JS-Refact] Bug 1628751 - Replace use of standard library traits classes by the _v or _t version in the rest of the engine
    • [m-r77] [JS-Refact] Bug 1628389 - Replace use of standard library traits classes by the _v or _t version in the GC
  • [m-r77] Bug 1628835 - Interpret regexps
  • [m-r77] Bug 1629670 - Compile regexps
  • [m-r77] Bug 1630383 - Miscellaneous fixes
    • [m-r77] [JS-Refact] Bug 1630090 - Call regexps from Ion
  • [m-r79] [IDB-Refact] Bug 1623278 - Prototype reduction of raw pointer usage
    • [m-r78] [IDB-Refact] Bug 1633719 - Add support for NotNull<SafeRefPtr> and use NotNull with InitializedOnce
  • [m-r78] [Multi-backout-reland] Bug 1634135 - Enable new regexp engine
  • [m-r78] Bug 1635275 - Add target for differential fuzzing
  • [m-r78] Bug 1637199 - Build failure due to #include picking up js/src/new-regexp/VERSION on macOS (unknown type name ‘Imported’, expected unqualified-id)
  • [m-r78] Bug 1637203 - Perma js/src/new-regexp/regexp-shim.cc:59:3: error: ‘SprintfLiteral’ was not declared in this scope when Gecko 78 merges to Beta on 2020-06-01
  • [m-r78] Bug 1636495 - Fix error handling in nsContentUtils::IsPatternMatching
    • Seems to be a pre-req for re-landing 1634135
  • [m-r78] Bug 1637189 - Crash [@ ??] through [@ js::RegExpShared::execute] or Assertion failure: start + length <= baseArg->length(), at vm/StringType-inl.h:207
  • !-- Reland 1634135 for the final time
  • [m-r78] Bug 1637977 - ThreadSanitizer: data race [@ emplace<>] vs. [@ isNothing] with memory corruption
  • [m-r78] [Bug 1637913 - Crash [@ v8::internal::ActionNode::StorePosition] or Assertion failure: (RegExpMacroAssembler::kMaxRegister) >= (next_register_](https://bugzilla.mozilla.org/show_bug.cgi?id=1637913 - Crash [@ v8::internal::ActionNode::StorePosition] or Assertion failure: (RegExpMacroAssembler::kMaxRegister) >= (next_register_) - 1), at new-regexp/regexp-compiler.cc:236
  • [m-r78] Bug 1362154 - Implement RegExp named groups
  • [m-r78] Bug 1638154 - Assertion failure: is_uint24(cp_offset + eats_at_least), at new-regexp/regexp-bytecode-generator.cc:183
  • [m-r78] Bug 1640479 - Named capture groups left undefined after OOM in RegExpShared::initializeNamedCaptures
  • [m-r79] [Reimport] Bug 1641352 - GC-free regexp parsing
  • [m-r79] [Replace] Bug 1642493 - Tidy up loose ends
This is an updated list following commit history up and including the point where they replaced the old version of the parser with the new one: - [m-r76] [Bug 1626713](https://bugzilla.mozilla.org/show_bug.cgi?id=1626713) - Parse regexps using new irregexp import - [m-r77] [Bug 1627838](https://bugzilla.mozilla.org/show_bug.cgi?id=1627838) - Handle simple string matches - [m-r77] [JS-Refact] [Bug 1628751](https://bugzilla.mozilla.org/show_bug.cgi?id=1628751) - Replace use of standard library traits classes by the _v or _t version in the rest of the engine - [m-r77] [JS-Refact] [Bug 1628389](https://bugzilla.mozilla.org/show_bug.cgi?id=1628389) - Replace use of standard library traits classes by the _v or _t version in the GC - [m-r77] [Bug 1628835](https://bugzilla.mozilla.org/show_bug.cgi?id=1628835) - Interpret regexps - [m-r77] [Bug 1629670](https://bugzilla.mozilla.org/show_bug.cgi?id=1629670) - Compile regexps - [m-r77] [Bug 1630383](https://bugzilla.mozilla.org/show_bug.cgi?id=1630383) - Miscellaneous fixes - [m-r77] [JS-Refact] [Bug 1630090](https://bugzilla.mozilla.org/show_bug.cgi?id=1630090) - Call regexps from Ion - [m-r79] [IDB-Refact] [Bug 1623278](https://bugzilla.mozilla.org/show_bug.cgi?id=1623278) - Prototype reduction of raw pointer usage - [m-r78] [IDB-Refact] [Bug 1633719](https://bugzilla.mozilla.org/show_bug.cgi?id=1633719) - Add support for NotNull<SafeRefPtr<T>> and use NotNull with InitializedOnce - [m-r78] [Multi-backout-reland] [Bug 1634135](https://bugzilla.mozilla.org/show_bug.cgi?id=1634135) - Enable new regexp engine - [m-r78] [Bug 1635275](https://bugzilla.mozilla.org/show_bug.cgi?id=1635275) - Add target for differential fuzzing - [m-r78] [Bug 1637199](https://bugzilla.mozilla.org/show_bug.cgi?id=1637199) - Build failure due to #include <version> picking up js/src/new-regexp/VERSION on macOS (unknown type name 'Imported', expected unqualified-id) - [m-r78] [Bug 1637203](https://bugzilla.mozilla.org/show_bug.cgi?id=1637203) - Perma js/src/new-regexp/regexp-shim.cc:59:3: error: 'SprintfLiteral' was not declared in this scope when Gecko 78 merges to Beta on 2020-06-01 - [m-r78] [Bug 1636495](https://bugzilla.mozilla.org/show_bug.cgi?id=1636495) - Fix error handling in nsContentUtils::IsPatternMatching - Seems to be a pre-req for re-landing 1634135 - [m-r78] [Bug 1637189](https://bugzilla.mozilla.org/show_bug.cgi?id=1637189) - Crash [@ ??] through [@ js::RegExpShared::execute] or Assertion failure: start + length <= baseArg->length(), at vm/StringType-inl.h:207 - !-- Reland 1634135 for the final time - [m-r78] [Bug 1637977](https://bugzilla.mozilla.org/show_bug.cgi?id=1637977) - ThreadSanitizer: data race [@ emplace<>] vs. [@ isNothing] with memory corruption - [m-r78] [Bug 1637913 - Crash [@ v8::internal::ActionNode::StorePosition] or Assertion failure: (RegExpMacroAssembler::kMaxRegister) >= (next_register_](https://bugzilla.mozilla.org/show_bug.cgi?id=1637913 - Crash [@ v8::internal::ActionNode::StorePosition] or Assertion failure: (RegExpMacroAssembler::kMaxRegister) >= (next_register_) - 1), at new-regexp/regexp-compiler.cc:236 - [m-r78] [Bug 1362154](https://bugzilla.mozilla.org/show_bug.cgi?id=1362154) - Implement RegExp named groups - [m-r78] [Bug 1638154](https://bugzilla.mozilla.org/show_bug.cgi?id=1638154) - Assertion failure: is_uint24(cp_offset + eats_at_least), at new-regexp/regexp-bytecode-generator.cc:183 - [m-r78] [Bug 1640479](https://bugzilla.mozilla.org/show_bug.cgi?id=1640479) - Named capture groups left undefined after OOM in RegExpShared::initializeNamedCaptures - [m-r79] [Reimport] [Bug 1641352](https://bugzilla.mozilla.org/show_bug.cgi?id=1641352) - GC-free regexp parsing - [m-r79] [Replace] [Bug 1642493](https://bugzilla.mozilla.org/show_bug.cgi?id=1642493) - Tidy up loose ends
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
2 Participants
Due Date

No due date set.

Blocks
Loading…
There is no content yet.