Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/debug/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  Debugger-wasm-esm-module.js

  Sprache: JAVA
 

// |jit-test| skip-if: !wasmDebuggingEnabled() || !getBuildConfiguration("source-phase-imports") || !wasmIsSupported() || getBuildConfiguration("release_or_beta"); --enable-source-phase-imports; --enable-wasm-esm-integration

load(libdir + "asserts.js");

var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);

var wasmScripts = [];
dbg.onNewScript = (s) => {
  if (s.format === "wasm") {
    wasmScripts.push(s);
  }
};

var m = g.parseModule(`
  import source emptyMod from "empty.wasm";
  globalThis.emptyMod = emptyMod;
`);
moduleLink(m);
moduleEvaluate(m);
drainJobQueue();

// A source-phase import alone does not make the wasm module visible to the debugger.
assertEq(wasmScripts.length, 0);

var sources = dbg.findSources();
assertEq(sources.length, 1);
for (var source of sources) {
  source.text;
  source.url;
  source.startLine;
  source.startColumn;
  source.id;
  source.displayURL;
  source.introductionScript;
  source.introductionOffset;
  source.introductionType;
  source.elementAttributeName;
  source.sourceMapURL;
}

// Instantiating the module makes it visible.
g.eval("new WebAssembly.Instance(emptyMod);");

assertEq(wasmScripts.length, 1);
var emptyScript = wasmScripts[0];

var foundEmpty = dbg.findScripts({ source: emptyScript.source });
assertEq(foundEmpty.length, 1);
assertEq(foundEmpty[0], emptyScript);

assertThrowsInstanceOf(() => emptyScript.source.reparse(), TypeError);

var src = emptyScript.source;
assertEq(src.startLine, 0);
assertEq(src.startColumn, 1);
assertEq(src.id, 0);
assertEq(src.displayURL, null);
assertEq(src.introductionOffset, undefined);
assertEq(src.introductionType, "wasm");
assertEq(src.elementAttributeName, undefined);
assertEq(src.sourceMapURL, null);

var sources = dbg.findSources();
for (var source of sources) {
  source.text;
  source.url;
  source.startLine;
  source.startColumn;
  source.id;
  source.displayURL;
  source.introductionScript;
  source.introductionOffset;
  source.introductionType;
  source.elementAttributeName;
  source.sourceMapURL;
}


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

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© 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.