Don’t persist superfluous length set operation during array push()
The ECMAScript spec requires that the length be set on every push operation as the push()
method is generic and may be used on objects that are not arrays (and that may not have a length property to begin with). That said, when this operation is performed on an array, it is a noop:
a = []
a[0] = 'hello'
// At this point a.length === 1 is true
a.length = 1
Instead of polluting the transaction log with these superfluous statements, we can easily filter them out by checking for the condition where an array’s length is attempting to be set to its existing length.
This should not affect more exotic uses of push()
on non-array objects.