Commit graph

8356 commits

Author SHA1 Message Date
Terry Lucas 0af98266ab Revert "Updated PYTHON code to correctly generate web_sql and re-wrote/re-enabled async web_sql test."
This reverts commit 0c8294e4a0.

Bug:
Change-Id: Idb35c64fd5365f2669e8aff45765fed74e0f0766
Reviewed-on: https://dart-review.googlesource.com/31440
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2017-12-23 01:59:38 +00:00
Terry Lucas 0c8294e4a0 Updated PYTHON code to correctly generate web_sql and re-wrote/re-enabled async web_sql test.
R=alanknight@google.com,vsm@google.com

Change-Id: I80e82f5aaa3c9748740031d8da139f79e2c0ab70
Reviewed-on: https://dart-review.googlesource.com/31080
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2017-12-22 22:57:34 +00:00
Roland McGrath f3581accf2 [GN] In Fuchsia build, use symlink for host dart-sdk/bin/dart copy
This solves some arcane issues with Fuchsia's GN complexities,
explained further in the comments.  It obviates "copy_dylibs".

Change-Id: If1b26bfa73d5167550d2217258fa074b9dacade9
Reviewed-on: https://dart-review.googlesource.com/30924
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-21 19:34:41 +00:00
Sigmund Cherem 22298629e8 Add unstable API for bazel summary worker and move the actual worker out of package:front-end
Bug:
Change-Id: I0a64d3de46ef55e8185e723d6111fa315ad286ca
Reviewed-on: https://dart-review.googlesource.com/30621
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2017-12-21 19:09:11 +00:00
Ryan Macnak 9f4ffb64ef Partial static mode changes for vm-service and tests (part 2).
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: Ie2605f5043b9f5d2f9156928e3cd39f74e726853
Reviewed-on: https://dart-review.googlesource.com/30681
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-20 00:45:28 +00:00
Sigmund Cherem b280922064 Fix patch location for isolate library
Change-Id: Ie1f0913eb61dfd77e73d483fd48f235c58ded523
Reviewed-on: https://dart-review.googlesource.com/30626
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-20 00:15:43 +00:00
Ryan Macnak d528e1651f Reapply "Misc "strong" mode fixes for dart:io."
Remove changes to Socket.flush and Socket.done.

Split socket_test and socket_exceptions_test so we can minimize suppressions.

Bug: https://github.com/dart-lang/sdk/issues/31587
Bug: https://github.com/dart-lang/sdk/issues/31685
Bug: https://github.com/dart-lang/sdk/issues/27453
Change-Id: I3c44223480554f57d66be048c0361f6d0c699be2
Reviewed-on: https://dart-review.googlesource.com/30389
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-19 21:41:47 +00:00
Sigmund Cherem 414bad86df Directly create dart2js platform files using its patch files
Change-Id: I1c7d59968bfafeeb5a8b5252fa2d47e3c05b893e
Reviewed-on: https://dart-review.googlesource.com/27404
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-12-19 20:31:57 +00:00
Zachary Anderson 3cd62c4b74 [dart:core] Adds @Provisional annotation
@Experimental is already defined in dart:html. Adding the same
annotation to dart:core breaks the build. Removing the annotation from
dart:html and adding it to dart:core is a breaking change, e.g.
if someone has said "import 'dart:html' show Experimental".

This annotation is for use in the upcoming dart:standalone with
the waitFor(Future f) function:

https://dart-review.googlesource.com/c/sdk/+/29449
Change-Id: Iea2f537a2ae89a6097c4284084a2a168e833bb04
Reviewed-on: https://dart-review.googlesource.com/30261
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-12-19 19:00:22 +00:00
Ryan Macnak a51b45870c Revert "Misc "strong" mode fixes for dart:io."
This reverts commit c6f1ce24f3.

Reason for revert: standalone_2/io/socket_exception_test failing

Original change's description:
> Misc "strong" mode fixes for dart:io.
> 
> Bug: https://github.com/dart-lang/sdk/issues/31587
> Change-Id: I032be8e25aa8d6a851f0bf00ec12b1a3578308c6
> Reviewed-on: https://dart-review.googlesource.com/30080
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I9af0570577009b54e3a43f083008d65c4c3f9ba3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31587
Reviewed-on: https://dart-review.googlesource.com/30420
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-19 00:04:10 +00:00
Zachary Anderson 971a15795e [dart:io] Allow setting overrides in the root Zone
Otherwise there is no way to install overrides that affect the whole
program.

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

Change-Id: I905b7067e79f11051e8204ebb296915d495fd13f
Reviewed-on: https://dart-review.googlesource.com/30100
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-18 22:46:07 +00:00
Ryan Macnak c6f1ce24f3 Misc "strong" mode fixes for dart:io.
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I032be8e25aa8d6a851f0bf00ec12b1a3578308c6
Reviewed-on: https://dart-review.googlesource.com/30080
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-18 22:15:06 +00:00
Vyacheslav Egorov b2eab8b96e [VM/Service] Restore zero-copying handling of JSON messages in vmservice.
In 5a44162c97 in attempt to adhere to declared
method signatures we lost zero-copying JSON decoding of responses from
VM: `Message.sendToVM` was changed to always decode the response into
string before passing it to the caller and the logic to use fused
JSON decoding was removed. This increased peak memory consumption by
the VM Service.

This commit addresses the issue by restoring the zero-copying JSON decoding
logic while adding a wrapper around responses that make it clear what kind
of data is passed around and how that data is encoded and handled.

We introduce a class `Response` which can contain either a Dart string, a
binary data (represented as a Uint8List) or utf8 encoded string (represented
as a Uint8List). This class is used in all places where previously a String
or dynamic were used, e.g. MessageRouter.routeRequest is changed to return
Future<Response> rather than Future<String>. This allows callees to
decode JSON responses without copying them into Dart heap while
maintaining sufficient level of typing to make the code easy to reason about.

This commit also removes some dead code from the VM service related to old
Service API and TAR assets unpacking (which has been long done in C++).

Bug: https://github.com/flutter/flutter/issues/13626
Change-Id: Ifbba56944a552034a0f802a965a313326a1236e7
Reviewed-on: https://dart-review.googlesource.com/30280
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-12-18 19:06:06 +00:00
Sam Rawlins eaa6790ef2 Clean up HttpClient docs
In particular, fix typos, and update many comments to begin with a one-sentence
summary, for better readability at api.dartlang.org.

Fixes #31608, #29460, #31538, #31449, #31505

Bug: https://github.com/dart-lang/sdk/issues/31608
Bug: https://github.com/dart-lang/sdk/issues/29460
Bug: https://github.com/dart-lang/sdk/issues/31538
Bug: https://github.com/dart-lang/sdk/issues/31449
Bug: https://github.com/dart-lang/sdk/issues/31505
Change-Id: If00726ef3636479f0613c91e48ff9f0e24b12502
Reviewed-on: https://dart-review.googlesource.com/30120
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-12-18 18:50:46 +00:00
Paul Berry 2822fbadea Fix the interface definition for Socket.close and Socket.done.
These members were defined as returning Future<Socket>, but the
implementation in _Socket didn't conform to the interface.  There's no
reason these members need to return Future<Socket> anyway, so just
change them to return Future<dynamic>.

Avoids a strong mode error in socket_patch.dart.

Change-Id: Icdda5c7880daf0241e36f1d35e61d171f1694409
Reviewed-on: https://dart-review.googlesource.com/29741
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-15 16:16:14 +00:00
Ryan Macnak 5554382135 Get a better stack trace from conversion errors in File.readAsString.
Bug: https://github.com/dart-lang/sdk/issues/31619
Change-Id: I79ae0337e35c8dd44aeff0613edaad620e82848e
Reviewed-on: https://dart-review.googlesource.com/29447
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-15 01:36:02 +00:00
Vijay Menon e0f5891850 Merge ddc type fixes to html_common
Change-Id: If8583c824989c9729ae2c29c718a514f24be0d2d
Reviewed-on: https://dart-review.googlesource.com/26840
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-12-14 22:04:05 +00:00
Terry Lucas bfea069823 Test possible keyevent fix.
Change-Id: I3f90979fad2681775cae56d499f3ff5968ea6485
Reviewed-on: https://dart-review.googlesource.com/29545
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2017-12-14 21:22:39 +00:00
Terry Lucas 642b768e87 Fixed default parameter messagePorts for MessageEvent factory.
R=vsm@google.com

Change-Id: Ic94ccbe4c29302e44c58791658ce75dff86d9ac2
Reviewed-on: https://dart-review.googlesource.com/29544
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-12-14 18:21:25 +00:00
Florian Loitsch 1a61b425d1 Reland BigInt class.
Moved `parseRadix` into a separate test where it doesn't do 10 iterations.
This reverts commit ab4061471b.

Change-Id: Ie48216c2f4f077dc86f915a54021c39706c432e8
Reviewed-on: https://dart-review.googlesource.com/29593
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2017-12-14 15:44:15 +00:00
Florian Loitsch f3e845cf48 Revert "Reland: [dart:io] Adds waitForEventSync"
This reverts commit 3ea5e13ad7.

Change-Id: Ic9fae69f3b7ef6e41aac3c7ebca3e1d288dbffb1
Reviewed-on: https://dart-review.googlesource.com/29589
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-12-14 14:10:45 +00:00
pq ab4061471b Revert "Add BigInt class." [TBR].
This reverts commit f189bb57a4.

Bug:
Change-Id: I7b1cc4ab69adb5142ff7b5abd563d3bf7371ebb9
Reviewed-on: https://dart-review.googlesource.com/29442
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2017-12-13 21:12:02 +00:00
Florian Loitsch f189bb57a4 Add BigInt class.
Change-Id: I6e7fed3913cdb8e69ea15f0c69e060cccd91a356
Reviewed-on: https://dart-review.googlesource.com/9820
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-12-13 18:23:51 +00:00
Terry Lucas 529add3834 DDC fix to expose classes which are only created inside of the browser.
R=vsm@google.com

Change-Id: I27ede73ac84a72ee9b5e8b3b0a706ade82b2aa59
Reviewed-on: https://dart-review.googlesource.com/25500
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-12-13 03:03:09 +00:00
Zachary Anderson 3ea5e13ad7 Reland: [dart:io] Adds waitForEventSync
The only fix needed for relanding is adding _ensureScheduleImmediate
to the list of vm entrypoints in //runtime/vm/compiler/aot/precompiler.cc

Original commit message:

Adds a top-level call waitForEventSync to dart:io that blocks the
thread an Isolate is running on until messages are available.
Before the thread blocks, the microtask queue is drained.
Before waitForEventSync returns, all messages are handled.

Lifting this up from a comment:

This is apropos of the request that nweiz@ sent to the mailing list a
couple weeks back. I'm not sure we should land this. We certainly
shouldn't land it without some annotations that will make the analyzer
complain a lot in most configurations, but I don't know what those
annotations are.

fixes #31102

Change-Id: Id96de46cc5f10e1847045cfafb7cfed6a38bce16
Reviewed-on: https://dart-review.googlesource.com/28920
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-12 23:16:50 +00:00
Natalie Weizenbaum acdd2adbdf Make sure that _StreamSinkImpl._isBound is kept up-to-date
There were two situations where this could get into a bad state:

* If the sink already had an error, _isBound would be set to true and
  never unset. This is fixed by not setting it at all if an error
  already exists.

* If _controllerCompleter completed to an error, _isBound would never
  get set back to false. This is fixed by refactoring the code so that
  the appropriate whenComplete() is always run.

Change-Id: Ia511fa3e2345213ff8e56dc4fae6f397b84257d1
Reviewed-on: https://dart-review.googlesource.com/26981
Commit-Queue: Natalie Weizenbaum <nweiz@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-12-12 22:41:29 +00:00
Zach Anderson 9d8e6453d2 Revert "[dart:io] Adds waitForEventSync"
This reverts commit 2aed87a133.

Reverting for failures on precompiled bots.

Change-Id: I758bfc72d8f5e67b0e5e12a7367a47f1df9364e2
Reviewed-on: https://dart-review.googlesource.com/28900
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-12 21:05:01 +00:00
Zachary Anderson 2aed87a133 [dart:io] Adds waitForEventSync
Adds a top-level call waitForEventSync to dart:io that blocks the
thread an Isolate is running on until messages are available.
Before the thread blocks, the microtask queue is drained.
Before waitForEventSync returns, all messages are handled.

Lifting this up from a comment:

This is apropos of the request that nweiz@ sent to the mailing list a
couple weeks back. I'm not sure we should land this. We certainly
shouldn't land it without some annotations that will make the analyzer
complain a lot in most configurations, but I don't know what those
annotations are.

Change-Id: If8286f4525994a162dd4f4563fefccb9d0984f7c
Reviewed-on: https://dart-review.googlesource.com/25281
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-12 19:12:58 +00:00
Bob Nystrom 650c9dcc8e Support extractTypeArguments() in 1.0 mode on the VM and dart2js.
Without strong mode, a "good enough" implementation is to simply call
the generic method with "dynamic" for the type arguments, which is what
this does. That should be enough to unblock our internal users.

We also need to not report a compile error when
dart_internal/extract_type_arguments.dart imports the hidden
"dart:_internal" library.

This patch does both of those for the VM and dart2js (using its old
front end).

Note that the test still fails because the test is more particular than
most actual user code would be -- it validates that the instantiated
type arguments are *exactly* correct, and not that the returned object
is merely subtype compatible.

Bug:
Change-Id: I0343beace4991861b29712b3fd7067ec8dc8f8ba
Reviewed-on: https://dart-review.googlesource.com/28020
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-12 19:04:18 +00:00
Vyacheslav Egorov 5a44162c97 [vm] Fix incorrect override in vmservice source
VMService.routeRequest of type Future Function(Message) overrides
MessageRouter.routeRequest of type Future<String> Function(Message).

It not enough to just fix VMService.routeRequest's return type because
Message.sendToVM() violates its type signature: it declares to
return Future<String> but in reality it returns Future<dynamic>
which can complete with either String or List. This CL addresses
this issue as well.

Bug:
Change-Id: I8240113d3e13d67c4e9a59db4250132a2077a4ec
Reviewed-on: https://dart-review.googlesource.com/26701
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2017-12-12 18:54:58 +00:00
Karl Klose 7b2678bd17 Fix paths in sdk/bin/dartdevk.bat
R=jensj@google.com

Change-Id: I3690674bf334f257b78916b88813d220330c72af
Reviewed-on: https://dart-review.googlesource.com/27761
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2017-12-12 06:51:27 +00:00
Paul Berry ba2417fdc0 Fix SDK errors due to inconsistent inheritance of Operator==.
The informal spec for strong mode top level inference
(https://github.com/dart-lang/sdk/pull/28218) says "If there are
multiple overridden/implemented methods, and any two of them have
non-equal types (declared or inferred) for a parameter position which
is being inferred for the overriding method, it is an error."

This CL fixes several SDK errors that arise from this rule.  For
example, the classes _Closure, Function, and Object contained members
declared as follows:

    class _Closure implements Function {
      bool operator ==(other) ...
    }
    class Function {
      bool operator ==(Object other) ...
    }
    class Object {
      bool operator ==(other) ...
    }

The type of Object's operator == was (dynamic) -> bool; the type of
Function's operator == was (Object) -> bool; therefore the type of
_Closure's operator == (which overrides both, since _Closure extends
Object and implements Function) cannot be inferred and must be
specified.

A similar situation exists for _Double and _IntegerImplementation
(both implement num, which declares operator == to have type (Object)
-> bool), and _Uri (which implements Uri, which declares operator ==
to have type (Object) -> bool).

This CL fixes the error by specifying the type explicitly in the
classes _Closure, _Double, _IntegerImplementation, and _Uri.

Change-Id: I91f7ceef8549399d438ba4be8c408493b3f338db
Reviewed-on: https://dart-review.googlesource.com/28100
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-11 13:02:19 +00:00
Zachary Anderson 9344c79eff [dart:io] Allow the embedder to override Platform.localeName
We don't have a good place to pull this from on Android, but the
Flutter engine gets notifications when it is updated, etc., so don't
cache the value, and let the embedder supply a closure.

fixes #29211

Change-Id: I18e322fffb5212d9dbe154bc8628f817ba070237
Reviewed-on: https://dart-review.googlesource.com/27924
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-08 22:58:30 +00:00
Bob Nystrom 03c8767f73 Here's a start at exposing an API to address https://github.com/dart-lang/sdk/issues/31371.
There is no actual implementation here yet (that's your job :) ), but there is:

- An external method in dart:_internal, extractTypeArguments().
- Empty patch methods for that for the VM, dart2js, and DDC. These need to have implementations
  filled in.
- A "dart_internal" package to expose a subset of the API. It gives you:

    extractListTypeArgument()
    extractMapTypeArguments()

  We'll bring this into Google, but not publish it externally unless we find we really need to.
- A test for the behavior. It probably has bugs since I can't run it.

See: https://github.com/dart-lang/sdk/issues/31371
Change-Id: I7d9f9a3a36f8e8be106440375c80d584898c83cb
Reviewed-on: https://dart-review.googlesource.com/26467
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-12-08 21:57:00 +00:00
Jens Johansen 83057c42b1 Run dartdevk tests on Windows too
Attempt #4 at making Windows bot happy

Bug:
Change-Id: I6101851787ba956fc14f28130ac6b73bfa38b2a3
Reviewed-on: https://dart-review.googlesource.com/27723
Reviewed-by: Jens Johansen <jensj@google.com>
2017-12-08 13:34:09 +00:00
Jens Johansen 6e3d94ab1a Revert "Run dartdevk tests on Windows too"
This reverts commit 125d704a6e.

Reason for revert: Seemingly still looks for .packages in wrong place.

Original change's description:
> Run dartdevk tests on Windows too
> 
> Attempt #3 at making Windows bot happy
> 
> Bug:
> Change-Id: Iae01ddc20167eed00387bc7075fd3272665ed76a
> Reviewed-on: https://dart-review.googlesource.com/27680
> Reviewed-by: Jens Johansen <jensj@google.com>

TBR=jensj@google.com,kmillikin@google.com

Change-Id: If8f13daf50343f0347fd7b9c218227154a766306
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/27700
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-12-08 13:02:52 +00:00
Jens Johansen 125d704a6e Run dartdevk tests on Windows too
Attempt #3 at making Windows bot happy

Bug:
Change-Id: Iae01ddc20167eed00387bc7075fd3272665ed76a
Reviewed-on: https://dart-review.googlesource.com/27680
Reviewed-by: Jens Johansen <jensj@google.com>
2017-12-08 12:40:28 +00:00
Vijay Menon c2d67fc39e Fix type error in html_common
My merge CL is breaking in dart2js.  Landing this minimal fix while I look at that.

Bug:
Change-Id: Ie0b17c9643e3ea7e788ff02ca3beef58fe3c3903
Reviewed-on: https://dart-review.googlesource.com/27060
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-12-07 03:45:30 +00:00
Vijay Menon b8cd835bb9 Workaround CFE instantiate-to-bounds bug
This avoids #31566 for now.

Change-Id: I5f2ea0cf0ad15a534c1c62182bdca36fc3b0b103
Reviewed-on: https://dart-review.googlesource.com/26760
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-12-06 21:34:11 +00:00
Leaf Petersen 8f199377fa Remove generic method comment syntax from dart:html.
This removes the last uses of the generic method comment syntax from
the SDK.  There are no additional explicit casts or reified generics
(other than those implied by reifying generic methods) in this CL.

Bug:
Change-Id: Icae23cac60869243cb3ba441f86d70422f68178f
Reviewed-on: https://dart-review.googlesource.com/26081
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2017-12-06 21:26:04 +00:00
Leaf Petersen faa4ff9408 Type on printToZone, and startRootIsolate fix.
Put a precise type on the printToZone variable, and change entry
calls in startRootIsolate to avoid casting arguments to Null.


Bug:
Change-Id: Ia7d23e8dafa93bd6246ec7fa9b8c14411db30421
Reviewed-on: https://dart-review.googlesource.com/18683
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-12-04 22:57:04 +00:00
Karl Klose 2a1d5ce963 Fix dartedvk script paths for Windows
Change-Id: I0fa243203ea36ecd7ad31c55f71a6a34df54ef98
Reviewed-on: https://dart-review.googlesource.com/25242
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2017-12-04 13:32:14 +00:00
Lasse Reichstein Holst Nielsen 757d806b36 Add type parameter to Isolate.spawn.
This is a strong mode migration that was missed in the earlier rounds.
It allows use of functions that have a more restricted argument type than Object in strong mode
while still ensuring that the argument has a correct type.

Change-Id: Ib00e3f4b4a679c003a992d674c36ef672729b22e
Reviewed-on: https://dart-review.googlesource.com/24540
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-12-04 07:11:44 +00:00
Paul Berry 316f2b429f Strong mode fixes to DDC SDK
Change-Id: I40508c686014f28772109fdfd10c68b986b40be6
Reviewed-on: https://dart-review.googlesource.com/25140
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-01 19:58:07 +00:00
Leaf Petersen be65ed0704 Remove comment syntax in _internal/.../linked_hash_map.dart.
Change type arguments for LinkedHashMapCell from reified in strong
mode only (using the comment syntax) to always reified.

Bug:
Change-Id: I567178a413194c72f01d4166e537ecb608c6a708
Reviewed-on: https://dart-review.googlesource.com/21789
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-30 20:02:04 +00:00
Jacob MacDonald 15148dde93 compile and ship the front_end blaze worker entrypoint as a snapshot
Bug:
Change-Id: Id8611e484df73a1ffb36baca5c529327bbb336cb
Reviewed-on: https://dart-review.googlesource.com/24560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2017-11-29 23:40:35 +00:00
Karl Klose 2d48be6e62 Invoke dartdevk.dart through shell script that locates the 'dart' executable
Change-Id: Id13cc838b67785b12f95d19b480a6a830ad5c003
Reviewed-on: https://dart-review.googlesource.com/24120
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2017-11-29 11:27:50 +00:00
Mark Fielbig d648426a5b Fix typo in isolate docs. (#31474)
Looks good. Thanks!
2017-11-29 07:57:15 +01:00
Lasse R.H. Nielsen 847cf039f0 Lower-case Isolate.{IMMEDIATE,BEFORE_NEXT_EVENT}.
Change-Id: I9a7071a7f6dc61b502f5aa9bc9bc2455247a7513
Reviewed-on: https://dart-review.googlesource.com/22984
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-24 12:44:17 +00:00
Leaf Petersen cac2299976 Remove comment syntax from lib/convert.
Remove comment syntax on methods signatures in convert.  This doesn't
change the reified types, but may cause new errors and warnings in
non-strong mode code.

Bug:
Change-Id: Ib811a4918d30eb5ba04300df928ac6c3868b2c2b
Reviewed-on: https://dart-review.googlesource.com/21783
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2017-11-22 22:57:05 +00:00
Zachary Anderson 616215df1b [dart:io] Adds Stdin.hasTerminal to mirror Stdout.hasTerminal
fixes #29083

Change-Id: I5f4d7ac2a5df9600fd3ad12abc2dd6068d9980af
Reviewed-on: https://dart-review.googlesource.com/23145
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-11-22 22:41:37 +00:00
Leaf Petersen 2b5349e259 Remove most comment syntax casts from sdk.
Eliminates all of the uses of the "/*=" syntax in the sdk libraries
that can be trivially converted to implicit downcasts.

Bug:
Change-Id: I213a5d683f50d0cec0b32482f44330db3b5d618d
Reviewed-on: https://dart-review.googlesource.com/21781
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-21 21:08:26 +00:00
Zachary Anderson bb33ba10d6 [GN] Fix SDK build deps
Change-Id: Id05e458963d3ba402558135c6af448b505669f11
Reviewed-on: https://dart-review.googlesource.com/22600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-11-21 18:34:30 +00:00
Stephen Adams 5aebf58b66 Add type parameter to JS pseudofunction.
Bug: 31408
Change-Id: I90ce573c2022c2614269dcb73d2856fcc7573e24
Reviewed-on: https://dart-review.googlesource.com/21841
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-21 02:43:17 +00:00
Bob Nystrom 68dc77f456 Build DDC's SDK as part of the regular build.
This involves a few main pieces:

- Add code to the GN scripts to generate DDC's patched SDK and then
  compile it to summaries and JS in the build output directory.

- Add support to the underlying DDC build scripts to support controlling
  which files are built where.

- Update test.dart to use the DDC SDK from the build directory.

- Update create_sdk to use the built SDK instead of the checked in one.

- Fix various internal DDC tools to build their own copy of the SDK
  (since they can't easily find the one in the build directory because
  it's path if config-specific) and use those.

- Delete the checked DDC SDK JS and summaries.

I think I got everything working. The built Dart SDK looks fine -- it's
identical to one built using the old build scripts.

The various tools and DDC's little test runner I *think* work, but there
may be a bug or two in there. I tried the various things I could and it
seems like they work but it's hard to tell since they may be kind of
broken right now anyway.

Bug:
Change-Id: Iea77915a5c1cc8450f60ebfbdf8c725c7ea2f32c
Reviewed-on: https://dart-review.googlesource.com/18144
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-20 23:24:07 +00:00
Paul Berry 1bdf361ed4 Strong mode fix for future_impl.dart.
Change-Id: Icbc36fecd79aedf87340e9d20d1901759492400a
Reviewed-on: https://dart-review.googlesource.com/21464
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-11-20 21:27:47 +00:00
Régis Crelier f91f67a5be [VM] Emit type checks for incoming function arguments in strong mode.
Change-Id: Icd64913f0fc6ba54a0b8517bf05ae4babfae3bdc
Reviewed-on: https://dart-review.googlesource.com/19287
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-18 00:31:35 +00:00
Leaf Petersen 63918ea921 Remove comment syntax from lib/async.
Eliminate uses of the comment syntax in lib/async.  This is mostly
done simply by turning explicit (but commented) casts into implicit
casts to avoid regressing dart2js performance.

Bug:
Change-Id: I286c7bffbf609b5e2fa24b9d48b90876c2c45a9b
Reviewed-on: https://dart-review.googlesource.com/21566
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-17 20:40:47 +00:00
Leaf Petersen 85ca7df7e2 Avoid fuzzy arrows when parsing json.
Change the types on the json decoding reviver to avoid fuzzy arrow
checks.

Bug:
Change-Id: I3ca52d7676b6305c398f128d370bc9859fd65820
Reviewed-on: https://dart-review.googlesource.com/21564
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-17 20:37:07 +00:00
Lasse R.H. Nielsen b0f6c4c8b1 Don't deprecate old constant names yet.
Flutter reacts badly to using deprecated members.

Change-Id: Id7933ddbc0c2fa68d9a232e2ad4c74dfd0ecdf35
Reviewed-on: https://dart-review.googlesource.com/21601
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-17 10:58:33 +00:00
Paul Berry 1034ad336d Strong mode fix for line_splitter.dart.
The new front end doesn't support generic comment syntax yet, so it's
getting the wrong type for LineSplitter in strong mode.  Since we no
longer to preserve legacy mode semantics for LineSplitter, we can just
use the correct strong mode types without generic comment syntax.

Change-Id: If2dcb2fb3fae9eb49685838e4e84958e545650c7
Reviewed-on: https://dart-review.googlesource.com/21286
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-16 19:52:51 +00:00
Stephen Adams 3836c70a81 Redo "js_runtime: Use browser's TextDecoder for UTF8 decoding"
Bug:
Change-Id: I40903bcdc1502e15cbf84298b43ba04ae8a8ecaf
Reviewed-on: https://dart-review.googlesource.com/21383
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-16 04:59:26 +00:00
Stephen Adams 5e06165d6b Revert "js_runtime: Use browser's TextDecoder for UTF8 decoding"
This reverts commit 5f15867a47.

The recent renaming of constants had caused a lot of pain with this CL.

TBR=lrn@google.com

Bug:
Change-Id: I67a78fa09e15e95ea44fe18d9847fcfd9c61e043
Reviewed-on: https://dart-review.googlesource.com/21382
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-16 04:52:40 +00:00
Stephen Adams 5f15867a47 js_runtime: Use browser's TextDecoder for UTF8 decoding
Change-Id: I85a8e774595784883281b1cc40ee75ae8de7d1d9
Reviewed-on: https://dart-review.googlesource.com/3303
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-11-16 04:22:22 +00:00
Ryan Macnak b8f6eb7899 [vm] Make effectively const fields const.
Change-Id: I3dd3a81a4887bdbe480ea0fdc70547885024a99d
Reviewed-on: https://dart-review.googlesource.com/20906
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-11-15 01:51:24 +00:00
Zachary Anderson 0af5298845 [dart:io] Adds optional withTrustedRoots parameter to SecurityContext()
The parameter defaults to false. This enables creating a
SecurityContext that includes the trusted root certificates that can
be modified per-connection.

fixes #24693

Change-Id: I22e5736838755ce4055f77b1b17aeb5176329240
Reviewed-on: https://dart-review.googlesource.com/20580
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-11-14 18:09:34 +00:00
Lasse R.H. Nielsen 0b58c4bd10 Change some constant declarations to lowerCase.
Retain the old values.

Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.

Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen e61fc07b58 Revert "Change some constant declarations to lowerCase."
This reverts commit c048cfb178.

Reason for revert: VM code fingerprints needs update.

Original change's description:
> Change some constant declarations to lowerCase.
> 
> Retain the old values.
> 
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>

TBR=lrn@google.com,floitsch@google.com

Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen c048cfb178 Change some constant declarations to lowerCase.
Retain the old values.

Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +00:00
Paul Berry b275c07359 Strong mode fixes for sdk/lib/vmservice/devfs.dart
Future.wait() must be passed a list of type List<Future>.

Change-Id: Id7dd9e7c77aef10db6de8146f7ffad6df8f5cbc2
Reviewed-on: https://dart-review.googlesource.com/20161
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-11 15:46:25 +00:00
Stephen Adams 7686dce346 Replace _downcast and _cast with local downcasts (dart:html)
Change-Id: I4282b20aac07da125805a2654da072742dbbdd0b
Reviewed-on: https://dart-review.googlesource.com/20300
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-11 00:09:38 +00:00
Sigmund Cherem 65530c3ef6 Initialize hunks as early as we can
Bug:
Change-Id: I6483e6d5fb08fbe162e3b54b8aa19e510d25eca4
Reviewed-on: https://dart-review.googlesource.com/19580
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-10 18:50:28 +00:00
Siva Annamalai c29b19fb34 - Do not generate a separate vmservice kernel file, include it in vm_platform file
- Load vmservice_io library only in the service isolate or when an AOT snapshot is being generated

This should account for the following issues:
- https://github.com/dart-lang/sdk/issues/31203 - there should be a vmservice_io_strong.dill file
- https://github.com/dart-lang/sdk/issues/30158 - Consider extracting flutter vmservice_sky into
                                                  separate .dill from platform.dill
- https://github.com/dart-lang/sdk/issues/30111 - support compiling vmservice with an external
                                                  outline of the sdk

Bug:
Change-Id: If945ec05afe8127e288e8d3b55172c0f7c3d6e7a
Reviewed-on: https://dart-review.googlesource.com/18147
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Chandra <sivachandra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2017-11-09 19:05:15 +00:00
P.Y. Laligand 8ebe23659a Add html to platform SDK libraries.
This also makes nativewrappers work in analysis.

Change-Id: Ic516035ed2995f9b267a095ed67cb58e96c42a1a
Bug:
Reviewed-on: https://dart-review.googlesource.com/19283
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-11-08 18:10:51 +00:00
Lasse R.H. Nielsen adcb6a7399 Make main invocation not fail strong-mode type checking.
Bug: http://dartbug.com/31270
Change-Id: Id6ad2a429d5dc44b437a0fdd8fb4889d3dccf194
Reviewed-on: https://dart-review.googlesource.com/18480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-03 16:06:00 +00:00
Peter von der Ahé 0023f99019 Changes to runtime patches so Fasta can understand them.
Change-Id: I7f8d6b110f2f0c90b131a2538240c1b81bfa1578
Reviewed-on: https://dart-review.googlesource.com/17162
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-01 15:16:04 +00:00
Peter von der Ahé b7060891c1 Mention that libraries.json is generated.
Change-Id: I48fcc8443a0980c435e87642cf6a7aede07e68f0
Reviewed-on: https://dart-review.googlesource.com/17161
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-01 12:55:42 +00:00
Peter von der Ahé 43c921faca Update libraries.yaml and .json
Change-Id: I0281b5e04785c1759866e0d9b9dc3e091ea72e66
Reviewed-on: https://dart-review.googlesource.com/16780
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-10-30 18:04:35 +00:00
Konstantin Shcheglov 5f42a89f3f Fix html_common to use absolute URI to import metadata.dart library.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: I00d9039f8e1eda1addf78b8a4bbbd42ffdde2908
Reviewed-on: https://dart-review.googlesource.com/16980
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-27 17:04:19 +00:00
Sigmund Cherem 75c7cf6be4 Include strong platform.dill files in sdk, this makes it possible to use --strong with --use-sdk
Change-Id: I01f035a79ff16612074071c261cfe1fcae9f6a37
Reviewed-on: https://dart-review.googlesource.com/16900
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-10-27 00:13:29 +00:00
Vijay Menon 4f9f77aedc Remove dcall in dart:convert
Seeing this in the hot path on an internal app.

Change-Id: I921f12ece706b4ea92d9a97858fde2799972f653
Reviewed-on: https://dart-review.googlesource.com/15940
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-10-25 18:28:06 +00:00
Vyacheslav Egorov dcfb7b9a4c [VM] Fix typing violations in string_patch.dart.
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I1a0a94ce19bb54cb4273d1508b6ed08b94c60307
Reviewed-on: https://dart-review.googlesource.com/14840
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-19 06:42:37 +00:00
Vyacheslav Egorov 528bc96858 [VM] Cleanup static typing issues in IO implementation
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I11788f267f99fe5a8d871b8500ca70abe04c7146
Reviewed-on: https://dart-review.googlesource.com/13040
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-16 10:05:06 +00:00
Zachary Anderson 346e1edf7e [dart:io] Rename IoOverrides -> IOOverrides
fixes #31063

Change-Id: Ib49ae77903805a5c027ab870898954bb43901fda
Reviewed-on: https://dart-review.googlesource.com/13120
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-10-11 20:31:00 +00:00
Zachary Anderson dcd275fa74 [dart:io] Begins work on mocking support
Change-Id: I770ed9485a934af07e570fbad3f3fb84ebef973d
Reviewed-on: https://dart-review.googlesource.com/3302
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-10 17:39:12 +00:00
Sigmund Cherem ec49b67b19 Split init.metadata by deferred chunk
Bug: http://dartbug.com/30002
Change-Id: I532f122a9b10054a51e40c49b3759c0af471370e
Reviewed-on: https://dart-review.googlesource.com/9140
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-09 19:41:15 +00:00
Peter von der Ahé 16aa720d27 Remove compiling platform.dill from patch_sdk.dart
This separates compiling platform.dill files from the patch_sdk.dart
script. The motivation for that is that I'm working on reading patch
files directly from Fasta, so we can completely remove the build step
for generating patched_sdk and dart2js_patched_sdk.

Short-term this should allow Paul to add a strong-mode version of
platform.dill without causing to many conflicts with my work on
patches.

Change-Id: I1150845b2986348d4fffe27092701d8a9b57ea54
Reviewed-on: https://dart-review.googlesource.com/11506
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-06 15:34:37 +00:00
Alexey Knyazev 760cfffdc4 Add type annotation to stringifier local var
Bug: https://github.com/dart-lang/sdk/issues/30951
Change-Id: Ic154536b57b2bd05a4ce8453d1dafdfbc5377da9
Reviewed-on: https://dart-review.googlesource.com/10000
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2017-10-05 14:51:10 +00:00
Régis Crelier 23b57df3e1 Postpone addition of 'typeArguments' getter on Invocation class until the
Dart 2.0 revision of the core library, since it breaks google3 Dart integration.

Change-Id: If9036f6e8d90b30f142a245ae16754c177f8461e
Reviewed-on: https://dart-review.googlesource.com/10702
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2017-10-03 23:28:02 +00:00
Ryan Macnak 4b64a835b9 [vm] Remove dead crypto.dart from dart:io.
Both dart:io and dart:_http have scripts whose uri is just 'crypto.dart'. This confuses vm-service clients who incorrectly assume that scripts are uniquely identified by uri.

Change-Id: I387c42d32f9e1a2aabf03d9d1a89ed4703f0f40d
Reviewed-on: https://dart-review.googlesource.com/10211
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-03 16:58:18 +00:00
Florian Loitsch 8752e7a6cd Remove obsolete documentation.
Fixes #27735.
Fixes #18625.
Fixes #10200.
Bug: http://dartbug.com/27735 http://dartbug.com/18625 http://dartbug.com/10200
Change-Id: I81dcaf2167f660527439bb117cfb0ee7d9188256
Reviewed-on: https://dart-review.googlesource.com/10240
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-10-03 11:23:11 +00:00
Florian Loitsch 0e4bb6da89 Document that it's not allowed to change the hashcodes of set and map entries.
Fixes #30400.
Bug: http://dartbug.com/30400
Change-Id: I4cfeefa98edddd1c735c2e2b44ebfda6e12b5613
Reviewed-on: https://dart-review.googlesource.com/9481
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-10-02 10:00:04 +00:00
Lasse R.H. Nielsen 72d1e2452d Fix documentation of Uint32List and Uint64List
The currently documented maximum value is 2^n, but since 0 should be counted too actual value is only 2^n - 1.

Pull request https://github.com/dart-lang/sdk/pull/30626 by https://github.com/renggli

Change-Id: I85f920929f4cc524b7096f550e4dfdc628306399
Reviewed-on: https://dart-review.googlesource.com/9500
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-09-29 12:20:12 +00:00
Régis Crelier db8b20107b Revert "Revert "Dart Core Lib change to support generic functions in class NoSuchMethodError.""
This reverts commit 8cf9ef22c4.

The expectations in Dart2js and Kernel tests have now been updated.

Change-Id: I9d65ff207490cfc783849b1b726db81cf56ecfc2
Reviewed-on: https://dart-review.googlesource.com/9124
Reviewed-by: Régis Crelier <regis@google.com>
2017-09-28 00:27:24 +00:00
Régis Crelier 8cf9ef22c4 Revert "Dart Core Lib change to support generic functions in class NoSuchMethodError."
This reverts commit db15f5d73b.

Dart2js and Kernel tests are comparing text that has changed because of
the core lib change.

Change-Id: I1d33716a3d6e6a077aa1f1a9ad7cc37825d31fa6
Reviewed-on: https://dart-review.googlesource.com/9082
Reviewed-by: Siva Chandra <sivachandra@google.com>
2017-09-27 21:08:20 +00:00
Régis Crelier db15f5d73b Dart Core Lib change to support generic functions in class NoSuchMethodError.
Change-Id: If7d1a8c07e4bee7ec68fede80a9d17cae0044d31
Reviewed-on: https://dart-review.googlesource.com/5329
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-27 17:57:41 +00:00
Sigmund Cherem 920d44c3d4 Include dart.io in dart2js platform
Change-Id: I7bd4356556023ff4a56d876684ea63bad1917b07
Reviewed-on: https://dart-review.googlesource.com/8341
Reviewed-by: Emily Fortuna <efortuna@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-09-27 02:06:10 +00:00
Leaf Petersen 8c924f2923 Tighten the is check in handleError.
Bug:
Change-Id: I23f49f65a395579293f0567e8069ccd931e00c4a
Reviewed-on: https://dart-review.googlesource.com/7842
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-26 13:38:05 +00:00
Leaf Petersen e350bb4565 Eliminate fuzzy arrow uses in SDK libraries.
Bug:
Change-Id: Ia1a00966b8d77c5aa812ed19eca136c47132ae58
Reviewed-on: https://dart-review.googlesource.com/8540
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-26 12:56:05 +00:00
Zachary Anderson 2948f8c1b7 Reland: [dart:io] Moves Http code into a separate library.
This moves Http code into dart:_http. dart:io then imports and
re-exports dart:_http. This is the first stage of moving
dart:_http into its own pub package.

This CL was reverted due to a failure in the Flutter engine build
which happened due to an incomplete change in gen_snapshot.cc, and to
update sdk/lib/libraries.yaml and sdk/lib/libraries.json

Change-Id: Ie90c77ef631aea7a163774b58e8ccbaf71a24d3c
Reviewed-on: https://dart-review.googlesource.com/7588
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-21 19:21:25 +00:00
Zach Anderson 64bf1b49b0 Revert "[dart:io] Moves Http code into a separate library."
Reverting for broken Flutter build and kernel platform compilation test. It looks like the new _http library is missing from various snapshots. Not sure why this didn't fail locally.

This reverts commit ac9ff3f3af.

Change-Id: I7fbc2f842cf1380793e7af9fb869cacd14682885
Reviewed-on: https://dart-review.googlesource.com/7600
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-21 15:57:59 +00:00
Zachary Anderson ac9ff3f3af [dart:io] Moves Http code into a separate library.
This moves Http code into dart:_http. dart:io then imports and
re-exports dart:_http. This is the first stage of moving
dart:_http into its own pub package.

Change-Id: Icd33232a97b3d75511ef7ec88b01fd47cdcf5a23
Reviewed-on: https://dart-review.googlesource.com/6420
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-21 15:10:22 +00:00
Zachary Anderson 406d59f9bf [sdk] Update version file correctly
fixes #30794

Change-Id: Icd412d36d34dc1da01a6b0fec8107b3a49d03e3a
Reviewed-on: https://dart-review.googlesource.com/7481
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-20 22:05:27 +00:00
Florian Loitsch 38bf70d7ac Use generic functions in zones.
Migrated from https://chromiumcodereview.appspot.com/2893893002/

Change-Id: I0bd6dc1438eb1e6762e7760a08b5a760b07d4b10
Reviewed-on: https://dart-review.googlesource.com/4942
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2017-09-20 15:46:06 +00:00
Ryan Macnak 3d21a46b72 Limit preserialized JSON for timeline events from Dart code to the arguments.
Avoids string copies in C++ and map copies in Dart.

Also remove some vestiages of removed feature that allowed an embedder to add pre-encoded events to the timeline.

Change-Id: I962a67093ba461c991d9169b0391c44af1d489db
Bug: https://github.com/dart-lang/sdk/issues/30787
Reviewed-on: https://dart-review.googlesource.com/6762
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-19 23:29:55 +00:00
Stephen Adams ee3d649a6e dart2js-kernel: Implement _DuplicatedFieldInitializerError
Bug:
Change-Id: I14925233d4275afbb0ec8bc17752acd43e04c9ac
Reviewed-on: https://dart-review.googlesource.com/5602
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-09-14 18:21:38 +00:00
Florian Loitsch 5f1945d768 DateTime documentation improvements.
Change-Id: Ic83f21ece19fb0d13636e0934c895da6b8b38eac
Reviewed-on: https://dart-review.googlesource.com/4360
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-08 12:52:13 +00:00
Florian Loitsch 9ca1960291 Add documentation to StreamTransformer.fromHandlers.
Change-Id: Iba1350ae416379a2b9a0d6846426e65a034424ce
Reviewed-on: https://dart-review.googlesource.com/3980
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-08 08:19:25 +00:00
Zachary Anderson fc41a57a93 [dart:io] Allow an embedder to disallow certain operaions
Fuchsia's Dart and Flutter content handlers share the implementation of
dart:io with the command line embedder, but would like to disable
some operations that don't make sense for them, like exiting thoe whole
process, which may be hosting multiple unrelated Isolates.
Change-Id: I825ece49c685471ff85802873b1c0f974c507aed
Reviewed-on: https://dart-review.googlesource.com/3687
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-08 05:02:07 +00:00
Terry Lucas 352f9fd859 Fixed bad indent not flushing emitted files.
Removed Dartium code emission.

TBR: alanknight@google.com,vsm@google.com
Change-Id: Ib027f542b238c90311f6838e67b4b8d27815374c
Reviewed-on: https://dart-review.googlesource.com/3280
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2017-09-05 14:43:08 +00:00
Lasse Reichstein Holst Nielsen 06f2a2eead Remove @proxy from the specification. Deprecate the annotation.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/3007853003 .
2017-09-04 07:56:53 +02:00
Zachary Anderson e2bce948ed [dart:io] Adds Platform.operatingSystemVersion
fixes #30018

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/3006873002 .
2017-09-01 22:08:48 -07:00
Terry Lucas 0585e74b63 Fixed analyzer test to use dart2js not dartium
R=paulberry@google.com

Committed: 704de3bb3e
Review-Url: https://codereview.chromium.org/3004153002 .
2017-09-01 09:03:16 -07:00
William Hesse a8cab7a205 Revert "Removed Dartium SDK libs"
This reverts commit 4a58918382.
That commit seems to have broken docgen on the html libraries.

BUG=
TBR=terry@google.com

Review-Url: https://codereview.chromium.org/3004173002 .
2017-09-01 00:47:57 +02:00
Terry Lucas 4a58918382 Removed Dartium SDK libs
First stage remove the libraries that are no longer part of 1.25 and beyond.

R=alanknight@google.com, sigmund@google.com

Committed: a18908461a
Committed: d96561af08
Review-Url: https://codereview.chromium.org/3008563002 .
2017-08-31 07:17:23 -07:00
Terry Lucas f1269525a8 Revert: Removed Dartium SDK libs
Review-Url: https://codereview.chromium.org/3005913003 .
2017-08-30 20:47:07 -07:00
Terry Lucas d96561af08 Removed Dartium SDK libs
First stage remove the libraries that are no longer part of 1.25 and beyond.

R=alanknight@google.com, sigmund@google.com

Committed: a18908461a
Review-Url: https://codereview.chromium.org/3008563002 .
2017-08-30 20:07:15 -07:00
Leaf Petersen f606e559c5 Avoid relying on fuzzy arrow for arity check in _FutureListener
BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3009893002 .
2017-08-30 14:18:52 -07:00
Zachary Anderson d0295c873c [dart:io] Namespaces for file IO
Fuchsia requires the ability to sandbox Isolates w.r.t. file IO.
When a new Isolate starts, Fuchsia will pass the Isolate an object
called a namespace. We can translate the namespace object into a
file descriptor suitable for passing to the *at() family of
POSIX file system calls. The file system calls will then
have visibility only into the specified namespace.

We also plumb Namespaces through on all the other platforms as well to
make the change easier to test and so that in the future we can
implement e.g. per-isolate cwds.

This change adds a new internal class to dart:io called _Namespace,
which is implemented in a patch file. See:

sdk/lib/io/namespace_impl.dart
runtime/bin/namespace_patch.dart

The embedder can set up a non-default namespace by calling
_Namespace._setupNamespace during Isolate setup.

Instances of _Namespace have a native field that holds a pointer
to a native Namespace object. See:

runtime/bin/namespace.h

Calls from e.g. file_impl.dart are now also passed a
_Namespace object. The implementations in e.g. file.cc and
file_linux.cc then extract the namespace, and use it to compute a
file descriptor and path suitable for passing to e.g. openat().

related US-313

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

Review-Url: https://codereview.chromium.org/3007703002 .
2017-08-30 09:34:36 -07:00
Leaf Petersen bdfc674a54 SDK core library fuzzy arrow fixes.
Fix a couple of places in the core libraries that were relying on
fuzzy arrow (lack of) checking.

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/3005653002 .
2017-08-29 14:03:38 -07:00
Terry Lucas 05ca90aa8c Removed Dartium test exceptions
R=alanknight@google.com

Committed: 84f079f24c
Review-Url: https://codereview.chromium.org/2983033002 .
2017-08-29 07:15:06 -07:00
Peter von der Ahé 37d3c369d8 Start trying to compile platform from unpatched sources.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3009503002 .
2017-08-29 16:09:24 +02:00
Terry Lucas a18908461a Removed Dartium SDK libs
First stage remove the libraries that are no longer part of 1.25 and beyond.

R=alanknight@google.com

Review-Url: https://codereview.chromium.org/3008563002 .
2017-08-29 06:38:53 -07:00
Lasse R.H. Nielsen c8b6c19314 Revert "Add ticks counter to Timer."
Tests broken in DDC

Review-Url: https://codereview.chromium.org/3011503002 .
2017-08-28 13:14:09 +02:00
Lasse R.H. Nielsen 39c8f64ea3 Add ticks counter to Timer.
Avoid VM scheduling multiple timer events if it gets delayed. This doesn't
scale for processes that are suspended for extended amounts of time.

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/3003853002 .
2017-08-28 12:57:45 +02:00
Florian Loitsch 5b60a510bc Add root isolate to map of isolates.
R=lrn@google.com

Review-Url: https://codereview.chromium.org/3005603002 .
2017-08-25 16:36:01 +02:00
Florian Loitsch 0e551194e7 Improve error message for JSON encoding.
Fixes #17954.
BUG= http://dartbug.com/17954
R=lrn@google.com

Review-Url: https://codereview.chromium.org/3003373002 .
2017-08-25 11:18:14 +02:00
Seth Ladd 941f8087b6 remove reference to dart:html (#30543)
This confused a Flutter user. The other classes don't reference dart:html, and these docs appear in docs.flutter.io, so we'd like them to stay focused on dart:io.
2017-08-24 16:21:04 -07:00
Lasse R.H. Nielsen 0194b3473d Fix unnecessary use of this.length in ListMixin.
Fixes #30478

BUG= http://dartbug.com/30478
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2998053002 .
2017-08-24 09:56:52 +02:00
Florian Loitsch a78cfb504d Simplify doc for Function.apply.
Review-Url: https://codereview.chromium.org/3002193002 .
2017-08-23 20:09:39 +02:00
Florian Loitsch 5cc2a9bc04 Fix Function.apply dartdoc.
Review-Url: https://codereview.chromium.org/3004453002 .
2017-08-22 19:04:08 +02:00
Zachary Anderson 734beef062 [infra] Translate _sources.gypi files to _sources.gni files
Also deletes code that becomes dead as a result.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2996903002 .
2017-08-14 21:54:36 -07:00
Sigmund Cherem 9c4b1991b4 Add more diagnostics to the deferred loading implementation.
BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2998943002 .
2017-08-14 13:37:21 -07:00
Florian Loitsch 349f85a40d Fix spurious parenthesis in Map documentation.
Fixes #21713
BUG= http://dartbug.com/21713

Review-Url: https://codereview.chromium.org/3001573002 .
2017-08-11 14:34:41 +02:00
Florian Loitsch 0d2540989d Update String.replaceFirstMapped documentation.
The result of `replace` must be a String, so no need to mention any other type in the documentation.

Fixes #30248.
BUG= http://dartbug.com/30248
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2994053003 .
2017-08-10 18:33:34 +02:00
Zachary Anderson 63b9312e1b Invoke copy_tree.py only once to collect all input file lists.
fixes #30105

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2992353002 .
2017-08-09 11:14:01 -07:00
Zachary Anderson 7730203555 [dart:io] Update docs for FileSystemEvent.isDirectory for Windows
fixes #30359

R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2997573002 .
2017-08-09 10:09:16 -07:00
Alexander Aprelev 1d50f112dc Flutter and Fuchsia build stripped down [platform] version of dart sdk, so make it default(while standalone builds full dart sdk)
Both Flutter and Fuchsia expect stripped dart in standard out directory, so make that default too(while standalone build puts stripped into exe.stripped/).

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2998503002 .
2017-08-08 14:42:11 -07:00
Sigmund Cherem 8d4af85333 Remove use of cwd in d8 preamble
Fixes #30279
BUG= https://github.com/dart-lang/sdk/issues/30279
R=sra@google.com

Review-Url: https://codereview.chromium.org/2993153003 .
2017-08-07 15:54:08 -07:00
Zachary Anderson 21eddc429e [dart:io] Ignore server http upgrade request unless status code is right
fixes #30338

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2993873002 .
2017-08-07 15:08:50 -07:00
Jens Johansen 73a54a30d5 [fasta] Create a 'constant helper' class which will throw on illegal 'constant' expressions
Currently kernel fails a number of test because too much is allowed to be constant.

Examples includes

const x = "hello " * 4; // yielding "hello hello hello hello "
const y = "hello".leng; // crashing the VM

The idea behing the helper class is, that fasta can generate those as for instance
var c = new _ConstantHelper();
const x = c.times("hello ", 4, () => thow yadayada);

where - upon evaluating it in for instance the VMs constant evaluator - the helper will see that "hello " is neiher an integer nor null, and thus execute the given onError function.

This is only one step towards that; it will still have to be hooked up in fasta,
and constant evaluators (e.g. in the VM, I suppose there's also one in dart2js etc)
might need to be updated to be able to execute it.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2982843002 .
2017-08-03 08:38:29 +02:00
Zachary Anderson 4dd403a370 Add missing new external to patch file
Review-Url: https://codereview.chromium.org/2990033002 .
2017-07-31 09:30:46 -07:00
Zachary Anderson 633ed4cf83 [corelib] dart:developer timeline flow events
This change adds an API to dart:developer Timeline for
adding flow events to the timeline. For details see the
changes in:

sdk/lib/developer/timeline.dart

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2985253002 .
2017-07-31 07:46:52 -07:00
Florian Loitsch ee46026671 Don't use LinkedList in the core libraries anymore.
R=lrn@google.com

Committed: fe17b5b2bc
Reverted: 5d4a786f44
Review-Url: https://codereview.chromium.org/2975443002 .
2017-07-28 21:14:11 +02:00
William Hesse cbaaceca2f Update checked-in d8 shell to version 6.2.0
BUG=https://github.com/dart-lang/sdk/issues/29794
R=rnystrom@google.com, sra@google.com

Review-Url: https://codereview.chromium.org/2979403002 .
2017-07-27 10:36:19 +02:00
Sigmund Cherem de7e14436c Include platform.dill files in sdk builds
R=zra@google.com

Review-Url: https://codereview.chromium.org/2984243002 .
2017-07-26 14:50:49 -07:00
Sigmund Cherem 77908a43a1 Deferred load: add status error code
R=sra@google.com

Review-Url: https://codereview.chromium.org/2990613002 .
2017-07-25 10:10:01 -07:00
Zachary Anderson 9e7e66602f Compute the script Uri lazily
Previously, the string set up by the embedder was eagerly passed to
Uri.parse during Isolate startup. This is expensive both in time and
memory footprint. This CL causes Uri.parse() to be called only
when needed. This change will allow reducing the memory footprint
of Fuchsia's Dart content handler on hello world by ~1MB.

fixes #25603

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2988613002 .
2017-07-24 12:56:21 -07:00
Stephen Adams 4790e3c842 Revert "D8 roll with 'Avoid using D8 Worker'"
This reverts commit 487a9048fd.

Failed on Golem, all benchmarks show "Run Failed".
Perhaps there are missing .so files on the runners.

TBR=whesse@google.com

Review-Url: https://codereview.chromium.org/2989433002 .
2017-07-20 16:05:09 -07:00
Stephen Adams 487a9048fd Avoid using D8 Worker
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2987563003 .
2017-07-20 14:58:51 -07:00
Vijay Menon 12e32e230d Add hook to register global object
DDC will use this in a later CL.

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

Stephen: I assume this will get compiled out be dart2js.
Review-Url: https://codereview.chromium.org/2983813002 .
2017-07-19 05:46:07 -07:00
Alan Knight 789de57cdf Allow setting unknown CSS properties, e.g. CSS variables
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2976213002 .
2017-07-17 14:56:31 -07:00
Stephen Adams 20680805d3 Redo "special-case ListMixin.setRange from same list"
This simply reapplies
001ce2aad7

R=lrn@google.com

BUG=

Review-Url: https://codereview.chromium.org/2961073002 .
2017-07-15 11:21:39 -07:00
Lasse R.H. Nielsen 8e21707a47 Fix bug in test's /none version. Update status files.
R=eernst@google.com

Review-Url: https://codereview.chromium.org/2975193002 .
2017-07-14 14:04:10 +02:00
Carlo Bernaschina df8bf384eb Introduce external services registration
A new RPC is introduced `_registerService` which allow clients to
register new services that are accessible from all the other clients.

Each registered endpoint is identified by 3 strings:

 - `service`
   a non empty string which identifies the provided service
   (e.g. `HotReload`, `OpenFile`)
 - `alias`
   an alias for that particular endpoint used by clients to identify it
   (e.g. `Flutter`, `IntelliJ`)
 - `method` __generated__
   the RPC method that should be invoked from a client to request it

A new _stream_ `_Service` is introduce, and two related events:

 - `ServiceRegistered`
   which is triggered when a new client is registered.
   All the related information (`service`, `alias`, `method`) are sent.

 - `ServiceUnregistered`
   which is triggered when a client, which previously registered a
   service, disconnects.
   Just `service` and `method` are sent.

Related https://github.com/dart-lang/sdk/issues/30023

R=asiva@google.com, bkonyi@google.com

Review-Url: https://codereview.chromium.org/2980733003 .
2017-07-13 18:18:51 -07:00
Natalie Weizenbaum 5a74d8ab09 Properly handle Windows file: URLs on Node.js (#30098)
This adds logic to the JS implementation of URI to determine whether
the code is running on Windows under Node.js.
2017-07-12 14:57:01 -07:00
Stephen Adams 8623950864 Change imports to clean up irritating warning
This gets rid of the following messages in the build:

patched_dart2js_sdk/lib/_internal/js_runtime/lib/native_typed_data.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
patched_dart2js_sdk/lib/svg/dart2js/svg_dart2js.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
patched_dart2js_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
patched_dart2js_sdk/lib/web_gl/dart2js/web_gl_dart2js.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
patched_dart2js_sdk/lib/web_sql/dart2js/web_sql_dart2js.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.

BUG=
R=ahe@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2982503002 .
2017-07-12 14:37:40 -07:00
Terry Lucas 1265b4c674 Fixed readPixels not working in Dartium.
BUG=11614
R=alanknight@google.com, jacobr@google.com

Review-Url: https://codereview.chromium.org/2975953002 .
2017-07-11 13:12:51 -07:00
Stephen Adams 3e9dba5687 Use more single quotes in js_runtime
This makes searching easier.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2981483002 .
2017-07-11 10:46:54 -07:00
Johnni Winther 6ed6ac9fb9 Fix handling of async patches.
- and rewrite the only use to avoid async rewrite.

Review-Url: https://codereview.chromium.org/2977583002 .
2017-07-10 16:08:08 +02:00
Florian Loitsch 5d4a786f44 Revert "Don't use LinkedList in the core libraries anymore."
This reverts commit fe17b5b2bc.

Review-Url: https://codereview.chromium.org/2974073002 .
2017-07-10 14:58:04 +02:00
Florian Loitsch fe17b5b2bc Don't use LinkedList in the core libraries anymore.
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2975443002 .
2017-07-10 14:09:24 +02:00
Stephen Adams b0803e1dd7 _ChildrenElementList implements removeRange
This is to avoid inheriting an implementation that works incorrectly for the underlying NodeList.

TBR=lrn@google.com

BUG=

Review-Url: https://codereview.chromium.org/2977453002 .
2017-07-07 15:55:19 -07:00
Ryan Macnak 1bfd01c1f7 Revert "Use relative URIs for core library part-of statements."
This reverts commit 62bc61b367.

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2968413002 .
2017-07-07 11:18:24 -07:00
Lasse R.H. Nielsen 32a2d2079a Update docs on Stream.skip/take/skipWhile/takeWhile.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2975583002 .
2017-07-07 13:52:18 +02:00
Florian Loitsch 42fd6cfd77 Revert "Remaining private libs"
This reverts commit 91db4489ee.

Review-Url: https://codereview.chromium.org/2973823002 .
2017-07-06 16:39:18 +02:00
Lasse R.H. Nielsen 91db4489ee Remaining private libs
Handle internal libraries correctly.

Revert `part of "file.dart"` to `part of "dart:file"` to avoid warnings in fasta.

BUG=
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2974433002 .
2017-07-06 14:58:27 +02:00
Lasse R.H. Nielsen 03491d6ed7 Don't use file-based part-of when part files are shared.
Review-Url: https://codereview.chromium.org/2967833002 .
2017-07-03 13:48:21 +02:00
Lasse R.H. Nielsen 62bc61b367 Use relative URIs for core library part-of statements.
Reapply "Change some platform libraries to use `part of URI`."
Change to used relative URIs in the part-of declarations.

R=brianwilkerson@google.com, floitsch@google.com

Review-Url: https://codereview.chromium.org/2911903002 .
2017-07-03 10:04:06 +02:00
Stephen Adams fc7d880c60 Implement _ChildNodeListLazy.removeRange as throwing UnsupportedError
_ChildNodeListLazy.removeRange used to throw UnsupportedError because ListMixin.removeRange calls setRange.
Make throwing UnsupportedError explicit to avoid relying on the implementation of ListMixin.removeRange
This will unblock the '_closeGap' change.

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2955103003 .
2017-06-28 09:42:55 -07:00
Florian Loitsch 978213d427 Revert "Make Zone API strong mode clean."
This reverts commit 0b35711d48.

BUG=

Review-Url: https://codereview.chromium.org/2963743002 .
2017-06-28 13:31:32 +02:00
Florian Loitsch 0b35711d48 Make Zone API strong mode clean.
Review-Url: https://codereview.chromium.org/2959163002 .
2017-06-28 13:16:39 +02:00
Stephen Adams e97610ec38 Revert "special-case ListMixin.setRange from same list"
This reverts commit 001ce2aad7.

TBR=lrn@google.com

BUG=

Review-Url: https://codereview.chromium.org/2960783002 .
2017-06-26 16:44:42 -07:00
Stephen Adams 001ce2aad7 special-case ListMixin.setRange from same list
BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2875013005 .
2017-06-26 15:46:37 -07:00
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Kevin Moore 239b0c088c Fix a couple of doc comment references - and many spelling mistakes
Review-Url: https://codereview.chromium.org/2946283002 .
2017-06-22 17:32:29 -07:00
Ben Konyi 06456e83d8 Added timeout parameter to RawSecureSocket and SecureSocket connect methods. Also updated CHANGELOG and SecureSocket tests to reflect this change. Issue 19120.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2950413002 .
2017-06-22 13:45:26 -07:00
Zachary Anderson ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Ben Konyi 86fdbde70a Added timeout parameter to RawSocket and Socket connect, which allows for the specification of a maximum time to wait for a valid connection to be established.
fixes #19120

R=zra@google.com

Review-Url: https://codereview.chromium.org/2946333002 .
2017-06-21 14:31:52 -07:00
Jens Johansen be9a3043aa [kernel] Make fasta call a new constructor on FallThroughError
On a switch fall through error, Fasta currently generates
```
throw new core::FallThroughError::•();
```

which generates the error-message via the VM:
```
'null': Switch case fall-through at line null.
```

This introduces a new constructor taking a url and a linenumber,
which then can give a better error message.

BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2951453002 .
2017-06-21 08:40:59 +02:00
Siva Chandra b9bf4fcc48 Remove vmservice_patch.dart.
The code in the patch is now inlined into the vmservice library.
This is being done because, the vmservice related libraries are
now compiled directly from source instead of from the "patched_sdk".
So, what is being compiled now does not have the vmservice_patch
applied. By removing the patch, we are removing the need to
artificially patch the vmservice library and making the
vmservice_io.dill complete.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2946773002 .
2017-06-20 12:24:16 -07:00
Konstantin Shcheglov b2b98bb8fd Exclude 'test' and 'testcases' from lib/ packages.
R=paulberry@google.com, whesse@google.com
BUG= https://github.com/dart-lang/sdk/issues/29852

Review-Url: https://codereview.chromium.org/2940723002 .
2017-06-14 07:50:06 -07:00
Alan Knight 6042ae4bd8 Get the name and message from DOMException correctly
BUG=
R=jacobr@google.com, terry@google.com

Review-Url: https://codereview.chromium.org/2931903003 .
2017-06-13 08:59:33 -07:00
Peter von der Ahé 14e9d0bd89 Prepare for improved error recovery from compile-time errors.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2931423002 .
2017-06-13 15:59:18 +02:00
Terry Lucas b3a90540f1 Fix sound not playing in Dartium checked mode.
Checked mode failure with optional args and Promise missing convertNativePromiseToDartFuture calls.
Easiest solution is to emit proper code instead of re-plumbing the Dartium emitter for operations
with optional arguments that are Promises.

https://github.com/dart-lang/sdk/issues/29810

TBR=alanknight@google.com,kevmoo@google.com

Review-Url: https://codereview.chromium.org/2940543002 .
2017-06-12 22:50:12 -07:00
Peter von der Ahé 1f294cbed0 Fix problem introduced with 043c0096ad.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2931383002 .
2017-06-12 11:22:13 +02:00
Peter von der Ahé 043c0096ad Complain about use before declaration.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2924423003 .
2017-06-10 10:12:18 +02:00
Terry Lucas 3cbacefbe3 Fix HTMLCanvasElement.getContext it can return RenderingContext2 now which will be tree shaken without this annotation.
R=alanknight@google.com,sigmund@google.com

Review-Url: https://codereview.chromium.org/2932793002 .
2017-06-08 20:44:30 -07:00
Ben Konyi 4a15b0b602 Updated HttpServer documentation to specify that only IPv6 connections can be made when specifying InternetAddress.LOOPBACK_IP_V6 as the address for a HttpServer. Refer to buganizer issue 38306174 for context.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2931623003 .
2017-06-08 15:53:07 -07:00
Ben Konyi 033c18472d Revert "Removed SecurityContext.alpnSupported, as ALPN is now supported on all platforms. Also updated CHANGELOG.md to announce its removal."
This reverts commit 4b6fa0d5fb.

BUG=
R=kevmoo@google.com

Review-Url: https://codereview.chromium.org/2928013002 .
2017-06-08 14:32:41 -07:00
Ben Konyi 4b6fa0d5fb Removed SecurityContext.alpnSupported, as ALPN is now supported on all platforms. Also updated CHANGELOG.md to announce its removal.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2926153004 .
2017-06-07 15:15:58 -07:00
Lasse Reichstein Holst Nielsen 2a14e68d78 Clean-up of Future documentation and small fix-ups.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2917683002 .
2017-06-02 07:53:47 +02:00
Florian Loitsch 33f360cc38 Revert "Add groupBy to Stream."
This reverts commit 3e8bfb1adb and 3f90b06836.

R=lrn@google.com

Review-Url: https://codereview.chromium.org/2921663002 .
2017-06-01 16:11:39 +02:00
Kevin Moore 46110c331b fix doc comments in dart:io and collection types
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2905013003 .
2017-05-31 09:08:12 -07:00
Alan Knight 75a1eaef7e Fix dataTransfer getter
BUG=

Review-Url: https://codereview.chromium.org/2907273003 .
2017-05-30 15:14:40 -07:00
Lasse Reichstein Holst Nielsen fbe98e6bfc Update stream documentation.
Fixes #29694
BUG= http://dartbug.com/29694
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2899273003 .
2017-05-29 09:14:40 +02:00
Sigmund Cherem dd70d8b655 Remove factory body in *.fromEnvironment, and implement this same behavior
directly inside dart2js.

A few notes:
  * I ended up adding support for this feature also in dart2js with --use-kernel, it was not implemented correctly before. This is why more tests are passing.

  * I played with two other ideas:
    (a) making this a compile-time error instead
    (b) making it a warning if the arguments were constant and implement it as a constant, treat it as an error if they were not.

Unfortunately both are a breaking changes, so I backed out from them. IMO (a) is the cleanest thing to do long term, and we should raise this with the language team.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2896393003 .
2017-05-26 14:49:19 -07:00
Alan Knight d21cc80a54 Add a dataTransfer member to MouseEvent
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2899393004 .
2017-05-25 14:05:10 -07:00
Terry Lucas 20dc749844 Suppress Scale interface - unused.
TBR=alanknight@google.com

Review-Url: https://codereview.chromium.org/2901213006 .
2017-05-25 12:54:38 -07:00
Alan Knight 6f71f9c80b Revert "[Experiment] Stop suppressing DragEvent"
This reverts commit fbbb974670.

Also updates the cached_patches.dart file.

BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2907563003 .
2017-05-25 11:16:10 -07:00