Koundinya Veluri [Thu, 8 Oct 2015 21:40:14 +0000 (14:40 -0700)]
Add allocation fast path for arrays of value type elements outside Windows
- A microbenchmark involving byte array allocation was about 200% faster on Windows compared to Linux
- On Windows, using the portable version of the fast path is about 5% slower than using the asm version on the microbenchmark
- On Linux, using the portable fast path improves the microbenchmark perf by 160%
- With the fast path enabled on Linux, the microbenchmark on Windows (with asm fast path) is now about 17% faster than on Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e47ea2c24bab1938791d3c31e6a6510f5b254038
Koundinya Veluri [Mon, 5 Oct 2015 18:36:55 +0000 (11:36 -0700)]
Merge pull request dotnet/coreclr#1681 from kouvel/FixPathSeparators
Fix loading native libraries from native search paths provided by the…
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7461fed79d952532146891de7c2746758fa9a88
Koundinya Veluri [Sat, 3 Oct 2015 18:45:17 +0000 (11:45 -0700)]
Fix loading native libraries from native search paths provided by the host
Fixed a couple of issues outside Windows regarding the directory separator char, path separator char, and absolute path determination.
Fixes dotnet/coreclr#1680
Commit migrated from https://github.com/dotnet/coreclr/commit/
ca6c4a9e7b6cb893ce1a79442f5048312d7f6357
Matt Mitchell [Fri, 2 Oct 2015 23:17:49 +0000 (16:17 -0700)]
Merge pull request dotnet/coreclr#1672 from kouvel/IncludeTestsInBuildSh
On builds outside Windows, build native test components by default
Commit migrated from https://github.com/dotnet/coreclr/commit/
125fd8145cd2b57e6ad362910583c10b7f8a493d
Koundinya Veluri [Fri, 2 Oct 2015 18:05:54 +0000 (11:05 -0700)]
On builds outside Windows, build native test components by default
Commit migrated from https://github.com/dotnet/coreclr/commit/
ccfbffb17c5555b6c90e25d694777c0bd6a235fa
Mike McLaughlin [Fri, 2 Oct 2015 17:23:17 +0000 (10:23 -0700)]
Merge pull request dotnet/coreclr#1663 from mikem8361/excepthan
Add native exception filter holder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f1ea77280c069eda75003014167771825d10b92
Jan Vorlicek [Fri, 2 Oct 2015 08:37:53 +0000 (10:37 +0200)]
Merge pull request dotnet/coreclr#1665 from ursine/patch-1
Fix comment variable name
Commit migrated from https://github.com/dotnet/coreclr/commit/
13914f15dc9b8c7d87294bb97e6c8b2668b8ee38
Gary Coulbourne [Fri, 2 Oct 2015 02:04:44 +0000 (22:04 -0400)]
Fix comment variable name
Commit migrated from https://github.com/dotnet/coreclr/commit/
25b6f13be1e2e0a0567de2c3a1f0e330f8adc7a6
Mike McLaughlin [Sun, 27 Sep 2015 23:11:05 +0000 (16:11 -0700)]
Add native exception filter holder.
The problem is that the debugger unhandled managed exception notification is sent
because the proper filter function (InternalUnhandledExcpetionFilter) isn't called
and the filter can't be called currently during the first pass of managed exception
dispatch that it requires.
The NativeExceptionHolder is used to hold the filter handler for the
PAL_TRY/PAL_EXCEPT/PAL_EXCEPT_FILTER macros so managed exception dispatcher
can call them during the first pass like real SEH on Windows.
Commit migrated from https://github.com/dotnet/coreclr/commit/
339273c3298105c361a10d754608e804cf762b60
Jan Kotas [Thu, 1 Oct 2015 21:47:55 +0000 (14:47 -0700)]
Merge pull request dotnet/coreclr#1661 from janvorli/fix-crossgen
Fix wrong register with module address in crossgen on Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d286b828e42ca811dbee13481f5d94625572cc2
Jan Vorlicek [Thu, 1 Oct 2015 20:13:09 +0000 (22:13 +0200)]
Fix wrong register with module address in crossgen on Unix
This change fixes a crossgen bug when the module pointer as a parameter to
JIT_StrCns was incorrectly placed into RDX both on Windows and on Unix.
Since it is the second parameter to the function, the calling convention
on Unix requires it to be in RSI.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e141ac2dd779a13402dff04d2629845225095fc4
Jan Kotas [Thu, 1 Oct 2015 15:47:09 +0000 (08:47 -0700)]
Merge pull request dotnet/coreclr#1620 from justinvp/dictionary
Avoid the enumerator allocation in Dictionary's constructor
Commit migrated from https://github.com/dotnet/coreclr/commit/
b8d511ad6a9c259422a01cfd8d94ed08e06a09dd
Jan Kotas [Thu, 1 Oct 2015 15:41:50 +0000 (08:41 -0700)]
Merge pull request dotnet/coreclr#1650 from Dmitry-Me/fixLeftShiftIssue1526
Fix left shift of signed integer - issue 1526
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c8eb2798a0417943132a98ad8239b800dfbd5e3
Jan Kotas [Thu, 1 Oct 2015 15:36:12 +0000 (08:36 -0700)]
Merge pull request dotnet/coreclr#1658 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ae735f177a7217a5a96580166f3eea81dbe93af
Jan Vorlicek [Thu, 1 Oct 2015 08:58:00 +0000 (10:58 +0200)]
Merge pull request dotnet/coreclr#1654 from janvorli/fix-isipinepilog-assert
Fix assert in IsIPInEpilog
Commit migrated from https://github.com/dotnet/coreclr/commit/
c31150a9284e07b0267b7cd901281862da63788d
Koundinya Veluri [Thu, 1 Oct 2015 06:50:41 +0000 (23:50 -0700)]
Merge pull request dotnet/coreclr#1638 from kouvel/CoreClrTests
Improve CoreCLR test runner outside Windows
Commit migrated from https://github.com/dotnet/coreclr/commit/
411a09f7e21e7f9070d941bd420be8b239880101
John Chen [Thu, 1 Oct 2015 04:08:57 +0000 (21:08 -0700)]
Fix SigPointer::PeekValueTypeTokenClosed to handle generic instantiation represented by ELEMENT_TYPE_INTERNAL
Integrate change dotnet/coreclr#1529861 from NetFXDev1
[tfs-changeset: 1532127]
Commit migrated from https://github.com/dotnet/coreclr/commit/
f97569360a2a0984a31270f75bcf7ba7e60c44d3
Jan Kotas [Thu, 1 Oct 2015 04:01:01 +0000 (21:01 -0700)]
Merge pull request dotnet/coreclr#1657 from Djuffin/disable_lu_ptrace
Remove references to libunwind-ptrace to fix build on RPM distros
Commit migrated from https://github.com/dotnet/coreclr/commit/
167f6cf5da60315946ca3d621c20a2530c0b42ae
Jan Kotas [Thu, 1 Oct 2015 03:59:48 +0000 (20:59 -0700)]
Merge pull request dotnet/coreclr#1656 from janvorli/exception-handling-perf
Improve Unix exception handling performance
Commit migrated from https://github.com/dotnet/coreclr/commit/
c7bbdbdf9d97bd54a983a67491e6ef2631e506f2
Eugene [Thu, 1 Oct 2015 01:09:12 +0000 (18:09 -0700)]
Remove references to libunwind-ptrace to fix build on RPM distros
Commit migrated from https://github.com/dotnet/coreclr/commit/
f1d46b8b6a2fd2a47afbcb6cf2e4194b557efdd1
Jan Vorlicek [Thu, 1 Oct 2015 00:55:30 +0000 (02:55 +0200)]
Improve Unix exception handling performance
This change adds caching of thread base / limit in PAL. Profiling has shown
extraction of the base / limit using pthread APIs to be the main contributors
to the bad performance.
With this fix, a simple loop with throw / catch is about 40 times faster than
before.
Commit migrated from https://github.com/dotnet/coreclr/commit/
97fe10f743275d5d3ff09dc7315afe3dd6dc6972
Jan Vorlicek [Wed, 30 Sep 2015 22:10:41 +0000 (00:10 +0200)]
Fix assert in IsIPInEpilog
The assert was incorrect for managed functions without body. Since there
is no easy way to find out that function has no body at that place,
the fix is to remove the assert.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5ccd752bfaa38ff67e53e4c2046dd77fbbde6ede
Lakshmi Priya [Wed, 30 Sep 2015 21:57:41 +0000 (14:57 -0700)]
Merge pull request dotnet/coreclr#1524 from Priya91/stackstring
Add StackString class for stack/heap allocation for MAX_LONGPATH.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6fa92e3cf8f013b5e694a4716f4b752375f38439
Koundinya Veluri [Wed, 30 Sep 2015 21:48:32 +0000 (14:48 -0700)]
Merge pull request dotnet/coreclr#1651 from kouvel/TpaPktFix
Remove the need for the PKT to match when binding to an assembly on t…
Commit migrated from https://github.com/dotnet/coreclr/commit/
ca8dc1370187dc2bd5fc2147999b77a74b5d12ee
Koundinya Veluri [Wed, 30 Sep 2015 20:22:13 +0000 (13:22 -0700)]
Merge pull request dotnet/coreclr#1646 from kouvel/HeapAllocationFix
Heap allocation fix
Commit migrated from https://github.com/dotnet/coreclr/commit/
7dac994dc3ee4bba846784f0079e54060dc030fb
Koundinya Veluri [Wed, 30 Sep 2015 19:20:52 +0000 (12:20 -0700)]
Remove the need for the PKT to match when binding to an assembly on the TPA list
There is some inconsistency in how binding works with and without a custom AssemblyLoadContext being active. By default, the binder allows binding to assemblies on the TPA list despite a PKT mismatch while searching app paths. This part is skipped when a custom AssemblyLoadContext is active.
It has been determined that generally, the binder shouldn't require the PKT to match, so disabling that check.
Fixes dotnet/coreclr#1640
Commit migrated from https://github.com/dotnet/coreclr/commit/
e780495d6e7575812fd5c42d4125c35b6054fa95
Lakshmi Priya Sekar [Thu, 10 Sep 2015 06:18:32 +0000 (23:18 -0700)]
Add StackString class for stack/heap allocation for MAX_LONGPATH.
Add stackstring.cpp to build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
662ec11f4161edbedc5c70e3e43c32c9a07f1cde
Dmitry-Me [Wed, 30 Sep 2015 09:16:30 +0000 (12:16 +0300)]
Fix left shift of signed integer - issue 1526
Commit migrated from https://github.com/dotnet/coreclr/commit/
5bc51bf79f08ec47e12f5eb57a2c0fb9df09ab54
Justin Van Patten [Thu, 24 Sep 2015 19:38:32 +0000 (12:38 -0700)]
Dictionary constructor perf optimization
Regarding the constructor overloads that take an
IDictionary<TKey, TValue>: It is likely that the passed-in dictionary
is Dictionary<TKey, TValue>. When this is the case, avoid the
enumerator allocation and overhead by looping through the entries
array directly. This is only done when the dictionary is
Dictionary<TKey, TValue> and not a subclass, to maintain back-compat
with subclasses that may have overridden the enumerator behavior.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee52a8ffcaab89524a4137c807bbde65445f61ab
Koundinya Veluri [Fri, 18 Sep 2015 18:08:28 +0000 (11:08 -0700)]
Improve CoreCLR test runner outside Windows
CoreCLR tests will need to be built on Windows and copied over to a non-Windows machine. Then, coreclr/tests/runtest.sh along
with some switches can be used to run the tests.
Changes:
- Run tests in parallel by default (use --sequential to force sequential mode)
- Update Windows test build to produce the Windows core overlay that includes test dependencies that are not built
- Add a number of switches (see coreclr/tests/runtest.sh for details) to provide locations of:
- The Windows test build
- The CoreCLR native test build
- Either:
- This:
- The core layout (including all of the below)
- Or:
- The CoreCLR build
- mscorlib.dll
- The CoreFX build
- The CoreFX native build
- Using information from above, build or use the core layout, and copy native test binaries to the respective test directories
- Add --testDir to specify an inclusive list of test directories to run
- Add text files to exclude tests:
- coreclr/tests/testsUnsupportedOutsideWindows.txt - Tests that are not supported outside Windows
- coreclr/tests/testsFailingOutsideWindows.txt - Tests that are known to fail outside Windows and are temporarily disabled while they are investigated
- Add --runFailingTestsOnly to run only the tests listed in coreclr/tests/testsFailingOutsideWindows.txt to verify known failures
- Produce xUnit-style output for the CI, output goes into <Windows test build folder>/coreclrtests.xml
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7f1b9ab91bb183dd180115ee287af74faa7acf9
Koundinya Veluri [Tue, 29 Sep 2015 21:01:57 +0000 (14:01 -0700)]
Fix HeapReAlloc to return a non-null pointer for a requested size of zero bytes
Commit migrated from https://github.com/dotnet/coreclr/commit/
23e878fcc063216fe02e9ac407f0370533d383e7
Jan Kotas [Tue, 29 Sep 2015 06:58:33 +0000 (23:58 -0700)]
Merge pull request dotnet/coreclr#1632 from bbowyersmyth/StringStartsWith
String.StartsWith ordinal optimization
Commit migrated from https://github.com/dotnet/coreclr/commit/
1572a8ab9b4f30459b3ae071cab2ae58e09e213d
Lakshmi Priya [Mon, 28 Sep 2015 22:56:03 +0000 (15:56 -0700)]
Merge pull request dotnet/coreclr#1589 from Priya91/pathstring
Use SString type - PathString for path allocations in binder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bdc5bce919855052679f07450065e17520674970
Koundinya Veluri [Mon, 28 Sep 2015 21:54:46 +0000 (14:54 -0700)]
Merge pull request dotnet/coreclr#1628 from kouvel/CppCheckFixes
Fix a few issues reported by cppcheck
Commit migrated from https://github.com/dotnet/coreclr/commit/
99458af30ac18c5b60afa7a68e241ed70b880eca
Bruce Bowyer-Smyth [Sun, 27 Sep 2015 20:47:43 +0000 (06:47 +1000)]
String.StartsWith ordinal optimization
Commit migrated from https://github.com/dotnet/coreclr/commit/
2005a137172d33f551b4370600ee3fc582a71177
Eric Eilebrecht [Sat, 26 Sep 2015 17:54:11 +0000 (10:54 -0700)]
Merge pull request dotnet/coreclr#1629 from ericeil/AsyncLocalPerf
Reduce allocations in AsyncLocal/ExecutionContext
1: Allocate a new AsyncLocal change notification list only if we need to add an item to the list.
2: Pre-size any collections we allocate, and manually copy into them to avoid IEnumerator allocations, etc.
3: Store the change notification list in an array, rather than a List, to avoid the extra List allocation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
795786f0ac0e5ea82f288dfeb5b673845e1ef075
Eric Eilebrecht [Sat, 26 Sep 2015 17:50:10 +0000 (10:50 -0700)]
Merge branch 'AsyncLocalPerf' of https://github.com/ericeil/coreclr into AsyncLocalPerf
Commit migrated from https://github.com/dotnet/coreclr/commit/
afb78b146b5429f11817688c5277875ff5071021
Eric Eilebrecht [Fri, 25 Sep 2015 21:03:08 +0000 (14:03 -0700)]
Reduce allocations when setting AsyncLocal values
1: Allocate a new AsyncLocal change notification list only if we need to add an item to the list.
2: Pre-size any collections we allocate, and manually copy into them to avoid IEnumerator allocations, etc.
3: Store the change notification list in an array, rather than a List, to avoid the extra List allocation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9bc06f7e534a1989911d795528737d767c2b408d
Jan Kotas [Sat, 26 Sep 2015 13:42:29 +0000 (06:42 -0700)]
Merge pull request dotnet/coreclr#1617 from jamesqo/patch-1
Assign directly to this in Decimal constructor
Commit migrated from https://github.com/dotnet/coreclr/commit/
4f25a0f321d7d75af994223771c12d461602b6c9
Matt Ellis [Sat, 26 Sep 2015 01:15:07 +0000 (18:15 -0700)]
Merge pull request dotnet/coreclr#1630 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
190d5d868c7f434dd4a49f923417a400ada572dc
Eric Eilebrecht [Sat, 26 Sep 2015 00:30:53 +0000 (17:30 -0700)]
Store AsyncLocal notification list in an array, rather than a List.
This should further reduce allocations, as we don't need the intermediate List<IAsyncLocal> object.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0cfbd7a868cb56d0df4c02d235a9aeb699d150e
Matt Ellis [Sat, 26 Sep 2015 00:18:34 +0000 (17:18 -0700)]
Fix clang only build breaks
Some new code from TFS was triggering this error in clang:
`error: suggest braces around initialization of subobject`
I just made the obvious fix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc966c6018f2e0e467d56fda62f2cbdaa63d0173
Rahul Kumar [Fri, 25 Sep 2015 21:03:54 +0000 (14:03 -0700)]
Fix for 134453: fix prefast warnings
[tfs-changeset: 1529946]
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ac3cef4e3b82b3b9fbbce50a4a762e576464634
Gaurav Khanna [Fri, 25 Sep 2015 19:31:07 +0000 (12:31 -0700)]
VS has mentioned that when they have an AV come through their reflection invoked code, they endup getting TargetInvocationException that is not actionable and also does not help in the Watson bucketing for the issue. To address this, they would like an opt-in flag to force a failfast when a CSE remains unhandled within reflection invocation.
This change adds support for an opt-in flag that will trigger failfast in Reflection codepath inface of an unhandled CSE.
[tfs-changeset: 1529878]
Commit migrated from https://github.com/dotnet/coreclr/commit/
f0c1382fd5c65e44585b84a4bf3dd8ec86d73c6c
Koundinya Veluri [Sat, 26 Sep 2015 00:23:43 +0000 (17:23 -0700)]
Add AssemblyLoadContext.LoadUnmanagedDllFromPathfor use by overriders of AssemblyLoadContext.LoadUnmanagedDll
LoadUnmanagedDllFromPath needs to call LoadLibrary or dlopen, and return the system handle to the library through LoadUnmanagedDll. Outside Windows, when LoadUnmanagedDll returns a system handle to a library, the handle needs to be registered with PAL's module list for lifetime management. From that point on, the system handle is tracked as part of the PAL handle.
To handle both of the above, I have refactored module.cpp!LOADLoadLibrary into a LoadLibraryDirect portion and a RegisterLibrary component.
LoadLibraryDirect loads the specified library directly using the system call, without appending or prepending anything to the library name
RegisterLibrary registers a system library handle with PAL to get a PAL handle
This patch contains the necessary changes to coreclr and mscorlib. Tests will be added separately, after the new APIs are published and can be consumed.
Fixes dotnet/coreclrdotnet/coreclr#935
Part of dotnet/coreclrdotnet/coreclr#937 and dotnet/corefxdotnet/coreclr#3054
See https://github.com/dotnet/coreclr/pull/1500
[tfs-changeset: 1529692]
Commit migrated from https://github.com/dotnet/coreclr/commit/
65663fe8c455fad5c1e54fc068d2ec077bee7222
Eric Eilebrecht [Sat, 26 Sep 2015 00:02:52 +0000 (17:02 -0700)]
Fix typo in my previous typo fix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3930062ac66cfa0950ef167222b3b6e009ce92b3
Eric Eilebrecht [Sat, 26 Sep 2015 00:01:40 +0000 (17:01 -0700)]
Fix typo
Commit migrated from https://github.com/dotnet/coreclr/commit/
46f7ba73e75861c1205e62ff3cdfe37433b0e333
Eric Eilebrecht [Fri, 25 Sep 2015 23:45:16 +0000 (16:45 -0700)]
Reduce AsyncLocal setter allocations further
Now we pre-size any collections we allocate, and manually copy into them to avoid IEnumerator allocations, etc.
Commit migrated from https://github.com/dotnet/coreclr/commit/
614e749212af87cb0138125db1ee1d996fda4d92
Matt Ellis [Fri, 25 Sep 2015 23:23:24 +0000 (16:23 -0700)]
Merge pull request dotnet/coreclr#1627 from ellismg/icu-collation
Implement basic collation on top of ICU
Commit migrated from https://github.com/dotnet/coreclr/commit/
878ba32ecda015ee77d0425076a0b92ca0f30cad
Matt Ellis [Fri, 25 Sep 2015 23:03:36 +0000 (16:03 -0700)]
Merge pull request dotnet/coreclr#1621 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
ab9bafc085f6f9cbe133e78e3933bd4333434ebf
Matt Ellis [Wed, 15 Jul 2015 18:22:39 +0000 (11:22 -0700)]
Implement basic collation on top of ICU
This change adds support for basic Unicode collation support, built on
top of ICU. Windows and ICU have different collation models, and the
windows model does not correspond 1:1 with the ICU model, so in addition
to differences in sort weights between the two platforms, the
CompareOptions enum does not map nicely to ICU options.
For now, we only map CompareOptions.None, CompareOptions.IgnoreCase as
well as CompareOptions.Ordinal and CompareOptions.OrdinalIngoreCase,
other CompareOptions are ignored during collation.
In addition to collation support, I have enabed the randomized string
hashing code (using Marvin32 + a per app domain seed) so that string
hashcodes are not predictable across runs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
62faf7e4cbbc74e89632a22c3c1b50dc114ba2d2
Eric Eilebrecht [Fri, 25 Sep 2015 21:03:08 +0000 (14:03 -0700)]
Allocate a new AsyncLocal change notification list only if we need to add an item to the list.
Commit migrated from https://github.com/dotnet/coreclr/commit/
640e6d4b99a3cd26d54348335815e1efff14bbe0
Mike McLaughlin [Fri, 25 Sep 2015 21:00:05 +0000 (14:00 -0700)]
Merge pull request dotnet/coreclr#1626 from caslan/exportsforee
Add new exports to get expression evaluator working in clrdbg
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3f2c08269eeae29ba83df22e13e4f3a06349dcb
Lakshmi Priya Sekar [Tue, 22 Sep 2015 06:32:54 +0000 (23:32 -0700)]
Use PathString type to allocate large path strings on linux scenario.
Respond to PR feedback. Fix test failures in mscoree.
Commit migrated from https://github.com/dotnet/coreclr/commit/
965e5d6480ebbff3d021665f95a37cb94eb9d56a
Koundinya Veluri [Wed, 23 Sep 2015 19:19:33 +0000 (12:19 -0700)]
Fix a few issues reported by cppcheck
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc99b33602795e4db64bfdc924ce8ef1b6f5cc78
Cagri [Fri, 25 Sep 2015 17:35:57 +0000 (10:35 -0700)]
Add new exports to get expression evaluator working in clrdbg
Commit migrated from https://github.com/dotnet/coreclr/commit/
b9bff752e5197b2e1ab4de88b3a548c8ef308003
Rama Krishnan Raghupathy [Thu, 24 Sep 2015 23:48:04 +0000 (16:48 -0700)]
Fixing SAL anotation for VM
[tfs-changeset: 1529342]
Commit migrated from https://github.com/dotnet/coreclr/commit/
a52b9639ac96a05844bac11560c4a99cddb6eb06
Jan Kotas [Thu, 24 Sep 2015 18:08:51 +0000 (11:08 -0700)]
Merge pull request dotnet/coreclr#1612 from jkotas/readytorun-directcall
Handle direct call ReadyToRun helpers
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4560c6e113741d2296f2ebbc4cd6e6427b57a88
Jan Kotas [Thu, 24 Sep 2015 16:37:53 +0000 (09:37 -0700)]
Merge pull request dotnet/coreclr#1616 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d844126b0afb4b9d059a58fdd1c93a246555af3
James Ko [Thu, 24 Sep 2015 16:05:21 +0000 (12:05 -0400)]
Assign directly to this in Decimal.cs
Commit migrated from https://github.com/dotnet/coreclr/commit/
4c22dcb3aca2b96c98ebe8f7f99be78e029bad7f
dotnet-bot [Thu, 24 Sep 2015 15:04:08 +0000 (08:04 -0700)]
Porting EventCounter from Roxel Branch to ProjectK
[tfs-changeset: 1529077]
Commit migrated from https://github.com/dotnet/coreclr/commit/
42a50efaf066af29ecc196a302586694e4e99fb0
Jan Kotas [Thu, 24 Sep 2015 05:26:08 +0000 (22:26 -0700)]
Merge pull request dotnet/coreclr#1613 from jkotas/crossgen-commandline
Fix crossgen command line handling on Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
b373d4e1c6cf6a98543e53486c262b5f8d36af82
Jan Kotas [Thu, 24 Sep 2015 05:07:45 +0000 (22:07 -0700)]
Delete incorrect AMD64 ifdef
ReadyToRun case of getCallInstruction was incorrectly ifdefed out
for AMD64. Delete the incorrect ifdef and make other adjustment
to make the code compile for X86 as well.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f87429893fa7d4ea24c4631cc1c229a05b3be9cc
Jan Kotas [Thu, 24 Sep 2015 04:30:35 +0000 (21:30 -0700)]
Fix crossgen command line handling on Unix
Replace hardcoded Windows directory and path separators with symbolic
constants.
Commit migrated from https://github.com/dotnet/coreclr/commit/
dee3161cb612401c81d9f5f434910e46ad25bd1a
Jan Kotas [Thu, 24 Sep 2015 01:34:37 +0000 (18:34 -0700)]
Handle direct call ReadyToRun helpers
Add missing check in the JIT to generate correct code for direct call ReadyToRun helpers. I have run into this bug while experimenting with ReadyToRun optimizations. It is not observable bug today because of crossgen happens to always emit ReadyToRun helpers as indirect calls.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7291e2f10a7812807c558f04527142496e750241
Matt Ellis [Wed, 23 Sep 2015 22:41:59 +0000 (15:41 -0700)]
Merge pull request dotnet/coreclr#1609 from Dmitry-Me/duplicatedCheck
Fix erroneous check
Commit migrated from https://github.com/dotnet/coreclr/commit/
57011c3b00e55343b95df632381c4b08fc8f5f9c
Jan Vorlicek [Wed, 23 Sep 2015 22:18:14 +0000 (00:18 +0200)]
Merge pull request dotnet/coreclr#1610 from janvorli/osx-thread-suspension-activation-2
Implement runtime suspension for OSX
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2491e37b0ed75de0aea643be5ec653fa3984262
Jan Vorlicek [Fri, 18 Sep 2015 13:57:49 +0000 (15:57 +0200)]
Implement runtime suspension for OSX
This change implements runtime suspension for OSX using activation
injection, the same mechanism as Linux uses.
I have modified the activation injection mechanism by adding a new
function that CoreCLR registers with PAL and PAL calls it to check
if an instruction address is safe for injection. The injection is
performed only if this new function returns true.
The activation on OSX is performed by suspending the target thread,
checking the instruction address in the suspended thread's context
using the above mentioned function and modifying the context to
perform the injection only at injection safe place.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f6c0c35cc3c3d9eaee04e3e46c4898730eff1ec
Dmitry-Me [Wed, 23 Sep 2015 15:32:54 +0000 (18:32 +0300)]
Fix erroneous check
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce91654cc6798465f2b23df8fd8700b43d0f0eb2
Matt Ellis [Wed, 23 Sep 2015 07:39:33 +0000 (00:39 -0700)]
Merge pull request dotnet/coreclr#1608 from ellismg/fix-infinite-recursion-in-culture-init
Use Ordinal when searching for collation keyword
Commit migrated from https://github.com/dotnet/coreclr/commit/
c65ac4f0971cd5ac8ef5eacf39a4b36f4f313584
Matt Ellis [Wed, 23 Sep 2015 06:47:59 +0000 (23:47 -0700)]
Use Ordinal when searching for collation keyword
IndexOf by default is culture specific, which could lead to us doing
the wrong thing depending on the current culture and also can cause
problems where we need to access CultureData while we are still building
up culture information, causing infinite recursion.
Some collection tests were triggering the latter case and failing after
we merged in the ICU changes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
52157825d6b55a24aebabe6f1e0507dc7a26bc2f
Matt Ellis [Wed, 23 Sep 2015 01:24:23 +0000 (18:24 -0700)]
Merge pull request dotnet/coreclr#1604 from ellismg/icu-merge-staging
Merge in initial round of ICU Changes
Commit migrated from https://github.com/dotnet/coreclr/commit/
65abcc1c361c522cfdef291e6de2e3f0a119c9e6
Jan Kotas [Tue, 22 Sep 2015 22:15:48 +0000 (15:15 -0700)]
Merge pull request dotnet/coreclr#1603 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
2a0e7677584cb4bcff0621c1a13897ada35c7b37
Matt Ellis [Tue, 22 Sep 2015 21:47:20 +0000 (14:47 -0700)]
Respond to PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f6fce38a9a7cbad436cf10a2410652f0fea3588
Matt Ellis [Tue, 22 Sep 2015 19:08:34 +0000 (12:08 -0700)]
Update documentation to list ICU dependency
Provide some hints on how to obtain the required ICU components for
Linux, OSX and FreeBSD
Commit migrated from https://github.com/dotnet/coreclr/commit/
93eeae8f8ed87230dd3ba5d52195b60dd01d0f2e
Steve Harter [Fri, 18 Sep 2015 19:01:16 +0000 (14:01 -0500)]
complete core implementation of CultureData for Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
7561e211e364255805314e27064ff62782a05b5e
Eric Erhardt [Thu, 17 Sep 2015 15:50:37 +0000 (10:50 -0500)]
Use 'readlink' of the /etc/localtime file to determine the TimeZoneInfo.Local.Id on Linux.
Fix https://github.com/dotnet/corefx/issues/2489.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cf5669690fbd4fe08ecf264783380667ceb25c27
Eric Erhardt [Fri, 11 Sep 2015 21:02:46 +0000 (16:02 -0500)]
Fixing date patterns on Linux.
1. Getting more LongDatePatterns by getting both full and long ICU patterns.
2. Getting more ShortDatePatterns by getting both medium and short ICU patterns. Still keeping the "yMd" pattern, since this closely matches what is used on Windows.
3. Removing any duplicates in the date patterns.
4. "Normalizing" the date patterns from ICU format to .NET format.
a. "EEEE", "eeee" and "cccc" is replaced with "dddd"
b. "LLLL" is replaced with "MMMM"
c. "G" is replaced with "g"
d. A single 'y' is replaced with 'yyyy'
Commit migrated from https://github.com/dotnet/coreclr/commit/
9dc6f27b77af7bf4272f63d9af2ec5b5ca2ec43a
Matt Ellis [Tue, 25 Aug 2015 00:44:16 +0000 (17:44 -0700)]
Build System.Native.Globalization on OSX
This requires the 'icu4c' package from homebrew, which can be installed
with `brew install icu4c`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
87c7b73e23caa73394e29cab7399d18972328d2b
Eric Erhardt [Wed, 9 Sep 2015 21:29:13 +0000 (16:29 -0500)]
Adding an empty string to the end of month names if ICU only returns 12.
This bug was caught by a test case in System.Globalization.Tests.
Commit migrated from https://github.com/dotnet/coreclr/commit/
73653cce8c173ac7236ffc015f1256bfbf754ea2
Matt Ellis [Wed, 2 Sep 2015 01:40:04 +0000 (18:40 -0700)]
Don't use StringBuilderCache for casing
During code review, Steve proposed we moved to using StringBuilderCache
to the allocation of the temporary char[] array during casing
operations. I made the change but later realized that this caused a few
issues.
- The native layer operates on UChar/length pairs, not null terminated
strings. Because of this, we don't actually write a terminating null
into the destination buffer (since we just do a 1:1 casing operation
on the input and never see the null terminator). However, the
marshalling code for StringBuilder assumes the buffer will be null
terminated and uses that to compute the new length value after a
marshalling call. Because there can be left over data from previous
calls in the buffer the string length calculation will be incorrect
and we will end up leaking in extra data into the cased string.
- The StringBuilder marshalling as a whole won't work if we have
embdedded nulls in a string (we'll end up dropping characters on the
transition from native back to managed) but that's something that we
need to be able to handle.
Ideally there would be a way to construct a mutable string, case into
its buffer and the freeze the string, but we don't have a way to do that
today, so we need to stick with this allocation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb057fc92d732fd438c8e7f96195e67e3c92f7f4
Eric Erhardt [Tue, 8 Sep 2015 18:34:11 +0000 (13:34 -0500)]
Responding to PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8dfb2a16d321096b6de86ac0ff0f32b9491f044d
Eric Erhardt [Wed, 2 Sep 2015 23:18:20 +0000 (18:18 -0500)]
Implement Japanese Era information.
Commit migrated from https://github.com/dotnet/coreclr/commit/
75cb790ade44b67e2a3c7b01bf0968b822014d65
Eric Erhardt [Tue, 1 Sep 2015 16:49:42 +0000 (11:49 -0500)]
Implement CalendarData.GetCalendars.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1ecbebf365257ff30627ccf28febe8f7dec84c24
Eric Erhardt [Tue, 25 Aug 2015 21:55:30 +0000 (16:55 -0500)]
Implement CalendarData on Linux.
This is the first round of CalendarData implementation on Linux using ICU
for the information. It contains Month Names, Day Names, DateTime format
patterns, etc.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e78ea838781d45b1f16d555a1be5950c05da7bfb
Steve Harter [Wed, 2 Sep 2015 17:42:36 +0000 (12:42 -0500)]
address code review feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
556a6ce7b7e4969a1ee4bef9625355fac91fadb4
Steve Harter [Wed, 2 Sep 2015 17:31:03 +0000 (12:31 -0500)]
address code review feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
71380c83610053181dd0ef2c73b452f69fc4dfd5
Steve Harter [Thu, 27 Aug 2015 17:31:25 +0000 (12:31 -0500)]
add number formatting
Commit migrated from https://github.com/dotnet/coreclr/commit/
88b91180979f5089f76fae7e94d579eccd1a39e7
Steve Harter [Tue, 11 Aug 2015 15:14:09 +0000 (10:14 -0500)]
address code review comments in CultureData.Unix.cs and and refactor files
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d3a7b3b472e1d181aca666198b05884b54458b7
Steve Harter [Tue, 4 Aug 2015 22:53:29 +0000 (17:53 -0500)]
address code review comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
f05fa7f22424c636bc5b813e417654a5a45f6773
Steve Harter [Tue, 4 Aug 2015 21:56:03 +0000 (16:56 -0500)]
address code review comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
592327f4b5f86a64d444d89c9e4cf99ce584d78e
Steve Harter [Mon, 3 Aug 2015 17:41:51 +0000 (12:41 -0500)]
base locale and formatting for linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2283764cb7b2d80e5660ed115ea65da9308d319
Matt Ellis [Fri, 17 Jul 2015 21:30:52 +0000 (14:30 -0700)]
Respond to PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
9320e7348ef5751b9bd1294c55d3592b107850ad
Matt Ellis [Thu, 18 Jun 2015 19:03:11 +0000 (12:03 -0700)]
Use System.Globalization.Native for casing
This is a fairly straight forward change to start using
System.Globalization.Native (and hence ICU) for casing support. There
are a few caveats due to how the work is being staged.
- There are some fast paths in mscorlib that do simple ASCII casing if
the input string is ASCII and we know the locale does not do special
casing for ascii characters. This is detected by doing a case
insensitive string comparision between "ABC..XYZ" and "abc...xyz".
However, since we don't have real collation support yet, this check
would always return true and hence we would never actually go to
TextInfo to do casing. For now, this code is just disabled so we
always go to TextInfo
- Some of the dummy collation implementations used the ASCII casing
routines on TextInfo. Since they are no longer needed for TextInfo
we move them to CompareInfo. The alternative would be to do proper
casing via TextInfo, but since all the collation code is throw away
it doesn't seem prudent to spend time moving them to TextInfo.
- Detection on if we should do turkish casing is based on the locale
name, when we have collation support we should likely detect this by
doing a case insenstive string comparision between i and LATIN
CAPTIAL I WITH DOT ABOVE.
Commit migrated from https://github.com/dotnet/coreclr/commit/
71fab326cb589002ed6fa37a60a4a8da6949fe24
Matt Ellis [Thu, 16 Jul 2015 20:33:03 +0000 (13:33 -0700)]
Add wrappers for ICU Casing
Unlike ICU, the CLR only wants to preform simple casing, so we can't
use the ICU APIs that work over strings. Instead we have to do
codepoint by codepoint casing ourselves.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f73c7f7a98efc372bbb35e9e07e3ae62e96bb135
Matt Ellis [Thu, 16 Jul 2015 20:25:25 +0000 (13:25 -0700)]
Add wrappers for IDNA support
Introduce wrappers around ICU for ToAscii and ToUnicode in support of
international domain name support.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4cd931dabc412d92ac32b37f0b79111ca466eb34
Matt Ellis [Thu, 16 Jul 2015 19:48:17 +0000 (12:48 -0700)]
Add Normalization wrappers on top of ICU
This change introduces System.Globalization.Native.so which will be
the libary that we use to wrap all ICU functionality needed by the
System.Globalization.* namespaces.
The initial commit also adds wrappers around the string normalization
functions which are exposed by the System.Globalization.Extensions
contract.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4d199ab379d4364a6202a6bfcd5e79ede77e624d
Venkata Sivaramakrishna Ramadugu [Tue, 22 Sep 2015 18:28:24 +0000 (11:28 -0700)]
Fix to VectorCopyTo test that are failing with NullReferencException on an AVX2 machine.
Scenario: Vector2/3/4.CopyTo(array, idx) or Vector<T>.CopyTo(array, idx)
Expected: Here the second arg is out of range and an argument out of range exception is expected.
Observed: AV while generating helper call to throw range-check exception which gets propagated as NullReferenceException
Root cause: If repro program being run is debug version (i.e. JIT is asked to execute minopts/debuggable code)
genRangeCheck() ->genJumpToThrowHlpBlk(bndsChk->gtThrowKind) ->Compiler::acdHelper(codeKind)
Since Compiler::acdHelper() doesn't have mapping for SCK_ARG_EXCPN and SCK_ARG_RNG_EXCPN it return zero as helper number. On chk builds this further leads to asserts in VM when genEmitHelperCall()->compGetHelperFtn(helpernum) call is made. On retail builds, it will lead to AV, which gets propagated as NullReferenceException.
Why this doesn't repro on SSE2: SIMD intrinsics are disabled while generating minopts/debuggable code.
Why does this repro on AVX2: Since VM used size for Vector<T> doesn't match IL definition of Vector<T>, JIT has no way but to support SIMD intrinsics even while generating minopts/debuggable code.
On manual source examination found a couple of places where (in compiler.hpp) that are supposed to check for SCK_ARG_EXCPN and SCK_ARG_RNG_EXCPN and fixed those as well.
Fix dotnet/coreclr#3262
[tfs-changeset: 1527996]
Commit migrated from https://github.com/dotnet/coreclr/commit/
a4882f5ed09736946ad7871f933c0e726b10b956
Lakshmi Priya Sekar [Thu, 17 Sep 2015 20:00:36 +0000 (13:00 -0700)]
Use SString type for path allocations in binder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b8282e0b7359e1abbcfdf4574621118b4f61d377
Jan Kotas [Mon, 21 Sep 2015 19:37:52 +0000 (12:37 -0700)]
Merge pull request dotnet/coreclr#1600 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
e879597385221df7131042d1e0830b87f7632a01