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

Quelle  callname-global1.js   Sprache: JAVA

 
// Check that the implicit-this logic needed for CALLNAME global stubs
// handles non-function values correctly.
var self = this;
var count = 0;
function g1() {
    assertEq(this, self);
    this.count++;
}
function g2() {
    this.count += 10;
}
function f() {
    function f1(other) {
        eval("gc(); h = g1");
        try {
            for(var i=0; i<20; i++) {
                h();
                if (i === 9) {
                    h = other;
                }
            }
            assertEq(typeof other, "function");
        } catch(e) {
            assertEq(typeof other !== "function"true);
            assertEq(e instanceof TypeError, true);
        }
    }
    f1(3);
    f1(null);
    f1({});
    f1(Math.abs);
    f1(g2);
}
f();
assertEq(count, 150);

Messung V0.5
C=97 H=89 G=93

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

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