Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing canonicalization of slices and raw pointer types #1007

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

philberty
Copy link
Member

@philberty philberty commented Mar 10, 2022

This is part of my patch series for slices. This adds the missing visitors
for name canonicalization. More information in the patch, once we get
slice support in we need to start taking advantage of @dkm's HIR
visitor refactoring to avoid these issues with missing visitors making
simple bugs hard to track down.

Fixes #1005

When we intercept impl blocks for slices or raw pointers we must generate
the canonical path for this for name resolution this adds in the missing
visitors which will generate the path. Previously this was defaulting to
empty path segments and then hitting an assertion when we append the
empty segment.

Fixes #1005
@philberty philberty added the bug label Mar 10, 2022
@philberty philberty added this to the Macro Expansion milestone Mar 10, 2022
@philberty philberty requested a review from CohenArthur March 10, 2022 16:44
@philberty philberty mentioned this pull request Mar 10, 2022
18 tasks
@philberty
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Mar 11, 2022
1007: Add missing canonicalization of slices and raw pointer types r=philberty a=philberty

This is part of my patch series for slices. This adds the missing visitors
for name canonicalization. More information in the patch, once we get
slice support in we need to start taking advantage of `@dkm's` HIR
visitor refactoring to avoid these issues with missing visitors making
simple bugs hard to track down.

Fixes #1005


1008: Add const_ptr lang item mappings r=philberty a=philberty

In order to support slices, we need to be able to parse and contain
mappings for the const_ptr lang item. We do not need to do any
special handling of this lang item yet but this adds the mappings
so when we hit it we do not output an unknown lang item error.

Addresses #849 

1009: Add missing type resolution to slices and arrays r=philberty a=philberty

This adds in the missing type resolution for slices and generic slices
and arrays. Since Arrays and Slices are both covariant types just like
references and pointers for example they need to handle recursive
substitutions where their element type might be a generic type
that can bind substitution parameters such as functions and ADT's.

Addresses #849 

Co-authored-by: Philip Herron <philip.herron@embecosm.com>
@bors
Copy link
Contributor

bors bot commented Mar 11, 2022

Build failed (retrying...):

@bors
Copy link
Contributor

bors bot commented Mar 11, 2022

Build succeeded:

@bors bors bot merged commit dbe59a3 into master Mar 11, 2022
@philberty philberty deleted the phil/issue-1005 branch March 11, 2022 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE in canonical path generation of slices
2 participants