Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/basic/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 872 B image not shown  

Quelle  bug-1663741.js

  Sprache: JAVA
 

const thisGlobal = this;
const otherGlobalSameCompartment = newGlobal({sameCompartmentAs: thisGlobal});
const otherGlobalNewCompartment = newGlobal({newCompartment: true});

const globals = [thisGlobal, otherGlobalSameCompartment, otherGlobalNewCompartment];

function testProperties(global, count) {
  let {object: source, transplant} = transplantableObject();

  // Create a bunch properties on |source|, which force allocation of dynamic
  // slots.
  for (let i = 0; i < count; i++) {
    source["foo" + i] = i;
  }

  // Calling |transplant| transplants the object and then returns undefined.
  transplant(global);

  // Check the properties were copied over to the swapped object.
  for (let i = 0; i < count; i++) {
    assertEq(source["foo" + i], i);
  }
}

for (let global of globals) {
  for (let count of [01030]) {
    testProperties(global, count);
  }
}

Messung V0.5 in Prozent
C=93 H=86 G=89

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.