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  Script-prologue-offsets.js

  Sprache: JAVA
 

let g = newGlobal({newCompartment: true});
let dbg = new Debugger(g);
let count = 0;
dbg.onEnterFrame = function(frame) {
  if (frame.type === "eval") {
    return;
  }

  // This test assumes the hello1 and hello2 functions have prologue bytecode.
  assertEq(frame.script.mainOffset > 0true);

  // Prologue bytecode ops are never marked as break/step points.
  let prologueData = frame.script.getOffsetMetadata(0);
  assertEq(prologueData.isBreakpoint, false);
  assertEq(prologueData.isStepStart, false);

  // Prologue ops are also never marked as entry points.
  let location = frame.script.getOffsetLocation(0);
  assertEq(location.isEntryPoint, false);
  if (count == 0) {
    // hello1
    assertEq(location.lineNumber, 3);
    assertEq(location.columnNumber, 5);
  } else {
    // hello2
    assertEq(location.lineNumber, 5);
    assertEq(location.columnNumber, 18);
  }

  // getPossibleBreakpointOffsets shouldn't return prologue offsets. 
  for (let offset of frame.script.getPossibleBreakpointOffsets()) {
    assertEq(offset >= frame.script.mainOffset, true);
  }

  count++;
};
g.eval(`                                // 1
  function hello1(name) {               // 2
    return [].some((r) => r === name);  // 3
  }                                     // 4
  function hello2(name, x=1) {          // 5
    return [].some((r) => r === name);  // 6
  }                                     // 7
  hello1("world");                      // 8
  hello2("world");                      // 9
`);

assertEq(count, 2);

Messung V0.5 in Prozent
C=88 H=86 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.