Skip to content

Commit

Permalink
Tweak Span encoding.
Browse files Browse the repository at this point in the history
Failing to fit `base` is more common than failing to fit `len`.
  • Loading branch information
nnethercote committed Apr 2, 2019
1 parent 428943c commit ff94fea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libsyntax_pos/span_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ const CTXT_INDEX: usize = 2;

// Tag = 0, inline format.
// -------------------------------------------------------------
// | base 31:8 | len 7:1 | ctxt (currently 0 bits) | tag 0:0 |
// | base 31:7 | len 6:1 | ctxt (currently 0 bits) | tag 0:0 |
// -------------------------------------------------------------
// Since there are zero bits for ctxt, only SpanData with a 0 SyntaxContext
// can be inline.
const INLINE_SIZES: [u32; 3] = [24, 7, 0];
const INLINE_OFFSETS: [u32; 3] = [8, 1, 1];
const INLINE_SIZES: [u32; 3] = [25, 6, 0];
const INLINE_OFFSETS: [u32; 3] = [7, 1, 1];

// Tag = 1, interned format.
// ------------------------
Expand Down

0 comments on commit ff94fea

Please sign in to comment.