Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/jsparagus-emitter/src/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 955 B image not shown  

Quelle  dis.rs

  Sprache: Rust
 

use std::convert::TryFrom;
use std::fmt::Write;
use stencil::opcode::Opcode;

/// Return a string form of the given bytecode.
pub fn dis(bc: &[u8]) -> String {
    let mut result = String::new();
    let mut iter = bc.iter();
    let mut offset = 0;
    loop {
        let len = match iter.next() {
            Some(byte) => match Opcode::try_from(*byte) {
                Ok(op) => {
                    write!(&mut result, "{}", format!("{:05}: {:?}", offset, op)).unwrap();
                    offset = offset + op.instruction_length();
                    op.instruction_length()
                }
                Err(()) => {
                    write!(&mut result, "{}", byte).unwrap();
                    1
                }
            },
            None => break,
        };

        for _ in 1..len {
            write!(&mut result, " {}", iter.next().unwrap()).unwrap();
        }

        writeln!(&mut result).unwrap();
    }

    result
}

Messung V0.5 in Prozent
C=82 H=95 G=88

¤ Dauer der Verarbeitung: 0.8 Sekunden  (vorverarbeitet am  2026-06-19) ¤

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