/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/test/mjsunit/shared-memory/shared-struct-property-storage.js
23 строки
605 B
Yagiz Nizipli
deps: update V8 to 10.9.194.4
27 ноя 2022, 20:27
27 ноя 2022, 20:27
16e03e7
Код
Авторство
О чём код?
// Copyright 2022 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. // // Flags: --shared-string-table --harmony-struct 'use strict'; let fieldNames = []; for (let i = 0; i < 999; i++) { fieldNames.push('field' + i); } let s = new (new SharedStructType(fieldNames)); // Write to an out-of-object field. (function storeOutOfObject() { for (let i = 0; i < 100; i++) s.field998 = i; })(); // Write to an in-object field. (function storeInObject() { for (let i = 0; i < 100; i++) s.field0 = i; })();