gecko-dev/ipc
Nathan Froyd 499fc0976b Bug 1297804 - part 4 - avoid array bounds checks in DestroySubtree loops; r=billm
The IPDL compiler generates code like this in DestroySubtree methods:

    // Recursively shutting down PAPZ kids
    nsTArray<PAPZChild*> kids((mManagedPAPZChild).Count());
    // Accumulate kids into a stable structure to iterate over
    ManagedPAPZChild(kids);
    for (uint32_t i = 0; (i) < ((kids).Length()); (++(i))) {
        // Guarding against a child removing a sibling from the list during the iteration.
        if ((mManagedPAPZChild).Contains(kids[i])) {
            (kids[i])->DestroySubtree(subtreewhy);
        }
    }

There are three problems with this code:

1) We initialize |kids| with a capacity, which is wasted work;
   ManagedPAPZChild() is going to resize the array for us anyway.
2) We're constantly reading from |kids.Length()| in the loop, when we
   only really need to read from it once.
3) We're repeatedly accessing kids[i], and doing needless bounds checks.

Let's fix those three problems.
2016-09-02 16:14:28 -04:00
..
app Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
chromium Bug 1051567 - Make sure we resend file descriptors for the first chunk of a message. r=billm 2016-08-30 18:26:59 +08:00
contentproc Bug 1284674 - Remove NUWA r=cyu 2016-08-02 14:54:00 +02:00
dbus Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj 2016-08-24 14:47:04 +08:00
glue Bug 1297804 - part 3 - avoid array bounds checking when writing nsTArray<T> to messages; r=billm 2016-09-02 16:14:28 -04:00
hal Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj 2016-08-24 14:47:04 +08:00
ipdl Bug 1297804 - part 4 - avoid array bounds checks in DestroySubtree loops; r=billm 2016-09-02 16:14:28 -04:00
keystore Bug 1296316 - Convert nsNSSShutDownObject::CalledFromType to an enum class. r=mgoodwin 2016-08-20 23:00:19 +08:00
mscom Bug 1298462 - tidy ipc/mscom/ files to avoid warnings from clang-cl; r=aklotz 2016-08-26 14:26:29 -04:00
netd Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
nfc Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
ril Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
testshell Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
unixfd Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
unixsocket Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj 2016-08-24 14:47:04 +08:00
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
pull-chromium.py