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
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 .
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 .
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 .
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 .
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 .
- [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 .
- 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 .
The current implementation of StreamIterator has a one-element buffer which
allows it listen for the next even eagerly, and only pause if consumption
doesn't keep up with production.
However, StreamIterator is also used by both VM and dart2js implementations
of "await for", and according to the specification, the iterated stream
must be paused between loop iterations.
The CL removes the one-element buffer and forces a pause after each event.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2149893002 .