<commit_before>// Copyright 2015 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.

// New space must be at max capacity to trigger pretenuring decision.
// Flags: --allow-natives-syntax --verify-heap --max-semi-space-size=1

var global = [];  // Used to keep some objects alive.

function Ctor() {
  var result = {a: {}, b: {}, c: {}, d: {}, e: {}, f: {}, g: {}};
  return result;
}

for (var i = 0; i < 120; i++) {
  // Make the "a" property long-lived, while everything else is short-lived.
  global.push(Ctor().a);
  (function FillNewSpace() { new Array(10000); })();
}<commit_msg>[test] Fix gc-stress failures of regress-crbug-500497.js<commit_after>// Copyright 2015 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.

// New space must be at max capacity to trigger pretenuring decision.
// Flags: --allow-natives-syntax --verify-heap --max-semi-space-size=1

var global = [];  // Used to keep some objects alive.

function Ctor() {
  var result = {a: {}, b: {}, c: {}, d: {}, e: {}, f: {}, g: {}};
  return result;
}

for (var i = 0; i < 120; i++) {
  // This print() is important! Without it, in --gc-stress mode, the function
  // Ctor is optimized too early. No idea why.
  print(i);
  // Make the "a" property long-lived, while everything else is short-lived.
  global.push(Ctor().a);
  (function FillNewSpace() { new Array(10000); })();
}
{'fraction_non_alphanumeric': 0.15956072351421188, 'fraction_numerical': 0.023255813953488372, 'mean_word_length': 3.175202156334232, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5704602', 'n_tokens_mistral': 528, 'n_tokens_neox': 488, 'n_words': 199}