Commit graph

6 commits

Author SHA1 Message Date
asiva e33d023fa0 [BUILD] - Format gn files, this is being done to ensure the unfork CL
doesn't show these formatting changes as diffs.

Change-Id: I69ccbf4adabc66d88371cece785a2c1bce60f133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138962
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-03-10 21:56:11 +00:00
Lasse R.H. Nielsen fc3af737c7 Update typed-data constructor documentation.
Make it explicit that the allocating constructors allocate precisly the
needed amount of bytes.

Fixes #40261

Bug: http://dartbug.com/40261
Change-Id: I059a9e3e387fee116e2221a0761557aedc948aee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132844
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-01-24 09:53:26 +00:00
Lasse R.H. Nielsen 0c71fb2d95 Add new constructors to TypedData classes.
The new constructor creates a view of a (sub range) of the elements of another TypedData object.
It works for both typed lists and ByteData.

The advantage over the .view constructors is that it handles other views properly, including their
offsetInBytes in the start computation, which it is easy to forget to do when you call

  SomethingList.view(other.buffer)

directly, and that constructor cannot compensate for the information because it only existed on the object
that the buffer was extracted from, not on the buffer itself.

Change-Id: I8abafbf2a81a32ea67f5d4c0f65dcfea08b49bb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127321
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-01-22 14:39:48 +00:00
Erik Ernst 5a45d0b062 Updated {,unmodifiable_}typed_data.dart for NNBD.
This CL updates typed_data.dart and unmodifiable_typed_data.dart such
that there are no issues from the dartanalyzer, non-nullable, in the
context of 103124, apart from conflicting_generic_interfaces, cf. SDK
issue #38813.

It updates _internal/js_dev_runtime/patch/typed_data_patch.dart and
_internal/vm/lib/typed_data_patch.dart with respect to the members
whose signatures were changed in the ...typed_data.dart libraries.

It updates lib/collection.list at member signatures, in order to
allow subtypes in ...typed_data to override a member with an NNBD-
correct signature: `contains`, `lastIndexOf`, `lastIndexWhere`. The
body of said members was adjusted to make it work in an NNBD setting.

Change-Id: Idbdd738834d70f408f6b4d65fcbacde28abb8d15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121280
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-10-25 07:34:34 +00:00
Lasse R.H. Nielsen e88057fe04 Add non-NNBD language version marker on all sdk_nnbd files.
Change-Id: I2ab3d4b1efe0f3c79f4b770e79476153380220f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118040
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2019-09-19 19:44:37 +00:00
Paul Berry 004d49bd6b Make a fork of sdk/lib for use by NNBD.
Change-Id: I7f5892d66f9e7bd08ca064fb2df329794a56faf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116527
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-10 19:20:12 +00:00