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

Quelle  transplant.js

  Sprache: JAVA
 

class Base {
  constructor(o) {
    return o;
  }
}

class A extends Base {
  #x = 10;
  static gx(o) {
    return o.#x
  }
  static sx(o, v) {
    o.#x = v;
  }
}

function transplantTest(transplantOptions, global) {
  var {object, transplant} = transplantableObject(transplantOptions);

  new A(object);
  assertEq(A.gx(object), 10);
  A.sx(object, 15);
  assertEq(A.gx(object), 15);

  transplant(global);

  assertEq(A.gx(object), 15);
  A.sx(object, 29);
  assertEq(A.gx(object), 29);
}

// Structure helpfully provided by bug1403679.js
const thisGlobal = this;
const otherGlobalSameCompartment = newGlobal({sameCompartmentAs: thisGlobal});
const otherGlobalNewCompartment = newGlobal({newCompartment: true});

const globals =
    [thisGlobal, otherGlobalSameCompartment, otherGlobalNewCompartment];

function testWithOptions(fn) {
  for (let global of globals) {
    for (let options of [{}, {proxy: true}, {object: new FakeDOMObject()}, ]) {
      fn(options, global);
    }
  }
}

testWithOptions(transplantTest)

Messung V0.5 in Prozent
C=93 H=88 G=90

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-04-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.