Phil/libcore dev WIP - #4816
Open
philberty wants to merge 8 commits into
Open
Conversation
Fixes #4814 gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::do_typepathfunction): add guard Signed-off-by: Philip Herron <herron.philip@googlemail.com>
This is just a general improvement so we can filter trait probing to not look at the whole crate. gcc/rust/ChangeLog: * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): add mapping * rust-session-manager.cc (Session::compile_crate): make sure nr context is ready * typecheck/rust-hir-path-probe.cc (PathProbeImplTrait::process_trait_impl_items_for_candidates): use the new filter * util/rust-hir-map.cc (Mappings::insert_trait_impl_mapping): new helper * util/rust-hir-map.h: likewise Signed-off-by: Philip Herron <herron.philip@googlemail.com>
This means we can do some pre filtering instead of scanning the crate. gcc/rust/ChangeLog: * typecheck/rust-hir-dot-operator.cc (MethodResolver::MethodResolver): new optional filter (MethodResolver::Probe): likewise (MethodResolver::try_select_predicate_candidates): likewise (MethodResolver::select): likewise * typecheck/rust-hir-dot-operator.h: likewise * typecheck/rust-hir-type-check-expr.cc: pass lang item trait * util/rust-hir-map.cc: new helper to scan implblocks * util/rust-hir-map.h: likewise Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog: * typecheck/rust-hir-type-bounds.h: optional trait arg * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::TypeBoundsProbe): likewise (TypeBoundsProbe::Probe): likewise (TypeBoundsProbe::is_bound_satisfied_for_type): use specified trait (TypeBoundsProbe::scan): try to scan for indexed traits Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog: * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::validate_type_implements_this): add filter Signed-off-by: Philip Herron <herron.philip@googlemail.com>
The code used to work by accident that the type bounds probe already setup the type checked trait before hand so the lookup's just worked by accident. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): dp trait lookup * typecheck/rust-tyty.cc (BaseType::satisfies_bound): add filter Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog: * typecheck/rust-type-util.cc (lookup_associated_impl_block): add filter (normalize_projection): likewise Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog: * typecheck/rust-hir-path-probe.cc (PathProbeType::Probe): filter Signed-off-by: Philip Herron <herron.philip@googlemail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP