summaryrefslogtreecommitdiff
path: root/source/slang/slang-compiler.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-07-09 16:29:23 -0400
committerGitHub <noreply@github.com>2021-07-09 16:29:23 -0400
commit7b447bdad29c828b49ba63cefacc677bd7c58b28 (patch)
treebb69105c92241b0b8296961cc0a301134a854bbf /source/slang/slang-compiler.h
parentfa565f96823f3985cffa3a899742fdf1449d5876 (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-compiler.h')
-rwxr-xr-xsource/slang/slang-compiler.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h
index a933716a8..52a9f935d 100755
--- a/source/slang/slang-compiler.h
+++ b/source/slang/slang-compiler.h
@@ -478,7 +478,7 @@ namespace Slang
/// This facility is only needed to support legacy APIs for string-based lookup
/// and parsing via Slang reflection, and is not recommended for future APIs to use.
///
- RefPtr<Scope> _createScopeForLegacyLookup();
+ Scope* _createScopeForLegacyLookup(ASTBuilder* astBuilder);
protected:
ComponentType(Linkage* linkage);
@@ -1425,7 +1425,7 @@ namespace Slang
///
SlangResult loadFile(String const& path, PathInfo& outPathInfo, ISlangBlob** outBlob);
- Expr* parseTermString(String str, RefPtr<Scope> scope);
+ Expr* parseTermString(String str, Scope* scope);
Type* specializeType(
Type* unspecializedType,
@@ -2259,10 +2259,10 @@ namespace Slang
/// Get the default compiler for a language
DownstreamCompiler* getDefaultDownstreamCompiler(SourceLanguage sourceLanguage);
- RefPtr<Scope> baseLanguageScope;
- RefPtr<Scope> coreLanguageScope;
- RefPtr<Scope> hlslLanguageScope;
- RefPtr<Scope> slangLanguageScope;
+ Scope* baseLanguageScope = nullptr;
+ Scope* coreLanguageScope = nullptr;
+ Scope* hlslLanguageScope = nullptr;
+ Scope* slangLanguageScope = nullptr;
ModuleDecl* baseModuleDecl = nullptr;
List<RefPtr<Module>> stdlibModules;
@@ -2321,7 +2321,7 @@ namespace Slang
void init();
void addBuiltinSource(
- RefPtr<Scope> const& scope,
+ Scope* scope,
String const& path,
String const& source);
~Session();