On Wed, 17 Dec 2014 11:47:24 -0800 Walter Bright via Digitalmars-d <[email protected]> wrote:
> >> Storing it as body IR accomplishes nothing practical over storing it as > >> source > >> file, i.e. .di files. > > except that there's no need to parse source code over and over again, > > which is good for other tools (like completion suggesting, intelligent > > code browsing and so on). > > > > Yeah, you just need to write another parser for the binary format, rather > than > reuse a canned D parser. :-) yes. but with good design the mmaped binary file can be used as data structure. and we can avoid lookaheads that current textual parser do, as we already got AST built for us. just drop the idea that binary file must be small (in a sense of "squeezing bytes by clever integer encoding" and such) and portable, and think about "how can we use this mmaped?" with very good design we can also generate readers and writers almost automatically from AST definitions.
signature.asc
Description: PGP signature
