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

Quelle  bug-1744663.js

  Sprache: JAVA
 

gczeal(2,1);

function failureCallingTestFunction() {
  let exports = wasmEvalText(
    `(module
       (tag $exn (export "exn"))
       (func $throwExn (export "throwExn")
         ;; Note that this does not fail if this function body is a plain (throw $exn).
         try
           (throw $exn)
         end
       ))`
  ).exports;

  let mod =
      `(module
         (type $exnType (func))
         (type $indirectFunctype (func))
         (import "m" "exn" (tag $exn (type $exnType)))
         (import "m" "throwExn" (func $throwExn (type $indirectFunctype)))
         (table funcref (elem $throwExn))
         (func (export "testFunc") (result i32)
           try
             (call_indirect (type $indirectFunctype) (i32.const 0))
           catch_all
           end
           i32.const 1))`;

  let testFunction = wasmEvalText(mod, { m : exports}).exports.testFunc;
  testFunction();
};

function failureRethrow1() {
  let exports = wasmEvalText(
    `(module
       (tag $exn (export "exn"))
       (func $throwExn (export "throwExn")
         try
           (throw $exn)
         catch_all
           try
             throw $exn
           catch_all
             (rethrow 1)
           end
         end
       ))`
  ).exports;

  let mod =
      `(module
         (type $exnType (func))
         (type $indirectFunctype (func))
         (import "m" "exn" (tag $exn (type $exnType)))
         (import "m" "throwExn" (func $throwExn (type $indirectFunctype)))
         (table funcref (elem $throwExn))
         (func (export "testFunc") (result i32)
           try
             (call_indirect (type $indirectFunctype) (i32.const 0))
           catch_all
           end
           (i32.const 1)))`;

  let testFunction = wasmEvalText(mod, { m : exports}).exports.testFunc;
  testFunction();
};

console.log("Calling failureCallingTestFunction.");
failureCallingTestFunction();
console.log("Calling failureRethrow1.");
failureRethrow1();

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

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-11) ¤

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