RESOLVED FIXED Bug 13386
[js-collector-tweaks] Shrink Array by 4 bytes
https://bugs.webkit.org/show_bug.cgi?id=13386
Summary [js-collector-tweaks] Shrink Array by 4 bytes
Maciej Stachowiak
Reported 2007-04-18 00:52:24 PDT
Shrink ArrayInstance objects by 4 bytes. This enables further optimizations.
Attachments
06-js-gc-array-shrink.patch.txt (4.22 KB, patch)
2007-04-18 00:54 PDT, Maciej Stachowiak
darin: review+
Maciej Stachowiak
Comment 1 2007-04-18 00:54:09 PDT
Created attachment 14067 [details] 06-js-gc-array-shrink.patch.txt
Darin Adler
Comment 2 2007-04-18 11:18:23 PDT
Comment on attachment 14067 [details] 06-js-gc-array-shrink.patch.txt + JSValue** storage = ((JSValue **)fastCalloc(capacity + 1, sizeof(JSValue *))) + 1; I'd like to see this use static_cast rather than C-style cast, and put the * next to JSValue instead of including a space. + storage = allocateStorage(newCapacity); Two spaces after the equal sign. + storage = ((JSValue **)fastRealloc(storage - 1, (newCapacity + 1) * sizeof (JSValue*))) + 1; static_cast again. r=me
Maciej Stachowiak
Comment 3 2007-04-18 15:02:36 PDT
(In reply to comment #2) > (From update of attachment 14067 [details] [edit]) > + JSValue** storage = ((JSValue **)fastCalloc(capacity + 1, sizeof(JSValue > *))) + 1; > > I'd like to see this use static_cast rather than C-style cast, and put the * > next to JSValue instead of including a space. > > + storage = allocateStorage(newCapacity); > > Two spaces after the equal sign. > > + storage = ((JSValue **)fastRealloc(storage - 1, (newCapacity + 1) * sizeof > (JSValue*))) + 1; > > static_cast again. > > r=me > Agreed on both of those.
Note You need to log in before you can comment on or make changes to this bug.