Alexander Markov
34e8b4229e
[tests/nnbd] Mark test as slow in debug mode, add diagnostics
...
Issue: https://github.com/dart-lang/sdk/issues/43613
Change-Id: I12fe82b3dc2eced6e0c582ecc487ef140e5edc40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165365
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2020-10-07 02:01:23 +00:00
Mark Zhou
38667e5667
[dartdevc] Lazily executing deferred types to prevent improper module reordering.
...
Supercedes the following (reverted/abandoned) CLs:
* https://dart-review.googlesource.com/c/sdk/+/162383
* https://dart-review.googlesource.com/c/sdk/+/165149
* https://dart-review.googlesource.com/c/sdk/+/165782
Fixes https://github.com/flutter/flutter/issues/66859 and https://github.com/flutter/flutter/issues/64011
Thanks to Siggi for this approach!
Change-Id: I8e496fdb938e18252ec8a0cf7232c99ca8c27080
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166127
Commit-Queue: Mark Zhou <markzipan@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-10-06 21:31:33 +00:00
Paul Berry
2c40d6a22a
Fix CFE legacy type promotion.
...
The previous implementation of type promotion in the CFE was unsound,
didn't follow the spec, and contained a lot of unnecessary logic
related to experiments that eventually led to flow analysis. This
change updates type promotion to be nearly spec compliant and removes
most of the unnecessary logic.
The lack of spec compliance went (astonishingly) unnoticed for over
three years, probably mostly due to the fact that for the most part it
promoted more eagerly than it should; as a result, any code that was
erroneously accepted by the CFE was rejected by the analyzer.
Unfortunately, in at least one case the erroneous promotion led to
incorrect VM behavior (issue #43640 ).
There's one aspect in which the CFE implementation is still not spec
compliant. The spec says that when analyzing an expression `e1 &&
e2`, if `e2` shows that a variable `v` has type `T`, but `e1` assigns
to `v`, then promotion does not occur. This turns out to be difficult
to model in the existing architecture, since much of the type
promotion logic happens during parsing, and any assignments that occur
in `e1` are parsed prior to figuring out that a logical and is in
progress. Fortunately, this is a rare circumstance, and allowing type
promotion in this situation is sound, so it should not lead to
incorrect VM behavior. Considering how long the other incorrect logic
(which was much more severe) went unnoticed, it seems unlikely that it
will cause problems for users.
Bug: https://github.com/dart-lang/sdk/issues/43640
Change-Id: If97293733e64e286780de5079a703717b8f6f142
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166040
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-10-06 18:12:13 +00:00
sgrekhov
e4992c1124
[co19] Instantiate to bound classes/static tests enabled
...
Change-Id: Ie313712ed487e0e9c1be2ae82a29feb84ce3cd8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166001
Reviewed-by: Alexander Thomas <athom@google.com >
2020-10-06 08:23:36 +00:00
Johnni Winther
28c6ab316d
[cfe] Report errors on incompatible getter/setter types
...
Closes #42702
Change-Id: I9af4b8d616c4368c9f955f658f27e581352a3cd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165806
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-10-05 21:53:42 +00:00
Ryan Macnak
e078d4f00a
[vm] Avoid allocations when reporting unhandled exceptions.
...
Bug: https://github.com/dart-lang/sdk/issues/43642
Bug: b/169880355
Change-Id: I260b9d47f2b65d3cb4a48b966557d139978947e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165740
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-10-05 20:42:02 +00:00
Johnni Winther
4c29f26fc6
[cfe] Report errors in invalid main declarations
...
Closes #43554
Closes #43556
Closes #43558
Change-Id: Ib3e2b891473f07bad7b4a373152be684095619b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165904
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-10-05 14:37:33 +00:00
Johnni Winther
5210942512
Fix null_shorting_test
...
Closes #43607
Change-Id: Id404f01b15db8adca6fcc78b119a0db0a250fa91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165903
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2020-10-05 12:34:59 +00:00
sgrekhov
78e30b039e
[co19] Enable instantiate to bound tests
...
Change-Id: Ie7894c39ec5fdee519c617862c32e3aaa263488b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161161
Reviewed-by: Alexander Thomas <athom@google.com >
Reviewed-by: William Hesse <whesse@google.com >
2020-10-05 10:52:45 +00:00
Alexander Thomas
80d8864b68
[testing] Skip slow test on AOT/debug with null-safety enabled
...
This test takes 16 to 32mins on bots before timing out without producing
a result.
Possibly related issue:
https://github.com/dart-lang/sdk/issues/43614
Change-Id: Ic0bf79e6d1b5276c7dae99b7c8f719e0f706e1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166000
Reviewed-by: Karl Klose <karlklose@google.com >
2020-10-05 09:47:21 +00:00
Mark Zhou
3234534bf9
Revert "[dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred"
...
This reverts commit 17dba76fb5 .
Reason for revert: Replacing this change with a new strategy for better module reordering.
Original change's description:
> [dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred
>
> Fixes https://github.com/flutter/flutter/issues/66859
>
> Change-Id: I9ca3ae7a312d48192659508f2fa0617c7f85efd9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165149
> Reviewed-by: Nicholas Shahan <nshahan@google.com >
> Commit-Queue: Mark Zhou <markzipan@google.com >
TBR=sigmund@google.com ,nshahan@google.com ,markzipan@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I02561ab7e4678392ee96a6132b96c7f0a1499a34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165872
Reviewed-by: Mark Zhou <markzipan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2020-10-02 23:55:11 +00:00
Ryan Macnak
7d79d215db
[vm] Use handles instead of array allocation when executing catch entry moves
...
Issue https://github.com/dart-lang/sdk/issues/43543
Change-Id: I61472be2507ce97721ab162a8c86f9662ec27f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164540
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2020-10-02 15:59:18 +00:00
Alexander Aprelev
48e5cba6b9
Reland "Enable long path on Windows"
...
This reverts commit f8fbefd951 in patchset 1 with fixes to the way how temporary strings are allocated and the way how prefixed string is returned in successive patchsets.
Fixes https://github.com/dart-lang/sdk/issues/42416
Change-Id: Idb801cb117fc2d84fad4c533f5239d8499afc943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164741
Commit-Queue: Alexander Aprelev <aam@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2020-10-02 00:54:46 +00:00
Mark Zhou
17dba76fb5
[dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred
...
Fixes https://github.com/flutter/flutter/issues/66859
Change-Id: I9ca3ae7a312d48192659508f2fa0617c7f85efd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165149
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2020-10-01 20:12:20 +00:00
Alexander Markov
92c6523392
[tests/nnbd] Fix standalone/http_launch_test for simarm
...
The test should mention .dart_tool/package_config.json in the
'OtherResources' comment so it is properly copied by the test tool.
Issue: https://github.com/dart-lang/sdk/issues/43614
Change-Id: I98420e0abb2751f518d69b21ade194d9a715266c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165406
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2020-10-01 18:49:10 +00:00
Filip Hracek
7e7c01e804
Follow HTTP 308 redirects
...
Fixes https://github.com/dart-lang/sdk/issues/43548 .
Bug: 43548
Change-Id: Ifd07941f4ae3ef9c9874c1be4254a2fe3c15ae2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165404
Reviewed-by: Ben Konyi <bkonyi@google.com >
2020-10-01 14:02:40 +00:00
Johnni Winther
428c27aee7
[cfe] Update test expectations
...
Change-Id: I976edefe060af2e5d8a293ca2f4b2f8e554334b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165600
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-01 11:27:12 +00:00
Clement Skau
b4f49dc255
Revert "Flow analysis: promote to non-nullable on initialization"
...
This reverts commit 6a1c54ec30 .
Reason for revert: Triggers test failure:
https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-x64/8247
Original change's description:
> Flow analysis: promote to non-nullable on initialization
>
> When flow analysis encounters a variable declaration of the form `T? x
> = expr;`, if the type of `expr` is `T`, then the variable is
> immediately promoted to type `T`.
>
> Fixes #43099 .
>
> Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
> Bug: https://github.com/dart-lang/sdk/issues/43099
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
> Commit-Queue: Paul Berry <paulberry@google.com >
> Reviewed-by: Bob Nystrom <rnystrom@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
TBR=paulberry@google.com ,scheglov@google.com ,rnystrom@google.com ,johnniwinther@google.com
Change-Id: I8549b48a734f527194ce11d82235b9d5c6e58185
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/43099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165564
Reviewed-by: Clement Skau <cskau@google.com >
Commit-Queue: Clement Skau <cskau@google.com >
2020-10-01 08:41:15 +00:00
sgrekhov
4477003f80
[co19] Simple bounds tests enabled
...
Change-Id: I8016f271339c8fa2b0fba44aa04daf674ae15145
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164082
Reviewed-by: Alexander Thomas <athom@google.com >
2020-10-01 06:36:52 +00:00
Konstantin Shcheglov
6a92616f52
Issue 43175. Report IMPLICIT_THIS_REFERENCE_IN_INITIALIZER in AssertInitializer.
...
Bug: https://github.com/dart-lang/sdk/issues/43175
Change-Id: I23ae1c8d6177e99e634d3b05236c5787a3a95b5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-10-01 02:02:31 +00:00
Paul Berry
6a1c54ec30
Flow analysis: promote to non-nullable on initialization
...
When flow analysis encounters a variable declaration of the form `T? x
= expr;`, if the type of `expr` is `T`, then the variable is
immediately promoted to type `T`.
Fixes #43099 .
Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
Bug: https://github.com/dart-lang/sdk/issues/43099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-10-01 01:15:31 +00:00
Paul Berry
4cb5b99718
Fix test expectations in read_error_test
...
Change-Id: I526d54f6976b28b171bf3c414b93e36dc6da508e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165000
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-10-01 00:38:25 +00:00
Paul Berry
746409b769
Account for full demotion discarding types of interest.
...
Demoting a variable back to its declared type discards types of
interest, therefore in order to verify that a type is of interest, we
need to join a demoting path with a non-demoting path so that the type
of interest is preserved.
Change-Id: Ie9c3278936b189120c9f0085f1563ff8062e51db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164800
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-10-01 00:29:55 +00:00
Ben Konyi
6bc7248049
Skip regress_41329 tests on precompiled runtimes
...
(these tests target the dartdev workflow which is not supported in
the precompiled runtime).
Also updated regress_41329_relative_test to not be a duplicate of the
absolute test.
Change-Id: I1df086c8cb2b6a03fad0043bc1f63b08370fdbae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165120
Commit-Queue: Ben Konyi <bkonyi@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Auto-Submit: Ben Konyi <bkonyi@google.com >
2020-09-30 16:18:34 +00:00
Erik Ernst
cd280a3f26
Create test for language issue 1182
...
Add language/extension_methods/static_extension_resolution_7_test.dart,
testing that the inference of a type argument to an extension method
invocation treats bounded type variables and promoted type variables
as specified, and as discussed in language issue #1182 .
Change-Id: I99f358eb82dcce235edb091bc2bae172c2725d39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165022
Commit-Queue: Erik Ernst <eernst@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2020-09-30 11:14:34 +00:00
Alexander Thomas
44cfc9a05a
[testing] Skip isolate/detect_nullsafety_2_test on Windows
...
https://github.com/dart-lang/sdk/issues/43583
Change-Id: I4d25013f2c92904854085349423254979687837b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165162
Reviewed-by: William Hesse <whesse@google.com >
2020-09-30 08:35:37 +00:00
Mark Zhou
33044ddd9a
[dartdevc] Resetting lazy js types on hot restart
...
Fixes https://github.com/flutter/flutter/issues/66361
Change-Id: I4e68963a36c71bb4dac964d8b0fdcd8ee9187e97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164101
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2020-09-30 00:08:23 +00:00
Johnni Winther
fc158b1616
[dart2js] Evaluate implicit constants in scope visitor
...
Change-Id: I2351571a665c8ffff8e9d57649fbf42b483e747b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142983
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2020-09-29 20:13:08 +00:00
Lasse Reichstein Holst Nielsen
241e9f9b11
Add test for null shortening.
...
Change-Id: Ica4a36114f487247b1e7a5bf1cd4a8584b3f36df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164326
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-09-29 15:01:56 +00:00
Paul Berry
2575008f25
Generate "late definitely unassigned" error regardless of nullability
...
Change-Id: I3c3244cb1042087d31c6e90acc9863369e15ad44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164801
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-29 12:38:14 +00:00
Johnni Winther
4025dee2f8
[cfe] Ensure that default values on synthesized constructor are included in outlines
...
Closes #43538
Change-Id: I58f03d6d71e6de4744003cc28519a20c7e9e7f12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164787
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-29 11:09:14 +00:00
Alexander Thomas
c3d37c1ad6
[infra] Add additional nnbd VM builders
...
See also Luci configuration here:
https://dart-review.googlesource.com/c/sdk/+/164084
https://github.com/dart-lang/sdk/issues/43463
Change-Id: I071c8c6055004574cbe35f14a28e0cd8c468988f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164164
Reviewed-by: William Hesse <whesse@google.com >
2020-09-29 09:57:44 +00:00
Paul Berry
c4b56443c5
Update CFE expectation for read_error_test.dart
...
Change-Id: Idfa1f83929305fbbc3560a1123850a1c785d6537
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164880
Reviewed-by: Leaf Petersen <leafp@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-28 23:15:08 +00:00
Riley Porter
febb1929cd
[ddc] Copy JS 2-digit year handling from dart2js.
...
Fixes https://github.com/dart-lang/sdk/issues/42894
Change-Id: I68a8782d123c299ec34bfd0a31b3108138dac117
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164681
Reviewed-by: Riley Porter <rileyporter@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Riley Porter <rileyporter@google.com >
2020-09-26 01:11:54 +00:00
Srujan Gaddam
c990450628
[package:js] Add checks for external keyword
...
Checks to see if a JS interop member is correctly annotated with
the `external` keyword. If it is not, it must be one of several
exceptions to be allowed.
This CL also changes static errors to first check for `JS` and
`external` before processing the member as a JS interop member.
This makes it clearer whether a member is a JS member.
Change-Id: I412eeafbfe8773847bfb9c864e4fb9b65e2d632a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158083
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-09-25 23:30:34 +00:00
Lasse R.H. Nielsen
02923c6f83
Make Future.wait not return a const <Never>[] when given no futures.
...
Fixes #43445 .
Bug: https://github.com/dart-lang/sdk/issues/43445
Change-Id: I70f722f6bee1d4cfe4d53a5f37bc29f0751edd78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164162
Reviewed-by: Nate Bosch <nbosch@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
2020-09-25 10:37:00 +00:00
Paul Berry
def50905c2
Make flow analysis handling of is/==/??=/?. consistent with mixed mode semantics
...
Bug: https://github.com/dart-lang/language/issues/1143
Change-Id: Id177f8b19c15ef246f21ddd840410cddfee2e5cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163600
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-09-25 08:35:03 +00:00
Brian Wilkerson
cd897bc86c
Remove the diagnostic default_value_in_function_typed_parameter
...
This diagnostic is obsolete because the parser also produces a
diagnostic for this situation.
Change-Id: I5c5f7fc734ddeb5cfaaba9cc9980efe174aeb4e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164461
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-09-25 04:35:53 +00:00
Mayank Patke
5be3a355e7
[dart2js] Clean up --experimental-trust-js-interop-type-annotations
...
flag.
Change-Id: I8622e88afdd1fc3f65f36814eebc8e124de2bc25
Fixes: https://github.com/dart-lang/sdk/issues/43470
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164422
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-09-25 00:17:09 +00:00
Tess Strickland
a4a714ebf9
[vm] Consolidate the *WriteStream hierarchy.
...
All *WriteStream classes are now part of the same hierarchy:
class BaseWriteStream : ValueObject;
Base class for all *WriteStreams. Provides all the methods from
the old WriteStream except for buffer() and SetPosition()
(relegated to NonStreamingWriteStreams). Has one pure virtual
method Realloc that must be overridden by concrete subclasses.
class NonStreamingWriteStream : BaseWriteStream;
Base class for all *WriteStreams where the entire stream is available
at all times (i.e., no flushing to an external sink). Extends the
public BaseWriteStream API with buffer() (for accessing the stream
contents) and SetPosition() (for changing the current stream pointer
to the given absolute position in the stream).
class MallocWriteStream : NonStreamingWriteStream;
Uses realloc to reallocate the internal buffer. Almost the same as
the old WriteStream, except that it only takes an initial size. Adds
one public method Steal() for taking ownership of the current buffer
contents (after which the buffer is reset to an empty state). Instead
of passing a pointer to a buffer, the internal buffer must be accessed
via either Steal() or buffer(), which allows access to the current
stream contents without changing ownership or resetting the stream.
The internal buffer is freed on stream destruction.
class ZoneWriteStream: NonStreamingWriteStream;
Takes a zone and reallocates the internal buffer in that zone. No
additional public methods beyond those available from
NonStreamingWriteStream.
class StreamingWriteStream : BaseWriteStream;
Uses realloc to reallocate the internal buffer. Generally same as
before, where the contents of the stream are periodically flushed
using Dart_StreamingWriteCallback. Since it extends BaseWriteStream,
there are now more methods available for writing data to the stream
than just Print/VPrint/WriteBytes. Since portions of the stream may be
flushed and thus no longer in the internal buffer, does not provide
access to the contents of the stream or a way to reposition the
current stream pointer. Flushes any unflushed data and frees the
internal buffer on stream destruction.
Also refactor things so that write streams are passed to appropriate
recipients, instead of the recipients taking arguments they only used to
create a WriteStream internally. Thus, recipients now can just specify
the appropriate base class for the public API used:
* BaseWriteStream for just writing to the stream, or
* NonStreamingWriteStream if re-positioning or the stream contents are
needed.
Change-Id: I419096ecd9331483d168b079fca55b69ef397f15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164080
Commit-Queue: Tess Strickland <sstrickl@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2020-09-23 21:05:59 +00:00
Srujan Gaddam
04e2482696
[dart2js] Add null checks on JS() expressions
...
Bug: https://github.com/dart-lang/sdk/issues/42536
Adds null checks on `JS()` invocations in dart:html and related
libraries if the static type is non-nullable. Renames option to
enable this to be consistent with DDC and adds tests.
Change-Id: Ia8c170cf0e1e4135966f36b25a83ec62becad701
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163210
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-09-23 17:49:49 +00:00
Leaf Petersen
041261f92f
Add tests for promotion behavior related to variable initialization.
...
Change-Id: I31d9f245f6dc1f34e13d026c95189f10f4dae75f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163663
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2020-09-23 00:15:25 +00:00
Ben Konyi
2b1105d2fe
[ dart:io ] Fix socket_connect_consume_write_close_test
...
The socket connection was being closed prematurely as the SocketServer
was not holding onto a reference to the connected socket. This was
previously fine since the network profiling implementation held on to a
reference within dart:io.
Fixes https://github.com/dart-lang/sdk/issues/43515
Change-Id: If85e0d63beb8299a9fbe86986c3d33a9c1bbb222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163901
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-09-22 16:36:43 +00:00
sgrekhov
7d806946d5
[co19] Spread collections tests enabled
...
Change-Id: Ie773be4e205611030ce1b9ec61d7d34818ea9b6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163344
Reviewed-by: Alexander Thomas <athom@google.com >
2020-09-22 12:33:49 +00:00
Tess Strickland
37cfae173c
[pkg/native_stack_traces] Make package NNBD compatible.
...
Bug: https://github.com/dart-lang/sdk/issues/43304
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Iaf451047ce74add6520bd514bafae8b0e3c5fa59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161704
Commit-Queue: Tess Strickland <sstrickl@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2020-09-22 11:33:13 +00:00
Erik Ernst
ecc87a177f
Correct tests with unintended syntax errors
...
Change-Id: Id33f3088391815686b04f437cbf756b5718ed9bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163664
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Erik Ernst <eernst@google.com >
2020-09-22 06:59:43 +00:00
Robert Nystrom
1b04c3f9de
Add a language test for #43397 .
...
Change-Id: I756d4f4a768ff08e81fd2b90a6c76d833cc8ba0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163740
Auto-Submit: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-09-21 19:32:12 +00:00
Ben Konyi
621aed6a49
[ VM ] Fix raw_datagram_socket_test
...
The removal of old socket profiling code caused a socket to be GCed when
it wasn't before, causing a no-rebind test to fail.
Fixes https://github.com/dart-lang/sdk/issues/43507
Change-Id: Id613789948fc6f80d05bcfedb7e08112690495d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163701
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-09-21 17:52:39 +00:00
sgrekhov
37ef286dba
[co19] Enable html tests
...
Change-Id: I1286a01b82ffcebf6a3931185d4eed22173f23fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161360
Reviewed-by: Alexander Thomas <athom@google.com >
2020-09-21 12:53:19 +00:00
sgrekhov
f87863b13b
[co19] Assert and int-to-double tests enabled
...
Change-Id: Ibbd2c1e5dacaf0f7b94e70a321459b2efdceb0ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163340
Reviewed-by: Alexander Thomas <athom@google.com >
2020-09-21 10:44:45 +00:00