Age | Commit message (Collapse) | Author |
|
Selectively porting a line from #5651 to unblock an issue reported on Gitter.
|
|
(#17441)
We added an optimization to async methods that lets the builder avoid allocating the Action delegate when it recognizes the awaiter being used. Previously this was enabled for all of the publicly exposed awaiters in corelib, with the exception of YieldAwaiter (what's used with Task.YIeld). It was enabled by having the awaiter implement an internal interface. This commit just generalizes that interface name and then implements it on YIeldAwaiter to complete the picture.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Code to call InitializeModules on startup and associated bug fixes and workarounds. Handles mismatched struct calling conventions between LLVM and Clang and works around the dup opcode incorrectly reloading values. Enables StartupCodeMain and fix associated bugs in pinvokes. Implements main return codes
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
|
|
(#17370)
* Vectorize and use ROSpan.LastIndexOf as the workhorse for string.LastIndexOf
* Address PR feedback, remove Length == 0 checks where unnecessary.
* Use aligned vector read just like IndexOf
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Improve {u}int/long.ToString/TryFormat throughput by pre-computing the length
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
- Move most of the implementation to the platform-agnostic file, rather than having completely different implementations for Windows and Unix. Now the only logic in each platform-specific file is the logic around invoking the associated P/Invoke.
- Optimize that implementation to take a fast path that doesn't allocate when no case change is needed, and to avoid the native call when the whole string is ASCII.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
If the output matches the input string, we can just use the input string as the result.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Fixes #5645.
|
|
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Change OwnedMemory to MemoryManager and add an IMemoryOwner.
* Fix comments.
* Reset start and length if TryGetMemoryManager returns false.
* Reset start and length if TryGetMemoryManager returns false [actually].
* Re-order MemoryHandle ctor parameters and rename TOwner to TManager.
* Fix formatting, remove unused code, and fix impl of Pin()
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Dict cache default comparer for object types
* Improves
* Fix EventRegistrationToken Equals
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Implement probing for native function names following the A/W suffix notation used on Windows.
Fixes #730.
|
|
* Use ROSpan.IndexOf as the workhorse for string.IndexOf
* Make changes to Span.IndexOf to follow what string.IndexOf did.
* Address PR feedback.
* Use Unsafe.Read instead of Unsafe.ReadUnaligned.
* Remove special casing for count == 0
* Fix up debug assert to use vector count instead of intptr.size
* Use size of Vector<ushort> instead of Vector<byte>.Count
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* 'value' to 'other': bool System.IEquatable<System.UIntPtr>.Equals(UIntPtr value);
* 'value' to 'other': bool System.IEquatable<System.IntPtr>.Equals(IntPtr value);
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Catches up to the breaking changes introduced around dotnet/corefx#27094.
|
|
Gets rid of `LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library [d:\git\rt\tests\src\Simple\StaticLibrary\StaticLibrary.csproj]`.
|
|
ObjWriter emits compiled managed code as data (using MCStreamer::EmitBytes method).
In this case on arm code is marked as data using special mapping symbol '$d' that
leads to problems during debugging. For example gdb uses incorrect opcode for
breakpoints that brokes program execution.
In this patch new method MCStreamer::EmitInstructionBytes is added. It uses '$a'/'$t'
mapping symbols to mark data as arm/thumb code. This method is used to emit compiled
managed code in ObjWriter.
|
|
Commit 5d96263c66e50ab88f51ec5aae01bd1d57d4ef37 made me aware that `IsIntrinsic` doesn't work on instantiated types. This fixes the problem in a bit of a roundabout way - we only want certain type system implementations to have the IsIntrinsic bit but the flags computation is in the core ECMA type system; a partial method to the rescue...
|
|
When I did the `System.Reflection.Pointer` support for reflection invoke and delegate `DynamicInvoke`, I found these two thunks do pretty much the same thing. They got implemented separately because I was just porting Project N IL2IL code, but there's no reason why we need two.
With this change, Delegate.DynamicInvoke will just call into the shared helper that is also used for reflection invoke.
This is a bigger diff due to bunch of mechanical changes:
* The set of generated helpers had to be moved to a place from where both delegate and reflection infrastructure can see it. A type system context dot file did the trick. (Contributes to #3873.)
* The generated assembly got moved to the type system context so that the thunks can stay homed in it.
* Fix to CppCodegen name mangling so that these can be still referenced in CppCodegen.
|
|
* Adding Memory.Pin() to eventually replace Memory.Retain(bool)
* Fix copy/paste error and return default for when object is null.
* Fix XML comments.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Streamline StreamWriter/Reader.CheckAsyncTaskInProgress and make it inlineable
* Re-inline StreamWriter.WriteSpan
Prior to my span changes, the code in WriteCore was manually inlined into each of its call sites. I'd refactored it out into a shared helper to reduce code duplication, but that introduced a regression for small inputs. I'm keeping the factoring but making it AggressiveInlining to avoid that regression while still keeping the C# code reuse.
* Use NoInlining on WriteSpan call sites
In case methods get devirtualized and JIT attempts to inline them and WriteSpan.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Remove InternalsVisibleTo for mscorlib and make sure that corefx still builds with it.
Delete global constants that were left-overs from .NET Framework build system.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
|
|
Moved to MemoryMarshal
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
- This change makes the compare for very short Span strings a bit slower and for longer Span strings many times faster.
- Switch several places where it was a clear benefit to use it.
`String.CompareOrdinal(string,string)` is notable exception that I have left intact for now. It is fine tuned for current string layout, and replacing with a call of vectorized SequenceCompareTo gives mixed results.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* The new chunk should be equal or larger than the one it is replacing. Fixes #17205
* Adding .exe.stackdump to .gitignore
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Update uses of AsBytes to use MemoryMarshal.AsBytes
* Cleanup commented out code
* Remove AsBytes from MemoryExtensions Portable
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
string (#17115)
* Fix CompareTo/Equals when dealing with Span wrapping a null string
* Removing unnecessary virtual keyword and address other feedback.
* Remove unnecessary/incorrect Debug.Asserts.
* Remove more unnecessary/incorrect Debug.Asserts.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Merge nmirror to master
|
|
|
|
Merge changes from TFS
|
|
make it public.
We need to call this method from CoreFX's AsyncInfoToTaskBridge to avoid leaking memory when a CancellationTokenSource is reused.
Bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/403992
Also see the proposal at https://github.com/dotnet/corefx/issues/14903.
CR: JKotas, SToub
[tfs-changeset: 1693280]
|
|
GetTempFileNameW doesn't return the required length of the buffer; it returns the unique number used in the temporary file name. But the calling code is using that result as a length, resulting in sometimes truncated paths, and sometimes paths that aren't at all related to the original due to state left over in a pooled buffer.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
|
|
Append and Insert (#16926)
* Fixing Clear infinitely growing when we combine usage of Insert and Append. Fixes #27625
* Move debug code to StringBuilder.Debug.cs and Applied code review feedback
* Adding missing debug condition check
* Adding comments and moving Condition on projitems after filename
* Moving the infinite capacity growth fix to Length setter
* Removing originalCapacity and Debug.Assert
* Applying PR feedbacks
* Minor cleanup
* simplifying to single loop
* keeping just one method for ShowChunks function
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
to buffer (#17141)
* changed to buffer
* More Common changes
* fixed
* another fix
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Fixes #5603
|
|
|
|
Merge changes from TFS
|
|
It fixes lldb error in case of zero-length arrays:
DW_TAG_member 'm_Data' refers to type 0x00000c70 which extends beyond the bounds of 0x00000c7c
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|