forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
wip: ILC & R2R UTF-8 name mangling. #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
933391b to
b789b7c
Compare
b789b7c to
730ab37
Compare
f1b73e7 to
3753bef
Compare
* And pass it around as ref. This required dropping the fluent pattern.
accidentally fixed bugs maybe, a lot of todos left
* The last diff is inconsistent usage of AppendMangledTypeName in InterfaceDispatchMap. Other nodes append unmangled < & > characters but in this type it was sanitized, causing this diff.
* more consistent of u8str initialization * simplify StringTableBuilder.CreateIndex
* Also reduce some allocations in unwind utf-8 paths
3753bef to
2a934ca
Compare
PaulusParssinen
commented
Jul 20, 2024
PaulusParssinen
commented
Jul 20, 2024
...ools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchCellSectionNode.cs
Outdated
Show resolved
Hide resolved
PaulusParssinen
commented
Jul 20, 2024
src/coreclr/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs
Outdated
Show resolved
Hide resolved
PaulusParssinen
pushed a commit
that referenced
this pull request
Nov 17, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range * bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type * bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use) * bug dotnet#4: document the fact that IOException can be thrown * bug dotnet#5: throw SerializationException rather than OverflowException when parsing the decimal fails * bug dotnet#6: 0 and 17 are illegal values for PrimitiveType enum * bug dotnet#7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
PaulusParssinen
pushed a commit
that referenced
this pull request
Oct 13, 2025
Currently, offsets are incorrectly treated as indices which is leading to incorrect code being emitted. e.g., `ScatterWithByteOffsets<long>` emits `ST1D Zdata.D, Pg, [Xbase, Zoffsets.D, lsl #3]` instead of, `ST1D Zdata.D, Pg, [Xbase, Zoffsets.D]`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
wip: Previewing diffs
todo: desc
todo: r2r correctness
Background
dotnet/corert/issues/2178
dotnet/corert/pull/2200
todo: write motivation
This PR
ref struct Utf8StringBuilderValueStringBuilderbut UTF-8.Utf8StringBuilderusing theArrayPool<byte>.SharedGetName(this ISymbolNode ..)had pooling logic, but now we can fallback to pool anywhere where we build mangled symbol name strings.GetMangled[Type/Method/Field/String]Namemethods,introduce
AppendMangled[Type/Method/Field/String]Nameoverload which can be used to append directly to the existing builder (very common operation)string->Utf8Stringcast and its overhead.Problems and questions
Utf8Stringso this PR flows it through all the way to the ObjectWriter logic. Choosing a cut off point for theUtf8Stringelsewhere would render null the transcoding/allocation savings.Potential future improvements
IPrefixMangled[Method/Type]could be optimized to append mangled namesResults
dotnet new webapiaotStage 2 Goldilocks (TodosApi)
Compile ILC with ILC
Bench with using the NAOT compiled ILC