summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h
AgeCommit message (Collapse)Author
2022-12-14LibJS: Convert RegExpStringIterator::create() to NonnullGCPtrLinus Groh
2022-08-29LibJS: Hide all the constructors!Andreas Kling
Now that the GC allocator is able to invoke Cell subclass constructors directly via friendship, we no longer need to keep them public. :^)
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in create() functionsLinus Groh
This is a continuation of the previous two commits. As allocating a JS cell already primarily involves a realm instead of a global object, and we'll need to pass one to the allocate() function itself eventually (it's bridged via the global object right now), the create() functions need to receive a realm as well. The plan is for this to be the highest-level function that actually receives a realm and passes it around, AOs on an even higher level will use the "current realm" concept via VM::current_realm() as that's what the spec assumes; passing around realms (or global objects, for that matter) on higher AO levels is pointless and unlike for allocating individual objects, which may happen outside of regular JS execution, we don't need control over the specific realm that is being used there.
2022-01-31Everywhere: Update copyrights with my new serenityos.org e-mail :^)Timothy Flynn
2021-08-10LibJS: Reduce copying of string data in RegExp.prototypeTimothy Flynn
In addition to invoking js_string() with existing UTF-16 strings when possible, RegExpExec now takes a Utf16String instead of a Utf16View. The view was previously fully copied into the returned result object, so this prevents potentially large copies of string data.
2021-08-10LibJS: Replace Vector<u16> usage in PrimitiveString wth Utf16StringTimothy Flynn
This commit does not go out of its way to reduce copying of the string data yet, but is a minimum set of changes to compile LibJS after making PrimitiveString hold a Utf16String.
2021-07-23LibJS: Implement RegExp.prototype [ @@match ] with UTF-16 code unitsTimothy Flynn
2021-07-16LibJS: Ensure RegExpStringIterator keeps the RegExp matcher object aliveTimothy Flynn
Fixes a crash found with 'test-js -g' due to this object going out of scope.
2021-07-16LibJS: Implement the RegExpStringIterator objectTimothy Flynn
This implementation closely follows the StringIterator object in that the abstract closure meant to be created in CreateRegExpStringIterator is instead unrolled into RegExpStringIterator.prototype.next.