Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  utf8.js

  Sprache: JAVA
 

/*
(module
 (func (param i32) (result i32)
       (i32.add (local.get 0) (local.get 0)))
 (export "hello" (func 0)))
*/


var txt =
`00 61 73 601 00 00 00 01 06 01 60 01 701 7f
 03 02 01 00 07 09 01 05 68 65 66600 00 0a
 09 01 07 00 20 00 20 00 60b`

var bin = new Uint8Array(txt.split(" ").map((x) => parseInt(x, 16)));
var mod = new WebAssembly.Module(bin);
var ins = new WebAssembly.Instance(mod);

assertEq(ins.exports.hello(37), 2*37);

assertEq(bin[25], 0x65); // the 'e' in 'hello'
bin[25] = 0x85;   // bad UTF-8

assertEq(WebAssembly.validate(bin), false);

assertThrowsInstanceOf(() => new WebAssembly.Module(bin), WebAssembly.CompileError);

assertThrowsInstanceOf(() => wasmEvalText(`(module (import "\u2603" "" (func))) `, {}), TypeError);

{
    let i1 = wasmEvalText(` (module (func (export "\u2603")))`);
    assertThrowsInstanceOf(() => wasmEvalText(`(module (import "" "\u2603" (func (result i32))))`,
                                              { "": { "\u2603": i1.exports['\u2603'] } }),
                           WebAssembly.LinkError);
    assertThrowsInstanceOf(() => wasmEvalText(`(module (import "\u2603" "" (func (result i32))))`,
                                              { "\u2603": { "": i1.exports['\u2603'] } }),
                           WebAssembly.LinkError);
}

Messung V0.5 in Prozent
C=98 H=86 G=91

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

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik