mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 06:58:50 +00:00
Update dependencies
This commit is contained in:
196
Cargo.lock
generated
196
Cargo.lock
generated
@@ -69,37 +69,21 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "3.0.0-beta.2"
|
version = "3.0.0-rc.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142"
|
checksum = "e6f243c7279f09ffed852a0a564c72091331651484cdbb32b7287f16df8611a7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"clap_derive",
|
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"os_str_bytes",
|
"os_str_bytes",
|
||||||
"strsim",
|
"strsim",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
"textwrap",
|
"textwrap",
|
||||||
"unicode-width",
|
|
||||||
"vec_map",
|
|
||||||
"yaml-rust",
|
"yaml-rust",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "clap_derive"
|
|
||||||
version = "3.0.0-beta.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1"
|
|
||||||
dependencies = [
|
|
||||||
"heck",
|
|
||||||
"proc-macro-error",
|
|
||||||
"proc-macro2",
|
|
||||||
"quote 1.0.9",
|
|
||||||
"syn 1.0.73",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "either"
|
name = "either"
|
||||||
version = "1.6.1"
|
version = "1.6.1"
|
||||||
@@ -123,8 +107,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote 1.0.9",
|
"quote",
|
||||||
"syn 1.0.73",
|
"syn",
|
||||||
"synstructure",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -151,15 +135,6 @@ version = "0.9.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
|
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "heck"
|
|
||||||
version = "0.3.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
|
||||||
dependencies = [
|
|
||||||
"unicode-segmentation",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hermit-abi"
|
name = "hermit-abi"
|
||||||
version = "0.1.18"
|
version = "0.1.18"
|
||||||
@@ -169,33 +144,11 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hexf"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e54653cc32d838771a36532647afad59c4bf7155745eeeec406f71fd5d7e7538"
|
|
||||||
dependencies = [
|
|
||||||
"hexf-impl",
|
|
||||||
"hexf-parse",
|
|
||||||
"proc-macro-hack",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hexf-impl"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "22eadcfadba76a730b2764eaa577d045f35e0ef5174b9c5b46adf1ee42b85e12"
|
|
||||||
dependencies = [
|
|
||||||
"hexf-parse",
|
|
||||||
"proc-macro-hack",
|
|
||||||
"syn 0.11.11",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hexf-parse"
|
name = "hexf-parse"
|
||||||
version = "0.1.0"
|
version = "0.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "79296f72d53a89096cbc9a88c9547ee8dfe793388674620e2207593d370550ac"
|
checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
@@ -209,9 +162,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itertools"
|
name = "itertools"
|
||||||
version = "0.10.1"
|
version = "0.10.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf"
|
checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"either",
|
"either",
|
||||||
]
|
]
|
||||||
@@ -222,7 +175,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"failure",
|
"failure",
|
||||||
"hexf",
|
"hexf-parse",
|
||||||
"itertools",
|
"itertools",
|
||||||
"lang-c",
|
"lang-c",
|
||||||
"ordered-float",
|
"ordered-float",
|
||||||
@@ -234,9 +187,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lang-c"
|
name = "lang-c"
|
||||||
version = "0.10.1"
|
version = "0.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a597343db6f9affec95665270028e3113864b48a1a0ba9257c1553ade3840207"
|
checksum = "a402480a9a8d5a8b6348ddb87bc7e7d16a0899086b5c6ba9ff6df622e9f4692a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
@@ -292,18 +245,21 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ordered-float"
|
name = "ordered-float"
|
||||||
version = "2.5.1"
|
version = "2.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f100fcfb41e5385e0991f74981732049f9b896821542a219420491046baafdc2"
|
checksum = "97c9d06878b3a851e8026ef94bf7fef9ba93062cd412601da4d9cf369b1cc62d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"num-traits",
|
"num-traits",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "os_str_bytes"
|
name = "os_str_bytes"
|
||||||
version = "2.4.0"
|
version = "6.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85"
|
checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "peg"
|
name = "peg"
|
||||||
@@ -323,7 +279,7 @@ checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"peg-runtime",
|
"peg-runtime",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote 1.0.9",
|
"quote",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -338,60 +294,15 @@ version = "0.2.10"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
|
checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro-error"
|
|
||||||
version = "1.0.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro-error-attr",
|
|
||||||
"proc-macro2",
|
|
||||||
"quote 1.0.9",
|
|
||||||
"syn 1.0.73",
|
|
||||||
"version_check",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro-error-attr"
|
|
||||||
version = "1.0.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote 1.0.9",
|
|
||||||
"version_check",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro-hack"
|
|
||||||
version = "0.3.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b773f824ff2a495833f85fcdddcf85e096949971decada2e93249fa2c6c3d32f"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro-hack-impl",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro-hack-impl"
|
|
||||||
version = "0.3.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0f674ccc446da486175527473ec8aa064f980b0966bbf767ee743a5dff6244a7"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.27"
|
version = "1.0.27"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
|
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-xid 0.2.2",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "quote"
|
|
||||||
version = "0.3.15"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.9"
|
version = "1.0.9"
|
||||||
@@ -471,17 +382,6 @@ version = "0.10.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "syn"
|
|
||||||
version = "0.11.11"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
|
|
||||||
dependencies = [
|
|
||||||
"quote 0.3.15",
|
|
||||||
"synom",
|
|
||||||
"unicode-xid 0.0.4",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.73"
|
version = "1.0.73"
|
||||||
@@ -489,17 +389,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
|
checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote 1.0.9",
|
"quote",
|
||||||
"unicode-xid 0.2.2",
|
"unicode-xid",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "synom"
|
|
||||||
version = "0.11.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
|
|
||||||
dependencies = [
|
|
||||||
"unicode-xid 0.0.4",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -509,9 +400,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
|
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote 1.0.9",
|
"quote",
|
||||||
"syn 1.0.73",
|
"syn",
|
||||||
"unicode-xid 0.2.2",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -539,30 +430,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "textwrap"
|
name = "textwrap"
|
||||||
version = "0.12.1"
|
version = "0.14.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789"
|
checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80"
|
||||||
dependencies = [
|
|
||||||
"unicode-width",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicode-segmentation"
|
|
||||||
version = "1.7.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicode-width"
|
|
||||||
version = "0.1.8"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicode-xid"
|
|
||||||
version = "0.0.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-xid"
|
name = "unicode-xid"
|
||||||
@@ -570,18 +440,6 @@ version = "0.2.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "vec_map"
|
|
||||||
version = "0.8.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "version_check"
|
|
||||||
version = "0.9.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wait-timeout"
|
name = "wait-timeout"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
|
|||||||
12
Cargo.toml
12
Cargo.toml
@@ -2,7 +2,7 @@
|
|||||||
name = "kecc"
|
name = "kecc"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Chunmyong Park <chunmyong.park@kaist.ac.kr>", "Jeehoon Kang <jeehoon.kang@kaist.ac.kr>"]
|
authors = ["Chunmyong Park <chunmyong.park@kaist.ac.kr>", "Jeehoon Kang <jeehoon.kang@kaist.ac.kr>"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
default-run = "kecc"
|
default-run = "kecc"
|
||||||
|
|
||||||
description = "KAIST Educational C Compiler"
|
description = "KAIST Educational C Compiler"
|
||||||
@@ -29,13 +29,13 @@ required-features = ["build-bin"]
|
|||||||
build-bin = ["clap"]
|
build-bin = ["clap"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "3.0.0-beta.2", features = ["yaml"], optional = true }
|
clap = { version = "3.0.0-rc.11", features = ["yaml", "cargo"], optional = true }
|
||||||
lang-c = "0.10.1"
|
lang-c = "0.11.0"
|
||||||
itertools = "0.10.1"
|
itertools = "0.10.3"
|
||||||
failure = "0.1.8"
|
failure = "0.1.8"
|
||||||
tempfile = "3.2.0"
|
tempfile = "3.2.0"
|
||||||
ordered-float = "2.5.1"
|
ordered-float = "2.8.0"
|
||||||
hexf = "0.1.0"
|
hexf-parse = "0.2.1"
|
||||||
wait-timeout = "0.2.0"
|
wait-timeout = "0.2.0"
|
||||||
peg = "0.7.0"
|
peg = "0.7.0"
|
||||||
rand = "0.8.4"
|
rand = "0.8.4"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use std::path::Path;
|
|||||||
fn main() {
|
fn main() {
|
||||||
let yaml = load_yaml!("fuzz_cli.yml");
|
let yaml = load_yaml!("fuzz_cli.yml");
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
let matches = App::from(yaml)
|
let matches = App::from_yaml(yaml)
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.about(crate_description!())
|
.about(crate_description!())
|
||||||
.author(crate_authors!(", "))
|
.author(crate_authors!(", "))
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ use kecc::{
|
|||||||
fn main() {
|
fn main() {
|
||||||
let yaml = load_yaml!("kecc_cli.yml");
|
let yaml = load_yaml!("kecc_cli.yml");
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
let matches = App::from(yaml)
|
let matches = App::from_yaml(yaml)
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.about(crate_description!())
|
.about(crate_description!())
|
||||||
.author(crate_authors!(", "))
|
.author(crate_authors!(", "))
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.53.0
|
1.57.0
|
||||||
|
|||||||
@@ -247,11 +247,14 @@ impl IsEquiv for Expression {
|
|||||||
}
|
}
|
||||||
(Self::Member(member), Self::Member(other_member)) => member.is_equiv(other_member),
|
(Self::Member(member), Self::Member(other_member)) => member.is_equiv(other_member),
|
||||||
(Self::Call(call), Self::Call(other_call)) => call.is_equiv(other_call),
|
(Self::Call(call), Self::Call(other_call)) => call.is_equiv(other_call),
|
||||||
(Self::SizeOf(typename), Self::SizeOf(other_typename)) => {
|
(Self::SizeOfTy(size_of_ty), Self::SizeOfTy(other_size_of_ty)) => {
|
||||||
typename.is_equiv(other_typename)
|
size_of_ty.is_equiv(other_size_of_ty)
|
||||||
}
|
}
|
||||||
(Self::AlignOf(typename), Self::AlignOf(other_typename)) => {
|
(Self::SizeOfVal(size_of_val), Self::SizeOfVal(other_size_of_val)) => {
|
||||||
typename.is_equiv(other_typename)
|
size_of_val.is_equiv(other_size_of_val)
|
||||||
|
}
|
||||||
|
(Self::AlignOf(align_of), Self::AlignOf(other_align_of)) => {
|
||||||
|
align_of.is_equiv(other_align_of)
|
||||||
}
|
}
|
||||||
(Self::UnaryOperator(unary), Self::UnaryOperator(other_unary)) => {
|
(Self::UnaryOperator(unary), Self::UnaryOperator(other_unary)) => {
|
||||||
unary.node.operator.is_equiv(&other_unary.node.operator)
|
unary.node.operator.is_equiv(&other_unary.node.operator)
|
||||||
@@ -506,6 +509,24 @@ impl IsEquiv for CallExpression {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl IsEquiv for SizeOfTy {
|
||||||
|
fn is_equiv(&self, other: &Self) -> bool {
|
||||||
|
self.0.is_equiv(&other.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl IsEquiv for SizeOfVal {
|
||||||
|
fn is_equiv(&self, other: &Self) -> bool {
|
||||||
|
self.0.is_equiv(&other.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl IsEquiv for AlignOf {
|
||||||
|
fn is_equiv(&self, other: &Self) -> bool {
|
||||||
|
self.0.is_equiv(&other.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn assert_ast_equiv(lhs: &TranslationUnit, rhs: &TranslationUnit) {
|
pub fn assert_ast_equiv(lhs: &TranslationUnit, rhs: &TranslationUnit) {
|
||||||
if !lhs.is_equiv(rhs) {
|
if !lhs.is_equiv(rhs) {
|
||||||
panic!(
|
panic!(
|
||||||
|
|||||||
@@ -466,8 +466,9 @@ impl AssertSupported for Expression {
|
|||||||
Self::Member(member) => member.assert_supported(),
|
Self::Member(member) => member.assert_supported(),
|
||||||
Self::Call(call) => call.assert_supported(),
|
Self::Call(call) => call.assert_supported(),
|
||||||
Self::CompoundLiteral(_) => panic!("Expression::CompoundLiteral"),
|
Self::CompoundLiteral(_) => panic!("Expression::CompoundLiteral"),
|
||||||
Self::SizeOf(typename) => typename.assert_supported(),
|
Self::SizeOfTy(size_of_ty) => size_of_ty.assert_supported(),
|
||||||
Self::AlignOf(typename) => typename.assert_supported(),
|
Self::SizeOfVal(size_of_val) => size_of_val.assert_supported(),
|
||||||
|
Self::AlignOf(align_of) => align_of.assert_supported(),
|
||||||
Self::UnaryOperator(unary) => unary.assert_supported(),
|
Self::UnaryOperator(unary) => unary.assert_supported(),
|
||||||
Self::Cast(cast) => cast.assert_supported(),
|
Self::Cast(cast) => cast.assert_supported(),
|
||||||
Self::BinaryOperator(binary) => binary.assert_supported(),
|
Self::BinaryOperator(binary) => binary.assert_supported(),
|
||||||
@@ -591,3 +592,21 @@ impl AssertSupported for ConditionalExpression {
|
|||||||
self.else_expression.assert_supported();
|
self.else_expression.assert_supported();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl AssertSupported for SizeOfTy {
|
||||||
|
fn assert_supported(&self) {
|
||||||
|
self.0.assert_supported();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AssertSupported for SizeOfVal {
|
||||||
|
fn assert_supported(&self) {
|
||||||
|
self.0.assert_supported();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AssertSupported for AlignOf {
|
||||||
|
fn assert_supported(&self) {
|
||||||
|
self.0.assert_supported();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ mod write_ir;
|
|||||||
use core::convert::TryFrom;
|
use core::convert::TryFrom;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::ops::{Deref, DerefMut};
|
use core::ops::{Deref, DerefMut};
|
||||||
use hexf::{parse_hexf32, parse_hexf64};
|
use hexf_parse::{parse_hexf32, parse_hexf64};
|
||||||
use lang_c::ast;
|
use lang_c::ast;
|
||||||
use ordered_float::OrderedFloat;
|
use ordered_float::OrderedFloat;
|
||||||
use std::collections::{BTreeMap, HashMap};
|
use std::collections::{BTreeMap, HashMap};
|
||||||
|
|||||||
Reference in New Issue
Block a user