diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:36 +0000 |
commit | 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch) | |
tree | 3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /src/etc | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-17d40c6057c88f4c432b0d7bac88e1b84cb7e67f.tar.xz rustc-17d40c6057c88f4c432b0d7bac88e1b84cb7e67f.zip |
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/check_missing_items.py | 189 | ||||
-rwxr-xr-x | src/etc/cpu-usage-over-time-plot.sh | 2 | ||||
-rw-r--r-- | src/etc/gdb_lookup.py | 3 | ||||
-rw-r--r-- | src/etc/gdb_providers.py | 11 | ||||
-rw-r--r-- | src/etc/htmldocck.py | 24 | ||||
-rw-r--r-- | src/etc/installer/msi/rust.wxs | 14 | ||||
-rw-r--r-- | src/etc/installer/pkg/Distribution.xml | 17 | ||||
-rw-r--r-- | src/etc/lldb_commands | 1 | ||||
-rw-r--r-- | src/etc/lldb_lookup.py | 3 | ||||
-rw-r--r-- | src/etc/lldb_providers.py | 8 | ||||
-rw-r--r-- | src/etc/natvis/intrinsic.natvis | 249 | ||||
-rw-r--r-- | src/etc/natvis/liballoc.natvis | 8 | ||||
-rwxr-xr-x | src/etc/pre-push.sh | 2 | ||||
-rw-r--r-- | src/etc/rust_types.py | 3 |
14 files changed, 226 insertions, 308 deletions
diff --git a/src/etc/check_missing_items.py b/src/etc/check_missing_items.py deleted file mode 100644 index 343dd0387..000000000 --- a/src/etc/check_missing_items.py +++ /dev/null @@ -1,189 +0,0 @@ -#!/usr/bin/env python - -# This test ensures that every ID in the produced json actually resolves to an item either in -# `index` or `paths`. It DOES NOT check that the structure of the produced json is actually in -# any way correct, for example an empty map would pass. - -# FIXME: Better error output - -import sys -import json - -crate = json.load(open(sys.argv[1], encoding="utf-8")) - - -def get_local_item(item_id): - if item_id in crate["index"]: - return crate["index"][item_id] - print("Missing local ID:", item_id) - sys.exit(1) - - -# local IDs have to be in `index`, external ones can sometimes be in `index` but otherwise have -# to be in `paths` -def valid_id(item_id): - return item_id in crate["index"] or item_id[0] != "0" and item_id in crate["paths"] - - -def check_generics(generics): - for param in generics["params"]: - check_generic_param(param) - for where_predicate in generics["where_predicates"]: - if "bound_predicate" in where_predicate: - pred = where_predicate["bound_predicate"] - check_type(pred["type"]) - for bound in pred["bounds"]: - check_generic_bound(bound) - elif "region_predicate" in where_predicate: - pred = where_predicate["region_predicate"] - for bound in pred["bounds"]: - check_generic_bound(bound) - elif "eq_predicate" in where_predicate: - pred = where_predicate["eq_predicate"] - check_type(pred["rhs"]) - check_type(pred["lhs"]) - - -def check_generic_param(param): - if "type" in param["kind"]: - ty = param["kind"]["type"] - if ty["default"]: - check_type(ty["default"]) - elif "const" in param["kind"]: - check_type(param["kind"]["const"]) - - -def check_generic_bound(bound): - if "trait_bound" in bound: - for param in bound["trait_bound"]["generic_params"]: - check_generic_param(param) - check_type(bound["trait_bound"]["trait"]) - - -def check_decl(decl): - for (_name, ty) in decl["inputs"]: - check_type(ty) - if decl["output"]: - check_type(decl["output"]) - - -def check_type(ty): - if ty["kind"] == "resolved_path": - for bound in ty["inner"]["param_names"]: - check_generic_bound(bound) - args = ty["inner"]["args"] - if args: - if "angle_bracketed" in args: - for arg in args["angle_bracketed"]["args"]: - if "type" in arg: - check_type(arg["type"]) - elif "const" in arg: - check_type(arg["const"]["type"]) - for binding in args["angle_bracketed"]["bindings"]: - if "equality" in binding["binding"]: - term = binding["binding"]["equality"] - if "type" in term: check_type(term["type"]) - elif "const" in term: check_type(term["const"]) - elif "constraint" in binding["binding"]: - for bound in binding["binding"]["constraint"]: - check_generic_bound(bound) - elif "parenthesized" in args: - for ty in args["parenthesized"]["inputs"]: - check_type(ty) - if args["parenthesized"]["output"]: - check_type(args["parenthesized"]["output"]) - if not valid_id(ty["inner"]["id"]): - print("Type contained an invalid ID:", ty["inner"]["id"]) - sys.exit(1) - elif ty["kind"] == "tuple": - for ty in ty["inner"]: - check_type(ty) - elif ty["kind"] == "slice": - check_type(ty["inner"]) - elif ty["kind"] == "impl_trait": - for bound in ty["inner"]: - check_generic_bound(bound) - elif ty["kind"] in ("raw_pointer", "borrowed_ref", "array"): - check_type(ty["inner"]["type"]) - elif ty["kind"] == "function_pointer": - for param in ty["inner"]["generic_params"]: - check_generic_param(param) - check_decl(ty["inner"]["decl"]) - elif ty["kind"] == "qualified_path": - check_type(ty["inner"]["self_type"]) - check_type(ty["inner"]["trait"]) - - -work_list = set([crate["root"]]) -visited = work_list.copy() - -while work_list: - current = work_list.pop() - visited.add(current) - item = get_local_item(current) - # check intradoc links - for (_name, link) in item["links"].items(): - if not valid_id(link): - print("Intra-doc link contains invalid ID:", link) - - # check all fields that reference types such as generics as well as nested items - # (modules, structs, traits, and enums) - if item["kind"] == "module": - work_list |= set(item["inner"]["items"]) - visited - elif item["kind"] == "struct": - check_generics(item["inner"]["generics"]) - work_list |= ( - set(item["inner"]["fields"]) | set(item["inner"]["impls"]) - ) - visited - elif item["kind"] == "struct_field": - check_type(item["inner"]) - elif item["kind"] == "enum": - check_generics(item["inner"]["generics"]) - work_list |= ( - set(item["inner"]["variants"]) | set(item["inner"]["impls"]) - ) - visited - elif item["kind"] == "variant": - if item["inner"]["variant_kind"] == "tuple": - for ty in item["inner"]["variant_inner"]: - check_type(ty) - elif item["inner"]["variant_kind"] == "struct": - work_list |= set(item["inner"]["variant_inner"]) - visited - elif item["kind"] in ("function", "method"): - check_generics(item["inner"]["generics"]) - check_decl(item["inner"]["decl"]) - elif item["kind"] in ("static", "constant", "assoc_const"): - check_type(item["inner"]["type"]) - elif item["kind"] == "typedef": - check_type(item["inner"]["type"]) - check_generics(item["inner"]["generics"]) - elif item["kind"] == "opaque_ty": - check_generics(item["inner"]["generics"]) - for bound in item["inner"]["bounds"]: - check_generic_bound(bound) - elif item["kind"] == "trait_alias": - check_generics(item["inner"]["params"]) - for bound in item["inner"]["bounds"]: - check_generic_bound(bound) - elif item["kind"] == "trait": - check_generics(item["inner"]["generics"]) - for bound in item["inner"]["bounds"]: - check_generic_bound(bound) - work_list |= ( - set(item["inner"]["items"]) | set(item["inner"]["implementations"]) - ) - visited - elif item["kind"] == "impl": - check_generics(item["inner"]["generics"]) - if item["inner"]["trait"]: - check_type(item["inner"]["trait"]) - if item["inner"]["blanket_impl"]: - check_type(item["inner"]["blanket_impl"]) - check_type(item["inner"]["for"]) - for assoc_item in item["inner"]["items"]: - if not valid_id(assoc_item): - print("Impl block referenced a missing ID:", assoc_item) - sys.exit(1) - elif item["kind"] == "assoc_type": - for bound in item["inner"]["bounds"]: - check_generic_bound(bound) - if item["inner"]["default"]: - check_type(item["inner"]["default"]) diff --git a/src/etc/cpu-usage-over-time-plot.sh b/src/etc/cpu-usage-over-time-plot.sh index 1c3425591..2617378ba 100755 --- a/src/etc/cpu-usage-over-time-plot.sh +++ b/src/etc/cpu-usage-over-time-plot.sh @@ -15,7 +15,7 @@ # Improvements to this script are greatly appreciated! if [[ $# != 2 ]]; then - echo "expected 2 arguments, recieved $#" + echo "expected 2 arguments, received $#" echo "example usage: './src/etc/cpu-usage-over-time-plot.sh \ 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c \ x86_64-gnu'" diff --git a/src/etc/gdb_lookup.py b/src/etc/gdb_lookup.py index 292e91b4d..8171cb4e9 100644 --- a/src/etc/gdb_lookup.py +++ b/src/etc/gdb_lookup.py @@ -89,4 +89,7 @@ def lookup(valobj): if rust_type == RustType.STD_REF_CELL: return StdRefCellProvider(valobj) + if rust_type == RustType.STD_NONZERO_NUMBER: + return StdNonZeroNumberProvider(valobj) + return None diff --git a/src/etc/gdb_providers.py b/src/etc/gdb_providers.py index 0a52b8c97..c351c3450 100644 --- a/src/etc/gdb_providers.py +++ b/src/etc/gdb_providers.py @@ -231,6 +231,17 @@ class StdRefCellProvider: yield "borrow", self.borrow +class StdNonZeroNumberProvider: + def __init__(self, valobj): + fields = valobj.type.fields() + assert len(fields) == 1 + field = list(fields)[0] + self.value = str(valobj[field.name]) + + def to_string(self): + return self.value + + # Yields children (in a provider's sense of the word) for a BTreeMap. def children_of_btree_map(map): # Yields each key/value pair in the node and in any child nodes. diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index d02ac9d9c..c97fb4b80 100644 --- a/src/etc/htmldocck.py +++ b/src/etc/htmldocck.py @@ -41,15 +41,15 @@ There are a number of supported commands: `PATH` is relative to the output directory. It can be given as `-` which repeats the most recently used `PATH`. -* `@has PATH PATTERN` and `@matches PATH PATTERN` checks for - the occurrence of the given pattern `PATTERN` in the specified file. +* `@hasraw PATH PATTERN` and `@matchesraw PATH PATTERN` checks + for the occurrence of the given pattern `PATTERN` in the specified file. Only one occurrence of the pattern is enough. - For `@has`, `PATTERN` is a whitespace-normalized (every consecutive + For `@hasraw`, `PATTERN` is a whitespace-normalized (every consecutive whitespace being replaced by one single space character) string. The entire file is also whitespace-normalized including newlines. - For `@matches`, `PATTERN` is a Python-supported regular expression. + For `@matchesraw`, `PATTERN` is a Python-supported regular expression. The file remains intact but the regexp is matched without the `MULTILINE` and `IGNORECASE` options. You can still use a prefix `(?m)` or `(?i)` to override them, and `\A` and `\Z` for definitely matching @@ -386,7 +386,7 @@ def check_tree_attr(tree, path, attr, pat, regexp): return ret -# Returns the number of occurences matching the regex (`regexp`) and the text (`pat`). +# Returns the number of occurrences matching the regex (`regexp`) and the text (`pat`). def check_tree_text(tree, path, pat, regexp, stop_at_first): path = normalize_xpath(path) match_count = 0 @@ -542,19 +542,23 @@ ERR_COUNT = 0 def check_command(c, cache): try: cerr = "" - if c.cmd == 'has' or c.cmd == 'matches': # string test - regexp = (c.cmd == 'matches') - if len(c.args) == 1 and not regexp: # @has <path> = file existence + if c.cmd in ['has', 'hasraw', 'matches', 'matchesraw']: # string test + regexp = c.cmd.startswith('matches') + + # @has <path> = file existence + if len(c.args) == 1 and not regexp and 'raw' not in c.cmd: try: cache.get_file(c.args[0]) ret = True except FailedCheck as err: cerr = str(err) ret = False - elif len(c.args) == 2: # @has/matches <path> <pat> = string test + # @hasraw/matchesraw <path> <pat> = string test + elif len(c.args) == 2 and 'raw' in c.cmd: cerr = "`PATTERN` did not match" ret = check_string(cache.get_file(c.args[0]), c.args[1], regexp) - elif len(c.args) == 3: # @has/matches <path> <pat> <match> = XML tree test + # @has/matches <path> <pat> <match> = XML tree test + elif len(c.args) == 3 and 'raw' not in c.cmd: cerr = "`XPATH PATTERN` did not match" ret = get_nb_matching_elements(cache, c, regexp, True) != 0 else: diff --git a/src/etc/installer/msi/rust.wxs b/src/etc/installer/msi/rust.wxs index a182bc406..0aa0784e5 100644 --- a/src/etc/installer/msi/rust.wxs +++ b/src/etc/installer/msi/rust.wxs @@ -170,10 +170,6 @@ <Directory Id="Docs" Name="." /> <Directory Id="Cargo" Name="." /> <Directory Id="Std" Name="." /> - <!-- tool-rls-start --> - <Directory Id="Rls" Name="." /> - <Directory Id="Analysis" Name="." /> - <!-- tool-rls-end --> </Directory> </Directory> @@ -277,16 +273,6 @@ <ComponentRef Id="PathEnvPerMachine" /> <ComponentRef Id="PathEnvPerUser" /> </Feature> - <!-- tool-rls-start --> - <Feature Id="RLS" - Title="RLS, the Rust Language Server" - Display="7" - Level="2" - AllowAdvertise="no"> - <ComponentGroupRef Id="RlsGroup" /> - <ComponentGroupRef Id="AnalysisGroup" /> - </Feature> - <!-- tool-rls-end --> <UIRef Id="RustUI" /> </Product> diff --git a/src/etc/installer/pkg/Distribution.xml b/src/etc/installer/pkg/Distribution.xml index 077ee1751..64f6bab9b 100644 --- a/src/etc/installer/pkg/Distribution.xml +++ b/src/etc/installer/pkg/Distribution.xml @@ -16,9 +16,6 @@ <line choice="rust-std"/> <line choice="cargo"/> <line choice="rust-docs"/> - <!-- tool-rls-start --> - <line choice="rls"/> - <!-- tool-rls-end --> </line> <line choice="uninstall" /> </choices-outline> @@ -64,24 +61,10 @@ > <pkg-ref id="org.rust-lang.rust-docs"/> </choice> - <!-- tool-rls-start --> - <choice id="rls" visible="true" - title="RLS" description="RLS, the Rust Language Server" - selected="(!choices.uninstall.selected && choices['rls'].selected) || (choices.uninstall.selected && choices.install.selected)" - start_selected="false" - > - <pkg-ref id="org.rust-lang.rls"/> - <pkg-ref id="org.rust-lang.rust-analysis"/> - </choice> - <!-- tool-rls-end --> <pkg-ref id="org.rust-lang.rustc" version="0" onConclusion="none">rustc.pkg</pkg-ref> <pkg-ref id="org.rust-lang.cargo" version="0" onConclusion="none">cargo.pkg</pkg-ref> <pkg-ref id="org.rust-lang.rust-docs" version="0" onConclusion="none">rust-docs.pkg</pkg-ref> <pkg-ref id="org.rust-lang.rust-std" version="0" onConclusion="none">rust-std.pkg</pkg-ref> - <!-- tool-rls-start --> - <pkg-ref id="org.rust-lang.rls" version="0" onConclusion="none">rls.pkg</pkg-ref> - <!-- tool-rls-end --> - <pkg-ref id="org.rust-lang.rust-analysis" version="0" onConclusion="none">rust-analysis.pkg</pkg-ref> <pkg-ref id="org.rust-lang.uninstall" version="0" onConclusion="none">uninstall.pkg</pkg-ref> <background file="rust-logo.png" mime-type="image/png" alignment="bottomleft"/> diff --git a/src/etc/lldb_commands b/src/etc/lldb_commands index 4a1204ccc..ed66ecf30 100644 --- a/src/etc/lldb_commands +++ b/src/etc/lldb_commands @@ -15,4 +15,5 @@ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)C type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)Ref<.+>$" --category Rust type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefMut<.+>$" --category Rust type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefCell<.+>$" --category Rust +type summary add -F lldb_lookup.summary_lookup -e -x -h "^core::num::([a-z_]+::)*NonZero.+$" --category Rust type category enable Rust diff --git a/src/etc/lldb_lookup.py b/src/etc/lldb_lookup.py index 3cee51982..bca9c2ae1 100644 --- a/src/etc/lldb_lookup.py +++ b/src/etc/lldb_lookup.py @@ -55,6 +55,9 @@ def summary_lookup(valobj, dict): if rust_type == RustType.STD_REF_CELL: return StdRefSummaryProvider(valobj, dict) + if rust_type == RustType.STD_NONZERO_NUMBER: + return StdNonZeroNumberSummaryProvider(valobj, dict) + return "" diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py index 35ac07f0d..8a9927e7d 100644 --- a/src/etc/lldb_providers.py +++ b/src/etc/lldb_providers.py @@ -739,3 +739,11 @@ class StdRefSyntheticProvider: def has_children(self): # type: () -> bool return True + + +def StdNonZeroNumberSummaryProvider(valobj, _dict): + # type: (SBValue, dict) -> str + objtype = valobj.GetType() + field = objtype.GetFieldAtIndex(0) + element = valobj.GetChildMemberWithName(field.name) + return element.GetValue() diff --git a/src/etc/natvis/intrinsic.natvis b/src/etc/natvis/intrinsic.natvis index 558536fa6..277e57aaf 100644 --- a/src/etc/natvis/intrinsic.natvis +++ b/src/etc/natvis/intrinsic.natvis @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> <Type Name="str"> <DisplayString>{(char*)data_ptr,[length]s8}</DisplayString> @@ -150,76 +150,189 @@ </Expand> </Type> - <!-- Directly tagged enums. $T1 is the type name --> - <Type Name="enum$<*>"> - <Intrinsic Name="tag" Expression="discriminant" /> - <DisplayString Condition="tag() == 0">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 1" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 2" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 3" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 4" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 5" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 6" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 7" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 8" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 9" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 10" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 11" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 12" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 13" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 14" Optional="true">{tag(),en}</DisplayString> - <DisplayString Condition="tag() == 15" Optional="true">{tag(),en}</DisplayString> + <!-- + This is the visualizer for all enums. It takes care of selecting the active variant. + See `compiler\rustc_codegen_llvm\src\debuginfo\metadata\enums\cpp_like.rs` for more information. + --> + <Type Name="enum2$<*>"> + <!-- NOTE: That tag ranges can wrap around, in which case `end` is less than `begin` and we + have to do a different check --> + <Intrinsic Name="in_range" Expression="(begin <= end) ? ((x >= begin) && (x <= end)) : ((x >= begin) || (x <= end))"> + <Parameter Name="x" Type="unsigned __int64" /> + <Parameter Name="begin" Type="unsigned __int64" /> + <Parameter Name="end" Type="unsigned __int64" /> + </Intrinsic> - <Expand> - <Synthetic Name="[variant]"> - <DisplayString>{tag(),en}</DisplayString> - </Synthetic> - <ExpandedItem Condition="tag() == 0">variant0</ExpandedItem> - <ExpandedItem Condition="tag() == 1" Optional="true">variant1</ExpandedItem> - <ExpandedItem Condition="tag() == 2" Optional="true">variant2</ExpandedItem> - <ExpandedItem Condition="tag() == 3" Optional="true">variant3</ExpandedItem> - <ExpandedItem Condition="tag() == 4" Optional="true">variant4</ExpandedItem> - <ExpandedItem Condition="tag() == 5" Optional="true">variant5</ExpandedItem> - <ExpandedItem Condition="tag() == 6" Optional="true">variant6</ExpandedItem> - <ExpandedItem Condition="tag() == 7" Optional="true">variant7</ExpandedItem> - <ExpandedItem Condition="tag() == 8" Optional="true">variant8</ExpandedItem> - <ExpandedItem Condition="tag() == 9" Optional="true">variant9</ExpandedItem> - <ExpandedItem Condition="tag() == 10" Optional="true">variant10</ExpandedItem> - <ExpandedItem Condition="tag() == 11" Optional="true">variant11</ExpandedItem> - <ExpandedItem Condition="tag() == 12" Optional="true">variant12</ExpandedItem> - <ExpandedItem Condition="tag() == 13" Optional="true">variant13</ExpandedItem> - <ExpandedItem Condition="tag() == 14" Optional="true">variant14</ExpandedItem> - <ExpandedItem Condition="tag() == 15" Optional="true">variant15</ExpandedItem> - </Expand> - </Type> + <Intrinsic Name="eq128" Expression="(x_hi == y_hi) && (x_lo == y_lo)"> + <Parameter Name="x_hi" Type="unsigned __int64" /> + <Parameter Name="x_lo" Type="unsigned __int64" /> + <Parameter Name="y_hi" Type="unsigned __int64" /> + <Parameter Name="y_lo" Type="unsigned __int64" /> + </Intrinsic> - <!-- Single variant enums. $T1 is the name of the enum, $T2 is the name of the variant --> - <Type Name="enum$<*, *>"> - <DisplayString>{"$T2",sb}</DisplayString> - <Expand> - <Synthetic Name="[variant]"> - <DisplayString>{"$T2",sb}</DisplayString> - </Synthetic> - <ExpandedItem>$T2</ExpandedItem> - </Expand> - </Type> + <Intrinsic Name="lt128" Expression="(x_hi < y_hi) || ((x_hi == y_hi) && (x_lo < y_lo))"> + <Parameter Name="x_hi" Type="unsigned __int64" /> + <Parameter Name="x_lo" Type="unsigned __int64" /> + <Parameter Name="y_hi" Type="unsigned __int64" /> + <Parameter Name="y_lo" Type="unsigned __int64" /> + </Intrinsic> - <!-- Niche-layout enums. $T1 is the name of the enum, $T2 is the low value of the dataful - variant tag, $T3 is the high value of the dataful variant tag, $T4 is the name of - the dataful variant --> - <Type Name="enum$<*, *, *, *>"> - <Intrinsic Name="tag" Expression="discriminant" /> - <Intrinsic Name="is_dataful" Expression="tag() >= $T2 && tag() <= $T3" /> - <DisplayString Condition="is_dataful()">{"$T4",sb}({dataful_variant})</DisplayString> - <DisplayString Condition="!is_dataful()">{discriminant,en}</DisplayString> - <Expand> - <ExpandedItem Condition="is_dataful()">dataful_variant</ExpandedItem> - <Synthetic Condition="is_dataful()" Name="[variant]"> - <DisplayString>{"$T4",sb}</DisplayString> - </Synthetic> - <Synthetic Condition="!is_dataful()" Name="[variant]"> - <DisplayString>{discriminant,en}</DisplayString> - </Synthetic> + <Intrinsic Name="lt_or_eq128" Expression="((x_hi == y_hi) && (x_lo == y_lo)) || lt128(x_hi, x_lo, y_hi, y_lo)"> + <Parameter Name="x_hi" Type="unsigned __int64" /> + <Parameter Name="x_lo" Type="unsigned __int64" /> + <Parameter Name="y_hi" Type="unsigned __int64" /> + <Parameter Name="y_lo" Type="unsigned __int64" /> + </Intrinsic> + + <!-- NOTE: That tag ranges can wrap around, in which case `end` is less than `begin` and we + have to do a different check --> + <Intrinsic Name="in_range128" Expression="(lt_or_eq128(begin_hi, begin_lo, end_hi, end_lo)) ? + (lt_or_eq128(begin_hi, begin_lo, x_hi, x_lo) && lt_or_eq128(x_hi, x_lo, end_hi, end_lo)) : + (lt_or_eq128(begin_hi, begin_lo, x_hi, x_lo) || lt_or_eq128(x_hi, x_lo, end_hi, end_lo))"> + <Parameter Name="x_hi" Type="unsigned __int64" /> + <Parameter Name="x_lo" Type="unsigned __int64" /> + <Parameter Name="begin_hi" Type="unsigned __int64" /> + <Parameter Name="begin_lo" Type="unsigned __int64" /> + <Parameter Name="end_hi" Type="unsigned __int64" /> + <Parameter Name="end_lo" Type="unsigned __int64" /> + </Intrinsic> + + <DisplayString Condition="tag == variant0.DISCR_EXACT" Optional="true">{variant0.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant1.DISCR_EXACT" Optional="true">{variant1.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant2.DISCR_EXACT" Optional="true">{variant2.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant3.DISCR_EXACT" Optional="true">{variant3.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant4.DISCR_EXACT" Optional="true">{variant4.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant5.DISCR_EXACT" Optional="true">{variant5.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant6.DISCR_EXACT" Optional="true">{variant6.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant7.DISCR_EXACT" Optional="true">{variant7.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant8.DISCR_EXACT" Optional="true">{variant8.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant9.DISCR_EXACT" Optional="true">{variant9.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant10.DISCR_EXACT" Optional="true">{variant10.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant11.DISCR_EXACT" Optional="true">{variant11.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant12.DISCR_EXACT" Optional="true">{variant12.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant13.DISCR_EXACT" Optional="true">{variant13.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant14.DISCR_EXACT" Optional="true">{variant14.NAME,en}</DisplayString> + <DisplayString Condition="tag == variant15.DISCR_EXACT" Optional="true">{variant15.NAME,en}</DisplayString> + + <DisplayString Condition="in_range(tag, variant0.DISCR_BEGIN, variant0.DISCR_END)" Optional="true">{variant0.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant1.DISCR_BEGIN, variant1.DISCR_END)" Optional="true">{variant1.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant2.DISCR_BEGIN, variant2.DISCR_END)" Optional="true">{variant2.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant3.DISCR_BEGIN, variant3.DISCR_END)" Optional="true">{variant3.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant4.DISCR_BEGIN, variant4.DISCR_END)" Optional="true">{variant4.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant5.DISCR_BEGIN, variant5.DISCR_END)" Optional="true">{variant5.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant6.DISCR_BEGIN, variant6.DISCR_END)" Optional="true">{variant6.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant7.DISCR_BEGIN, variant7.DISCR_END)" Optional="true">{variant7.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant8.DISCR_BEGIN, variant8.DISCR_END)" Optional="true">{variant8.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant9.DISCR_BEGIN, variant9.DISCR_END)" Optional="true">{variant9.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant10.DISCR_BEGIN, variant10.DISCR_END)" Optional="true">{variant10.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant11.DISCR_BEGIN, variant11.DISCR_END)" Optional="true">{variant11.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant12.DISCR_BEGIN, variant12.DISCR_END)" Optional="true">{variant12.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant13.DISCR_BEGIN, variant13.DISCR_END)" Optional="true">{variant13.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant14.DISCR_BEGIN, variant14.DISCR_END)" Optional="true">{variant14.NAME,en}</DisplayString> + <DisplayString Condition="in_range(tag, variant15.DISCR_BEGIN, variant15.DISCR_END)" Optional="true">{variant15.NAME,en}</DisplayString> + + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant0.DISCR128_EXACT_HI, variant0.DISCR128_EXACT_LO)" Optional="true">{variant0.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant1.DISCR128_EXACT_HI, variant1.DISCR128_EXACT_LO)" Optional="true">{variant1.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant2.DISCR128_EXACT_HI, variant2.DISCR128_EXACT_LO)" Optional="true">{variant2.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant3.DISCR128_EXACT_HI, variant3.DISCR128_EXACT_LO)" Optional="true">{variant3.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant4.DISCR128_EXACT_HI, variant4.DISCR128_EXACT_LO)" Optional="true">{variant4.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant5.DISCR128_EXACT_HI, variant5.DISCR128_EXACT_LO)" Optional="true">{variant5.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant6.DISCR128_EXACT_HI, variant6.DISCR128_EXACT_LO)" Optional="true">{variant6.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant7.DISCR128_EXACT_HI, variant7.DISCR128_EXACT_LO)" Optional="true">{variant7.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant8.DISCR128_EXACT_HI, variant8.DISCR128_EXACT_LO)" Optional="true">{variant8.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant9.DISCR128_EXACT_HI, variant9.DISCR128_EXACT_LO)" Optional="true">{variant9.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant10.DISCR128_EXACT_HI, variant10.DISCR128_EXACT_LO)" Optional="true">{variant10.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant11.DISCR128_EXACT_HI, variant11.DISCR128_EXACT_LO)" Optional="true">{variant11.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant12.DISCR128_EXACT_HI, variant12.DISCR128_EXACT_LO)" Optional="true">{variant12.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant13.DISCR128_EXACT_HI, variant13.DISCR128_EXACT_LO)" Optional="true">{variant13.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant14.DISCR128_EXACT_HI, variant14.DISCR128_EXACT_LO)" Optional="true">{variant14.NAME,en}</DisplayString> + <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant15.DISCR128_EXACT_HI, variant15.DISCR128_EXACT_LO)" Optional="true">{variant15.NAME,en}</DisplayString> + + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant0.DISCR128_BEGIN_HI, variant0.DISCR128_BEGIN_LO, variant0.DISCR128_END_HI, variant0.DISCR128_END_LO)" Optional="true">{variant0.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant1.DISCR128_BEGIN_HI, variant1.DISCR128_BEGIN_LO, variant1.DISCR128_END_HI, variant1.DISCR128_END_LO)" Optional="true">{variant1.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant2.DISCR128_BEGIN_HI, variant2.DISCR128_BEGIN_LO, variant2.DISCR128_END_HI, variant2.DISCR128_END_LO)" Optional="true">{variant2.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant3.DISCR128_BEGIN_HI, variant3.DISCR128_BEGIN_LO, variant3.DISCR128_END_HI, variant3.DISCR128_END_LO)" Optional="true">{variant3.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant4.DISCR128_BEGIN_HI, variant4.DISCR128_BEGIN_LO, variant4.DISCR128_END_HI, variant4.DISCR128_END_LO)" Optional="true">{variant4.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant5.DISCR128_BEGIN_HI, variant5.DISCR128_BEGIN_LO, variant5.DISCR128_END_HI, variant5.DISCR128_END_LO)" Optional="true">{variant5.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant6.DISCR128_BEGIN_HI, variant6.DISCR128_BEGIN_LO, variant6.DISCR128_END_HI, variant6.DISCR128_END_LO)" Optional="true">{variant6.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant7.DISCR128_BEGIN_HI, variant7.DISCR128_BEGIN_LO, variant7.DISCR128_END_HI, variant7.DISCR128_END_LO)" Optional="true">{variant7.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant8.DISCR128_BEGIN_HI, variant8.DISCR128_BEGIN_LO, variant8.DISCR128_END_HI, variant8.DISCR128_END_LO)" Optional="true">{variant8.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant9.DISCR128_BEGIN_HI, variant9.DISCR128_BEGIN_LO, variant9.DISCR128_END_HI, variant9.DISCR128_END_LO)" Optional="true">{variant9.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant10.DISCR128_BEGIN_HI, variant10.DISCR128_BEGIN_LO, variant10.DISCR128_END_HI, variant10.DISCR128_END_LO)" Optional="true">{variant10.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant11.DISCR128_BEGIN_HI, variant11.DISCR128_BEGIN_LO, variant11.DISCR128_END_HI, variant11.DISCR128_END_LO)" Optional="true">{variant11.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant12.DISCR128_BEGIN_HI, variant12.DISCR128_BEGIN_LO, variant12.DISCR128_END_HI, variant12.DISCR128_END_LO)" Optional="true">{variant12.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant13.DISCR128_BEGIN_HI, variant13.DISCR128_BEGIN_LO, variant13.DISCR128_END_HI, variant13.DISCR128_END_LO)" Optional="true">{variant13.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant14.DISCR128_BEGIN_HI, variant14.DISCR128_BEGIN_LO, variant14.DISCR128_END_HI, variant14.DISCR128_END_LO)" Optional="true">{variant14.NAME,en}</DisplayString> + <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant15.DISCR128_BEGIN_HI, variant15.DISCR128_BEGIN_LO, variant15.DISCR128_END_HI, variant15.DISCR128_END_LO)" Optional="true">{variant15.NAME,en}</DisplayString> + + <Expand HideRawView="true"> + <ExpandedItem Condition="tag == variant0.DISCR_EXACT" Optional="true">variant0.value</ExpandedItem> + <ExpandedItem Condition="tag == variant1.DISCR_EXACT" Optional="true">variant1.value</ExpandedItem> + <ExpandedItem Condition="tag == variant2.DISCR_EXACT" Optional="true">variant2.value</ExpandedItem> + <ExpandedItem Condition="tag == variant3.DISCR_EXACT" Optional="true">variant3.value</ExpandedItem> + <ExpandedItem Condition="tag == variant4.DISCR_EXACT" Optional="true">variant4.value</ExpandedItem> + <ExpandedItem Condition="tag == variant5.DISCR_EXACT" Optional="true">variant5.value</ExpandedItem> + <ExpandedItem Condition="tag == variant6.DISCR_EXACT" Optional="true">variant6.value</ExpandedItem> + <ExpandedItem Condition="tag == variant7.DISCR_EXACT" Optional="true">variant7.value</ExpandedItem> + <ExpandedItem Condition="tag == variant8.DISCR_EXACT" Optional="true">variant8.value</ExpandedItem> + <ExpandedItem Condition="tag == variant9.DISCR_EXACT" Optional="true">variant9.value</ExpandedItem> + <ExpandedItem Condition="tag == variant10.DISCR_EXACT" Optional="true">variant10.value</ExpandedItem> + <ExpandedItem Condition="tag == variant11.DISCR_EXACT" Optional="true">variant11.value</ExpandedItem> + <ExpandedItem Condition="tag == variant12.DISCR_EXACT" Optional="true">variant12.value</ExpandedItem> + <ExpandedItem Condition="tag == variant13.DISCR_EXACT" Optional="true">variant13.value</ExpandedItem> + <ExpandedItem Condition="tag == variant14.DISCR_EXACT" Optional="true">variant14.value</ExpandedItem> + <ExpandedItem Condition="tag == variant15.DISCR_EXACT" Optional="true">variant15.value</ExpandedItem> + + <ExpandedItem Condition="in_range(tag, variant0.DISCR_BEGIN, variant0.DISCR_END)" Optional="true">variant0.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant1.DISCR_BEGIN, variant1.DISCR_END)" Optional="true">variant1.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant2.DISCR_BEGIN, variant2.DISCR_END)" Optional="true">variant2.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant3.DISCR_BEGIN, variant3.DISCR_END)" Optional="true">variant3.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant4.DISCR_BEGIN, variant4.DISCR_END)" Optional="true">variant4.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant5.DISCR_BEGIN, variant5.DISCR_END)" Optional="true">variant5.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant6.DISCR_BEGIN, variant6.DISCR_END)" Optional="true">variant6.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant7.DISCR_BEGIN, variant7.DISCR_END)" Optional="true">variant7.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant8.DISCR_BEGIN, variant8.DISCR_END)" Optional="true">variant8.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant9.DISCR_BEGIN, variant9.DISCR_END)" Optional="true">variant9.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant10.DISCR_BEGIN, variant10.DISCR_END)" Optional="true">variant10.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant11.DISCR_BEGIN, variant11.DISCR_END)" Optional="true">variant11.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant12.DISCR_BEGIN, variant12.DISCR_END)" Optional="true">variant12.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant13.DISCR_BEGIN, variant13.DISCR_END)" Optional="true">variant13.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant14.DISCR_BEGIN, variant14.DISCR_END)" Optional="true">variant14.value</ExpandedItem> + <ExpandedItem Condition="in_range(tag, variant15.DISCR_BEGIN, variant15.DISCR_END)" Optional="true">variant15.value</ExpandedItem> + + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant0.DISCR128_EXACT_HI, variant0.DISCR128_EXACT_LO)" Optional="true">variant0.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant1.DISCR128_EXACT_HI, variant1.DISCR128_EXACT_LO)" Optional="true">variant1.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant2.DISCR128_EXACT_HI, variant2.DISCR128_EXACT_LO)" Optional="true">variant2.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant3.DISCR128_EXACT_HI, variant3.DISCR128_EXACT_LO)" Optional="true">variant3.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant4.DISCR128_EXACT_HI, variant4.DISCR128_EXACT_LO)" Optional="true">variant4.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant5.DISCR128_EXACT_HI, variant5.DISCR128_EXACT_LO)" Optional="true">variant5.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant6.DISCR128_EXACT_HI, variant6.DISCR128_EXACT_LO)" Optional="true">variant6.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant7.DISCR128_EXACT_HI, variant7.DISCR128_EXACT_LO)" Optional="true">variant7.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant8.DISCR128_EXACT_HI, variant8.DISCR128_EXACT_LO)" Optional="true">variant8.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant9.DISCR128_EXACT_HI, variant9.DISCR128_EXACT_LO)" Optional="true">variant9.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant10.DISCR128_EXACT_HI, variant10.DISCR128_EXACT_LO)" Optional="true">variant10.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant11.DISCR128_EXACT_HI, variant11.DISCR128_EXACT_LO)" Optional="true">variant11.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant12.DISCR128_EXACT_HI, variant12.DISCR128_EXACT_LO)" Optional="true">variant12.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant13.DISCR128_EXACT_HI, variant13.DISCR128_EXACT_LO)" Optional="true">variant13.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant14.DISCR128_EXACT_HI, variant14.DISCR128_EXACT_LO)" Optional="true">variant14.value</ExpandedItem> + <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant15.DISCR128_EXACT_HI, variant15.DISCR128_EXACT_LO)" Optional="true">variant15.value</ExpandedItem> + + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant0.DISCR128_BEGIN_HI, variant0.DISCR128_BEGIN_LO, variant0.DISCR128_END_HI, variant0.DISCR128_END_LO)" Optional="true">variant0.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant1.DISCR128_BEGIN_HI, variant1.DISCR128_BEGIN_LO, variant1.DISCR128_END_HI, variant1.DISCR128_END_LO)" Optional="true">variant1.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant2.DISCR128_BEGIN_HI, variant2.DISCR128_BEGIN_LO, variant2.DISCR128_END_HI, variant2.DISCR128_END_LO)" Optional="true">variant2.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant3.DISCR128_BEGIN_HI, variant3.DISCR128_BEGIN_LO, variant3.DISCR128_END_HI, variant3.DISCR128_END_LO)" Optional="true">variant3.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant4.DISCR128_BEGIN_HI, variant4.DISCR128_BEGIN_LO, variant4.DISCR128_END_HI, variant4.DISCR128_END_LO)" Optional="true">variant4.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant5.DISCR128_BEGIN_HI, variant5.DISCR128_BEGIN_LO, variant5.DISCR128_END_HI, variant5.DISCR128_END_LO)" Optional="true">variant5.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant6.DISCR128_BEGIN_HI, variant6.DISCR128_BEGIN_LO, variant6.DISCR128_END_HI, variant6.DISCR128_END_LO)" Optional="true">variant6.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant7.DISCR128_BEGIN_HI, variant7.DISCR128_BEGIN_LO, variant7.DISCR128_END_HI, variant7.DISCR128_END_LO)" Optional="true">variant7.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant8.DISCR128_BEGIN_HI, variant8.DISCR128_BEGIN_LO, variant8.DISCR128_END_HI, variant8.DISCR128_END_LO)" Optional="true">variant8.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant9.DISCR128_BEGIN_HI, variant9.DISCR128_BEGIN_LO, variant9.DISCR128_END_HI, variant9.DISCR128_END_LO)" Optional="true">variant9.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant10.DISCR128_BEGIN_HI, variant10.DISCR128_BEGIN_LO, variant10.DISCR128_END_HI, variant10.DISCR128_END_LO)" Optional="true">variant10.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant11.DISCR128_BEGIN_HI, variant11.DISCR128_BEGIN_LO, variant11.DISCR128_END_HI, variant11.DISCR128_END_LO)" Optional="true">variant11.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant12.DISCR128_BEGIN_HI, variant12.DISCR128_BEGIN_LO, variant12.DISCR128_END_HI, variant12.DISCR128_END_LO)" Optional="true">variant12.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant13.DISCR128_BEGIN_HI, variant13.DISCR128_BEGIN_LO, variant13.DISCR128_END_HI, variant13.DISCR128_END_LO)" Optional="true">variant13.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant14.DISCR128_BEGIN_HI, variant14.DISCR128_BEGIN_LO, variant14.DISCR128_END_HI, variant14.DISCR128_END_LO)" Optional="true">variant14.value</ExpandedItem> + <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant15.DISCR128_BEGIN_HI, variant15.DISCR128_BEGIN_LO, variant15.DISCR128_END_HI, variant15.DISCR128_END_LO)" Optional="true">variant15.value</ExpandedItem> </Expand> </Type> </AutoVisualizer> diff --git a/src/etc/natvis/liballoc.natvis b/src/etc/natvis/liballoc.natvis index 912418fa7..bf6c02b91 100644 --- a/src/etc/natvis/liballoc.natvis +++ b/src/etc/natvis/liballoc.natvis @@ -185,12 +185,4 @@ </ArrayItems> </Expand> </Type> - - <Type Name="alloc::borrow::Cow<*>"> - <DisplayString Condition="RUST$ENUM$DISR == 0x0">Borrowed({__0})</DisplayString> - <DisplayString Condition="RUST$ENUM$DISR == 0x1">Owned({__0})</DisplayString> - <Expand> - <Item Name="[value]" ExcludeView="simple">__0</Item> - </Expand> - </Type> </AutoVisualizer> diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh index 5f5b48bc1..be7de3eba 100755 --- a/src/etc/pre-push.sh +++ b/src/etc/pre-push.sh @@ -10,7 +10,7 @@ set -Eeuo pipefail # https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570 unset GIT_DIR ROOT_DIR="$(git rev-parse --show-toplevel)" -COMMAND="$ROOT_DIR/x.py test tidy --bless" +COMMAND="$ROOT_DIR/x.py test tidy" if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then COMMAND="python $COMMAND" diff --git a/src/etc/rust_types.py b/src/etc/rust_types.py index bbc945a7d..bf512bc99 100644 --- a/src/etc/rust_types.py +++ b/src/etc/rust_types.py @@ -31,6 +31,7 @@ class RustType(object): STD_REF = "StdRef" STD_REF_MUT = "StdRefMut" STD_REF_CELL = "StdRefCell" + STD_NONZERO_NUMBER = "StdNonZeroNumber" STD_STRING_REGEX = re.compile(r"^(alloc::(\w+::)+)String$") @@ -49,6 +50,7 @@ STD_CELL_REGEX = re.compile(r"^(core::(\w+::)+)Cell<.+>$") STD_REF_REGEX = re.compile(r"^(core::(\w+::)+)Ref<.+>$") STD_REF_MUT_REGEX = re.compile(r"^(core::(\w+::)+)RefMut<.+>$") STD_REF_CELL_REGEX = re.compile(r"^(core::(\w+::)+)RefCell<.+>$") +STD_NONZERO_NUMBER_REGEX = re.compile(r"^core::num::([a-z_]+::)*NonZero.+$") TUPLE_ITEM_REGEX = re.compile(r"__\d+$") @@ -72,6 +74,7 @@ STD_TYPE_TO_REGEX = { RustType.STD_REF_MUT: STD_REF_MUT_REGEX, RustType.STD_REF_CELL: STD_REF_CELL_REGEX, RustType.STD_CELL: STD_CELL_REGEX, + RustType.STD_NONZERO_NUMBER: STD_NONZERO_NUMBER_REGEX, } def is_tuple_fields(fields): |