Commit graph

8738 commits

Author SHA1 Message Date
Jenny Messerly 41e0ae9399 [dartdevc] fix libraries.yaml to mark dart:isolate unsupported
Web platforms do not support dart:isolate--`dartdevc` already treats it
as false, but this fix is needed if using `--kernel` and conditional
imports (which are handled by the front_end rather than dev_compiler).

Change-Id: I479a4846c6073f986a4ce7a0739ed0a25b1bd35b
Reviewed-on: https://dart-review.googlesource.com/c/86085
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-04 21:51:02 +00:00
Jenny Messerly d3c3341b8a [dartdevc] fix conditional imports in kernel backend
Change-Id: I694b67624dff65099ca8cb8147d2b56a3532cd6c
Reviewed-on: https://dart-review.googlesource.com/c/85880
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-12-04 18:39:46 +00:00
Lasse Reichstein Holst Nielsen 1231244ede Add version information to SDK changes that have happened after 2.0.
Change-Id: I4f49731c446d49e8b49e5c1c29ebcab85e085864
Reviewed-on: https://dart-review.googlesource.com/c/84430
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-11-30 07:55:26 +00:00
Kevin Moore 17a7f513c3 Fix up pubspec for pkg:compiler
Removed unused dependencies
Correctly reference repo packages via dependency_overrides
Fix pubspecs for pkg: js_ast, js_runtime, sdk_library_metadata

Change-Id: I2077814f733c299dca7afe3f5ab4b380c2c886e4
Reviewed-on: https://dart-review.googlesource.com/c/85660
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-29 23:33:39 +00:00
Martin Kustermann f5d1229081 Reland "[VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding"
This change extends/fixes the exiting "pattern recognition" which tries
to recognize the pattern

  v2 <- LoadClassIdInstr(v1)
  BranchIf v2 == IntegerConstant(cid)

Furthermore we start inlining the recognized `ClassID.getID` method very
early in the pipeline.  This allows the VM to recognize the above
pattern and insert redefinitions before the actual inlining pass.

Furthermore we special-case two very hot methods in utf8 decoding by
manually having two loops, one of which is guarded by a class-id check
against the _Uint8ArrayView class, which is most common.  (In the future
we would like to unify the typed data layouts so we no longer need to
use `ClassId.getID`, thereby also allowing non core library code to use
this).

This improves dart-aot by
  * 31%+ for a protobuf decoding benchmark we care about

Issue https://github.com/dart-lang/sdk/issues/31954

Change-Id: I7181bbf096aabe303634fd3b2bff9cc96d69719c
Reviewed-on: https://dart-review.googlesource.com/c/85443
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-11-28 10:43:32 +00:00
Nate Bosch e25c744138 Clarify doc for Duration equals
Fixes #35273

Previous wording made it seem like the behavior was the same as
`identical`.

Change-Id: Ib7fdb183a26a4e2b3c849dd72cb515aa1652028d
Reviewed-on: https://dart-review.googlesource.com/c/85465
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-11-28 08:29:57 +00:00
William Hesse faafdb4b2f Revert "[VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding"
This reverts commit d7cf6959bb.

Reason for revert: This causes crashes on the vm-obfuscate builder at https://ci.chromium.org/p/dart/builders/luci.dart.ci.sandbox/vm-kernel-precomp-obfuscate-linux-release-x64
like

FAILED: dartkp-dart_precompiled release_x64 corelib_2/linked_hash_map_test
Expected: Pass
Actual: Crash
Unexpected compile error.

--- Command "vm_compile_to_kernel" (took 11.000189s):
DART_CONFIGURATION=ReleaseX64 /b/s/w/ir/cache/builder/sdk/pkg/vm/tool/gen_kernel --aot --platform=out/ReleaseX64/vm_platform_strong.dill -o /b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.dill /b/s/w/ir/cache/builder/sdk/tests/corelib_2/linked_hash_map_test.dart --packages=/b/s/w/ir/cache/builder/sdk/.packages -Ddart.developer.causal_async_stacks=true

exit code:
0

--- Command "precompiler" (took 583ms):
DART_CONFIGURATION=ReleaseX64 out/ReleaseX64/gen_snapshot --snapshot-kind=app-aot-assembly --assembly=/b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.S --obfuscate --sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.dill

exit code:
-6

stderr:
Warning: This VM has been configured to obfuscate symbol information which violates the Dart standard.
         See dartbug.com/30524 for more information.

===== CRASH =====
version=2.2.0-edge.83712405657ff736033380cb24b0bd5a62fc3692 (Tue Nov 27 16:56:07 2018 +0000) on "linux_x64"
si_signo=Segmentation fault(11), si_code=1, si_addr=0xd1400050e5f
Dumping native stack trace for thread 2b71
  [0x000056001fc426c7] Unknown symbol
  [0x000056001fc426c7] Unknown symbol
  [0x000056001fe5763d] Unknown symbol
  [0x000056001fe4c99c] Unknown symbol
  [0x000056001fe6166a] Unknown symbol
  [0x000056001fe59c0c] Unknown symbol
 

Original change's description:
> [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding
> 
> This change extends/fixes the exiting "pattern recognition" which tries
> to recognize the pattern
> 
>   v2 <- LoadClassIdInstr(v1)
>   BranchIf v2 == IntegerConstant(cid)
> 
> Furthermore we start inlining the recognized `ClassID.getID` method very
> early in the pipeline.  This allows the VM to recognize the above
> pattern and insert redefinitions before the actual inlining pass.
> 
> Furthermore we special-case two very hot methods in utf8 decoding by
> manually having two loops, one of which is guarded by a class-id check
> against the _Uint8ArrayView class, which is most common.  (In the future
> we would like to unify the typed data layouts so we no longer need to
> use `ClassId.getID`, thereby also allowing non core library code to use
> this).
> 
> This improves dart-aot by
>   * 31%+ for a protobuf decoding benchmark we care about
> 
> 
> Issue https://github.com/dart-lang/sdk/issues/31954
> 
> Change-Id: Ia567b92b7e76ff28eda1726deaafda32732ed8f5
> Reviewed-on: https://dart-review.googlesource.com/c/85281
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Jenny Messerly <jmesserly@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>

TBR=vegorov@google.com,kustermann@google.com,jmesserly@google.com,johnniwinther@google.com,sra@google.com

Change-Id: I912b0768c32cbb00297ce48db29dbdbea44c14fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/85441
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2018-11-27 18:15:36 +00:00
Martin Kustermann d7cf6959bb [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding
This change extends/fixes the exiting "pattern recognition" which tries
to recognize the pattern

  v2 <- LoadClassIdInstr(v1)
  BranchIf v2 == IntegerConstant(cid)

Furthermore we start inlining the recognized `ClassID.getID` method very
early in the pipeline.  This allows the VM to recognize the above
pattern and insert redefinitions before the actual inlining pass.

Furthermore we special-case two very hot methods in utf8 decoding by
manually having two loops, one of which is guarded by a class-id check
against the _Uint8ArrayView class, which is most common.  (In the future
we would like to unify the typed data layouts so we no longer need to
use `ClassId.getID`, thereby also allowing non core library code to use
this).

This improves dart-aot by
  * 31%+ for a protobuf decoding benchmark we care about


Issue https://github.com/dart-lang/sdk/issues/31954

Change-Id: Ia567b92b7e76ff28eda1726deaafda32732ed8f5
Reviewed-on: https://dart-review.googlesource.com/c/85281
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-11-27 13:14:27 +00:00
Nate Bosch 5a54f0eb57 Remove type checks that are already guaranteed
In Dart 2.0 types are enforced at signature boundaries, so most of the
type checks on arguments are serving no other purpose other than
disalllowing `null`. Make that explicit in these checks.

Unnecessary checks were discovered by searching for "if (\w+ is" and
filtering down to the checks that match exactly against a type argument.
Checks in any files related to "js" or "dart2js" are left alone.

In a few places there will be a user visible behavior change where
ArgumentErrors will reference "not null" instead of "not a String" etc.
Client code should not be relying on these details and the new messages
should be more clear.

Updated checks take a few forms:
- ArgumentError.checkNotNull
- Changing `value is SomeType` to `value != null` where it's combined
  with other conditions.
- Where non-null values are already guaranteed or allowed, drop the
  check.

Other changes:
- Use single line short circuit returns or throws where possible.
- In some places change an ArgumentError to a RangeError for
  consistency.
- Some minor formatting changes with the latest dartfmt.

Change-Id: I761dd5cc325ccdbf6506d6db8cfa9246218c1f98
Reviewed-on: https://dart-review.googlesource.com/c/81501
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-11-26 19:38:58 +00:00
Lasse R.H. Nielsen ed09a1e5f9 Update documentation of List.filled.
Change-Id: I3fa8275388adc958e003b50365075121095bc19a
Reviewed-on: https://dart-review.googlesource.com/c/85260
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-11-23 11:18:27 +00:00
Jonas Finnemann Jensen 4b51cea91b More docs for Timer.cancel()
Notably, it's worth documenting that calling `cancel()` twice is safe.

Change-Id: I35fdf3f8a810f78f296fc96750ec9ad4d81c6fc7
Reviewed-on: https://dart-review.googlesource.com/c/83744
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-11-21 10:54:59 +00:00
Sigmund Cherem 59e17553f9 Upgrade call-instrumentation logic.
This:
 - exposes the feature as an experiment flag
 - cleans up the code to prevent issues with strong-mode checks
 - provides only a single implementation, but lets users use a hook to tailor the feature to their needs.
Change-Id: I3bf277b76b7503235c35bfbf83356c953405ff6f
Reviewed-on: https://dart-review.googlesource.com/c/84880
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-11-20 20:10:01 +00:00
Kevin Moore c8e95cf3b5 More lint-driven cleanup of Core libs
Change-Id: Ic0bd821b3966c9ec2e92052ed2046b01e5fdd1cb
Reviewed-on: https://dart-review.googlesource.com/c/84124
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-11-14 16:23:22 +00:00
Sigmund Cherem 015f51c304 Fix windows sdk script
TBR=johnniwinther@google.com

Change-Id: Ibfb0b3657bcf0beb47ebd74874466ddfe9981a0e
Reviewed-on: https://dart-review.googlesource.com/c/84052
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-11-10 00:40:18 +00:00
Sigmund Cherem b484aada21 Remove library-root option - replace it with a libraries-spec option instead
Change-Id: Ie1df52cdaa7ab4381a4c1b94c61a1210f0f31b5f
Reviewed-on: https://dart-review.googlesource.com/c/83641
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-09 22:40:28 +00:00
Sam Rawlins 1a5f5e4caf Fix doc comment in HttpRequest.getString and other tweaks
Bug: https://github.com/dart-lang/sdk/issues/21578
Change-Id: I9ec333319922f27a216c1804d889198baf7e579b
Reviewed-on: https://dart-review.googlesource.com/c/82789
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-11-07 23:31:14 +00:00
Sam Rawlins e6e4039bc6 Correct HttpClient, HttpClientRequest, and HttpClientResponse docs.
Fixes #31528, #32408, #31966

Bug: https://github.com/dart-lang/sdk/issues/31528, https://github.com/dart-lang/sdk/issues/32408, https://github.com/dart-lang/sdk/issues/31966
Change-Id: I8072fc565e809fe51fb7e30109d5d43d44b96566
Reviewed-on: https://dart-review.googlesource.com/c/82783
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-11-07 17:31:53 +00:00
Sam Rawlins f7dab643ff Remove discontinued webproject.org links. Fixes #21482
Bug: https://github.com/dart-lang/sdk/issues/21482
Change-Id: Ie3becfa7eb9f233186629cf97bfcabe51efc8794
Reviewed-on: https://dart-review.googlesource.com/c/82790
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-11-06 22:20:51 +00:00
Sam Rawlins 8b465bc9e6 Document that addStream cannot be called while addStream is in progress.
Fixes #31478

Bug: https://github.com/dart-lang/sdk/issues/31478
Change-Id: I7ac08305133c58970d655fa589b1c3d948225000
Reviewed-on: https://dart-review.googlesource.com/c/82787
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-11-03 23:48:23 +00:00
Sam Rawlins 6f75e7a861 Document what happens if DataUri.parse() is passed bad data. Fixes #28679
Bug: https://github.com/dart-lang/sdk/issues/28679
Change-Id: I8fa71064b5b8f842d559276964fc001b8cc4668e
Reviewed-on: https://dart-review.googlesource.com/c/82786
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-11-03 23:41:23 +00:00
Sam Rawlins 2c70f80490 Fix doc comment for terminalLines. Womp womp. Fixes #31612
Bug: https://github.com/dart-lang/sdk/issues/31612
Change-Id: Ic95ae9ef8bb0ed18de939476a6d03739b80ecf5d
Reviewed-on: https://dart-review.googlesource.com/c/82785
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-11-03 22:38:59 +00:00
Sam Rawlins e083b61974 Add more documentation and examples to RegExp constructor. Fixes #32844
Bug: https://github.com/dart-lang/sdk/issues/32844
Change-Id: I658e83a8fc160f3d4e0e2cd1c6aa54f6964664e5
Reviewed-on: https://dart-review.googlesource.com/c/82782
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-11-03 14:59:29 +00:00
Sam Rawlins abbcecf7ad Fix various Encoding documentation. Fixes #31827, #31828, #31829, #31830, #31831
1. Override documentation for Codec.decoder and Codec.encoder so that
   mysterious type parameters `T` and `S` don't appear in documentation, e.g.
   https://api.dartlang.org/stable/2.0.0/dart-convert/Encoding/decoder.html.
   This fixes the documentation for subclasses, including AsciiCodec,
   Latin1Codec, Utf8Codec, and SystemEncoding.
2. Fix typo in `const AsciiCodec()`.
3. Override documentation for AsciiCodec.name.
4. Override documentation for Latin1Codec.name.
5. Override documentation for Utf8Codec.name.
6. Document `const SystemEncoding()`.

Bug: https://github.com/dart-lang/sdk/issues/31827, https://github.com/dart-lang/sdk/issues/31828, https://github.com/dart-lang/sdk/issues/31829, https://github.com/dart-lang/sdk/issues/31830, https://github.com/dart-lang/sdk/issues/31831
Change-Id: I292e1cbafff991b55ab67dba684692b686f3b8de
Reviewed-on: https://dart-review.googlesource.com/c/82788
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-11-03 14:59:18 +00:00
Kevin Moore 475eaee3c2 Cleanup some dynamic/Object promotion confusion from 5226b5c307
And make tweaks to Uri and StreamController equality

Change-Id: I63f85f67209442684e50b7c2e0011531893f294e
Reviewed-on: https://dart-review.googlesource.com/c/82781
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-11-03 14:05:15 +00:00
Lasse R.H. Nielsen 5226b5c307 Remove some unnecessary dynamic invocations in the platform libraries.
Change-Id: Ia72033e37c4d8292eabd95aeff97e4cb29e81823
Reviewed-on: https://dart-review.googlesource.com/c/82204
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-02 11:32:03 +00:00
Nate Bosch ca512dc018 Fix typo in int docs, valus - values
Closes #35021

Change-Id: I1d317fc7a6a76ed9b29e014cd9cab08a0fd17b67
Reviewed-on: https://dart-review.googlesource.com/c/82542
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-11-02 09:27:25 +00:00
Jens Johansen 69f04aac12 Remove unused _ConstantHelper
This was an idea that never manifested.
This has thus been unused code for more than a year.

Change-Id: Ib7c373a988a220e515d873d7a9e815cecfab178c
Reviewed-on: https://dart-review.googlesource.com/c/82225
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-11-01 08:44:36 +00:00
Lasse Reichstein Holst Nielsen 26121608a1 Make DateTime not assume arguments are instances of the same class.
The current DateTime class takes DateTime objects as arguments,
and then tries to access private members.
That does not work if someone else implements the DateTime interface.

Fixes #34962

BUG= http://dartbug.com/34962

Change-Id: I7191fe42f5b6efc1c7da5ed8e22b892b18f872f7
Reviewed-on: https://dart-review.googlesource.com/c/81828
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-10-31 07:29:48 +00:00
Keerti Parthasarathy 9f6aff7f52 Update doc comments for Iterable.singleWhere.
Change-Id: I29cc4265ce4f4d76830e0aa9b0bb7f62615504d1
Reviewed-on: https://dart-review.googlesource.com/c/82021
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2018-10-30 22:59:38 +00:00
qtbeee fa3df86c5f Update http status codes
Closes #34946
https://github.com/dart-lang/sdk/pull/34946

GitOrigin-RevId: 1ceac033effa8edea93d985e03aecce0ed833aea
Change-Id: Ia9580c131446ba41feacb889d7ff229f6f966821
Reviewed-on: https://dart-review.googlesource.com/c/81741
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-10-30 15:54:58 +00:00
Nate Bosch 7c845fa853 Remove some unnecessary type asserts
These are guarateed by the type system now.

Change-Id: I6d68a0284761805ae14f8c26d68469018c2a0e1d
Reviewed-on: https://dart-review.googlesource.com/c/81186
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-10-29 21:03:50 +00:00
asiva e6d3a45b6a [VM] Fix for issue 34839 Service isolate hangs during shutdown if
the VM exits before the Observatory server has a chance to
     start listening.

Bug: 34839
Change-Id: I2a5dfe69a197fe054dd041af3ea4e07da736b226
Reviewed-on: https://dart-review.googlesource.com/c/81381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-10-27 00:45:59 +00:00
Kevin Moore 79f8c8f9d8 cleanup dart:convert
Fixed a number of standard lints

Change-Id: I36e535c6dc91f3c7407c66a8089c38e0463bee83
Reviewed-on: https://dart-review.googlesource.com/c/81700
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-10-26 23:05:24 +00:00
Devon Carew a67ae75471 Fix a typo in dart:io docs.
Change-Id: I970aef1e25b3c72b740b41a3384af8aa75fc4b41
Reviewed-on: https://dart-review.googlesource.com/c/81662
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-10-26 19:03:21 +00:00
Samir Jindel e23acaaf90 [vm/aot] Fix obfuscation.
Test Plan:

Make vm-kernel-precomp-obfuscate-linux-release-x64-try green, ensuring status file changes
reflect design gaps and not bugs.

Tested locally that obfuscated Flutter Gallery runs.

Change-Id: Ifcdc334de58f43c310e15b58dbcf6fe1597206f2
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/81009
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-26 13:00:33 +00:00
Aart Bik 74d058ef1b [vm/sdk] add missing vm entry-point pragma
Rationale:
This makes File/Directory/Link's fromRawPath
equivalent again, and unblocks the pending
loop-based inlining heuristic.

Reverted CL because of this bug:
https://dart-review.googlesource.com/c/sdk/+/81335

https://github.com/dart-lang/sdk/issues/34473
https://github.com/dart-lang/sdk/issues/32167

Change-Id: I769a8365ea32d6f6830d0dd8ef97fc6c2467fb90
Reviewed-on: https://dart-review.googlesource.com/c/81460
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2018-10-25 21:10:03 +00:00
Nate Bosch 655310ddf2 Add ArgumentError.checkNotNull utility
In the places where other utilities like `RangeError.checkNotNegative`
are used it reads nicer to call through a similar signature than to
follow a conditional with the utility.

Change-Id: Idd89b2934020fb55e57a22c39773fd7879d1c28f
Reviewed-on: https://dart-review.googlesource.com/c/81287
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-10-24 23:34:15 +00:00
Lasse R.H. Nielsen d693742648 Specify for all literals whether the object overrides Object.==.
Also mention it in the `external const factory Symbol` constructor.

This only relevant for constant expressions that may be used as
switch case expressions or constant map keys.

See #32557.

Bug: http://dartbug.com/32557
Change-Id: Ie82799f3f0d39c21c10765338a7dfeb74a582add
Reviewed-on: https://dart-review.googlesource.com/c/81242
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-10-24 09:07:50 +00:00
Nate Bosch 03eafc0b2e Add fromEntries on HashMap and LinkedHashMap
Closes #34818

Change-Id: I77b117c16169a5c5bd5655e851256930a2ea5a28
Reviewed-on: https://dart-review.googlesource.com/c/81188
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-10-23 20:53:34 +00:00
Stephen Adams f0a116d339 [dart2js] Some tear-off cleanup
Replace jsArguments with isIntercepted

Change-Id: I440a86fb411d3e278fa60ed86e5d43c5efb79033
Reviewed-on: https://dart-review.googlesource.com/c/80721
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-10-19 02:37:49 +00:00
Alexander Aprelev a4a3f95748 Avoid using future closure in http connect.
Going through the closure seems to add 100+ms to the connect flow.

Change-Id: I3ba413a333a403628cb9d8320c91448c3ac7072c
Reviewed-on: https://dart-review.googlesource.com/c/80524
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-10-18 17:11:17 +00:00
Dan Field 6e23c3b3cb Support SO_REUSEPORT and IP_MULTICAST_TTL for datagram sockets.
mDNS queries (and many other local queries) should be allowed to set
their TTL to 255.  This patch enables that on all platforms.

On macOS in particular, a system service reserves the mDNS port. The
socket option SO_REUSEPORT is required in addition to SO_REUSEADDR to
successfully bind there; the flag is also supported on Linux, so this
patch allows it to be used there as well (but prints an error message if
it's used on any other platform).

I could use some guidance as to tests for this - is it support availble
for running tests only on specific platforms?

Bug: https://github.com/dart-lang/sdk/issues/34799 and
Change-Id: I29b620d8ec04343f356a8171bae3d385ddfa9564
https://github.com/dart-lang/sdk/issues/34782
Reviewed-on: https://dart-review.googlesource.com/c/80082
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 01:48:52 +00:00
Terry Lucas 490421d166 Fixed Service Workers and any Promise/Future API with a Dictionary parameter.
APIs in dart:html (that take a Dictionary) will receive a Dart Map parameter.  The Map parameter
must be converted to a Dictionary before passing to the browser's API.  Before this change,
any Promise/Future API with a Map/Dictionary parameter never called the Promise and didn't
return a Dart Future - now it does.

This caused a number of breaks especially in Service Workers (register, etc.).  Here is a
complete list of the fixed APIs:

BackgroundFetchManager
    Future<BackgroundFetchRegistration> fetch(String id, Object requests, [Map options])

CacheStorage
    Future match(/*RequestInfo*/ request, [Map options])

CanMakePayment
    Future<List<Client>> matchAll([Map options])

CookieStore
    Future getAll([Map options])
    Future set(String name, String value, [Map options])

CredentialsContainer
    Future get([Map options])
    Future create([Map options])

DirectoryEntry
    Future<Entry> _getDirectory(String path, {Map options})
    Future<Entry> _getFile(String path, {Map options})

ImageCapture
    Future setOptions(Map photoSettings)

MediaCapabilities
    Future<MediaCapabilitiesInfo> decodingInfo(Map configuration)
    Future<MediaCapabilitiesInfo> encodingInfo(Map configuration)

MediaStreamTrack
    Future applyConstraints([Map constraints])

Navigator
    Future requestKeyboardLock([List<String> keyCodes])
    Future requestMidiAccess([Map options])
    Future share([Map data])

OffscreenCanvas
    Future<Blob> convertToBlob([Map options])

PaymentInstruments
    Future set(String instrumentKey, Map details)

Permissions
    Future<PermissionStatus> query(Map permission)
    Future<PermissionStatus> request(Map permissions)
    Future<PermissionStatus> revoke(Map permission)

PushManager
    Future permissionState([Map options])
    Future<PushSubscription> subscribe([Map options])

RtcPeerConnection
    REMOVED:  Future createAnswer([options_OR_successCallback,
                                   RtcPeerConnectionErrorCallback failureCallback,
                                   Map mediaConstraints])
    REMOVED:  Future createOffer([options_OR_successCallback,
                                  RtcPeerConnectionErrorCallback failureCallback,
                                  Map rtcOfferOptions])
    REMOVED:  Future setLocalDescription(Map description, VoidCallback successCallback,
                                         [RtcPeerConnectionErrorCallback failureCallback])
    REMOVED:  Future setLocalDescription(Map description, VoidCallback successCallback,
                                         [RtcPeerConnectionErrorCallback failureCallback])
    Future<RtcSessionDescription> createAnswer([Map options])
    Future<RtcSessionDescription> createOffer([Map options])
    Future setLocalDescription(Map description)
    Future setRemoteDescription(Map description)

ServiceWorkerContainer
    Future<ServiceWorkerRegistration> register(String url, [Map options])

ServiceWorkerRegistration
    Future<List<Notification>> getNotifications([Map filter])
    Future showNotification(String title, [Map options])

VRDevice
    Future requestSession([Map options])
    Future supportsSession([Map options])

VRSession
    Future requestFrameOfReference(String type, [Map options])

Window
    Future fetch(/*RequestInfo*/ input, [Map init])

WorkerGlobalScope
    Future fetch(/*RequestInfo*/ input, [Map init])


In addition, exposed Service Worker "self" as a static getter named "instance".  The
instance is exposed on four different Service Worker classes and can throw a InstanceTypeError
if the instance isn't of the class expected (WorkerGlobalScope.instance will always work
and not throw):

*   SharedWorkerGlobalScope.instance
*   DedicatedWorkerGlobalScope.instance
*   ServiceWorkerGlobalScope.instance
*   WorkerGlobalScope.instance

R=vsm@google.com

Bug: #34202
Change-Id: I641ccbff7cc771465dd32c73db20eba5d6667939
Reviewed-on: https://dart-review.googlesource.com/c/74482
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-10-14 22:48:33 +00:00
Jonathan White aa9f0f911f Update stream.dart
Fixed a typo or 2. Ran the entire file through a basic spell check and it's good now

Closes #34773
https://github.com/dart-lang/sdk/pull/34773

GitOrigin-RevId: ccde23a5880ec5904d838e5c2bc2a747c5d3ebb6
Change-Id: I154bd90376a4ea4b7a8d736382b19a44fc41e5b0
Reviewed-on: https://dart-review.googlesource.com/c/79500
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-10-12 16:46:35 +00:00
Peter von der Ahé 54ef78b7c5 Remove non-strong vm dill files from SDK
Change-Id: Ia9337ec090333902ea8fc2492f2ffdac1bcff2d1
Reviewed-on: https://dart-review.googlesource.com/c/79520
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-10-12 12:42:57 +00:00
Peter von der Ahé ddf67772bb Remove warning about inferring packages URI from dart2js
Change-Id: I37ee171b0359e1fa6720d7af9e403f4dfab76e9e
Reviewed-on: https://dart-review.googlesource.com/c/79480
Auto-Submit: Peter von der Ahé <ahe@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-10-12 07:37:23 +00:00
Stephen Adams bd223d0ec4 Add consistent_type_error_test
Change-Id: Ic48765468dcdd19371291a32514b9b04012a762a
Reviewed-on: https://dart-review.googlesource.com/c/79146
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-12 00:52:25 +00:00
Sigmund Cherem 9a6f811466 Report null error as a NoSuchMethodError
Change-Id: I04f978b99c75d0bba5128c07cdc56d9020529a5f
Reviewed-on: https://dart-review.googlesource.com/c/79085
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-10-10 20:07:44 +00:00
G?nter Z?chbauer 2da0b9f4f1 fix some typos
Closes #34738
https://github.com/dart-lang/sdk/pull/34738

GitOrigin-RevId: d211bbacfe65355cf7304c990ffb6c79d7a229cf
Change-Id: If690e6d378e543b300e1f6a353ceae73e39c29db
Reviewed-on: https://dart-review.googlesource.com/c/78900
Reviewed-by: Alexander Thomas <athom@google.com>
2018-10-10 19:15:30 +00:00
Stephen Adams daa13ad0aa Fix preamble/d8.js currentScript for v8 6.9
Change-Id: I3783c51dc4f26ca21c368840758f7acf34f710b7
Reviewed-on: https://dart-review.googlesource.com/c/78865
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-09 20:39:06 +00:00
Stephen Adams 6c2aaf1241 Remove IrRepresentation annotation
Change-Id: I4cf47dd34fa5fe070bf74b4a422a5ce3e2de0273
Reviewed-on: https://dart-review.googlesource.com/76742
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-09-28 08:49:50 +00:00
Peter von der Ahé 8ef3258e59 Remove _ConstantExpressionError
Change-Id: I0f7c590e826d9516d7b916cb6e39fd67eab97997
Reviewed-on: https://dart-review.googlesource.com/76662
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-09-28 08:41:53 +00:00
Jenny Messerly d673847bd8 [dartdevc] add --kernel option, deprecate bin/dartdevk
`dartdevc --kernel` is now equivalent to the old `dartdevk` command.
This will make migration easier, as it's now just a flag to enable
CFE/Kernel. `dartdevk` is now deprecated, but it can be supported for
a while as it just calls `dartdevc --kernel`.

Change-Id: Ib8d09f74556740a3af11c753f80cd87bd4a09044
Reviewed-on: https://dart-review.googlesource.com/76566
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-26 21:18:06 +00:00
Lasse R.H. Nielsen 429bca8e65 Make Uri.parse accept [ and ] in path, query and fragment.
Also accept `#` in fragment.
Fix bug in parsing URI where first character of path needs escaping.
The characters are escaped, but parsing doesn't fail, like it previously
did on misplaced general delimiters in those places

Fixes #34451.

Bug: https://dartbug.com/34451
Change-Id: I99aa39bd2909661802ad9d1bb5dada94d579141b
Reviewed-on: https://dart-review.googlesource.com/74780
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-09-26 14:09:37 +00:00
Stephen Adams 1a29217509 Remove empty statements
TBR=sigmund@google.com

Change-Id: I352bdc7f8031d797ec612a369341f93c7fbb1557
Reviewed-on: https://dart-review.googlesource.com/76586
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-09-26 03:35:08 +00:00
Zach Anderson 0ac3b8fff9 [fuchsia] Add missing vm:entry-point annotation
Change-Id: I42be70aba4aa5ed451fcc4afca02f0830f8d82d7
Reviewed-on: https://dart-review.googlesource.com/76220
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-09-24 19:04:21 +00:00
Nate Bosch d9fcaa33b1 Implement StreamTransformer.fromBind
Closes #32021

Change-Id: I9b8c680ace8b3d7a7bb479ffe19fa0e01fc2cf2f
Reviewed-on: https://dart-review.googlesource.com/71923
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-09-18 21:11:10 +00:00
Stephen Adams 96a190020e Remove dart2js non-strong platforms
Since dart2js is now strong-mode-only and ignores the --strong flag, I don't see the point in having 'strong' in the platform name.

Removed:
  dart2js_platform
  dart2js_server_platform
renamed:
  dart2js_platform_strong --> dart2js_platform
  dart2js_server_platform_strong --> dart2js_server_platform

Change-Id: If74ef31a17acc15a23a5338e5f53e820fc66b0dd
Reviewed-on: https://dart-review.googlesource.com/71425
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-09-18 16:33:19 +00:00
Lasse R.H. Nielsen cc08d0e1da Add operators &, | and ^ to bool.
Change-Id: Idd6472f239445914c1ff1ab68fc7b38fa6b320ae
Reviewed-on: https://dart-review.googlesource.com/25240
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-09-17 12:33:12 +00:00
Nate Bosch 7442bac571 Reword readLineSync doc to remove typo
Fixes #32040

Change-Id: I7608d583d85fb696c8b760f7b6787a3fb52a77ea
Reviewed-on: https://dart-review.googlesource.com/71922
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-09-12 18:15:27 +00:00
Samir Jindel acf842c56f [vm] Empty dart_io_entries.txt and add entry-points for Flutter.
Change-Id: Ic722c315e63965d6e3730a7757797fbaf1879dee
Reviewed-on: https://dart-review.googlesource.com/74486
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-09-11 20:53:53 +00:00
Nate Bosch 3c4a86c709 Forward drain argument through after .take(0)
Fixes #30305

Change-Id: I7a30cee3e9a406e99f5d714a201b031c428a12e8
Reviewed-on: https://dart-review.googlesource.com/74015
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-09-11 11:07:01 +00:00
Nate Bosch 3ddc9bb329 Add a doc comment for String.compare
Closes #5612

Similar to `hashCode` and `operator ==`, add an explicit declaration of
the method to attach a doc comment and give extra context beyond the
`Comparable` interface doc comment.

I checked the implementation in `runtime/lib/string_patch.dart` to
validate that it is acting on code units and does not check case.

Change-Id: I85bc94b954a507756132f86cc8299232c73a25cf
Reviewed-on: https://dart-review.googlesource.com/73284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-09-10 19:37:48 +00:00
Johnni Winther 134bb884de Handle generic types in native behavior
Previous implementation didn't include subtypes of the specified type.
For instance `JS('Rectangle', ...)` should have triggered the inclusion
of `_DomRect` but the use of this-type in the subtype test,
`_DomRect <: Rectangle<T>`, prohibited this.

This fix is to use the raw type instead of the this-type. The subtype test
will therefore be `_DomRect <: Rectangle<dynamic>` which correctly
includes `_DomRect`.

The change has the effect that `JS('List', ...)` now actually includes subtypes of
`List`. For this reason uses of `List` have been updated to use `JSArray` or
explicitly use `returns:...` to avoid unintended inclusion of native lists such
as the native typed arrays.

Change-Id: I06ab55d9bf694829596875d9c3a0a6c954d396b7
Reviewed-on: https://dart-review.googlesource.com/73903
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-07 22:28:37 +00:00
Lasse Reichstein Holst Nielsen f0172a4c41 Export Future and Stream from dart:core.
This allows `async` and `async*` functions to be typed without importing `dart:async`.
All other async types still need to be imported, including `FutureOr` and `Zone`,
but pure `async`/`await` based code can be written with no imports.

Fixes #26162.

Bug: http://dartbug.com/26162
Change-Id: Iaf36631ef5b3251a688e495a9d238b2f8787f14c
Reviewed-on: https://dart-review.googlesource.com/71480
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-09-07 06:14:32 +00:00
Jason Simmons f2e6e7255a Mark File/Directory.fromRawPath as an entry point
Fixes https://github.com/flutter/flutter/issues/21242

Change-Id: Ibc100bbdaffd41a1f91a13087a0f12bc1849fc6f
Reviewed-on: https://dart-review.googlesource.com/72920
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-09-06 15:22:56 +00:00
Nate Bosch a024082f01 Clarify behavior of async result in Future.delayed
Closes #29283

Change-Id: I3d375d7ba70394e46162ed7303aa24a2d7a63f66
Reviewed-on: https://dart-review.googlesource.com/72551
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-09-05 00:20:14 +00:00
Nate Bosch 2a479d320b Call out addError API in stderr docs
Closes #32808

One could reasonably think that `addError` is a useful API on `stderr`,
but in this case it will only cause an unhandled async error and exit
the VM.

Change-Id: Ia9e14ab53faec19aed91a1a5acc0709807204de8
Reviewed-on: https://dart-review.googlesource.com/71921
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-09-05 00:18:34 +00:00
Nate Bosch 33cd9cc8c6 More consistent Stream docs
- Use "emits error" instead of "contains error".
- Always use "this stream" for isntance members and "the stream" for
  constructors.
- Some minor rewording for clarity.

Change-Id: Ia2b0430810603ab2a137a99b2cfa3d3096523d19
Reviewed-on: https://dart-review.googlesource.com/72068
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-08-31 23:11:10 +00:00
Paul Berry d04d304909 Stop using/generating spec.sum file.
For some time now, this file has had the same contents as strong.sum.
There's no point in keeping it around.

Change-Id: I793a41ca6cb1c47c68357f549d299fa95b96c4c5
Reviewed-on: https://dart-review.googlesource.com/71701
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-08-30 12:32:52 +00:00
Devon Carew 9fa3d8351c Remove analysis_server sources from the built sdk.
Change-Id: I4fe32ca52d69a6e1f361428aa577c311a102bb49
Reviewed-on: https://dart-review.googlesource.com/72060
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-08-29 22:03:55 +00:00
Nate Bosch ee9582d382 Explain what an "identity" map is
Closes #27247

Change-Id: If3d9800ddc3571c72412a3a8d521712c0e40ac74
Reviewed-on: https://dart-review.googlesource.com/71430
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-08-29 18:27:29 +00:00
Nate Bosch 4916cdf9dc Mention ordering in Future.wait docs
Fixes #34290

Change-Id: I79a476912305641ca328d00146fbcb5191646015
Reviewed-on: https://dart-review.googlesource.com/71885
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-08-29 18:20:19 +00:00
Nate Bosch 0789ab8b0e Add clarification for broadcast stream.first
Closes #28195

Change-Id: I625128be6ac5275394e0893a00a22faee3d2a0b4
Reviewed-on: https://dart-review.googlesource.com/71388
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-08-28 23:07:12 +00:00
Nate Bosch 34963476ed Clarify behavior of sublist with end == start
Closes #28074

I used some wording from the discussion. I kept he title line as is
since I think the "inclusive/exclusive" distinction is how most readers
think of it, and the more precise language can be kept in the details.

Change-Id: I4de2ffc77dbc8168efcacb94a168c1a2428a5293
Reviewed-on: https://dart-review.googlesource.com/71390
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-08-28 22:59:08 +00:00
Nate Bosch bb382f3c81 Drop _CastQueueMixin
See comments at https://dart-review.googlesource.com/c/sdk/+/26620/

- Drop `_CastQueueMixin` and implement directly at usage. There is no
need for a mixin since it does not need to be used for `CastListQueue`.
- Drop placeholder comment for `CastListMixin` since `ListQueue` was
never updated to implement `List`.

Change-Id: I23c5e342ae174e6fbb0381190f11ce86abb64d0b
Reviewed-on: https://dart-review.googlesource.com/71422
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-08-28 22:52:12 +00:00
Nate Bosch 38b9a544df Call our error events in StreamTransform.bind doc
Fixes #27739

The doc already has guidelines on things like listening to and pausing
the stream but did not mention whether or how error events should be
considered. Since a Transformer may choose to do anything with errors
metion that explicitly and encourage the behavior to be documented.

Change-Id: I77e98c0967ae0041f5e959282369aa294aa9b18a
Reviewed-on: https://dart-review.googlesource.com/71383
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-08-28 22:51:02 +00:00
Hugo van der Merwe 8d9baeb058 Explain Unicode encoding in String documentation.
The Dart String class is not particularly safe when dealing with
Unicode, particularly for non-Latin scripts or Emoji. This
documentation change attempts to raise awareness of the pitfalls of
the current Strings class.

Change-Id: I8a6c15b6ad654f73a1d33513863cae8bfe475b16
Reviewed-on: https://dart-review.googlesource.com/71500
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-08-28 09:46:58 +00:00
Lasse Reichstein Holst Nielsen edd6b75a05 Add missing method to UnmodifiableMapMixin.
Fixes 34256
BUG= http://dartbug.com/34256

Change-Id: I780368176b0111130bee1b5aae1f5228eabfa16f
Reviewed-on: https://dart-review.googlesource.com/71460
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-08-28 05:11:12 +00:00
Lasse Reichstein Holst Nielsen 72e6353c32 Make Stream.fromIterable handle errors in current and send a done.
The code didn't handle `iterator.current` throwing, and it didn't send a done
event after `iterator.moveNext()` throws.

Fixes #33431.

Bug: http://dartbug.com/33431
Change-Id: Ic8f7b5d52793ea3db30480e7aa69d01a86e93772
Reviewed-on: https://dart-review.googlesource.com/63841
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-08-27 08:06:54 +00:00
Nate Bosch 0976347339 Expand docs for Stream.toSet
Fixes #30187

Include description of behavior around when the Future completes and how
errors are handled. Include detail of ordering - since the default
`Set` implementation is `LinkedHashSet` where insertion order matters.

Change-Id: I4695c131bcab4527b153f57f90bffe61c818d187
Reviewed-on: https://dart-review.googlesource.com/71381
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-08-24 19:28:37 +00:00
Nate Bosch dc9a7b3aa3 Clarify that stdout my not be done before exitCode
Closes #31666

Change-Id: If1ba66d72a57a3ca2ce38d9a8101de2f13baa639
Reviewed-on: https://dart-review.googlesource.com/71384
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-08-24 18:54:25 +00:00
Nate Bosch 48f61d6ae3 Clarify docs on StreamSubscription.pause/resume
Fixes #27756

Call out more explicitly in the `pause` doc that `resume` and
`resumeSignal` are interchangeable, and in both docs that a `resume`
call is safe on a subscription which is not paused.

Also reformat to remove single newline in between sentences and to 80
character lines.

Change-Id: I1efd05639400f2cb5266e686adb99c3c721fabe7
Reviewed-on: https://dart-review.googlesource.com/71380
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-08-24 18:46:29 +00:00
asiva d1bd887d03 [VM/SDK] Switch kernel isolate to run in Dart 2 mode
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: Iccca3233f6cb8d6b307b4cf1ca3262f293f794a6
Reviewed-on: https://dart-review.googlesource.com/70841
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-21 20:28:06 +00:00
Johnni Winther 244c9bebec Remove STRONG_MODE flag
Change-Id: I260be375925dde43703f64e83e09ed924e44e669
Reviewed-on: https://dart-review.googlesource.com/70641
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-08-21 08:21:02 +00:00
Nate Bosch 2cca4415b1 Replace Deprecated.expires with message
Closes #34155

This updates the annotation to reflet how it is being used in practice
anyway.

Change-Id: I3bed65e8b0d93f0361d98a93957164a345082933
Reviewed-on: https://dart-review.googlesource.com/70200
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-08-20 20:24:31 +00:00
Vyacheslav Egorov 032037681e Revert "[VM/SDK] Switch kernel isolate to run in Dart 2 mode"
This reverts commit 499761f0da.

Reason for revert: crashes when building SDK, red bots, broken Flutter 3xHEAD bot

Original change's description:
> [VM/SDK] Switch kernel isolate to run in Dart 2 mode
> 
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
>   with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
>   snapshot rule does not get into a cyclic dependency during the
>   bootstrap stage
> 
> Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
> Reviewed-on: https://dart-review.googlesource.com/70461
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: Ibf6d526fb5132b766f063fcf873cde661ae895d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/70516
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-08-19 19:58:32 +00:00
asiva 499761f0da [VM/SDK] Switch kernel isolate to run in Dart 2 mode
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
Reviewed-on: https://dart-review.googlesource.com/70461
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-18 22:50:09 +00:00
Johnni Winther 742ec9372f Remove support for functions as assert conditions in Dart 2
Change-Id: I57b9a63bcc43cc6a92ba255916102cc2c25e99c8
Reviewed-on: https://dart-review.googlesource.com/69968
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-08-17 12:05:48 +00:00
Lasse R.H. Nielsen 42f295ece5 Deprecate provisional and Provisional and make them unusable.
Will be removed in Dart 3.

Change-Id: I0bf8b01f23bab5a7871f0562562b7ad98887394f
Reviewed-on: https://dart-review.googlesource.com/69462
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-08-17 07:55:12 +00:00
Samir Jindel 5572df1458 [vm/precomp] Fix name of vm:entry-point.
Change-Id: I907e59a9df9407f924c0518a185d5b28ab46e381
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/69971
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-08-16 15:07:51 +00:00
Samir Jindel 4b704f234e [vm/precomp] Remove part of the generated entry points JSON list.
Change-Id: I2ae71b0ef35e8e009d1ff4d5917974748dfd6f05
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/69961
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-08-14 19:32:55 +00:00
Sigmund Cherem 8a05c944cd Remove JsInvocationMirror._invokeOn
I believe this was code only used via dart:mirrors

Soon we might want to rename JSInvocationMirror to just JsInvocation (so it's
clear that it is only used for nsm)

Change-Id: I0e0f836b18e6f290311c7173cfafedfcccab5c6f
Reviewed-on: https://dart-review.googlesource.com/69246
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-08-13 18:09:14 +00:00
Jonas Finnemann Jensen a9178a20fc Documented issues with HttpClient.authenticate
Retries following `HttpClient.authenticate` does not include the
original request payload, this is an issue as POST, PUT, PATCH
request can be retried through this mechanism. This patch advices
of the issue and suggests using `HttpClient.AddCredentials` directly
or setting the `'authorization'` header manually.

Closes https://github.com/dart-lang/sdk/issues/28012

---

It is possible that we should use even stronger language. It is not immediately obvious
to me when the `HttpClient.authenticate` property is useful. But retrying POST, PUT, PATCH
requests without sending the body again is problematic.

Perhaps we should print a warning when requests with a payload a retries. Or maybe even
deprecate the `HttpClient.authenticate` property. I'm new here so please educate me on
the useful use-cases.

Change-Id: Iaddba39c2fbb08fd31dda77bf19b9856bfa947f3
Reviewed-on: https://dart-review.googlesource.com/69161
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-08-13 12:28:54 +00:00
William Hesse a9ad427ea2 Validate cookie values wrapped in double-quotes
Servers sometimes send headers with cookie values that are encapsulated in double-quotes. Dart should validate values surrounded with double-quotes instead of throwing a FormatException.

This addresses Issue #33327 directly. I applied the solution to this problem that was [solved in Go's code base](https://github.com/golang/go/blob/master/src/net/http/cookie.go#L369).

Closes #33765
https://github.com/dart-lang/sdk/pull/33765

GitOrigin-RevId: 99672dd07d1f938b1bae063f2e9d99d4c141f684
Change-Id: Ie95a064611b1aa15aea93f5c8d801ecfc7d996c4
Reviewed-on: https://dart-review.googlesource.com/63920
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-08-10 16:14:15 +00:00
Vyacheslav Egorov bde6bbca96 [kernel] Move VmTarget and FlutterTarget to package:vm
Similar to how dart2js keeps its own target in package compiler.

This allows VmTarget to use package vm specific transformations and metadata.

Change-Id: I41dd2ae241b828224fb2c9a51e6ad5073b6fdea8
Reviewed-on: https://dart-review.googlesource.com/69160
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-08-10 12:55:57 +00:00
Daniel Hillerström 84d8887d3f Fixes a minor typo in the documentation of the StreamTransformer class.
Change-Id: I4d1142d14cf01d2b8c04d6bf41f9bac7c86c0d5a
Reviewed-on: https://dart-review.googlesource.com/68880
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
2018-08-08 10:53:49 +00:00
Stephen Adams 0fbe9d3a95 [dart2js] Dynamically generated tear-off constructors should have names
If the name is not provided the implementation can invent something
that conflicts with Dart 'Object'.

Change-Id: I3d15ab5d2c5b57d4bc3757fb5693ef56c452e0b0
Reviewed-on: https://dart-review.googlesource.com/68800
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-08-07 22:15:57 +00:00
Samir Jindel 9767af2550 [vm/precomp] Support @pragma for fields and remove associated entry-point entries.
Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I584aae2360771cf0599d9fb1b5ae2735b20d3413
Reviewed-on: https://dart-review.googlesource.com/65820
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-08-07 16:47:50 +00:00
Samir Jindel de408202a5 [vm/precomp] Take 4 for procedure- and class-entrypoints.
This reverts commit 08f59e5de3.

There are no changes to take 3 except fixing merge conflicts.

Change-Id: I45d5a16274c80f469827c19f4e4f4ca724e85a67
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/68363
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-08-07 13:54:27 +00:00
Stephen Adams 7cf2607344 Make minified names explicit in printed representation of types.
Supports mixed minified and unminified names (like `List` and `num` below).

Example:
TypeError: Closure 'minified:b3': type '() => minified:o<minified:k<num>>' is not a subtype of type 'List<minified:o<minified:k<num>>>'


Change-Id: I1fc67f189170eb9b9c8614b1e3d33128adc49787
Reviewed-on: https://dart-review.googlesource.com/67303
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-08-06 22:28:11 +00:00
Terry Lucas d9a07b09ff Fixed createObjectStore to keyPath.
TBR=vsm@google.com

Change-Id: I709e2741adf1dc222dd94e5052360a35cf21d917
Reviewed-on: https://dart-review.googlesource.com/68480
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2018-08-06 20:52:35 +00:00
Stephen Adams 315216e2e2 [dart2js] Avoid collision with getInterceptor.
getInterceptor now always goes via HInterceptor, ensuring the back end
knows to generate the unspecialized interceptor. We no longer generate
the unspecialized interceptor as *shadowing* the js_runtime
definition. In small programs where interceptors are not used except
via js_runtime.getInterceptor, the program would fail on the value
returned by the dummy body, since it was not shadowed.

This gets rid of the two definitions of getInterceptor (issue 9180).

Change-Id: Ibfa73f26d7d432273d5e755e2165ab6c2d48ad4f
Reviewed-on: https://dart-review.googlesource.com/68002
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-08-04 00:15:53 +00:00
Devon Carew 05b9bbd2b5 Remove the dart1 version of the analysis server snapshot.
Change-Id: I0e2739fee543604110d95e46b4c62d49fcab2b1a
Reviewed-on: https://dart-review.googlesource.com/67383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-30 20:13:27 +00:00
Ben Konyi 08f59e5de3 These changes are causing a segfault in DartEntry::InvokeFunction in dart_entry.cc in Flutter,
which was blocking the Dart SDK roll.

Revert "Take 3 for "[vm/kernel/precomp] Remove procedures from entry points files.""

This reverts commit 567109df7f.

Revert "[vm/precomp] Extend @pragma entry-points to classes."

This reverts commit 232698047c.

Change-Id: Ib63d1afb8a1c978be7ddf282af0e7d5547111cc3
Reviewed-on: https://dart-review.googlesource.com/67300
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-07-28 00:01:50 +00:00
Sigmund Cherem d5b5736a47 Merge DDC's libraries specification into the sdk/lib/libraries.json file
Change-Id: I3f8076a3726aec0636e63173df8ec2a2c75d225e
Reviewed-on: https://dart-review.googlesource.com/66740
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-07-26 22:31:51 +00:00
Zach Anderson bad8de3156 [GN] Include all library sources in the platform SDK
These files are mentioned in libraries.dart under lib/_internal, and
tools may not work if they don't exist.

Change-Id: Idf7d4590b02a4f50dd1cb605d2e91e1c14399726
Reviewed-on: https://dart-review.googlesource.com/67041
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-07-26 22:26:58 +00:00
Samir Jindel 567109df7f Take 3 for "[vm/kernel/precomp] Remove procedures from entry points files."
I've updated the transformer test. The Windows build error appears to have been spurious.

Take 2 is in patchset 1.

Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I6ef8f70aaf4664e0411e776463e88c2a1068dbcc
Reviewed-on: https://dart-review.googlesource.com/65902
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-07-26 16:24:59 +00:00
Martin Kustermann 33914226f2 [VM] Add Dart_InvokeVMServiceMethod() to dart_tools_api.h
This will allow any embedder to use a C++ API to talk to the vm-service.
Usecase is e.g. trigger a hot-reload without speaking websocket.

Change-Id: Ia54e5a73a0f0a4899e3e6d60694af0b394efb993
Reviewed-on: https://dart-review.googlesource.com/66384
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-07-25 12:06:55 +00:00
Terry Lucas 7b77fa217b Fixed callbacks typedef to be List instead of a generic typed List.
Fixed getLegacyStats - shouldn't have a JSName annotation.

Fixes #33891

R=sigmund@google.com

Change-Id: Ie9761ad4f3c69fc875cdb1f0d096f48d1528671b
Reviewed-on: https://dart-review.googlesource.com/66400
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2018-07-24 19:14:08 +00:00
Siva Annamalai 33697f7339 Revert "Reland "[VM/SDK]""
This reverts commit b59583edea.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "[VM/SDK]"
> 
> This is a reland of b4146411d0
> 
> Original change's description:
> > [VM/SDK]
> > 
> > - Switch the kernel isolate to run in Dart2 mode
> > - Refactor build rules so bootstrapping of the front end happens
> >   with a prebuilt dart sdk
> > - Refactor application snapshot build rules so the kernel application
> >   snapshot rule does not get into a cyclic dependency during the
> >   bootstrap stage
> > 
> > Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> > Reviewed-on: https://dart-review.googlesource.com/61660
> > Commit-Queue: Siva Annamalai <asiva@google.com>
> > Reviewed-by: Zach Anderson <zra@google.com>
> 
> Change-Id: I2a3fa8ed4f331cf3de89ddff5cf8e478809dae39
> Reviewed-on: https://dart-review.googlesource.com/65841
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=zra@google.com,asiva@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I6077236481bec9089ead881c902036b0817114fc
Reviewed-on: https://dart-review.googlesource.com/66240
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-07-23 18:07:29 +00:00
Sigmund Cherem 21a582d886 Cleanup in JsInvocationMirror: remove message about MirrorsUsed
Change-Id: I3aeeb0dfb2a3e76abd0b8587ab2e32b54cf726f6
Reviewed-on: https://dart-review.googlesource.com/66081
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-07-23 17:10:49 +00:00
Samir Jindel 98356d3ed8 Revert "Re-land "[vm/kernel/precomp] Remove procedures from entry points files.""
This reverts commit a437b4b469.

Reason for revert: Build on Windows appears broken.

Original change's description:
> Re-land "[vm/kernel/precomp] Remove procedures from entry points files."
> 
> The original revision is in Patchset 1.
> 
> Due to idiosyncrasies of the legacy VM parser, we need to put the @pragma definition
> on both the original and patched definition. Hopefully we can remove these extra definitions
> once Dart 1 AOT is fully obsolete.
> 
> Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
> Change-Id: I2515dee2bbf14cece5e75450b1951d45f1250959
> Reviewed-on: https://dart-review.googlesource.com/65545
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Samir Jindel <sjindel@google.com>

TBR=lrn@google.com,alexmarkov@google.com,sjindel@google.com

Change-Id: I783dcd6f00d1f31907d90651ffbf80a6af1fb98d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/65960
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-07-20 16:57:30 +00:00
Samir Jindel a437b4b469 Re-land "[vm/kernel/precomp] Remove procedures from entry points files."
The original revision is in Patchset 1.

Due to idiosyncrasies of the legacy VM parser, we need to put the @pragma definition
on both the original and patched definition. Hopefully we can remove these extra definitions
once Dart 1 AOT is fully obsolete.

Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I2515dee2bbf14cece5e75450b1951d45f1250959
Reviewed-on: https://dart-review.googlesource.com/65545
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-07-20 14:19:33 +00:00
asiva b59583edea Reland "[VM/SDK]"
This is a reland of b4146411d0

Original change's description:
> [VM/SDK]
> 
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
>   with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
>   snapshot rule does not get into a cyclic dependency during the
>   bootstrap stage
> 
> Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> Reviewed-on: https://dart-review.googlesource.com/61660
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

Change-Id: I2a3fa8ed4f331cf3de89ddff5cf8e478809dae39
Reviewed-on: https://dart-review.googlesource.com/65841
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-07-19 22:04:56 +00:00
Siva Annamalai 7f5334480e Revert "[VM/SDK]"
This reverts commit b4146411d0.

Reason for revert: Seems to have build issues on certain bots

Original change's description:
> [VM/SDK]
> 
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
>   with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
>   snapshot rule does not get into a cyclic dependency during the
>   bootstrap stage
> 
> Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> Reviewed-on: https://dart-review.googlesource.com/61660
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=zra@google.com,asiva@google.com

Change-Id: I4fc5b81e0a102bde4e8b4f737af3825e9728be3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/65840
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-07-19 21:20:39 +00:00
asiva b4146411d0 [VM/SDK]
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
Reviewed-on: https://dart-review.googlesource.com/61660
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-07-19 20:48:18 +00:00
Johnni Winther ec733c3b3c Support more type arguments in generic instantiation
The real solution requires more work, so this is to buy us some time.

Change-Id: I033a77d05c0ca7658475d1fe59760ce4e5919f7e
Reviewed-on: https://dart-review.googlesource.com/65541
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-07-19 08:10:15 +00:00
Samir Jindel 17cca798e5 Revert "[vm/kernel/precomp] Remove procedures from entry points files."
This reverts commit 91dcf654a4.

Reason for revert: Many failures across Dart 1 precompiler bots.

Original change's description:
> [vm/kernel/precomp] Remove procedures from entry points files.
> 
> entry_points_extra_standalone.json is completely removed.
> 
> Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
> Change-Id: Ia4fb18aebbb09752e3795cda3a9c66f9c502b23a
> Reviewed-on: https://dart-review.googlesource.com/65325
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

TBR=alexmarkov@google.com,sjindel@google.com

Change-Id: I0df74807fcc8e8fa75a45a411ddf23e385cfc8d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/65580
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-07-18 16:10:21 +00:00
Samir Jindel 91dcf654a4 [vm/kernel/precomp] Remove procedures from entry points files.
entry_points_extra_standalone.json is completely removed.

Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: Ia4fb18aebbb09752e3795cda3a9c66f9c502b23a
Reviewed-on: https://dart-review.googlesource.com/65325
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-07-18 15:22:41 +00:00
Lasse R.H. Nielsen f2402b3c08 Remove deprecated SDK constant declarations.
Change-Id: I0e4208b6fa957765403608103128c28562280657
Reviewed-on: https://dart-review.googlesource.com/51841
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-07-18 13:05:00 +00:00
Devon Carew e84f061db8 Build a 2nd, --no-preview-dart-2, analysis server snapshot.
Change-Id: I991aabef1ecacdcd01a67d5dcb536e7592f6b5cc
Reviewed-on: https://dart-review.googlesource.com/65020
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-16 23:37:53 +00:00
Lasse R.H. Nielsen 91ce347309 Reapply "Create _nullFuture and _falseFuture in the root zone."
Originally landed by https://dart-review.googlesource.com/c/sdk/+/49509
Reverted because an internal test is fragile and changes behavior when the bug is fixed.

Change-Id: I8516082e5741547c46aa521a91826846dc101303
Reviewed-on: https://dart-review.googlesource.com/63743
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2018-07-16 16:19:15 +00:00
Lasse R.H. Nielsen 76db06cc24 Fix assert in Future code to allow a Future<Future<int>>.
Fix the `lib_2/async/future_test` test which was otherwise failing everywhere.
Updated status files.

Change-Id: I4e277dd7d47692b92b3303bfdd7cfbde120a8f87
Reviewed-on: https://dart-review.googlesource.com/65080
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-07-16 11:27:36 +00:00
Devon Carew ffeee8fe10 Fix some typos.
Change-Id: I86997801dd4ae210d79340d76006b4865fdee814
Reviewed-on: https://dart-review.googlesource.com/65022
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-14 07:05:21 +00:00
Zach Anderson 576f01045a [build] Copy Observatory assets with GN rather than observatory_tool.py
Change-Id: Ib6faf31fffaa49dadbf47056cbce353348b7680c
Reviewed-on: https://dart-review.googlesource.com/64241
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-07-10 19:08:47 +00:00
Lasse Reichstein Holst Nielsen e26d3d5f9f Reenable the Iterable.whereType method.
Fixes #32463.

Bug: http://dartbug.com/32463
Change-Id: Ie58ff1acbc0a834956741c7ec0ab8d890793baf9
Reviewed-on: https://dart-review.googlesource.com/63940
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-07-10 18:05:15 +00:00
Johnni Winther 1c673b1046 Include bounds in type literals
Change-Id: Ieb3e5b09e88c98f8943a6e7ca9031c8a6ab776e1
Reviewed-on: https://dart-review.googlesource.com/63820
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-07-09 12:24:04 +00:00
Zach Anderson 0ccdc3ec38 Reland: [dart:io] Adds Socket.startConnect
This is a reland of https://dart-review.googlesource.com/c/sdk/+/62484
with the following changes:
- _NativeSocket.connect now drops references to pending sockets on
  an error or successful connection.
- eventhandlers are updated to ignore unset Dart ports on a close
  command.
- Test updated to account for new SocketException.

This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484

This CL adds a startConnect method to Socket types that returns
a ConnectionTask object that can be cancelled. Cancelling
a ConnectionTask closes any sockets that were opened for the
connection attempt that are not yet connected to the host.

This allows a closing HttpClient to close sockets for pending
requests whose sockets weren't fully connected yet.

related https://github.com/flutter/flutter/issues/18617

Change-Id: I47fe3564e41197d622079aad4bb644bbdfe0bfe8
Reviewed-on: https://dart-review.googlesource.com/63040
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-07-03 14:47:41 +00:00
Terry Lucas fd26d67a0b Added getLegacyStats until Chrome fully supports new getStats() API.
TBR=alanknight@google.com

Change-Id: Iea06485fc54cdbcb30f1cc1bf7a10f97335e242a
Reviewed-on: https://dart-review.googlesource.com/63442
Reviewed-by: Alan Knight <alanknight@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2018-07-02 21:28:48 +00:00
Sigmund Cherem a4b27057f0 Make bots green again: mostly status updates, but also fix check in custom-element upgrades
Change-Id: Ic5e5b58be60261c4843f00eb090e0c1e4ed7e093
Reviewed-on: https://dart-review.googlesource.com/63325
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-06-30 01:23:39 +00:00
Sigmund Cherem 8a0ac0b3e2 temporarily add more details in error message for safari.
A test is failing in safari and I plan to suppress it shortly, meanwhile, we are adding a better error message to help us debug it. We are likely going to revert this change shortly.

TBR=sra@google.com

Change-Id: I0d6fc8699c411054e5da73d59b33800879757482
Reviewed-on: https://dart-review.googlesource.com/63301
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-06-29 21:24:42 +00:00
Sam Rawlins 911e285333 Fix DocumentFragment.appendHtml and regenerate (some dartfmt changes included)
Bug: https://github.com/dart-lang/sdk/issues/29325
Change-Id: Id66b414e996e37b3ddd7469bbbb0deb4601a2171
Reviewed-on: https://dart-review.googlesource.com/63221
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-06-29 17:05:48 +00:00
Sam Rawlins 29dc5fc4c2 doc - Add units info to requestFileSystem docs
Bug: https://github.com/dart-lang/sdk/issues/20008
Change-Id: I7bd846ac546fa53a948e99cf2d054726c6d71692
Reviewed-on: https://dart-review.googlesource.com/61824
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-06-29 16:28:18 +00:00
Zach Anderson 4e04ad50b7 Revert "[dart:io] Adds Socket.startConnect"
This reverts commit eb3becea2c.

Reason for revert: test failures on the bots.

Original change's description:
> [dart:io] Adds Socket.startConnect
> 
> This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484
> 
> This CL adds a startConnect method to Socket types that returns
> a ConnectionTask object that can be cancelled. Cancelling
> a ConnectionTask closes any sockets that were opened for the
> connection attempt that are not yet connected to the host.
> 
> This allows a closing HttpClient to close sockets for pending
> requests whose sockets weren't fully connected yet.
> 
> related https://github.com/flutter/flutter/issues/18617
> 
> Change-Id: I59c761b06e070d555fc514614079930b69c129dd
> Reviewed-on: https://dart-review.googlesource.com/62780
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com

Change-Id: I890d0de7fcde65fec55bfa9bad077c1a3dd13a74
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/62980
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-28 22:42:38 +00:00
Zach Anderson eb3becea2c [dart:io] Adds Socket.startConnect
This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484

This CL adds a startConnect method to Socket types that returns
a ConnectionTask object that can be cancelled. Cancelling
a ConnectionTask closes any sockets that were opened for the
connection attempt that are not yet connected to the host.

This allows a closing HttpClient to close sockets for pending
requests whose sockets weren't fully connected yet.

related https://github.com/flutter/flutter/issues/18617

Change-Id: I59c761b06e070d555fc514614079930b69c129dd
Reviewed-on: https://dart-review.googlesource.com/62780
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-28 21:58:08 +00:00
Zach Anderson 85253708a3 [build] Include kernel-service snapshot in the platform sdk
Needed for next Dart roll into Fuchsia.

Change-Id: Ibc86852f392d1c5b23498f01d2d0b30455036aa5
Reviewed-on: https://dart-review.googlesource.com/62702
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-27 20:55:02 +00:00
Zach Anderson b4a426fa72 [dart:io] Adds HttpClient.connectionTimeout
This is the first part of a two part change for fixing a file
descriptor leak when using HttpClient with a flaky network connection.
There are two ways to use HttpClient. The first way is to allocate
and close an HttpClient for each request. The second way is to allocate
an HttpClient and use it to make several requests. This change
addresses leaks that can happen when using it the second way. A
subsequent change will address leaks that can happen when using it
the first way.

This change adds a field connectionTimeout to HttpClient. Users of
HttpClient can set this field to indicate the `timeout` parameter
that should be passed to calls to {SecureSocket,Socket}.connect() for
new http connections. If the field is not set, the OS default is
used.

related https://github.com/flutter/flutter/issues/18617

Change-Id: I26ae2fce7d28273923d1af697c93d987e3e4a38a
Reviewed-on: https://dart-review.googlesource.com/62484
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-06-27 20:27:08 +00:00
Terry Lucas 723bcbd5f9 Added link to see webdev.dartlang.org
Fixes #30253

TBR=kwalrath@google.com

Change-Id: I4271c6b2ba2bd809153c935f4955a64e6c20a557
Reviewed-on: https://dart-review.googlesource.com/62642
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2018-06-27 19:10:24 +00:00
Lasse R.H. Nielsen b43dc893eb Remove spec references to Symbol constructor.
Change-Id: I3c6fe9d27aad387a55f9a003d94faa6a9a72f227
Reviewed-on: https://dart-review.googlesource.com/44741
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-06-27 13:53:47 +00:00
Sam Rawlins 2876bd08fb Doc - Fix OSError.message and errorCode doc
Bug: https://github.com/dart-lang/sdk/issues/30698
Change-Id: Iae4ed07171862b44d1303fe1ba33a587b04e5aa5
Reviewed-on: https://dart-review.googlesource.com/61981
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-06-25 23:45:33 +00:00
Lasse R.H. Nielsen 2876623654 Check function types in the correct order in runZoned.
A change made it check for a unary function type before a binary, so `(o, [stack])=>...` would not get a stack trace.

Fixes #33589

Bug: http://dartbug.com/33589
Change-Id: I69793eb74501c1f7fe07b6c90115b2f90f4d95df
Reviewed-on: https://dart-review.googlesource.com/61936
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-06-25 19:43:14 +00:00
Terry Lucas 6d25212302 getStats Future should be strongly typed.
TBR=kevmoo@google.com

Change-Id: I4c4a6376f84b346e676245e5984136adfe3074aa
Reviewed-on: https://dart-review.googlesource.com/62128
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2018-06-25 19:25:04 +00:00
Terry Lucas 5721d8af6d - Fixed querySelectoryAll generic syntax to assert if types in list aren't of the same type T.
- Fixes requestFullscreen to call operation webkitRequestFullscreen not requestFullscreen its only available when RuntimeEnabled=FullscreenUnprefixed.

Fixes #21919

R=vsm@google.com

Change-Id: Ib4c4140350d3cef096954e67010f922df9f2310a
Reviewed-on: https://dart-review.googlesource.com/60702
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-25 18:43:54 +00:00
Nate Bosch f598e6933c Drop support for Dart 1 in pub
Closes #33187

Brings in the latest version of pub. There is still an issue with
invaliding old snapshots, but this version works better than the current
synced version.

Change-Id: I5c98b0277ea769baa83c3fee7ebfff2034ba9920
Reviewed-on: https://dart-review.googlesource.com/61983
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-06-23 01:00:05 +00:00
Sam Rawlins 5bfb70ec5b Docs - Update example websockets app; use idiomatic async/await in examples
Bug: https://github.com/dart-lang/sdk/issues/30686
Change-Id: Ie447c2fa095315c3d11972c24cacb67c1729796e
Reviewed-on: https://dart-review.googlesource.com/61915
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-06-22 18:52:45 +00:00
Sam Rawlins 2121c3bb56 Docs - Link to the Random.secure constructor in dartdoc
Bug: https://github.com/dart-lang/sdk/issues/13775
Change-Id: Ia5446bee4d5b068cc0f9f8773261b504bc3807a7
Reviewed-on: https://dart-review.googlesource.com/61740
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-06-21 23:56:13 +00:00
Nate Bosch 1a1ff9e666 Reverse the pub snapshot names
Fixes https://github.com/dart-lang/pub/issues/1931

Pub color output depends on the name of the entrypoint it is running
from, when the entrypoint went from "pub" to "pub2" it confused this
check and we stopped getting colors.

Since the Dart 1 version of the snapshot has a short remaining lifespan
we can switch it to the other name and let "pub" mean Dart 2 and
continue to behave like it used to.

Change-Id: I1851a4c908ffe2222ab5fe6802f4b81a63d7f9f1
Reviewed-on: https://dart-review.googlesource.com/61641
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-06-21 19:52:53 +00:00
Sam Rawlins 69c807c636 Fix docs for async File methods
* "Returns a Future that completes..." is consistent with other File docs.

Bug: https://github.com/dart-lang/sdk/issues/30137
Change-Id: I0418f7cb03325442081319caf4e353db5403e68b
Reviewed-on: https://dart-review.googlesource.com/61483
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-06-21 17:20:13 +00:00
Sam Rawlins 569341cbe0 Improve CompressionOptions docs:
* Don't use the word "sets" on a final (no setter) member.
* Use "its" not "it's"
* Use modern dartdoc syntax
* Use markdown unordered list for `compressionDefault`.
* Use one-sentence first paragraphs.

Bug: https://github.com/dart-lang/sdk/issues/29438
Change-Id: I008c1bd0f32c7760dd64fc45fe4dd99e44498d10
Reviewed-on: https://dart-review.googlesource.com/61482
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-06-21 17:14:33 +00:00
Alexander Aprelev 8d3eb154e9 [vmservice] Report expression compilation errors
Change-Id: I4209321f1ae69e1e411c642a905861e4e561836c
Reviewed-on: https://dart-review.googlesource.com/61402
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-20 22:46:12 +00:00
Johnni Winther 1c4b362ba5 Support noSuchMethod forwarders in dart2js
Closes #32750

Change-Id: Ib2f358b14ae5a079e3df8413013ecfc006f0e69b
Reviewed-on: https://dart-review.googlesource.com/60250
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-20 10:15:41 +00:00
Terry Lucas 7979232580 Re-added header, only needed to remove the other resource section.
TBR=kevmoo@google.com

Change-Id: If40536e17cdc40e76c2870cfacbac64e06d1145a
Reviewed-on: https://dart-review.googlesource.com/60941
Reviewed-by: Terry Lucas <terry@google.com>
2018-06-19 13:56:23 +00:00
asiva bc7220a4fd [VM] Turn dart2 on by default on the command line VM
- make Dart2 the default option for the command line VM
- add option --no-preview-dart-2 as a fallback option to run dart1
- change test scripts to use the executable dart for testing dart2 mode instead of
pkg/vm/tool/dart2
- adjust numerous build and test configurations

Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7
Reviewed-on: https://dart-review.googlesource.com/58240
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-18 22:31:32 +00:00
Terry Lucas 8fedfc7f8c Removed DomName, DosEditable, and experimental annoations they are unused.
R=kevmoo@google.com,vsm@google.com

Fixes #32304

Change-Id: Ia2c8f99f0125c4d4bd0f95a792ff2af8a58e3599
Reviewed-on: https://dart-review.googlesource.com/60400
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-06-18 18:48:03 +00:00
Alexander Aprelev 4c9689c1d2 [vm] Support pluggable expression compiler for evaluate service api call.
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/57520, which added expression compiler support for EvaluateInFrame

Bug: dartbug.com/31981
Change-Id: I19e6b654698d5b032a276c9cb3634324f4f1ad37
Reviewed-on: https://dart-review.googlesource.com/58660
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-18 15:50:02 +00:00
Lasse R.H. Nielsen 060ee6769e Make CastStreamSubscription.onData handle a null callback
Fixes #33166

Bug: http://dartbug/com/33166
Change-Id: If2f0f714b96ce592936d3298bb5d84732d34f69b
Reviewed-on: https://dart-review.googlesource.com/56101
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-18 13:24:17 +00:00
Lasse R.H. Nielsen 87131780cb Add appendix to spec which specifies JavaScript integer behavior.
Also update the `int` class documentation.

Change-Id: I2de6c62aa9642c18134effa8187a12902d5f2259
Reviewed-on: https://dart-review.googlesource.com/58204
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-18 11:17:57 +00:00
Johnni Winther f59389b688 Optimize .runtimeType impact based on usage
Change-Id: If6c24d4115241dcb8ac2ed82eee58c4025e3d8e2
Reviewed-on: https://dart-review.googlesource.com/59090
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-15 19:51:14 +00:00
Terry Lucas dd8988c9b2 - Moved all WebGL rendering/drawing constants to synthesized class WebGL.
- Removed obsolete Dartium/_blink code.

R=kevmoo@google.com

Change-Id: I81a6f0d5bfe33592ff8ae9c85db9266e898c2861
Reviewed-on: https://dart-review.googlesource.com/60380
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-06-15 17:08:54 +00:00
Jacob MacDonald 541dd195bb Enable creating full kernel files in addition to outlines from the bazel worker for kernel.
Change-Id: I2dc5ef10046fd210a1a7cd7db44a22fc47654e17
Reviewed-on: https://dart-review.googlesource.com/58920
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-06-15 16:24:24 +00:00
Terry Lucas f479435bca - Removed custom handling of fill - it was wrong the method is now overloaded.
- Associate the JS class SpeechSyntesisVoice with the correct Dart class (DDC).
- Top-level querySelectorAll wasn't generic.
- Handle "static" for attributes in the IDLs.

Fixes #33147
Fixes #33178
Fixes #31886
Fixes #20585

R=vsm@google.com

Change-Id: Ic75a2bfc66670b72342269be259408b610547dab
Reviewed-on: https://dart-review.googlesource.com/59240
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-15 02:25:13 +00:00
Terry Lucas eea2dff20d Added support for members of type Promise.
Fixes #31046

R=sra@google.com

Change-Id: Id1e8d415b91a842bd8e2f50c6064c24aaaed9d98
Reviewed-on: https://dart-review.googlesource.com/59460
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2018-06-13 18:20:53 +00:00
Mike Fairhurst 7911fb2683 First pass at disabling packages/ dir, packageRoot
Change-Id: Ib2d7738c84cd1258dcad46e8e2c8da8105efea60
Reviewed-on: https://dart-review.googlesource.com/59100
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-06-12 19:38:40 +00:00
Samir Jindel beb0432d6c Re-land "[vm/kernel/aot] Exclude vmservice_io from "product" AOT snapshots."
This reverts commit 17585c42fe.

The original revision is in Patchset 1.

Fixed Tests:

python tools/test.py -m debug -c dartkp -r dart_precompiled --strong standalone_2/no_support_service_test
python tools/test.py -m product -c precompiler -r dart_precompiled lib_2/isolate/function_send1_test

Change-Id: I6af715ee3c080b515c8312357f3d8be6e494747a
Reviewed-on: https://dart-review.googlesource.com/59760
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-12 15:31:19 +00:00
Régis Crelier 87a46b8bee [VM Bigint] Fix _convert() of classic reduction for negative Bigint (fixes #33405).
Add regression test in existing bigint test.


Change-Id: I3dd0cc24ef19531dd16c89b4565f687a7b2b46bd
Reviewed-on: https://dart-review.googlesource.com/59820
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-06-12 15:12:00 +00:00
Lasse R.H. Nielsen 0b91676362 Remove the retype method.
See #33075.

Bug: http://dartbug.com/33075
Change-Id: I1ee2f587afbc672dd08ac61ac003bbdc85bb95e2
Reviewed-on: https://dart-review.googlesource.com/59091
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-12 14:36:09 +00:00
Johnni Winther e7ad806bf1 Provide default type variable bounds on inlining.
+ use the 'any' type to avoid failing on bounds with type variables, which we currently don't support.

Change-Id: I57d74d17fa9eee598bd86c8e76790778438cddfd
Reviewed-on: https://dart-review.googlesource.com/59540
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-06-12 09:05:09 +00:00
Stephen Adams 1fb845c2f4 [dart2js] Apply stub should default type parameters
Change-Id: Ie01ade9b6e561a96a3ac06bf13617bb679122c63
Reviewed-on: https://dart-review.googlesource.com/59020
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-06-12 01:10:39 +00:00
Ryan Macnak 86db7810ba [build] Declare dependency of the version strings on the current Git commit.
Add fake Git reflog to Debian source tarball.

Bug: https://github.com/flutter/flutter/issues/15348
Bug: https://github.com/dart-lang/sdk/issues/32614
Change-Id: Ib4104a98cf245ee11285a37d5eee3165ca656645
Reviewed-on: https://dart-review.googlesource.com/48091
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-11 18:22:09 +00:00
Terry Lucas f4386ed488 Fix type error in MultiElementCssClassSet constructor.
Fixes #29901

R=sra@google.com

Change-Id: Idfa1dee3d243ed34c3ca8d1225404143a28746e8
Reviewed-on: https://dart-review.googlesource.com/59340
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2018-06-08 17:47:32 +00:00
Kevin Moore a3c209d53b dart:js_util: add bool return type to instanceof and hasProperty
Change-Id: Ib3f52a42a25d3a14089a7aa7d74c206603eed80d
Reviewed-on: https://dart-review.googlesource.com/59280
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-06-08 01:37:03 +00:00
Alexander Markov 17585c42fe Revert "[vm/kernel/aot] Exclude vmservice_io from "product" AOT snapshots."
This reverts commit 23fff58503.

Reason: failures on vm-kernel-precomp-linux-debug-x64-4-8-be,
precomp-linux-debug-x64-1-3-be, precomp-linux-product-x64-be bots.
Change-Id: I7bd67038aac3795c4b6ec9562c6fd4afead41a36
Reviewed-on: https://dart-review.googlesource.com/59242
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-08 00:51:53 +00:00
Samir Jindel 23fff58503 [vm/kernel/aot] Exclude vmservice_io from "product" AOT snapshots.
The `@pragma` annotation on `vmservice_io.main` is modified to only mark it as a
root on non-product builds. Since the annotation is evaluated in the constant
transformation, we need to thread a flag through `gen_kernel.dart` indicating
whether the Kernel produced should target a product precompiler.

# Test Plan

Tested locally on Flutter. Unfortunately it's not possible to test the scenario where
`vmservice_io` is not included, since we don't have any "product" bots. Soon the
flag will be introduced into Flutter, and we will have some coverage from there.

Change-Id: I39f12343038fa221aafe5a55241bff4b8d14ec19
Reviewed-on: https://dart-review.googlesource.com/57501
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-07 20:22:21 +00:00
Zach Anderson 87b5112d5b [dart:_http] Adds Dart-styled constants
Change-Id: I42e0c02b3aac7f952c5346bbcddd50293bf2b5b8
Reviewed-on: https://dart-review.googlesource.com/58620
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-07 16:18:33 +00:00
Devon Carew 50b610cc9c Add a 'Core' category for doc generation.
Change-Id: I56b6b20935f5d543ccf3b9546191203096ed1c47
Reviewed-on: https://dart-review.googlesource.com/58880
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-07 14:47:41 +00:00
Lasse R.H. Nielsen b9381d3378 Fix strong-mode bug in dart2js ConstantMap.from.
Fixes 33371.

Bug: http://dartbug.com/33371
Change-Id: I57eeeb2a0eca198c76c3470706648110da45775b
Reviewed-on: https://dart-review.googlesource.com/59082
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-06-07 12:31:50 +00:00
Terry Lucas 5ec940a2e0 Updated to expose APIs promiseToFuture calls for users.
Fixes #33226

R=kevmoo@google.com, sra@google.com

Change-Id: I04995b33e9445d0fcef8d874315f14fd272018d1
Reviewed-on: https://dart-review.googlesource.com/57482
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-06-07 01:40:22 +00:00
Stephen Adams 8421e69fbb [js_runtime] Make _checkLength more likely to be inlined
Rewrite _checkLength to avoid weaknesses in type inference.

Change-Id: I1a254d021ff966fa51da7f8258c5cba7b3b10336
Reviewed-on: https://dart-review.googlesource.com/58542
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-06-05 19:03:26 +00:00
Alexander Aprelev a5e41681e5 Add support for expression compilation via service.
If there is registered expression compiler, VM debugger uses it to compile expressions. Otherwise, it will fallback to use kernel service compiler.
This is needed to support Flutter use case where compiler is running on developer's host machine, not on the device where VM is running.

Bug: dartbug.com/31981
Change-Id: I8bdfc8ab45a57c306169abe189f1e24e1b0bcf40
Reviewed-on: https://dart-review.googlesource.com/57520
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-05 04:16:39 +00:00
Alexander Markov c3b5939965 [vm] Remove --limit-ints-to-64-bits option and old _Bigint class
Closes https://github.com/dart-lang/sdk/issues/33306

Change-Id: I7088d8b7143edbe24f5cefe4be037ad2006e0625
Reviewed-on: https://dart-review.googlesource.com/58101
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 20:10:40 +00:00
Martin Kustermann 1fe279d859 Fix _FutureListener.handleError() to use explicit type for Zone.runBinary
Change-Id: I1606b0039a535e5fd65e76848a2743b6d27a3dc0
Reviewed-on: https://dart-review.googlesource.com/58209
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-06-04 13:17:54 +00:00
Stephen Adams 56424f08a8 [js_runtime] Test for JavaScriptFunction type tests.
- Add test for JavaScriptFunction type tests
- Make toString() for JavaScriptFunction more explicit.

Change-Id: I60042b909709c822c924336fd4973f35dc7f779a
Reviewed-on: https://dart-review.googlesource.com/58062
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-02 00:40:24 +00:00
Stephen Adams 312f02532a [js_runtime] JavaScriptFunction matches any Dart function type
Change-Id: Ib9ce3658c06cef15e2b57d5585a2bae51d69586e
Reviewed-on: https://dart-review.googlesource.com/57720
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-06-01 19:57:54 +00:00
Lasse R.H. Nielsen 315a186dc4 Better test error handler argument types.
Change-Id: I460a40dc9db096f3ae95602ba9c8dc86b4576c56
Reviewed-on: https://dart-review.googlesource.com/53208
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-01 12:26:37 +00:00
Emily Fortuna 483c42b899 Switch dart2js to use dart 2 vm.
Change-Id: I39e807e10f53f647414d4e419b9f3ef3862bd651
Reviewed-on: https://dart-review.googlesource.com/57440
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-31 19:44:36 +00:00
Jenny Messerly a1f6aa8a3b improve speed of dartdevk SDK and ddc test package summary build
Renames the target to dartdevk_sdk (to match dartdevc_sdk), and switches
dartdevk_sdk and dartdevc_test_pkg to use prebuilt_dart_action.

Change-Id: Ib31c85c46743a005bb95cf888055a4d093ffe07f
Reviewed-on: https://dart-review.googlesource.com/57481
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-05-30 21:14:01 +00:00
Janice Collins 753d95453c Move to dartdoc 0.20.0 and enable preview-dart-2.
Change-Id: I8e1b7957a416644b8c7d02bee60c248e6c6d9827
Reviewed-on: https://dart-review.googlesource.com/57444
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2018-05-30 19:08:41 +00:00
Emily Fortuna e7bad54986 Make dart2js only run with 64 bit ints, not the larger ints from the vm.
Change-Id: I03887a0af963f1a8f68acff0428635fc130687f5
Reviewed-on: https://dart-review.googlesource.com/57041
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-30 17:21:49 +00:00
Jingjie Y. ??? 88127f10e4 Clean up num#toStringAsPrecision docs
Closes #32895
https://github.com/dart-lang/sdk/pull/32895

GitOrigin-RevId: a628456dcaebb200a2f1e3022169197a6b7d1248
Change-Id: I8bc0edb17d6aa713717954a5e592e64805246574
Reviewed-on: https://dart-review.googlesource.com/51280
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-05-30 13:38:18 +00:00
Ryan Macnak c30af41b96 Reapply "[mirrors] Add IsolateMirror.loadUri."
- Forward only kImportTag requests to DFE. This restores the current handling of a kScriptTag request when loading the kernel isolate in the simulators.
 - Mark dynamic_load_test as failing in the reload stress tests (reload fails to preserve library identity).

Change-Id: Ibe6f0a3505b99736a38d566abf3b2151505d7a7e
Reviewed-on: https://dart-review.googlesource.com/56706
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-29 22:01:01 +00:00
Johnni Winther 6b7f3d5f54 Share non-generic signatures through init.types
Change-Id: Ie132bbe805780022c91e5578c8dc4636c3c4cc8b
Reviewed-on: https://dart-review.googlesource.com/56671
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-28 07:40:24 +00:00
Vijay Menon 30ad3f66ce Set DDK to run on Dart-2 VM
Change-Id: I0c0558996c5d6d6c739ded5e5c8b2554a4cd7b04
Reviewed-on: https://dart-review.googlesource.com/53320
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-05-24 21:51:25 +00:00
Ryan Macnak de545b4079 Revert "[mirrors] Add IsolateMirror.loadUri."
This reverts commit ad4cfa0260.

Reason for revert: Assertion failures on DBC

Original change's description:
> [mirrors] Add IsolateMirror.loadUri.
> 
> This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
> 
> Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
> Reviewed-on: https://dart-review.googlesource.com/45363
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com,kmillikin@google.com

Change-Id: I80669188b9f40b3b527e8e268ade0d0d514a8753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-24 20:03:40 +00:00
Ryan Macnak ad4cfa0260 [mirrors] Add IsolateMirror.loadUri.
This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.

Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
Reviewed-on: https://dart-review.googlesource.com/45363
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-24 17:07:15 +00:00
Ben Konyi 3ab7cf0590 Revert "[dart:io] Revert recent non-utf8 path handling"
This reverts commit 42bcdcd332.

Change-Id: I11fb7db2aac3b7dc15cb35a22fea38b31069cbc0
Reviewed-on: https://dart-review.googlesource.com/55502
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-23 21:01:44 +00:00
Bob Nystrom 7c59fe6332 Flip dartfmt to run in Dart 2 mode.
Change-Id: I245dce2510ccf99cd443b4d27828790dabe54e8a
Reviewed-on: https://dart-review.googlesource.com/56283
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-05-23 20:45:03 +00:00
Terry Lucas cf87b84f7d Support Promise to Future for both DDC and dart2js.
APIs in the newer Chrome IDLs support more JS style promises. The Dart web libraries now hookup those promises and return a Dart Future.
Additionally, a new type maplike is exposed in the IDL this is exposed too.

Change-Id: I44175877eb95f4d910586d42c0139fb182483f82
Reviewed-on: https://dart-review.googlesource.com/49800
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-23 04:08:14 +00:00
Stephen Adams 3ccd5a06f5 [js_runtime] Fix for 'o is FutureOr<T>' with function type T
Change-Id: I0533d565f7edf87ea9ac45e56e1e192658ec5849
Reviewed-on: https://dart-review.googlesource.com/55982
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-22 16:43:54 +00:00
Leaf Petersen 580e486386 Make CastStreamSubscription.onData handle a null callback
Fixes #33166

Change-Id: I52e8bcb6c782c84e8a474b0fc40ada24f31bf602
Reviewed-on: https://dart-review.googlesource.com/55984
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-05-22 16:24:57 +00:00