Commit graph

7771 commits

Author SHA1 Message Date
Florian Loitsch db8782f6e6 Update num.compareTo documentation.
Fixes #27924
BUG= http://dartbug.com/27924
R=lrn@google.com

Review URL: https://codereview.chromium.org/2537813002 .
2016-12-01 17:26:59 -08:00
Ryan Macnak e5a16b1ca5 Remove exitCode setter from dart:io's Process.
Fixes #27950

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2542323002 .
2016-12-01 14:35:12 -08:00
John McCutchan 6bf86eacd7 Add getIsolateID to Service class in dart:developer
Fixes https://github.com/dart-lang/sdk/issues/23924

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2542003002 .
2016-12-01 12:48:49 -08:00
Florian Loitsch 222d80ad9d Update documentation for num.clamp.
(partially) fixes #27923
BUG= http://dartbug.com/27923
R=lrn@google.com

Review URL: https://codereview.chromium.org/2541513002 .
2016-12-01 11:01:44 -08:00
Lasse R.H. Nielsen c6412af7bb Don't use [operator==] to refer to [==] in DartDoc. It doesn't work.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2548433002 .
2016-12-01 11:00:33 +01:00
Lasse Reichstein Holst Nielsen 7957a1c256 Make EfficientLength extend Iterable.
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.

It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2467113003 .

Committed: b08fb1373f
2016-11-28 08:04:04 +01:00
Matan Lurey d92107e01d Remove scary warning from dart:convert#Codec (#27897)
Seems unnecessarily scary given that a breaking change here would now be a huge breaking change.
2016-11-25 15:42:01 -08:00
Mohamed Hayibor 5595b9698d Fix typos 'overriden' to 'overridden' and '@mustCall super' to '@mustCallSuper' (#27853)
* fix overriden typos to overridden
* Fix @mustCall super to @mustCallSuper
2016-11-18 09:36:25 -08:00
Vyacheslav Egorov 57af30e2d5 VM: [Kernel] Make NativeFieldWrapperClass[1-4] constructible when running from Kernel.
For unclear reason sdk/lib/html/dartium/nativewrappers.dart had these classes
with constructors that would throw. In reality on Kernel ever uses this file so
nobody would use these constructors before anyway.

When running Kernel binaries we need to be able to construct subclasses of
these classes - so they need to have non-throwing constructors.

R=kustermann@google.com
BUG=http://dartbug.com/27590

Review URL: https://codereview.chromium.org/2511083003 .
2016-11-17 18:59:08 +01:00
Sigmund Cherem d89dab56b5 Fix IE11 issue: this complements the CL I sent last week. It turns out that
there are two places where we do this check. This is why the test that I added
appears to be failing in the bots.

BUG=
R=jakemac@google.com

Review URL: https://codereview.chromium.org/2504883002 .
2016-11-16 08:38:24 -08:00
Vyacheslav Egorov 6f1efe295c VM: Remove _nativeScript external. JS has no equivalent.
It was added to @patch member in the VM patches.

The right fix is to remove @patch annotation from the _nativeScript.

TBR=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org/2506033002 .
2016-11-16 16:36:10 +01:00
Vyacheslav Egorov 23fd1a184b VM: Support bootstrapping core libraries from Kernel binaries instead of source.
BUG=http://dartbug.com/27590
R=asiva@google.com

Review URL: https://codereview.chromium.org/2485993002 .
2016-11-16 13:56:20 +01:00
Sigmund Cherem f460a8706d Add implementation of Isolate.resolvePackageUri for dart2js.
This uses 'packages/' as the default base to resolve uris from, but also exposes
a hook to allow users to overwrite it.

BUG= https://github.com/dart-lang/sdk/issues/25594
R=het@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/2495383003 .
2016-11-14 15:11:49 -08:00
Sigmund Cherem 008da86c03 Support extending TemplateElement in IE11 + webcomponents-lite.js
Addresses issue reported in the polymer repo: https://github.com/dart-lang/polymer-dart/issues/682

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

Review URL: https://codereview.chromium.org/2493703004 .
2016-11-14 07:32:09 -08:00
Siva Annamalai a7107fdd95 Fix some comments.
BUG=

Review URL: https://codereview.chromium.org/2499763002 .
2016-11-11 15:38:55 -08:00
Lasse R.H. Nielsen c3bb3ddb41 Make Stopwatch logic simpler.
The `Stopwatch` class had more states than necessary because it started with
the `_start` and `_stop` fields being `null`, a state that couldn't happen later,
and it had to handle those cases specially.
Now just starts in a state equivalent to a stopped, reset timer.
Also use ?? and ??= because they are there,and don't call the overridable `isRunning` from other methods.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2485063003 .
2016-11-11 10:01:25 +01:00
Stephen Adams 8ccd41c2ae Avoid using constructor.name on ff & safari
TBR=jacobr@google.com

Review URL: https://codereview.chromium.org/2492163002 .
2016-11-10 21:26:23 -08:00
Stephen Adams f734606d0e Add native_testing library to mock @Native classes
Convert 114 tests to use native_testing.dart library.

Includes reviewed code from
https://codereview.chromium.org/2332953002/

Committed: ddfc70f164

Review URL: https://codereview.chromium.org/2379173002 .

Reverted:  74deaad759
2016-11-10 14:16:08 -08:00
John McCutchan 14297ee480 Add an environment variable toggle to control new service protocol auth token
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2486443002 .
2016-11-07 14:45:52 -08:00
Lasse Reichstein Holst Nielsen 88ef4e98fa Make Stream.take(0) still listen and close the stream.
It shouldn't matter, but for some streams (e.g., a `ReceivePort`)
it does make a big difference whether it's closed or not.
We can't make a port not keep the isolate alive unless it has been listened to.
If we could, this wouldn't be necessary.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2481083003 .
2016-11-07 17:01:19 +01:00
Lasse R.H. Nielsen 9ebef9af7c Handle the case of Stream.take(0) better.
The current implementation listens to the stream and waits for it to complete.
The change makes it listen and then immediately cancel, and then return a
subscription that only sends done.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2444363004 .

Committed: 8cead4090c
2016-11-04 15:55:05 +01:00
William Hesse 3bd04426a8 Revert "Handle the case of Stream.take(0) better." This reverts commit 8cead4090c.
The test co19/LibTest/async/Stream/take_A01_t02 was failing after this
commit, on macos and windows, and perhaps everywhere.

BUG=
TBR=lrn@google.com

Review URL: https://codereview.chromium.org/2475303002 .
2016-11-04 15:47:46 +01:00
Lasse R.H. Nielsen 8cead4090c Handle the case of Stream.take(0) better.
The current implementation listens to the stream and waits for it to complete.
The change makes it listen and then immediately cancel, and then return a
subscription that only sends done.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2444363004 .
2016-11-04 14:54:58 +01:00
Florian Loitsch fb968553ae Add generic argument to Codec.fuse.
Fixes #27722
BUG= http://dartbug.com/27722
R=lrn@google.com

Review URL: https://codereview.chromium.org/2472023004 .
2016-11-04 10:19:03 +01:00
Anders Thorhauge Sandholm 4682ea9953 Update http.dart
Fixing #27711
2016-11-03 07:52:49 -07:00
Ryan Macnak 6cf5c3baa3 Revert "Make EfficientLength extend Iterable."
This reverts commit b08fb1373f.

TBR=lrn@google.com

Review URL: https://codereview.chromium.org/2467283003 .
2016-11-02 13:20:41 -07:00
Lasse R.H. Nielsen b08fb1373f Make EfficientLength extend Iterable.
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.

It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2467113003 .
2016-11-02 14:05:35 +01:00
Johnni Winther 8be67929a2 Fix import in sdk/lib/developer
This broke dart2js/analyze_api_test

Review URL: https://codereview.chromium.org/2464083002 .
2016-11-01 12:31:12 +01:00
John McCutchan a0d9975af4 Fix analyzer bots
BUG=

Review URL: https://codereview.chromium.org/2467613002 .
2016-10-31 13:24:39 -07:00
John McCutchan 63e4f69e5e Provide an API to dart:developer to control the web server hosting the Service Protocol
- [x] Add `ServiceProtocolnfo` class to dart:developer.
- [x] Add `Service` class to dart:developer.
- [x] Add `Service.getInfo` static method to dart:developer.
- [x] Add `Service.controlWebServer` static method to dart:developer.

API:

```dart

/// Information about the service protocol.
class ServiceProtocolInfo {
  /// The major version of the protocol.
  final int majorVersion;
  /// The minor version of the protocol.
  final int minorVersion;
  /// The Uri to access the service. If the web server is not running, this
  /// will be null.
  final Uri serverUri;
}

/// Access information about the service protocol and control the web server.
class Service {
  /// Get information about the service protocol.
  static Future<ServiceProtocolInfo> getInfo();

  /// Control the web server that the service protocol is accessed through.
  static Future<ServiceProtocolInfo> controlWebServer({bool enable: false});
}
```

... and add a randomly generated authentication token path prefix that must be passed in to access the service protocol.

Old base url:

Observatory listening on http://127.0.0.1:54804/

New base url:

Observatory listening on http://127.0.0.1:54804/<token>/

For example:

Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/

Many tools will need to be updated.

Fixes #23320

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

Review URL: https://codereview.chromium.org/2438613002 .
2016-10-31 12:32:23 -07:00
Florian Loitsch f9cf78a1af Fix docs for Stream.handleError.
Fixes #27699
BUG= http://dartbug.com/27699
R=lrn@google.com

Review URL: https://codereview.chromium.org/2467453002 .
2016-10-31 16:03:05 +01:00
Jan-Hendrik Dolling 89560c68a0 change "the the" to the 2016-10-28 21:47:50 +02:00
Zachary Anderson 8169499ef8 GN: Format more gn files
Missed these on the first pass.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2454703004 .
2016-10-27 04:25:34 -07:00
Vyacheslav Egorov eb8c24e133 Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451623006 .
2016-10-27 10:09:22 +02:00
Vyacheslav Egorov 12968edb9c Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
This reverts commit 4e7a31262e.

Windows bots are broken now.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451893004 .
2016-10-26 17:07:18 +02:00
Vyacheslav Egorov 4e7a31262e Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This relands commit 2fed1c3905 with fixes to ensure that analyzer summaries are correctly created and XARM build does not try to use target binaries on the host.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2453773002 .
2016-10-26 16:48:28 +02:00
Vyacheslav Egorov cf7ff42e60 Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This reverts commit 2fed1c3905.

SDK builds are failing

TBR=zra@google.com

Review URL: https://codereview.chromium.org/2455593002 .
2016-10-26 13:06:27 +02:00
Vyacheslav Egorov 2fed1c3905 Merge more Kernel infrastructure from kernel_sdk SDK fork.
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
  Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
  not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.

- bring test script modifications that allow to test Kernel pipeline

BUG=
R=asiva@google.com, kmillikin@google.com, whesse@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2434123003 .
2016-10-26 13:02:54 +02:00
Florian Loitsch 6beb1fdd11 Change Set.difference API to accept Set<Object>.
Fixes #27573
BUG= http://dartbug.com/27573
R=lrn@google.com

Review URL: https://codereview.chromium.org/2413233002 .
2016-10-20 14:37:15 +02:00
Stephen Adams 50e557d176 Prevent inlining of js_library core.RegExp constructor
Inlining was achieving no beneficial effect.

- Enabled GVN of match start.
- Made string quote style uniform.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2437863002 .
2016-10-19 16:25:11 -07:00
Stephen Adams 1e793c96b2 Properties of flattenString
TBR=sigmund@google.com

Review URL: https://codereview.chromium.org/2432993004 .
2016-10-19 13:53:46 -07:00
Stephen Adams c9c3c203c1 Minor tweaks to dart:html for better dart2js codegen
- Allow 'document' to be reused (GVN-ed).
- Allow inlining of 'new Comment'.
- 'new Text' and 'new Comment' have no effects.

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

Review URL: https://codereview.chromium.org/2422293002 .
2016-10-17 13:35:17 -07:00
Florian Loitsch 8fbd651c49 Emphasize that durations are context independent.
Fixes #27597
BUG= http://dartbug.com/27597
R=lrn@google.com

Review URL: https://codereview.chromium.org/2423993002 .
2016-10-17 14:51:00 +02:00
Stephen Adams 790b9d9cb1 Enable GVN on HForeignNew
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2422003002 .
2016-10-14 17:34:07 -07:00
Florian Loitsch 136e476c87 Check for the type of the the spawned function.
In general we avoid explicit type-checks, but in this case the error would be only detected in the new isolate making error handling much harder.

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

Review URL: https://codereview.chromium.org/2414173003 .
2016-10-14 13:27:11 +02:00
John McCutchan eaea9d58fe Revert "Give useful message for null derefs"
This reverts commit 588fed0368.

BUG=

Review URL: https://codereview.chromium.org/2403203002 .
2016-10-10 13:11:44 -07:00
John McCutchan 588fed0368 Give useful message for null derefs
The exception implements NoSuchMethodError so that code that depends on
the previous exception type still works.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2407603002 .
2016-10-10 12:53:47 -07:00
Kevin Moore 9d9858fa7e Update recommendations for HTTP server packages
R=dgrove@google.com

Review URL: https://codereview.chromium.org/2389833002 .
2016-10-05 21:16:35 -07:00
Stephen Adams 74deaad759 Revert "Add native_testing library to mock @Native classes"
Investigating failures.

BUG=

Review URL: https://codereview.chromium.org/2383273002 .
2016-09-30 13:27:09 -07:00
Stephen Adams ddfc70f164 Add native_testing library to mock @Native classes
Convert 114 tests to use native_testing.dart library.

Review URL: https://codereview.chromium.org/2379173002 .
2016-09-30 12:13:52 -07:00