[webkit-reviews] review granted: [Bug 135217] Allocate the whole RegExpMatchesArray backing store up front. : [Attachment 235385] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 25 11:22:43 PDT 2014


Geoffrey Garen <ggaren at apple.com> has granted Andreas Kling
<akling at apple.com>'s request for review:
Bug 135217: Allocate the whole RegExpMatchesArray backing store up front.
https://bugs.webkit.org/show_bug.cgi?id=135217

Attachment 235385: Patch
https://bugs.webkit.org/attachment.cgi?id=235385&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=235385&action=review


r=me

> Source/JavaScriptCore/runtime/RegExpMatchesArray.cpp:55
> +static inline Butterfly* createRegExpMatchesArrayButterfly(VM& vm, JSCell*
intendedOwner, unsigned initialLength)
> +{
> +    Butterfly* butterfly = Butterfly::create(
> +	   vm, intendedOwner, 0, 0, true, indexingHeaderForArray(initialLength,
initialLength),
> +	   ArrayStorage::sizeFor(initialLength));
> +    ArrayStorage* storage = butterfly->arrayStorage();
> +    storage->m_indexBias = 0;
> +    storage->m_sparseMap.clear();
> +    storage->m_numValuesInVector = 0;
> +    return butterfly;
> +}

Maybe this function should go in JSArray.h?


More information about the webkit-reviews mailing list