864cacd65a
By marking maps detached from the transition tree as prototypes, we'll automatically stop tracking transitions from those detached fast maps. That allows us to quickly check whether a map is detached (or the initial map anyway); and saves memory. We can use this information to ignore sibling type feedback when parsing a JSON array with many distinctly shaped json objects. Bug: chromium:993980 Change-Id: I86d493ac2cabec2c31c6e322ad5c5a7ace059dfc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1771778 Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#63403}
21 lines
537 B
JavaScript
21 lines
537 B
JavaScript
// Copyright 2019 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
(function () {
|
|
// generate some sample data
|
|
let data = new Array(1600).fill(null).map((e, i) => ({
|
|
invariantKey: 'v',
|
|
['randomKey' + i]: 'w',
|
|
|
|
}));
|
|
|
|
// use json parser
|
|
data = JSON.parse(JSON.stringify(data))
|
|
|
|
// look for undefined values
|
|
for (const t of data) {
|
|
assertFalse(Object.keys(t).some(k => !t[k]));
|
|
}
|
|
})()
|