Commit graph

8 commits

Author SHA1 Message Date
Martok
e81a8d866d Issue #1285 - implement named capturing groups and named backrefs
- RegExpParser collects seen groups in named_captures_.
- After irregexp::ParsePattern has finished, RegExpParser::StoreNamedCaptureMap translates
  the parser data to RegExpCompileData.capture_name/index
- RegExpShared::initializeNamedCaptures takes these and builds a PlainObject map which
  is kept with the compiled expression
This is done because irregexp doesn't have access to the JS context and so can't allocate
any JSValues itself.
- for each match result, this map is used to build PlainObjects of name->match/undefined
  (extremely simplified from upstream at the expense of some perf)

IonMonkey switches to non-masm code path for expressions with named groups.
2022-12-24 08:09:39 +08:00
Martok
85cb46096a No issue - refactor base classes for easier access
- move InfallibleVector into its own header, together with common typedefs
- refactor CapturesVector
2022-12-24 08:09:22 +08:00
Martok
5555a72d8e Issue #2056 - Fix handling of captures in lookbehinds
- Port unification of CheckNotBackReference*
- Port LoadCurrentCharacter
- Make RegExpMacroAssembler::CheckAtStart understand cp_offset
- Replace magic numbers in ChoiceNode::Emit, Trace::PerformDeferredActions
- CheckBacktrackStackLimit
- Allow backrefs to resist recursion
2022-12-24 08:09:18 +08:00
Moonchild
2f0896ab31 Issue #1279 - Implement regular expressions lookbehind (v2)
Because of some additional changes in the JS engine in the meantime,
this implementation should work and not crash due to slot allocation.
2022-10-13 10:40:14 +08:00
Moonchild
9c59990883 Issue #1656 - Part 10: Manual cleanup. 2020-09-25 22:07:01 +08:00
wolfbeast
00d1bac44d Issue #1362 - Revert "Implement regular expression lookbehind"
This reverts commit fa473930f424bf17a9e545b601c84dd2e61364e3.
2020-01-24 09:10:50 +08:00
wolfbeast
63b7dedc94 Issue #1279 - Implement regular expression lookbehind
Based on Tom Schuster's work, with extra minters for unicode.
2019-11-15 14:23:10 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00