5"""This module provides maps and sets that report unused elements."""
11 for value
in _monitored_values:
12 if value._dart2jsOnly
and not includeDart2jsOnly:
14 value.CheckUsage(logger)
23 _monitored_values.append(self)
27 """Wrapper for a dict that reports unused keys."""
29 def __init__(self, name, map, dart2jsOnly=False):
30 super(Dict, self).
__init__(name, dart2jsOnly)
38 self.
_map[key] = value
42 return key
in self.
_map
47 def get(self, key, default=None):
49 return self.
_map.
get(key, default)
58 'dict \'%s\' has unused key \'%s\'' % (self.
name, v))
62 """Wrapper for a set that reports unused keys."""
64 def __init__(self, name, a_set, dart2jsOnly=False):
65 super(Set, self).
__init__(name, dart2jsOnly)
70 return key
in self.
_set
79 for v
in sorted(self.
_set):
81 logger.warn(
'set \'%s\' has unused key \'%s\'' % (self.
name, v))
def get(self, key, default=None)
def __setitem__(self, key, value)
def CheckUsage(self, logger)
def __contains__(self, key)
def __getitem__(self, key)
def __init__(self, name, map, dart2jsOnly=False)
def __init__(self, name, dart2jsOnly)
def __init__(self, name, a_set, dart2jsOnly=False)
def CheckUsage(self, logger)
def __contains__(self, key)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
def FinishMonitoring(includeDart2jsOnly, logger)