Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/python/mozperftest/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quellcode-Bibliothek syncedcontext.py   Sprache: Python

 
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import re

import gdb

from gdbpp import GeckoPrettyPrinter


@GeckoPrettyPrinter(
    "syncedcontext::FieldValues""^mozilla::dom::syncedcontext::FieldValues<.*>$"
)
class synced_context_field_printer(object):
    def __init__(self, value):
        self.type = gdb.types.get_basic_type(value.type).template_argument(0)
        self.value = value.cast(self.type)
        self.IDX_re = re.compile(r"<(.*?),")

    def to_string(self):
        return ""

    def children(self):
        for base_field in self.type.fields():
            base = self.value[base_field]
            for field in base.type.fields():
                field_value = base[field]
                if gdb.types.has_field(field_value.type, "mField"):
                    field_name = self.IDX_re.search(f"{field_value.type.name}")
                    field_type = field.type.template_argument(1)
                    yield (
                        f"Field<{field_name[1]}, {field_type}>",
                        field_value["mField"],
                    )

    def display_hint(self):
        return "array"

77%


¤ 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.0.1Bemerkung:  (vorverarbeitet)  ¤

*Bot Zugriff






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 ist noch experimentell.