support enums with more than 256 variants in derive macro (#4370)
* support enums with more than 256 variants in derive macro This addresses #4361. Technically, we now support up to 2^32 variants, which is the maximum for the canonical ABI. In practice, though, the derived code for enums with even just 2^16 variants takes a prohibitively long time to compile. Signed-off-by: Joel Dice <joel.dice@fermyon.com> * simplify `LowerExpander::expand_variant` code Signed-off-by: Joel Dice <joel.dice@fermyon.com>
This commit is contained in:
10
Cargo.lock
generated
10
Cargo.lock
generated
@@ -450,6 +450,15 @@ dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "component-macro-test"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "console"
|
||||
version = "0.15.0"
|
||||
@@ -3413,6 +3422,7 @@ dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"clap 3.1.15",
|
||||
"component-macro-test",
|
||||
"criterion",
|
||||
"env_logger 0.9.0",
|
||||
"filecheck",
|
||||
|
||||
Reference in New Issue
Block a user