diff options
| author | bors <bors@rust-lang.org> | 2013-05-14 22:00:01 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-14 22:00:01 -0700 |
| commit | 31cedf6927ae4add985995137c394032b599ea1e (patch) | |
| tree | 60259cd58a25df99be9a6ff4e03df0cc3739220a /src/libsyntax | |
| parent | 2fc6b0998b3bd8c7ef796a9f4c795814b4ad30ea (diff) | |
| parent | 7ba685c7abe3f4e76d7e720277c1070c4dafb88b (diff) | |
| download | rust-31cedf6927ae4add985995137c394032b599ea1e.tar.gz rust-31cedf6927ae4add985995137c394032b599ea1e.zip | |
auto merge of #6478 : dotdash/rust/inlining, r=catamorphism
Not inlining these affects the hash table performance quite badly.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 94bd9a18589..34480bb1edf 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -98,12 +98,14 @@ impl<D:Decoder> Decodable<D> for ident { #[cfg(stage0)] impl to_bytes::IterBytes for ident { + #[inline(always)] fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) { self.repr.iter_bytes(lsb0, f) } } #[cfg(not(stage0))] impl to_bytes::IterBytes for ident { + #[inline(always)] fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) -> bool { self.repr.iter_bytes(lsb0, f) } diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 27686c4e4aa..fe479ab81f7 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -357,12 +357,14 @@ impl<'self> Equiv<@~str> for StringRef<'self> { #[cfg(stage0)] impl<'self> to_bytes::IterBytes for StringRef<'self> { + #[inline(always)] fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) { (**self).iter_bytes(lsb0, f); } } #[cfg(not(stage0))] impl<'self> to_bytes::IterBytes for StringRef<'self> { + #[inline(always)] fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) -> bool { (**self).iter_bytes(lsb0, f) } |
