diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-07-09 16:29:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-09 16:29:23 -0400 |
| commit | 7b447bdad29c828b49ba63cefacc677bd7c58b28 (patch) | |
| tree | bb69105c92241b0b8296961cc0a301134a854bbf /source/slang/slang-serialize-factory.cpp | |
| parent | fa565f96823f3985cffa3a899742fdf1449d5876 (diff) | |
Make Scope non ref counted (#1904)
* Add debug symbols for release build.
* Hack to try and capture failing compilation.
* Typo fix for capture hack.
* Specify return type on lambdas.
* Added const.
* Try breakpoint.
* Up count
* Let's capture everything so we can valgrind.
* Disable always writing repros.
* Make Scope non RefCounted.
* Fix issue with not serializing Scope.
* More comments around changes to Scope.
Remove Scope* from serialization.
* Remove code used for testing original issue.
Diffstat (limited to 'source/slang/slang-serialize-factory.cpp')
| -rw-r--r-- | source/slang/slang-serialize-factory.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/slang/slang-serialize-factory.cpp b/source/slang/slang-serialize-factory.cpp index 9b3ba9994..a6b7e0ba8 100644 --- a/source/slang/slang-serialize-factory.cpp +++ b/source/slang/slang-serialize-factory.cpp @@ -49,8 +49,8 @@ void* DefaultSerialObjectFactory::create(SerialTypeKind typeKind, SerialSubType SerialIndex ModuleSerialFilter::writePointer(SerialWriter* writer, const RefObject* inPtr) { - // We don't serialize Module or Scope - if (as<Module>(inPtr) || as<Scope>(inPtr)) + // We don't serialize Module + if (as<Module>(inPtr)) { writer->setPointerIndex(inPtr, SerialIndex(0)); return SerialIndex(0); @@ -65,6 +65,13 @@ SerialIndex ModuleSerialFilter::writePointer(SerialWriter* writer, const NodeBas NodeBase* ptr = const_cast<NodeBase*>(inPtr); SLANG_ASSERT(ptr); + // We don't serialize Scope + if (as<Scope>(ptr)) + { + writer->setPointerIndex(inPtr, SerialIndex(0)); + return SerialIndex(0); + } + if (Decl* decl = as<Decl>(ptr)) { ModuleDecl* moduleDecl = findModuleForDecl(decl); |
