Commit Graph

73 Commits

Author SHA1 Message Date
Ryan Macnak d9c3190e44 [vm] Remove some bin -> vm includes.
Change-Id: Id304de9618a299a201b946a901a54352772f56fb
Reviewed-on: https://dart-review.googlesource.com/48704
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-28 23:16:09 +00:00
Zachary Anderson 9c40a7e662 Reland: [dart:cli] Adds waitFor(Future)
This is a reland of https://dart-review.googlesource.com/#/c/sdk/+/28920/
with the following changes:
- It creates a new library dart:cli
- waitFor(Future) goes in dart:cli instead of dart:io
- Removes a flaky test, and adds a missing precompiler entrypoint
- Adds waitFor(Future)
- Improves doc comments

fixes #31102

Change-Id: I04d2c46fd0afac049dd4fd1353905dc20da18f90
Reviewed-on: https://dart-review.googlesource.com/29449
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Natalie Weizenbaum <nweiz@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-18 16:38:54 +00:00
Alexander Aprelev d822bdb797 Prefix scripts from core builtin libraries so the URIs are unique.
After https://dart-review.googlesource.com/c/sdk/+/7588 we ended up with two crypto.dart files in the core prebuilt libraries(io and _http), which caused problem with coverage tool that relied on the fact that script uris can uniquely identify files. https://github.com/dart-lang/coverage/issues/194 was filed to handle non-unique uris.
This CL ensures that core builtin libraries URIs stays unique by prefixing them with 'dart:' library prefix. This makes core builtin libraries scripts have names similarly structured to script names for other core libraries.

Bug:
Change-Id: I79960f4f24e6e958836df866365355584c28df27
Reviewed-on: https://dart-review.googlesource.com/11140
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-05 15:47:43 +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
Terry Lucas 0585e74b63 Fixed analyzer test to use dart2js not dartium
R=paulberry@google.com

Committed: https://github.com/dart-lang/sdk/commit/704de3bb3e27313c0eb6eb5ebc03173a5396dd1e
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: https://github.com/dart-lang/sdk/commit/a18908461adc431af2ee0114ed5ea9ef781bfb67
Committed: https://github.com/dart-lang/sdk/commit/d96561af083777ac9529c75ae05b6e89f8f06a6c
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: https://github.com/dart-lang/sdk/commit/a18908461adc431af2ee0114ed5ea9ef781bfb67
Review-Url: https://codereview.chromium.org/3008563002 .
2017-08-30 20:07:15 -07:00
Terry Lucas 05ca90aa8c Removed Dartium test exceptions
R=alanknight@google.com

Committed: https://github.com/dart-lang/sdk/commit/84f079f24c75aec51a53c17f1ebe0027b2adbb0c
Review-Url: https://codereview.chromium.org/2983033002 .
2017-08-29 07:15:06 -07: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
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Siva Annamalai f436b4986c Related to issue 27860
- Removed code which stored the source code paths for core and
  builtin libraries.

BUG=27860
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2921513002 .
2017-06-01 11:11:09 -07:00
Siva Annamalai ae57eca504 Read builtin source files directly only under a flag which is off by default.
BUG=27860
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2903693003 .
2017-05-23 18:14:00 -07: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
Zachary Anderson 479a97b129 clang-format runtime/bin
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2480793002 .
2016-11-04 12:30:56 -07:00
Zachary Anderson 7e1b7e54d7 Starting work on full GN build
This change:
- Sucks in gn binaries
- Sucks in a version of llvm that the GN build likes
- Adds tools/gn.py to invoke gn
- Adds a root BUILD.gn and .gn file
- Removes chrome boilerplate we don't need
- etc.

This lets us do a standalone build of the 'runtime'
target for x64, ia32, arm, arm64, mips, and the
simulators on Linux, and arm and arm64 on Android.

It does not include tcmalloc, and hasn't been tested
on Mac or Windows. That work and more cleanup of
chrome boilerplate will come in follow-up CLs.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2350583002 .
2016-09-23 07:47:36 -07:00
Todd Turnidge 1166f83bf6 Only reload libraries when they may have been modified.
We now check all of the scripts which make up a library.  If any
script is modified, then we consider that library to be modified.  We
also consider any library which imports a modified library to be
modified.  To propagate this info efficiently, we build and discard
the imported-by graph when beginning a reload.

The embedder must provide a FileModifiedCallback in order to support
the detection of modified scripts.

In order to detect changes to package: libraries, we have modified the
embedder interface to provide the resolved url when possible, so that
we don't need to re-resolve package uris when checking for reload.
This change is incompatible and all embedders will need to be updated.

We now support a "force" flag when reloading sources.  This causes all
libraries to be reloaded regardless of whether the underlying scripts
have been updated.

Closes #26919

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2186423002 .
2016-07-29 11:23:18 -07:00
Jacob Richman 96ca5db7e5 Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop objects in cases where the member name is not known statically. These methods would be extension methods on JSObject if Dart supported extension methods. Update package js to export these methods. Implement in Dart2JS. Implement JS$ in dart2js.
BUG=
R=alanknight@google.com, sra@google.com

Review URL: https://codereview.chromium.org/2150313003 .
2016-07-25 09:59:01 -07:00
Ivan Posva 964f95a020 - Fix loading of dart:html.
- Remove debug print in VM service.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1952903002 .
2016-05-04 17:43:58 -07:00
Ivan Posva 3884fd4e4b - Allow for loading dart:html and friends into the standalone
dart_bootstrap binary to evaluate startup and compilation
  performance.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1916793003 .
2016-05-03 20:33:14 -07:00
Zachary Anderson 45661a7091 Cleanup in //runtime/bin
R=iposva@google.com

Review URL: https://codereview.chromium.org/1800863002 .
2016-03-16 10:01:00 -07:00
Ivan Posva d97c7bdbde - Include sources in gen_snapshot and dart_no_snapshot to allow
creating full snapshots without having a full Dart SDK checkout.

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

Review URL: https://codereview.chromium.org/1449163003 .
2015-11-17 14:58:09 -08:00
John McCutchan 51d8bae199 Revert "Hide Isolate pointer from embedder"
This reverts commit 014e694ba7.

Revert "Fix fall out from hide isolate pointer change"

This reverts commit 966aafbc81.

Revert "Fix build"

This reverts commit d7b03ba7b0.

BUG=

Review URL: https://codereview.chromium.org//1140263005
2015-05-19 11:41:42 -07:00
John McCutchan 014e694ba7 Hide Isolate pointer from embedder
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1130753006
2015-05-18 14:06:10 -07:00
asiva@google.com 35cbf31ca1 Instead of aborting in Builtin::LoadAndCheckLibrary let the caller handle the error condition accordingly.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45804 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 23:27:58 +00:00
johnmccutchan@google.com 172baa03ff Service isolate rework take 2
Review URL: https://codereview.chromium.org//889443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43306 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 18:31:27 +00:00
johnmccutchan@google.com db271b0477 Revert r43217, r43215, r43208, r43207, and r43202.
Reverting because of some isolate spawn issues (on Windows, and pub bots).

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43219 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 22:56:18 +00:00
johnmccutchan@google.com 66aa470fc6 * Create vm-service isolate at Dart_Initialize time.
* Remove Service create callback.
* Simplify creation of service isolate.
* Creation is done on thread pool.
* Use vm-service isolate for loading in standalone embedder.
* Remove import of dart:io from builtin library.

performance changes:

no service isolate:

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | -    0]

always start service isolate (as a thread pool task):

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:45 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:44 | 100% | +12363 | -    0]

service does I/O (calls to Dart_LoadScript block until service is running):

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | -    0]

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43202 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 19:45:48 +00:00
zra@google.com 0219bdb81a Regularize naming to make BUILD.gn files easier to write.
Review URL: https://codereview.chromium.org//703693002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41510 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 22:03:57 +00:00
rmacnak@google.com e803f27641 Make Dart_LoadLibrary and Dart_LoadSource take line and column offsets like Dart_LoadScript.
BUG=http://dartbug.com/13460
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38801 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:25:23 +00:00
iposva@google.com 7256650645 - Change when the library being loaded is registered. Now
we register it before calling the tag handler so that the
  VM can keep track of which libraries have outstanding
  requests.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35870 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 21:46:05 +00:00
johnmccutchan@google.com ef666553a1 Add runtime and native entry tags
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
asiva@google.com 292d8c9c21 Fix 13594.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28017 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 16:55:20 +00:00
asiva@google.com 89ef11e004 Final step towards loading core library scripts directly from the sources
- Modify bin.gypi to ensure that the io library and patch files are read
  directly from the sources. Remove the source buffer generation step in
  the gypi files for all the io library and patch files.

- Restructure the code a bit to eliminate some code duplication.

- Delete runtime/tools/concat_library.py

R=ager@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22514 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 16:42:46 +00:00
smok@google.com ebbc2020a2 Put everything in runtime/bin into '::dart::bin' namespace.
Review URL: https://codereview.chromium.org//14341015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22032 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 14:22:30 +00:00
asiva@google.com 97ef3c86d3 Move json, uri, utf and crypto libraries into the VM.
This should ensure that we would not need a patch per embedder for these libraries in case somebody decides to patch these.
Review URL: https://codereview.chromium.org//12318031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18865 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 01:24:57 +00:00
sra@google.com b82378e3e4 Revert "Fresh try at "Use browsers JSON.parse for parsing JSON.""
Review URL: https://codereview.chromium.org//12220009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18117 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 07:11:12 +00:00
sra@google.com 2a3de27007 Fresh try at "Use browsers JSON.parse for parsing JSON."
Review URL: https://codereview.chromium.org//12221009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18116 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 07:00:47 +00:00
sra@google.com 42ccc2aa4a Revert "Revert "Revert "Use browsers JSON.parse for parsing JSON."""
Review URL: https://codereview.chromium.org//12192003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18024 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 04:01:28 +00:00
sra@google.com 75a7b7e0f6 Revert "Revert "Use browsers JSON.parse for parsing JSON.""
with missing gyp file.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18023 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:36:10 +00:00
sra@google.com e525fdb517 Revert "Use browsers JSON.parse for parsing JSON."
Review URL: https://codereview.chromium.org//12190002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18022 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:25:53 +00:00
sra@google.com cafd5ddcae Use browsers JSON.parse for parsing JSON.
This shrinks swarm by 27k (3.6%)
We can't make the error messages be the same since the native error contains only a message.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18021 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:17:41 +00:00
whesse@google.com ad4681a661 When building standalone Dart executable, put implementation of dart:io natives in a separate library.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14679 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 13:19:26 +00:00
asiva@google.com ebbb7c4134 - Represent strings internally in UTF-16 format, this makes it
compatible with webkit and will allow for easy externalization of
  strings. One byte strings are retained for pure ASCII strings.
  (The language specification was changed recently to reflect this as
   follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
  consistent and better describe the underlying functionality
  Dart_NewString => Dart_NewStringFromCString
  Dart_NewString8 => Dart_NewStringFromUTF8
  Dart_NewString16 => Dart_NewStringFromUTF16
  Dart_NewString32 => Dart_NewStringFromUTF32
  Dart_NewExternalString8 => Dart_NewExternalUTF8String
  Dart_NewExternalString16 => Dart_NewExternalUTF16String
  Dart_NewExternalString32 => Dart_NewExternalUTF32String
  Dart_StringGet8 => Dart_StringToUTF8
  Dart_StringGet16 => Dart_StringToUTF16
  Dart_StringToCString => Dart_StringToCString
  Dart_IsString8 => Removed
  Dart_IsString16 -> Removed
  Dart_StringToBytes -> Removed
  Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 17:56:46 +00:00
ager@google.com aac030e777 Use patching for dart:io.
This allows the tools such as dartdoc to operate on dart:io
in the same way as it does with other code and allows the
implemenation of parts of dart:io for dart2js if we ever
want to do that.

The current patching is very VM specific. I have only moved
stuff to patch files when they actually need to be. For
Process and Socket everything has to be moved because they
use native fields. For the rest, only the individual native
calls have been put in patch files.

R=sgjesse@google.com,ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14259 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 10:32:30 +00:00
asiva@google.com 6a0ea0d428 Simplify functions in Builtin class and get rid of unused code.
Review URL: https://chromiumcodereview.appspot.com//10911135

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12085 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-08 01:00:28 +00:00
lrn@google.com 978c3f6da6 Move dart:web to pkg:htmlescape.
Remove the dart:web library from the VM.
Remove reference to web library from libraries.dart.

Review URL: https://chromiumcodereview.appspot.com//10919147

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12023 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 12:30:55 +00:00