diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-03-22 12:04:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-22 12:04:33 -0400 |
| commit | d4f99c8bac8b28f18c864a717d8833db6a1c872d (patch) | |
| tree | ebea06c019130d8248d5e4f6bccf5e4b2649e3cb /source/compiler-core/slang-artifact-desc-util.cpp | |
| parent | d8a40abba5223fbcb56c52b04ccb88c02bbaf79f (diff) | |
Source map obfuscation (#2717)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP source map.
* Split out handling of RttiTypeFuncs to a map type.
* Make RttiTypeFuncsMap hold default impls.
* Slightly more sophisticated RttiTypeFuncsMap
* Source map decoding.
* Fix tabs.
* Fix asserts due to negative values.
* Use less obscure mechanisms in SourceMap.
* Source map decoding.
Simplifying SourceMap usage.
* First attempt at ouputting a source map as part of emit.
* Added support for -source-map option. SourceMap is added to the artifact.
* Small improvements around column calculation in SourceWriter.
* Source Loc obuscation WIP.
* Fix some issues around SourceMap obfuscation.
* Split out obfuscation into its own file.
* Keep obfuscated SourceMap even through serialization bottleneck.
Diffstat (limited to 'source/compiler-core/slang-artifact-desc-util.cpp')
| -rw-r--r-- | source/compiler-core/slang-artifact-desc-util.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/compiler-core/slang-artifact-desc-util.cpp b/source/compiler-core/slang-artifact-desc-util.cpp index ee014daf0..08b7c8412 100644 --- a/source/compiler-core/slang-artifact-desc-util.cpp +++ b/source/compiler-core/slang-artifact-desc-util.cpp @@ -175,6 +175,7 @@ bool isDerivedFrom(ENUM_TYPE kind, ENUM_TYPE base) { return g_table##ENUM_TYPE.i x(HumanText, Text) \ x(Source, Text) \ x(Assembly, Text) \ + x(Json, Text) \ x(Instance, Base) #define SLANG_ARTIFACT_KIND_ENTRY(TYPE, PARENT) { Index(ArtifactKind::TYPE), Index(ArtifactKind::PARENT), #TYPE }, @@ -239,13 +240,13 @@ SLANG_HIERARCHICAL_ENUM(ArtifactPayload, SLANG_ARTIFACT_PAYLOAD, SLANG_ARTIFACT_ x(Unknown, Base) \ x(CodeLike, Base) \ x(Kernel, CodeLike) \ - x(Host, CodeLike) + x(Host, CodeLike) \ + x(Obfuscated, Base) #define SLANG_ARTIFACT_STYLE_ENTRY(TYPE, PARENT) { Index(ArtifactStyle::TYPE), Index(ArtifactStyle::PARENT), #TYPE }, SLANG_HIERARCHICAL_ENUM(ArtifactStyle, SLANG_ARTIFACT_STYLE, SLANG_ARTIFACT_STYLE_ENTRY) - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ArtifactDescUtil !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ /* static */ArtifactDesc ArtifactDescUtil::makeDescForCompileTarget(SlangCompileTarget target) @@ -555,7 +556,7 @@ static const KindExtension g_cpuKindExts[] = // Visual Studio. It's used here for source map. if (slice == toSlice("map")) { - return ArtifactDesc::make(ArtifactKind::Text, ArtifactPayload::SourceMap); + return ArtifactDesc::make(ArtifactKind::Json, ArtifactPayload::SourceMap); } if (slice == toSlice("pdb")) |
