[webkit-reviews] review granted: [Bug 41920] Avoid slow-path for put() in Array.splice() : [Attachment 61424] Proposed patch v5

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 13 15:59:05 PDT 2010


Darin Adler <darin at apple.com> has granted Andreas Kling
<andreas.kling at nokia.com>'s request for review:
Bug 41920: Avoid slow-path for put() in Array.splice()
https://bugs.webkit.org/show_bug.cgi?id=41920

Attachment 61424: Proposed patch v5
https://bugs.webkit.org/attachment.cgi?id=61424&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> -#define CHECK_ARRAY_CONSISTENCY 0

One of the goals for CHECK_ARRAY_CONSISTENCY is to be able to turn it on
without recompiling anything except JSArray.cpp. By making
m_inCompactInitialization be included in any non-NDEBUG builds, we could
achieve that.

The code to set up m_inCompactInitialization and the data member itself would
be inside #ifndef NDEBUG rather than #if CHECK_ARRAY_CONSISTENCY.

> +#if CHECK_ARRAY_CONSISTENCY
> +	       ASSERT(m_storage->m_inCompactInitialization);
> +#endif

If we used #ifndef NDEBUG we could just unconditionally include this assertion.
This gives a good reason to have the boolean there even if
CHECK_ARRAY_CONSISTENCY is 0.

r=me as is

Even better if you move CHECK_ARRAY_CONSISTENCY back inside the .cpp file.


More information about the webkit-reviews mailing list