diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-11-25 16:12:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-25 16:12:02 +0000 |
commit | cf913e7f2985fa5a2ab3bf8f3ba861855afe4e37 (patch) | |
tree | a56f5221c3d15ace6cdaf06abc91bd1c4dca35bf /gcc/rust/backend/rust-compile-expr.cc | |
parent | 98fb902fb3029da33c5a8d2fd4bd7d7bcb7271ee (diff) | |
parent | e532893ba43349a8dcb0374fd6e0f415fcd96fe1 (diff) | |
parent | d0e51dca2dedf32d1d0a48d560f89e2952aee063 (diff) | |
download | gcc-cf913e7f2985fa5a2ab3bf8f3ba861855afe4e37.zip gcc-cf913e7f2985fa5a2ab3bf8f3ba861855afe4e37.tar.gz gcc-cf913e7f2985fa5a2ab3bf8f3ba861855afe4e37.tar.bz2 |
Merge #821 #822
821: Always update the type context for monoprhized items except type params r=philberty a=philberty
We need to update the type context type with the newly monomorphized types
we guarded against ADT's and functions because they were never added before
though this does not work for generic reference's to ADT's this updates
the check accordingly.
822: Make TyTy::BaseType::contains_type_parameters non-virtual r=philberty a=philberty
This is a second cleanup to the generic interfaces in the type system. The
helper for contains type parameters is akin to asking if a type is concrete
or not. If a type is not concrete ie: contains type parameters then this
can be leveraged instead of adding more complexity.
The TyTy::BaseType::is_concrete is already an abstract method forcing
all types to implement it, this makes it much safer and fixes some bad
infinite recursion bugs if we asked if a type contained type-parameters
which in turn somtimes aksed if it was concrete or not which in turn
again called contains_type_parameters. This cleans it all up. More
cleanup to these interfaces can be done over time.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>