Commit graph

8101 commits

Author SHA1 Message Date
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