Commit Graph
3 Commits
Author SHA1 Message Date
Karthik Rajasekaran 4bbdadd88a Update project configuration and sln files (dotnet/corefx#15182)
* Add ValidateVSConfigurations

* Update project config and sln files.


Commit migrated from https://github.com/dotnet/corefx/commit/f6ab339f446e37505f93ef9f430801fa1dcc05b8
2017-01-17 14:31:23 -08:00
nietras 895b815bda S.M.Span<T>: Add Clear()/Fill(T value) (dotnet/corefx#14396)
Commit migrated from https://github.com/dotnet/corefx/commit/051290fbd903140e2f1f55c7b8a2aa33814a161f
2017-01-15 07:10:22 -08:00
Atsushi Kanamori 3c6e7e66cf Portable (and thus slower) version of Span<> (dotnet/corefx#13562)
* Rebase to make review readable again.

* Remove the type casts from DangerousGetPinnedReference - store object as Pinnable<T>

* Removed stable version list.

* DangerousCreate gets more Dangerous...

* Updated dependency versions *again*.

* IsReferenceFree fast-paths for common primitives.

* Move exception throwing out of inline code.

* Remove Windows-only restriction.

* Remove baseline version.

* Don't hardcode array header size.

* Another dependency version change!

What's the matter, don't we have any version
numbers you like??

* Version => 4.0.0.0

* Use Unsafe.Add rather than SpanHeloer.Add in this[index]

(all this repeated source is annoying - unfortunately,
Rosylin at this point at least, insists that "ref"
variables be initialized once only at declaration point and
doesn't allow the conditional ternary operator on ref types.
This makes it hard to manually inline DangerousGetPinnableReference
in a nice way...)

* ThrowHelper.Throw ==> throw ThrowHelper.Create

Allow JIT to recognize the throw path as a
no-return path so it can throw it into the
cold region.

* Revert the specific primitive type checks in IsReferenceFree().

It pessimizes the routine on the desktop CLR.

* Fix DangerousGetPinnableReference to be a method to match spec.

* PR feedback.

Description: "Provide classes" => "Provide types"

Add fastpath for specific types in IsReferenceFree

Make MeasureArrayAdjustment a PerTypeValues private

* More concise operator==

Eh... hard to tell with all the noise but
it did seems to shave a couple of percentage
points off.

* Follow Ben's suggested ThrowHelper pattern.

* Update ThrowHelper comments based on Ben's feedback.

* Remove trailing whitespace.

* Dependency bump. Again...

* Fix up some tests so the IL is Span-legal.

Ah, the fun of writing Span code w/out stack-only enforcement.

* Add a reference assembly and some of the plumbing...

...to typeforward on CoreClr. Right now, CoreClr
fails 44 out of 55 tests so I believe it's
premature to throw the switch just yet. This just
gets some of the grunt work out of the way.

* Add Cdotnet/corefx#6.0 workaround.

After chatting offline, we'll accomodate C# 6.0 for now
by having the indexer return "T" rather than "ref T".

Some performant code require the "ref T" version so
as another stopgap, we'll provide a GetItem() method
that returns "ref T".

Once the tooling story is in better shape,
we'll merge GetItem() and the indexer into a single
indexer that returns "ref T".

* Dependency update again.

This is getting really monotonous.


Commit migrated from https://github.com/dotnet/corefx/commit/ccc44b7b2e9145251e2ca98bbe0936938ed94379
2016-11-15 16:15:16 -05:00