Serialized encoding of a sequence of SourceLocations.
Optimized to produce small values when locations with the sequence are similar. Each element can be delta-encoded against the last nonzero element.
Sequences should be started by creating a SourceLocationSequence::State, and then passed around as SourceLocationSequence*. Example:
// establishes a sequence void EmitTopLevelThing() { SourceLocationSequence::State Seq; EmitContainedThing(Seq); EmitRecursiveThing(Seq); }
// optionally part of a sequence void EmitContainedThing(SourceLocationSequence *Seq = nullptr) { Record.push_back(SourceLocationEncoding::encode(SomeLoc, Seq)); }
// establishes a sequence if there isn't one already void EmitRecursiveThing(SourceLocationSequence *ParentSeq = nullptr) { SourceLocationSequence::State Seq(ParentSeq); Record.push_back(SourceLocationEncoding::encode(SomeLoc, Seq)); EmitRecursiveThing(Seq); }
Definition at line 96 of file SourceLocationEncoding.h.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4