-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Remove mentions of the old tilde owned pointer syntax #25085
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
Changes from 3 commits
7ec8172
232b202
d366774
55e7f9b
77acf7b
abc0017
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -288,7 +288,7 @@ pub fn mangle<PI: Iterator<Item=PathElem>>(path: PI, | |
| // when using unix's linker. Perhaps one day when we just use a linker from LLVM | ||
| // we won't need to do this name mangling. The problem with name mangling is | ||
| // that it seriously limits the available characters. For example we can't | ||
| // have things like &T or ~[T] in symbol names when one would theoretically | ||
| // have things like &T or Vec<T> in symbol names when one would theoretically | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure this change makes sense. I think it's referring to the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I wasn't sure either, but |
||
| // want them for things like impls of traits on that type. | ||
| // | ||
| // To be able to work on all platforms and get *some* reasonable output, we | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -142,26 +142,24 @@ impl<'tcx> TypeMap<'tcx> { | |
| fn get_unique_type_id_of_type<'a>(&mut self, cx: &CrateContext<'a, 'tcx>, | ||
| type_: Ty<'tcx>) -> UniqueTypeId { | ||
|
|
||
| // basic type -> {:name of the type:} | ||
| // tuple -> {tuple_(:param-uid:)*} | ||
| // struct -> {struct_:svh: / :node-id:_<(:param-uid:),*> } | ||
| // enum -> {enum_:svh: / :node-id:_<(:param-uid:),*> } | ||
| // enum variant -> {variant_:variant-name:_:enum-uid:} | ||
| // reference (&) -> {& :pointee-uid:} | ||
| // mut reference (&mut) -> {&mut :pointee-uid:} | ||
| // ptr (*) -> {* :pointee-uid:} | ||
| // mut ptr (*mut) -> {*mut :pointee-uid:} | ||
| // unique ptr (~) -> {~ :pointee-uid:} | ||
| // @-ptr (@) -> {@ :pointee-uid:} | ||
| // sized vec ([T; x]) -> {[:size:] :element-uid:} | ||
| // unsized vec ([T]) -> {[] :element-uid:} | ||
| // trait (T) -> {trait_:svh: / :node-id:_<(:param-uid:),*> } | ||
| // closure -> {<unsafe_> <once_> :store-sigil: |(:param-uid:),* <,_...>| -> \ | ||
| // basic type -> {:name of the type:} | ||
| // tuple -> {tuple_(:param-uid:)*} | ||
| // struct -> {struct_:svh: / :node-id:_<(:param-uid:),*> } | ||
| // enum -> {enum_:svh: / :node-id:_<(:param-uid:),*> } | ||
| // enum variant -> {variant_:variant-name:_:enum-uid:} | ||
| // reference (&) -> {& :pointee-uid:} | ||
| // mut reference (&mut) -> {&mut :pointee-uid:} | ||
| // ptr (*) -> {* :pointee-uid:} | ||
| // mut ptr (*mut) -> {*mut :pointee-uid:} | ||
| // unique ptr (Box) -> {Box :pointee-uid:} | ||
| // @-ptr (@) -> {@ :pointee-uid:} | ||
| // sized vec ([T; x]) -> {[:size:] :element-uid:} | ||
| // unsized vec ([T]) -> {[] :element-uid:} | ||
| // trait (T) -> {trait_:svh: / :node-id:_<(:param-uid:),*> } | ||
| // closure -> {<unsafe_> <once_> :store-sigil: |(:param-uid:),* <,_...>| -> \ | ||
| // :return-type-uid: : (:bounds:)*} | ||
| // function -> {<unsafe_> <abi_> fn( (:param-uid:)* <,_...> ) -> \ | ||
| // function -> {<unsafe_> <abi_> fn( (:param-uid:)* <,_...> ) -> \ | ||
| // :return-type-uid:} | ||
| // unique vec box (~[]) -> {HEAP_VEC_BOX<:pointee-uid:>} | ||
| // gc box -> {GC_BOX<:pointee-uid:>} | ||
|
|
||
| match self.type_to_unique_id.get(&type_).cloned() { | ||
| Some(unique_type_id) => return unique_type_id, | ||
|
|
@@ -202,7 +200,7 @@ impl<'tcx> TypeMap<'tcx> { | |
| } | ||
| }, | ||
| ty::ty_uniq(inner_type) => { | ||
| unique_type_id.push('~'); | ||
| unique_type_id.push_str("Box "); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wouldn't the lowercase version for the box syntax make more sense here?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea, sounds plausible to me! Change incoming. |
||
| let inner_type_id = self.get_unique_type_id_of_type(cx, inner_type); | ||
| let inner_type_id = self.get_unique_type_id_as_string(inner_type_id); | ||
| unique_type_id.push_str(&inner_type_id[..]); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this would be refererring to
Box<[T]>types, asVecisn't a built-in type that the compiler should know about.