Commit Graph

68 Commits

Author SHA1 Message Date
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
Matthias Hausner 1a6d1eca32 Implement @patch annotation for patch class members
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.

Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2230383003 .
2016-08-10 12:54:57 -07:00
Matthias Hausner e11ca24053 Use metadata annotation @patch for patch classes
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.

The deprecated syntax is still supported, but a warning is printed when detected.

BUG=

Review URL: https://codereview.chromium.org/2220883004 .
2016-08-09 09:48:03 -07:00
John McCutchan b9b0649b9c dart:developer service extension fixes
Fixes #25724
Fixes Florian Loitsch's emailed request (get rid of k prefix on constants).

- Rename ServiceExtensionResponse constants to not have a 'k' prefix.
- Provide more explanation on how to invoke service extensions (they require an 'isolateId' parameter).
- Require extension method names to begin with "ext." and recommend the template: "ext.package.command" to avoid conflicts with other packages.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1680593004 .
2016-02-10 08:54:51 -08:00
Rico Wind 38b579fa78 Add tracking of open processes to the new io resource tracking.
I plan on refactoring the io_resource_info.dart file a bit in a follow up, but I keept this simple

I also plan on adding some sort of sanity checking when the vm exits, to make sure
all 3 maps are empty (in debug mode)

This fixes issue #24314, before we would hold on to process that failed to start
running in the _processes map.

Closes #24314
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1331033003 .
2015-09-14 12:54:36 +02:00
sgjesse@google.com 5973b2c422 Make the construction of a ProcessResult public
There was really no need for it to be a private implementation.

BUG=http://dartbug.com/23070
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44935 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 13:05:45 +00:00
sgjesse@google.com 6ba8c7bd7f Fix another type bug in r43455
TBR=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43459 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 10:13:11 +00:00
sgjesse@google.com a99617c254 Fix type bug in r43455
TBR=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43456 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 08:45:23 +00:00
sgjesse@google.com 833e5d9aee Add support for killing a process with a given PID to dart:io
R=lrn@google.com, kustermann@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43455 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 08:20:33 +00:00
sgjesse@google.com 9aa4805e21 Add an option for starting a detached process with stdio connected
R=lrn@google.com, kustermann@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43393 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 13:38:38 +00:00
sgjesse@google.com f6a10fbdf1 Add support for starting a detached process
BUG=http://dartbug.com/20970
R=kustermann@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43070 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-22 11:49:39 +00:00
zra@google.com 306ef8dd75 Fixes leak in Process.runSync().
This removes the call to _stdin._sink.destroy()
from my previous CL, which broke a test.
stdin is closed by the native implementation.
Closing again shouldn't cause a problem, but
it looks like destroy() attempts to do a lot
more than that.

OTOH adding the remove call is sufficient to
fix the leak, so let's just stick with that.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41395 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 14:32:30 +00:00
zra@google.com 4e15424820 Reverts 41378 for test failure.
Review URL: https://codereview.chromium.org//688443005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41386 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 01:57:22 +00:00
zra@google.com 2bb9c19ab8 Fixes memory leak in Process.runSync()
This was introduced in 36665 by https://codereview.chromium.org/307503002/

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41378 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 23:02:54 +00:00
johnmccutchan@google.com 435c6ad7ac Reduce service isolate startup time from ~80ms to ~30ms
- Get access to dart:io internal signal listening function using API instead of mirrors.

- Service isolate can start with service deactivated.
- Load Observatory front end resources only when service activated.
- Do not execute Dart Service code until service is activated.
- Register live isolates when service is activated.

- Startup refactored to allow for future use of script snapshots.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40124 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 22:38:33 +00:00
johnmccutchan@google.com 1f62dad54d Add Proces owner of socket and fix printing of non-network sockets
R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36729 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 07:15:02 +00:00
johnmccutchan@google.com a71fa873b1 Add processes to Observatory
R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36665 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 11:20:30 +00:00
ajohnsen@google.com 03429c2ee6 Allow internal usage of SIGQUIT signal listening.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35616 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 08:01:09 +00:00
iposva@google.com 090e15d537 Do not try to move lines around after test!
- Fix typo in field name.

R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34935 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 17:58:47 +00:00
iposva@google.com 9adfe60489 - Apply review comments from https://codereview.chromium.org/232223004/
- Use isWindows where appropriate.

R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34934 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 17:49:31 +00:00
iposva@google.com 566ec5d5b9 - Do not keep the environment alive past the process spawn.
- Avoid creation of many temp objects while creating the process
  environment.
- "if (identical(true, value))" makes no sense.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34907 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 00:15:47 +00:00
ajohnsen@google.com 09a4f24413 Add exitCode getter counterpart to the existing setter in dart:io.
BUG=https://code.google.com/p/dart/issues/detail?id=16217
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33737 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 10:40:19 +00:00
ajohnsen@google.com c93bb293c5 Fix signal handler in checked mode..
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32424 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 13:19:23 +00:00
ajohnsen@google.com 2f60129fb0 Document ProcessSignal::watch.
We now also allow watching for SIGTERM.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32416 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 09:41:38 +00:00
sgjesse@google.com a89aa53071 Make the Platform.environment return value an unmodifiable map
R=ajohnsen@google.com, kustemann@google.com
BUG=http://dartbug.com/15872

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31468 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-06 10:18:22 +00:00
ajohnsen@google.com 38d0fad2c7 Signal handling, take 2.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31276 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 15:07:48 +00:00
ajohnsen@google.com f24f568571 Revert "Signal handling."
This reverts commit r31270.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31275 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 14:03:15 +00:00
ajohnsen@google.com e8d9794c70 Signal handling.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31270 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 13:08:26 +00:00
ajohnsen@google.com 8fdf9b8ee6 Use correct output encoding in Process.runSync.
BUG=https://code.google.com/p/dart/issues/detail?id=13149
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27283 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:33:53 +00:00
floitsch@google.com 35d7140e66 Remove Encoding-enum from dart:io and add interface in dart:convert.
BUG= http://dartbug.com/6284
BUG= http://dartbug.com/7966
R=nweiz@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26632 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:37:25 +00:00
sgjesse@google.com 959456533f Add Process.runSync for running processes synchronously
BUG=http://dartbug.com/1707

R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26052 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 14:12:31 +00:00
ajohnsen@google.com f7d1f50329 Remove _BufferList from dart:io and now use BytesBuilder.
BUG=
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24941 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 10:39:02 +00:00
ajohnsen@google.com e01bcbaa0d Include parent environment by default, add option to not, for Process.
BUG=https://code.google.com/p/dart/issues/detail?id=9294,https://code.google.com/p/dart/issues/detail?id=9295
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24262 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 06:44:55 +00:00
ajohnsen@google.com ff7d45d16f Always escape " in Process on Windows.
BUG=https://code.google.com/p/dart/issues/detail?id=10895
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24232 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 14:50:33 +00:00
sgjesse@google.com 0cd11fcdc3 Remove Encoding.BINARY
THe Encoding.BINARY was a bad idea. It is now removed and null is used to indicate binary result from Process.run.

R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23977 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 13:06:11 +00:00
sgjesse@google.com c2d41fb1ba Add support for binary stdout/stderr data when using Process.run
R=ajohnsen@google.com
BUG=http://dartbug.com/9167

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23962 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 10:27:54 +00:00
ajohnsen@google.com e2350a610b Temporary, only escape quotes if run in shell.
This gets pub to pass. This patch should be reverted at some point.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23150 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 14:14:45 +00:00
ajohnsen@google.com 686cebef6e Use correct path escape on Windows, for Process.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23148 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 13:34:27 +00:00
ajohnsen@google.com 87ea640826 Remove ProcessOptions and make the options named arguments.
This also removed Process.runShell and adds a new flag: runInShell.

BUG=
R=kustermann@google.com, nweiz@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23131 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 11:03:40 +00:00
sgjesse@google.com 732556a48d Fix patch file return types
TBR=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21615 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-17 11:10:21 +00:00
sgjesse@google.com cf64f0ad79 Add access to process id for both current process and processes started
BUG=https://code.google.com/p/dart/issues/detail?id=9129

R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21611 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-17 10:15:29 +00:00
floitsch@google.com bebe3ac2cd Refactor List.setRange function.
Review URL: https://codereview.chromium.org//13863012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21452 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 13:52:29 +00:00
ajohnsen@google.com ea312dd9e3 Also wrap stdin/stdout/stderr on Process.
BUG=https://code.google.com/p/dart/issues/detail?id=9439

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21132 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 06:21:17 +00:00
floitsch@google.com bef8ebb5f6 Add Iterable.fold (and Stream.fold) which replace reduce.
For now this is just a copy. In a next step we will change the behavior of
`reduce`.

BUG= http://dartbug.com/9536

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20978 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 16:12:40 +00:00
sgjesse@google.com e10bc2d3e0 Reapply "Add a sleep function to dart:io"
This reapplies r20952, r20953, r20954 together with hiding sleep from
dart:io in a number of tests.

R=ager@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20964 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 13:04:26 +00:00
sgjesse@google.com 22a06ceeea Revert r20952, r20953, r20954
Too many failures due to conflicting top level sleep methods.

TBR=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20955 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 10:06:56 +00:00