about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-06-14 16:20:01 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-06-14 16:21:53 -0700
commit97bcb2024440935f5e9ba2ac6116dc1ac8702824 (patch)
tree4bf8f9011c87cdf9891ad11ba569cd8ff85cd30d /src/rt/rust_kernel.cpp
parentaeb9a2b72cf94ae15624482abf89f2de7a538aed (diff)
downloadrust-97bcb2024440935f5e9ba2ac6116dc1ac8702824.tar.gz
rust-97bcb2024440935f5e9ba2ac6116dc1ac8702824.zip
Avoid some duplicated typechecking work
There was a FIXME noting that ty::enum_variants and typeck::check::
check_enum_variants both call eval_const_expr. I tried refactoring the
code so that check_enum_variants does all the work and enum_variants
just looks up cached results, but this turned out not to be easy because
several ty functions call enum_variants and it might get invoked on an
enum before that enum item has been typechecked. Instead, I just made
check_enum_variants update the enum_var_cache so that enum_variants
will never call eval_const_expr twice on the same const.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions