On 11-03-15 11:28 AM, Marijn Haverbeke wrote:
(Heh. It looks like discussing on a Wiki isn't something this team is
used to. Graydon discussed this on irc, you over e-mail. Oh well.)

Well, I like email mostly because it creates a very easy to index record of the conversation.

No, types are also indexed by name here. The type table maps from ids
to types. This may seem needlessly indirect, but it maps precisely to
the resolve pass being separate from the typecheck/translate passes.

...

As I understood it, these hashes will also contain type info. The
resolver doesn't know anything beyond a path when it is resolving
something, so we need to have raw paths as keys (I think).

Ah, I think I see what you are trying. My original idea was that we would handle metadata only things (like types) a bit more efficiently by not mangling them at all. They would use something like a hash for each module.

Resolve doesn't know what the types are, but it knows if something is a type or not.

I guess it is OK if you want to mangle all paths the same for now, but there are some things that can be done more efficiently for paths that the native linker doesn't needs to see:

*) They can be local
*) Being local they don't need the hash prefix
*) We don't even need to make them real symbols, we could have a internal more efficient representation.

Cheers,
Rafael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to