Commit graph

1337 commits

Author SHA1 Message Date
Sarah Zakarias 6512f5563d Revert "Revert "Add dart2native tool for building either an aot file or a stand-alone executable.""
This reverts commit 54fdd559d8.

Trying to reland this after https://dart-review.googlesource.com/c/sdk/+/115364 hopefully fixes the issue leading to the revert.

Change-Id: If3c49bea9d791aa3d569003490c1cbe8b325f2e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115705
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-05 14:46:43 +00:00
Ben Konyi 54fdd559d8 Revert "Add dart2native tool for building either an aot file or a stand-alone executable."
This reverts commit a6141ff5c9.

Reason for revert: Blocking Dart SDK -> Flutter engine roll. See logs here: https://github.com/flutter/engine/pull/11836/checks?check_run_id=210988794

Original change's description:
> Add dart2native tool for building either an aot file or a stand-alone executable.
> 
> *dart2aot has been rewritten in Dart accompanied by a trampoline script.
> *dart2exec is still missing implementation.
> 
> Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
> Commit-Queue: Sarah Zakarias <zarah@google.com>
> Reviewed-by: Clement Skau <cskau@google.com>

TBR=cskau@google.com,zarah@google.com

Change-Id: I4c5946ce0f0a66484e243b98cdcb7e2b24e2d705
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-09-04 00:40:20 +00:00
Sarah Zakarias a6141ff5c9 Add dart2native tool for building either an aot file or a stand-alone executable.
*dart2aot has been rewritten in Dart accompanied by a trampoline script.
*dart2exec is still missing implementation.

Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-03 09:36:50 +00:00
Jens Johansen 8a670d773b [CFE/bazel/DDC] Match 'tags' to reuse compiler state
This CL introduces 'tags' as a way to distinguish different setups and
be able to throw away previous state when it cannot be used.
These tags are - for now - basically filled up with the roots used for
the multi root filesystem, the idea being, that if they have changed we
cannot reuse the old state.

Change-Id: I19e069513ce3836f5bc6abf047e4359836fc7e09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114945
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-30 12:06:41 +00:00
Jens Johansen 3f0f66cabc [DDC,bazel] Allow no digest when not in worker mode
Change-Id: Id4d2b385bc00e7dc4e20aefea9ba38e4839bbaca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114065
Reviewed-by: David Morgan <davidmorgan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-22 11:15:19 +00:00
Jens Johansen 976877974b [bazel] Don't require empty linked inputs for incremental mode
Before this CL one could ask to use the incremental compiler, but not
actually get the incremental compiler because one supplied linked inputs
(and not just summary inputs).

This is an artificial limitation, and inside the compiler there are no
real difference between "linked" and "summary" inputs. "Summaries" are
marked as "external" but that's a historical hack to mark it as something
we don't want to serialize --- something that is not used in this package.

Generally, the distinction and hack should go away entirely.
Considering there is no difference in this package, a good start would be
to remove the distinction in this package, but as this package is used
both internally and externally, this CL won't do that, but will just treat
the two 'different' input types the same.

Change-Id: I11a3962d22424387eca83212d08f535da350bd1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113022
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-22 08:31:47 +00:00
Alexander Markov ea7348c5f0 Revert "[vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode"
This reverts commit beee442625.

Reason for revert: StackOverflow on language_2/deep_nesting_expression_test/01 in interpreted mode.

Original change's description:
> [vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode
> 
> Temporary setting of FLAG_enable_interpreter is avoided in the VM unit tests as
> this flag is global and used by kernel service isolate while running tests.
> Flipping this flag causes assertion failures in kernel isolate's background compiler
> or infinite loop between LazyCompile stub and CompileFunction as AttachBytecode
> doesn't set entry point to InterpretCall.
> 
> The less intrusive way to ensure compilation of functions in unit tests is to set
> FLAG_compilation_counter_threshold to 0.
> 
> Change-Id: Ia46ff8d03d66ab8b147b9d89336548c4a9c29f5d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113123
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,regis@google.com

Change-Id: I67cd03a56f9a2d29aa6597d38779e77ca3a16b18
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113480
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-16 22:39:52 +00:00
Alexander Markov beee442625 [vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode
Temporary setting of FLAG_enable_interpreter is avoided in the VM unit tests as
this flag is global and used by kernel service isolate while running tests.
Flipping this flag causes assertion failures in kernel isolate's background compiler
or infinite loop between LazyCompile stub and CompileFunction as AttachBytecode
doesn't set entry point to InterpretCall.

The less intrusive way to ensure compilation of functions in unit tests is to set
FLAG_compilation_counter_threshold to 0.

Change-Id: Ia46ff8d03d66ab8b147b9d89336548c4a9c29f5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113123
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-08-16 20:53:10 +00:00
Alexander Markov 1644d4b178 [vm/bytecode] Train kernel service with bytecode generation
If Dart SDK is built with --bytecode, kernel service will generate
bytecode, so it should be trained with bytecode generation as well.

Change-Id: I1a7914c78dfcbd51425585b5600b299fee4c6506
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113381
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-16 19:31:00 +00:00
Jens Johansen 23a956c7a8 [bazel] Fix serialization when not doing summary
Before this CL, if using the incremental compiler in bazels
kernel_worker, did not do summaries and did ask to "exclude-non-sources"
one would still get the entire thing (including loaded summaries etc)
(i.e. it would behave as if "exclude-non-sources" wasn't set).

This CL fixes it and makes it serialize as in the non-incremental case.

Change-Id: I396b53664a3d1ac32a243e903c8ff5c049fca453
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113021
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-08-15 16:31:30 +00:00
Jens Johansen aeb864a43f Allow bazels kernel_worker to output used inputs
This change basically consists of these steps:
* Enable the incremental compiler to trace used inputs.
* Translate used libraries into used dill inputs.
* Output the list of used dills.

Bug: #37788
Change-Id: I08cffe299166cf10e990c9e261f190afd25da8b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112384
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-08-13 08:28:09 +00:00
Vijay Menon 45591cd123 [dartdevc] fix sdk source map paths
Change-Id: I5d508d64b8cb9e8cc9ca764ab34f57aebcc9146a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109020
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-15 16:11:04 +00:00
Vijay Menon 11da803fe9 [dartdevc] build the ddk sdk with dartdevc
This:
(1) Uses dartdevc and kernel_worker directly to build ddk artifacts.

(2) Generates an outline file instead of a full dill file for ddc_sdk.dill.

(3) Fixes source maps in the shipped sdk so that urls from dart_sdk.js.map
have correct relative paths to dart files in the sdk.  This won't work with
webdev/build as that copies and serves dart_sdk.js, but it will now be
able to build the sdk directly.

Change-Id: I7b9470fe18cac9b4343c7c520fe6ffd7bd9246b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104842
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-11 02:05:37 +00:00
Mark Zhou 9a07c4a817 [dartdevc] Properly encode Windows-style paths and paths with spaces for source maps
Change-Id: I32a28d7327a35c245a67343c91fdc74d6026d810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108503
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-07-10 16:49:22 +00:00
Jacob MacDonald 279c1da42d Use absolute paths as canonical paths for inputs digest maps
Change-Id: I9a6c5efe22d4ef1f46393e2983084fe0b8a4652b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107682
Reviewed-by: David Morgan <davidmorgan@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2019-07-01 16:02:14 +00:00
Vyacheslav Egorov d35358426c [tools] Remove patch_sdk tool which is no longer used.
This tool has not been used ever since Fasta learned to parse and apply
patch files directly.

Change-Id: Idfa2a65d106279f208e48ece9967d39d72b6faeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106911
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-06-25 11:46:37 +00:00
Vijay Menon 8a94b6f8b0 [dartdevc] don't gen source maps for helper code compiled with dart2js
Change-Id: If1108ce6f8adf6673abeaafe8f060833284b516d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106020
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-06-21 14:20:46 +00:00
David Morgan 0a57ce3f23 Make KernelWorker support running in an isolate.
Change-Id: I9a6ab96bbd7901b3f61b3769b40c76fd36b90071
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106340
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-06-17 16:23:59 +00:00
Vijay Menon 3b5a187726 [dartdevc] move ddc internal libraries under sdk
Note, this has the effect of including all DDC Dart sources with the
shipped SDK: we ship everything under sdk/lib.

This should enable https://github.com/dart-lang/build/issues/2262

Change-Id: If66bc7c620034e7f2acf7d2c3e9524a408417681
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104383
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-06-04 13:47:29 +00:00
Vijay Menon 1b95819e3d [dartdevc] Train ddc on dill file instead of analyzer summary
Change-Id: I5560e309cac8e7ba4e4807af683bd64c6d0f63ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104040
Auto-Submit: Vijay Menon <vsm@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-05-29 16:17:10 +00:00
Jens Johansen ec3cd7ffe0 Workaround for dartbug.com/36983 also when not in incremental compiler
When invoking the kernel worker in worker mode, reusing previous state,
but not using the incremental compiler, we will currently leak,
see dartbug.com/36983.
This was previously fixed in the incremental compiler case, but this CL
moves the fix outside the if to fix it in every configuration.

Change-Id: I993fecbcc053d2bca64af9e65d270f75411f2e68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103626
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-27 10:46:18 +00:00
Sigmund Cherem 64ed4bf664 Changes to bazel worker to support modular testing.
This includes:
 * accepting null values like sdk-summary or .packages (which are not used when building kernel for the sdk itself)
 * allow enabling language experiments
 * only exclude-non-sources on the non-incremental code path if that's requested

Change-Id: I08eeb643676f1f1406f0f3030c341d68179d42a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103574
Reviewed-by: Nate Bosch <nbosch@google.com>
2019-05-24 19:09:12 +00:00
Jens Johansen 2bbb6aae9b Fixes to incremental DDK/blaze
This CL fixes a number of issues:
* Semi-leaking old components when starting over
  (i.e. when loading a new sdk)
* Setting new filesystem not really working because the old one was
  cached in the ProcessedOptions
* Leaking old state because of an apparent VM bug (http://dartbug.com/36983)

Change-Id: Ib124257c456b019941e253409c1ef56eedcf66b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103121
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-05-21 09:10:58 +00:00
Jens Johansen 6b730e8203 [bazel/kernel_worker] Only workers use incremental compiler; require digest
Change-Id: Iff4b45ffba79a05ce829ed73d952937ae55624d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101282
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-05-21 08:13:58 +00:00
Jens Johansen 099af47a69 [kernel] add ability to disable offsets for bazel worker to use
This is a lightly modified version of Jennys CL @
https://dart-review.googlesource.com/100275

Change-Id: I46a1665d84d04602af1f338cf963bc25b4e6b25c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101280
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-21 07:55:10 +00:00
Jacob Richman e2976acd22 Add --track-widget-creation flag to frontend_server.
This is needed to activate the kernel transformer embedded with the kernel package from the flutter engine.

Change-Id: I3253e01723b662eb48b4b3743ac5bcc1b44c7d46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102920
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jacob Richman <jacobr@google.com>
2019-05-20 22:47:28 +00:00
Aske Simon Christensen 8754351283 [CFE] Run widget transformer before constant evaluation.
Change-Id: I51ded35ecb95cb5cfbac5ecf8967e0918a48269a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101987
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-05-10 11:02:49 +00:00
Aske Simon Christensen 1179467a5e Move widget transformer to kernel package
Change-Id: I7f9ece029e181d380f37028ed04f97d4fdfb12b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101985
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-10 11:02:49 +00:00
Ryan Macnak 3ad32e4287 [vm] Revert 1db1ac4863.
This feature was for Goma work that has been marked obsolete.

Bug: FL-48
Change-Id: I9997f8aefbe1d55f86cff2ab377166a0bce1ed53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101925
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-08 23:52:29 +00:00
Chingjun Lau 51730db51b Add flutter track widget creation transform to bazel kernel worker
Had to do a few changes to make this happen:
1. Restored some of the code removed in the transformer, making class
hierarchy optional.
2. Split the "compile" method in bazel_worker.dart into two, since we
need the intermediate Component object in one of the case.

Change-Id: I0ee004467e76dff0025f7979834c62b9db328ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100480
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-05-06 19:20:08 +00:00
Jens Johansen ed8e4255a4 Proposed fix to #36644
TL;DR: Unbind canonical names doesn't do what you think it does and
probably shouldn't (ever) be used. This CL stops using it in a few places.

Longer version:

When loading a dill file it:
- First loads the table of canonical names. These have no references yet.
- When a canonical name is asked for its reference it creates one if it
  doesn't yet have one.
- When loading, for instance, a library, it asks for the reference.

When unbinding a canonical name:
- It removes itself (the canonical name) from the reference
- It removes the reference in itself
- Note: Whatever has a pointer to the reference keeps it, and the
  reference points to whatever node it already pointed to.

This also means, that if we have a dill file that's split in two and:
- Load #1
- Load #2
that works fine, but if we
- Load #1
- Unbind canonical names
- Binds canonical names
- Load #2
stuff is not bound correctly (and an error is thrown).

And - the cause of this bug:
- Load #1
- Load #2
everything is fine
- Unbind canonical names
- Binds canonical names
- Load #2'
stuff is not bound correctly --- references points to stuff loaded as #2,
not as #2'. On top of being weird, wrong and confusing it also caused wrong
things to be but into the class hierarchy which ultimatly caused the crash.

This CL fixes it by not calling unbind and force loading of dill files
(at specific call sites) to create new libraries
(and in the process overwriting references ".node").

Revert "[dartdevc] Retry ddc incremental compile on crash"

This reverts commit ecdbdf00b8.

Revert "[kernel_worker] retry on failure"

This reverts commit 43eebea5a3.

Fixes #36644

Bug: #36644
Change-Id: Id8f548179e6a409b01f2ebfa3219f94cb64b1c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100380
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-26 07:18:28 +00:00
Chingjun Lau 2c4dc7a431 Support targetting flutter and flutter_runner in kernel_worker
Change-Id: I87745f48ba09a0ac8629ae6518b7dad883733447
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100180
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-04-23 20:06:45 +00:00
Vijay Menon 43eebea5a3 [kernel_worker] retry on failure
Workaround for https://github.com/dart-lang/sdk/issues/36644

See similar for dartdevc: https://dart-review.googlesource.com/c/sdk/+/99442

Change-Id: Id02549a7bd8110b4691a724fa8930ede477464f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99735
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-04-17 23:36:01 +00:00
Nate Bosch d8a0d68bd6 Rename devcompiler to ddc
The value 'devcompiler' is never being passed to this argument so this
will not break any known use cases. The name 'ddc' has better
consistency with how we label SDK platforms in `build_runner`.

Bug: https://github.com/dart-lang/build/issues/2174
Change-Id: I95f6cb75ec86c2f276298781443203d201550815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99704
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-04-17 21:42:51 +00:00
Jacob MacDonald edc6f88168 Use compiler context when serializing components and performing transformations.
Without this, if an error occurs during serialization you get this message:

```
Internal problem: Compiler cannot run without a compiler context.

```

Instead of the real error.

Change-Id: I016ec0923a2e01b68f850988724be9d30179f78d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98740
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2019-04-10 06:26:33 +00:00
Clement Skau 907c514c89 [SDK] Adds build targets, wrappers and SDK builds for Dart AOT.
Adds:
- dart2aot, a script similar to dart2js which compiles my.dart to my.dart.aot.
- dartaotruntime, a minimal Dart runtime that only runs AOT blobs.
- some extra tooling like gen_kernel and gen_snapshot used by the above.
- build rules for all of the above, including adding it to the full SDK builds.

Bug:https://github.com/dart-lang/sdk/issues/27596
Change-Id: Ic35f832b2b86be959212b8d21cfc5a082da5ced4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97627
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-04-05 13:23:44 +00:00
Jens Johansen b7f69e24a2 dartdevc and bazel worker can use incremental compiler
This allows dartdevc and the bazel worker to user
the incremental compiler with kernel.
Use --reuse-compiler-result --use-incremental-compiler to run in this mode.

Change-Id: I9189ce5f1a51320d9d96e071f8c95c80fe6fca84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95386
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-29 12:07:42 +00:00
Liam Appelbe 89f00ab25f Add a build rule for bytecode version of kernel_service.dill
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: Ifc95ff270c33cce13699bda23c1b7c8fb6139e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96835
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-19 21:29:29 +00:00
Jacob MacDonald d267fb6bf3 change the SummaryTarget to extend the DevCompilerTarget
Change-Id: I2ebd09e35b8ba8a254a318103102d33291f006a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97003
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2019-03-15 20:50:25 +00:00
Sigmund Cherem 74a23b96b0 Add support for dart2js targets to kernel_worker
This includes a `--target` flag (that in the future we can use for other targets
too) and a flag to accept the libraries.json file (currently needed to properly
compute constants of the form `bool.fromEnvironment('dart.library.io')`.

Change-Id: I8beea48610f0e1e721b7c76e545c9f662e3255ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96849
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-03-15 18:02:10 +00:00
Zach Anderson 8332fb0631 [vm] Adds an API call to dump the CPU profile to the timeline
Used in https://fuchsia-review.googlesource.com/c/topaz/+/258655

Change-Id: I79b102e0d318d7be3bae44fb88f81bb8086a10d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2019-03-07 21:28:26 +00:00
Ryan Macnak 30b47d24e6 [sdk] Remove unused --packages flag no longer recognized by gen_snapshot.
Change-Id: Ibcb27b11ed550724c2e8bac1b68801a2d3eb4892
Reviewed-on: https://dart-review.googlesource.com/c/94001
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-22 19:48:51 +00:00
jonahwilliams 3e304def65 switch dartdevc to kernel and fix path in rules.
The flutter engine needs to switch to the full SDK to include web support. As written, the dartdevc rules do not work outside of the sdk repo


Bug: https://github.com/dart-lang/sdk/issues/35834
Change-Id: I3b7711cf1920d86b82ddc4f0959b447207f54751
Reviewed-on: https://dart-review.googlesource.com/c/93760
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-02-22 01:02:05 +00:00
Ben Konyi 4cff5a4fd6 [ VM / Service ] Dynamically load source from linked-in platform kernel
- Added `Dart_SetDartLibrarySourcesKernel` to the Dart embedding API.
- vm_platform_strong.dill now contains the Dart SDK sources
- If vm_platform_strong.dill is linked into the Dart binary, the first
  request for a Dart SDK Script object from the VM service will load the
  sources for the script from the linked in kernel buffer.

Change-Id: I664abe31f9378d25ec79c21edce0b237a278495d
Reviewed-on: https://dart-review.googlesource.com/c/93375
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-21 18:22:39 +00:00
Jenny Messerly 3d6acab3e7 [dartdevc] remove unused dartdevk binary, fixes #35483
It's simply an alias for `dartdevc --kernel`, and now that build_runner
is switching to that, there's no reason to keep it around anymore.

Change-Id: I43d30a582314a236bcfa2e3a0b50bb48ddac79f8
Reviewed-on: https://dart-review.googlesource.com/c/88281
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-01-04 17:19:52 +00:00
Kevin Millikin d0c2cdcd4c [Kernel] Remove the syncAsync flag
This flag was always true so we can remove it and specialize the
remaining code that used it.  The only code that used it was in the
Dart VM's async transformation.

Specializing that code led to some unused fields in the async helper
class which were removed.  This triggered me to look at core types
which seems to have a lot of unused stuff.

Change-Id: I7da800ca17ac05478149f4c90337a38d2c2b1459
Reviewed-on: https://dart-review.googlesource.com/c/87960
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-21 10:07:04 +00:00
Jenny Messerly d3c3341b8a [dartdevc] fix conditional imports in kernel backend
Change-Id: I694b67624dff65099ca8cb8147d2b56a3532cd6c
Reviewed-on: https://dart-review.googlesource.com/c/85880
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-12-04 18:39:46 +00:00
Sigmund Cherem b484aada21 Remove library-root option - replace it with a libraries-spec option instead
Change-Id: Ie1df52cdaa7ab4381a4c1b94c61a1210f0f31b5f
Reviewed-on: https://dart-review.googlesource.com/c/83641
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-09 22:40:28 +00:00
Jacob MacDonald 8f4e379665 update kernel worker to enable sync-async
Bug: https://github.com/dart-lang/sdk/issues/34852
Change-Id: I80a6209fd241aec455c67a9eb1893bf3c4c70e47
Reviewed-on: https://dart-review.googlesource.com/c/80561
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-10-18 16:07:18 +00:00
Peter von der Ahé 0a6d960d66 Update bazel_worker to onDiagnostic
Change-Id: If1e0f3977f9d70ae74cfb589aeddcb96ce1fafc1
Reviewed-on: https://dart-review.googlesource.com/c/78041
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-15 14:06:55 +00:00