Shrink ArrayInstance objects by 4 bytes. This enables further optimizations.
Created attachment 14067 [details] 06-js-gc-array-shrink.patch.txt
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
(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.