about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-30 11:08:26 +0000
committerbors <bors@rust-lang.org>2017-08-30 11:08:26 +0000
commitca9cf3594ab25d2809ac576dfc9defb8e87b45b8 (patch)
treec9445d8732ffdea1b395e9e2c0da993574db2e0a /src/rustllvm/PassWrapper.cpp
parentc66e7fa8dee0b6b2b5439e2bd527ab66c9fbde13 (diff)
parenta0c32641fd8bff11b657bfb87d9ade5487d336ae (diff)
downloadrust-ca9cf3594ab25d2809ac576dfc9defb8e87b45b8.tar.gz
rust-ca9cf3594ab25d2809ac576dfc9defb8e87b45b8.zip
Auto merge of #43968 - petrochenkov:span2, r=michaelwoerister
Make fields of `Span` private

I actually tried to intern spans and benchmark the result<sup>*</sup>, and this was a prerequisite.
This kind of encapsulation will be a prerequisite for any other attempt to compress span's representation, so I decided to submit this change alone.

The issue https://github.com/rust-lang/rust/issues/43088 seems relevant, but it looks like `SpanId` won't be able to reuse this interface, unless the tables are global (like interner that I tried) and are not a part of HIR.
r? @michaelwoerister anyway

<sup>*</sup> Interning means 2-3 times more space is required for a single span, but duplicates are free. In practice it turned out that duplicates are not *that* common, so more memory was wasted by interning rather than saved.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions