[Syntax] Unify RawSyntax and RawTokenSyntax using union and TrailingObjects

It better matches with SwiftSyntax model.

Using TrailingObjects reduces the number of heap allocation which
gains 18% performance improvement.
This commit is contained in:
Rintaro Ishizaki
2018-01-15 21:13:36 +09:00
parent 4c172037e8
commit 0780c529c4
28 changed files with 557 additions and 627 deletions

View File

@@ -20,8 +20,6 @@
#include "swift/AST/Identifier.h"
#include "swift/Basic/LangOptions.h"
#include "swift/Basic/SourceManager.h"
#include "swift/Syntax/SyntaxParsingContext.h"
#include "swift/Syntax/RawTokenSyntax.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"