diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-06-25 16:41:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-25 16:41:14 -0400 |
| commit | 892acc47143348d50062354492b048c4e474d1ec (patch) | |
| tree | 06770d26509f77641a78eec490eb93012aa6fa9c /source/slang/slang.cpp | |
| parent | 3fe4f5398d524333e955ecb91be5646e86f3b2da (diff) | |
AST Serialize Reading (#1409)
* Try to fix problem with C++ extractor concating tokens producing an erroneous result.
* Improve naming/comments around C++ extractor fix.
* Another small improvement around space concating when outputing token list.
* Handle some more special cases for consecutive tokens for C++ extractor concat of tokens.
* WIP AST serialization.
* Comment out so compile works.
* More work on AST serialization.
* WIP AST serialize.
* WIP AST Serialization - handling more types.
* WIP: Compiles but not all types are converted, as not all List element types are handled.
* Compiles with array types.
* Finish off AST serialization of remaining types.
* Remove ComputedLayoutModifier and TupleVarModifier.
* Add fields to ASTSerialClass type.
* Construct AST type layout.
* AST Serialization working for writing to ASTSerialWriter.
* Removed call to ASTSerialization::selfTest in session creation.
* Fixes for gcc.
* Diagnostics handling - better handling of dashify.
* Improve comment around DiagnosticLookup.
* Updated VS project.
* Write out as a Stream, taking into account alignment.
* First pass at serializing in AST.
* Added support for deserializing arrays.
* Small bug fixes.
* Fix problem calculating layout.
Split out loading on entries.
* Fix typo in AST conversion.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 7c535d64b..6d4a27733 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -1080,10 +1080,18 @@ void FrontEndCompileRequest::parseTranslationUnit( // Test serialization { RefPtr<ASTSerialClasses> classes = new ASTSerialClasses; - ASTSerialWriter writer(classes); - // Lets serialize it all - writer.addPointer(translationUnit->getModuleDecl()); + OwnedMemoryStream stream(FileAccess::ReadWrite); + + { + ASTSerialWriter writer(classes); + + // Lets serialize it all + writer.addPointer(translationUnit->getModuleDecl()); + // Let's stick it all in a stream + writer.write(&stream); + } + } #endif |
