diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-11-18 14:52:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-18 14:52:58 -0500 |
| commit | d898d561e3c76ecf38db434ec7fbb4bbd0e25cb2 (patch) | |
| tree | 7d92bcf80430a6d3e065aac9fc06a2c44b1cf5fa /source/slang/slang.cpp | |
| parent | bdc589b0b1360cd06c48f88a117c55e84198ab23 (diff) | |
Serialized stdlib working (#1603)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Mangling/module name extraction for GenericDecl
* Add comment on SerialFilter to explain re-enabling Stmt.
* Support setting up SyntaxDecl when reconstructed after deserialization.
* Improvements to setup SyntaxDecl.
* Fix typo so can read compressed SourceLocs.
* Fix issue with SourceManger.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index ea17a0cf7..6f670167d 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -195,7 +195,9 @@ void Session::init() // Set up options SerialContainerUtil::WriteOptions options; - //options.optionFlags |= SerialOptionFlag::SourceLocation; + + options.optionFlags |= SerialOptionFlag::SourceLocation; + // TODO(JS): Should this be the Session::getBuiltinSourceManager() options.sourceManager = m_builtinLinkage->getSourceManager(); StringBuilder builder; @@ -249,6 +251,8 @@ SlangResult Session::_readBuiltinModule(Scope* scope, String moduleName) Linkage* linkage = getBuiltinLinkage(); + SourceManager* sourceManger = getBuiltinSourceManager(); + NamePool* sessionNamePool = &namePool; NamePool* linkageNamePool = linkage->getNamePool(); @@ -256,7 +260,7 @@ SlangResult Session::_readBuiltinModule(Scope* scope, String moduleName) options.namePool = linkageNamePool; options.session = this; options.sharedASTBuilder = linkage->getASTBuilder()->getSharedASTBuilder(); - options.sourceManager = linkage->getSourceManager(); + options.sourceManager = sourceManger; options.linkage = linkage; // Hmm - don't have a suitable sink yet, so attempt to just not have one |
