Konstantin Shcheglov
031cfcf993
Fix for combining outlines when we first see the external version of a library (so, without exports).
...
Bug:
Change-Id: I4aeef7f2ae85ce4e5ac8b997aa43d120304aee6b
Reviewed-on: https://dart-review.googlesource.com/19061
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-07 19:30:10 +00:00
Konstantin Shcheglov
11543a9540
Update Library.additionalExports during combining.
...
Bug:
Change-Id: Ia99a9f64834acb62ee6ffb95836b957b85f90731
Reviewed-on: https://dart-review.googlesource.com/18960
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-07 04:08:29 +00:00
Konstantin Shcheglov
00d9c180c3
Fix for combining private members.
...
Bug:
Change-Id: If623420777c13a2d6e56dfcc33be4f2d4ae69f34
Reviewed-on: https://dart-review.googlesource.com/18686
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-06 18:25:44 +00:00
Konstantin Shcheglov
5ea30b4e3d
Rename performace_logger.dart to performance_logger.dart
...
R=paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ib7b6d122dff3ddabde3db2270daa777a269e04ed
Reviewed-on: https://dart-review.googlesource.com/18512
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 20:24:00 +00:00
Konstantin Shcheglov
611475aaaa
Separate KernelDriver.getKernel() and getKernelSequence().
...
The reason to have both is that IKG needs kernels for all libraries,
potentially not even deserialized from bytes, if we eventually get this
optimization.
OTOH, Analyzer always needs just one library, with enough outlines
to make sense of the dependencies. For now, getKernel() is implemented
using getKernelSequence(), this will change with switching to
outline based compilation.
R=paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Iba02bc3a4cdb67a896c4faa2f809c7cb8069aa9e
Reviewed-on: https://dart-review.googlesource.com/18509
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 20:00:01 +00:00
Konstantin Shcheglov
cd2f4a1e44
Update references to Class and TypeParameter, updates for tests.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I8a922df8c21fe2ff54c60da989f87524b0cff56c
Reviewed-on: https://dart-review.googlesource.com/17340
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 18:55:11 +00:00
Konstantin Shcheglov
9b8e8c2344
Add memory cache directly into ProtectedFileByteStore.
...
So, it can be used standalone, without wrapping into
MemoryCachingByteStore, and IKG can check for it to protect keys.
Bug:
Change-Id: I50635c773b73ad7e57d0dfe1fd9e3c4574f1a1aa
Reviewed-on: https://dart-review.googlesource.com/17560
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-10-31 18:10:05 +00:00
Konstantin Shcheglov
16d4e9606f
Use text presentation for expections and initial libraries state.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ia74e6012e02156a8ee30eb72c07a2415ed2dcba0
Reviewed-on: https://dart-review.googlesource.com/16880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-27 14:43:08 +00:00
Konstantin Shcheglov
ffadd1ed3d
When running analyzer_cli with --preview-dart-2, load SDK from vm_outline.dill.
...
We need this to be able to access classes that are required by Fasta,
but come from VM patches.
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I4d29e1dca42e016446516a2dab0fae138cb74548
Reviewed-on: https://dart-review.googlesource.com/16863
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-26 23:34:18 +00:00
Konstantin Shcheglov
d0f9e9927b
Combine class constructors and fields.
...
Testing is simple, but wordy.
I plan to replace testing of final states with text dumps.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I82dd3e7c575b68f6889e07f0084b5f9070538d39
Reviewed-on: https://dart-review.googlesource.com/16326
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-26 21:46:50 +00:00
Konstantin Shcheglov
fdb1ce53f1
Implement FlutterByteStore with temporary protected keys.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug: https://github.com/dart-lang/sdk/issues/31138
Change-Id: I8aa7344a0a9e232c28a077a7e40211a44685db63
Reviewed-on: https://dart-review.googlesource.com/15861
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-10-24 20:07:00 +00:00
Konstantin Shcheglov
ebc91d103c
Implement combining Class procedures.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I4f93637fef4a41acb987d65da75c4ded27c66f6e
Reviewed-on: https://dart-review.googlesource.com/16060
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-24 18:07:18 +00:00
Konstantin Shcheglov
a8fa25afa2
Add more tests for combining top-level getters and setters.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I124c6914b08a70dcbd7cb51d30be28ff45f04299
Reviewed-on: https://dart-review.googlesource.com/15982
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-10-23 20:04:29 +00:00
Sigmund Cherem
bc1dd524ba
Use custom URIs on most of front_end unit tests
...
This required a couple small fixes where we had made assumptions in our system
about not having anything other than dart, package, and file URIs.
Change-Id: Ie0943f609ceeaacf3fb284ceba0df5c55c315b0b
Reviewed-on: https://dart-review.googlesource.com/11650
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-10-21 00:26:58 +00:00
Vyacheslav Egorov
9cd7bc724d
[VM, Kernel] Fix sync* implementation in checked mode
...
Change abefb7b432 introduced a typing issue
instead of fixing it: _SyncIterator<T>._current was actually used to return
either a value of type T (for yield) or value of type Iterable<T> (for yield*)
from the move callback.
This change refactors implementation of _SyncIterator in such a way that
_current is only used to return value for yield and a separate field
_yieldEachIterable is used to return Iterable<T> for yield*.
Change-Id: I3e3c832bbc8986d6976ddbb0856a1b5a127d845b
Reviewed-on: https://dart-review.googlesource.com/15542
Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2017-10-20 18:15:28 +00:00
Konstantin Shcheglov
2747dae5d7
Copy uriToSource from compiled programs into IKG results.
...
This lets us to remove some code, and we start respecting the
`embedSourceText` option.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug: https://github.com/dart-lang/sdk/issues/31139
Change-Id: I2007f4b887fa9d417f18364bbb063bb3de3a08be
Reviewed-on: https://dart-review.googlesource.com/15240
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-19 22:14:47 +00:00
Vyacheslav Egorov
abefb7b432
[kernel] Assign proper types and interface targets to nodes created by async transformer.
...
Bug: https://github.com/dart-lang/sdk/issues/31070
Change-Id: Iaedbd425fcb6d243c0bfa93495335658553a9301
Reviewed-on: https://dart-review.googlesource.com/14481
Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2017-10-17 17:44:00 +00:00
Konstantin Shcheglov
6b5ba5351b
Implement combining outlines for top-level declarations.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Id849e68d3026457bdddb98604b92c7424961bbd9
Reviewed-on: https://dart-review.googlesource.com/11649
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2017-10-13 20:32:24 +00:00
Peter von der Ahé
16aa720d27
Remove compiling platform.dill from patch_sdk.dart
...
This separates compiling platform.dill files from the patch_sdk.dart
script. The motivation for that is that I'm working on reading patch
files directly from Fasta, so we can completely remove the build step
for generating patched_sdk and dart2js_patched_sdk.
Short-term this should allow Paul to add a strong-mode version of
platform.dill without causing to many conflicts with my work on
patches.
Change-Id: I1150845b2986348d4fffe27092701d8a9b57ea54
Reviewed-on: https://dart-review.googlesource.com/11506
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-10-06 15:34:37 +00:00
Konstantin Shcheglov
7f33f78026
Issue 30875. Don't damage _redirecting# when adding kernels to DillLoader.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug: https://github.com/dart-lang/sdk/issues/30875
Change-Id: Iede037673458131a357050ab61eb9930b70d372b
Reviewed-on: https://dart-review.googlesource.com/8381
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-09-26 20:41:14 +00:00
Paul Berry
291b83b345
Move reload.dart to test directory.
...
This will allow us to run hot_reload_e2e_test.dart internally.
Change-Id: Ia44b086683ea629a0af15addd652543daa1700ce
Reviewed-on: https://dart-review.googlesource.com/7450
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-09-21 13:43:02 +00:00
Sigmund Cherem
2d6a6b300f
Allow custom URI schemes in hot-reload unit test and internally in IKG and
...
hybrid file system.
Fixes #30673
Change-Id: Ib35a790ca4890ee6e212d2e8cfa4f572784d7f3d
Reviewed-on: https://dart-review.googlesource.com/5294
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-12 20:44:13 +00:00
Konstantin Shcheglov
5cf4b0f27a
Fill Program.uriToSource for libraries in delta.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I13f5e94f5857a9baaa52764907c2d7fbf2a4e4c7
Reviewed-on: https://dart-review.googlesource.com/4140
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-09-07 21:18:12 +00:00
Konstantin Shcheglov
1b4239d2e4
Export ByteStore and its implementations from front_end.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ie2e3413a7f143e270cec2bd3ae4564ad7cc315b1
Reviewed-on: https://dart-review.googlesource.com/3840
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-07 19:23:21 +00:00
Konstantin Shcheglov
a0b5dda332
Test that we store FunctionType.typedefReference in partial kernels.
...
The problem seems to be fixed in https://dart-review.googlesource.com/c/sdk/+/2880
so, there are no actual code changes.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ic7743aedc443a164762a87ff6af0d455a9137b8e
Reviewed-on: https://dart-review.googlesource.com/3720
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-09-07 01:43:15 +00:00
Peter von der Ahé
b460a25459
Store actual Reference(s) for additional exports.
...
R=johnniwinther@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/3009953003 .
2017-09-01 16:30:43 +02:00
Peter von der Ahé
f0277b32e8
Revert "Store actual Reference(s) for additional exports."
...
This reverts commit 234c4a7f49 .
Revert "Fix for ScopeBuilder[] - look into setters too."
This reverts commit 7924f4c42f .
Revert "Don't include BuiltinTypeBuilder(s) into additional exports."
This reverts commit e28aac09c4 .
The reason for reverting is that the two follow-up commits aren't correct.
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/3004973002 .
2017-08-31 16:13:50 +02:00
Konstantin Shcheglov
288b203b6c
Stop building export scopes in KernelDriver.
...
Fasta already store exports scopes into Kernel.
It was added some time ago and improved recently.
https://github.com/dart-lang/sdk/commit/234c4a7f493e1fc3dafc393472e39163ac2ad783
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/3004913002 .
2017-08-30 10:38:17 -07:00
Konstantin Shcheglov
234c4a7f49
Store actual Reference(s) for additional exports.
...
We need this to be able to tree shake outline.
https://github.com/dart-lang/sdk/issues/30448#issuecomment-325434406
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/3008763002 .
2017-08-30 09:56:21 -07:00
Konstantin Shcheglov
5d07433bb1
Mark types of Constructor parameters and preserve referenced typedefs.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/3009803002 .
2017-08-29 16:52:51 -07:00
Peter von der Ahé
a5bcf58b06
Move tools to tool folder.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/3003743002 .
2017-08-29 14:30:51 +02:00
Konstantin Shcheglov
a751b971a2
Remember direct dependencies in LibraryCycle.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/3009683002 .
2017-08-26 14:50:37 -07:00
Konstantin Shcheglov
6d5a29004c
Generalize LRU Cache to any objects.
...
It turned out that caching just bytes does not allow us to realize full
benefits of caching PackageBundle(s). We want to keep partially
decoded values like sub-objects and strings for maximum performance.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2998363002 .
2017-08-24 11:07:07 -07:00
Sigmund Cherem
f539785e03
Load extraRequiredLibraries from the target passed in the options
...
This makes the behavior match what fasta does.
Long term I agree we don't want these implicit imports. I sent an email to
brainstorm a solution for that.
This change will address one of the issues reported in http://dartbug.com/30491
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3007503002 .
2017-08-23 20:11:53 -07:00
Siva Annamalai
cfac48179b
1. Figure out the modified libraries from the specifeid kernel file during
...
reload instead of computing it based on the source modification information.
2. Fix for failure in Unit test case https://github.com/dart-lang/sdk/issues/30322
3. Fix crash in test that was being skipped in https://github.com/dart-lang/sdk/issues/30109 and turn that test on.
This CL is work towards completing issue https://github.com/dart-lang/sdk/issues/28051
R=aam@google.com
Review-Url: https://codereview.chromium.org/2998983002 .
2017-08-18 13:42:19 -07:00
Konstantin Shcheglov
eb3c3d8f77
Extract BytesMemoryCache from MemoryCachingByteStore.
...
BytesMemoryCache will be used in Bazel workers to cache values of
inputs by their digest, so avoid reading the same files multiple times.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/3000723002 .
2017-08-11 12:25:29 -07:00
Konstantin Shcheglov
ada4db3fb6
When using SDK outline, transplant its names into the name root.
...
It's a bit messy that we have to break immutability of CanonicalName(s)
here. The alternative is not re-load SDK outline from bytes every time.
It is relatively expensive for small tests, although probably relatively
less expensive for large apps when we load hundreds of other libraries.
Thoughts?
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG= https://github.com/dart-lang/sdk/issues/30409
Review-Url: https://codereview.chromium.org/2995773002 .
2017-08-11 12:00:37 -07:00
Konstantin Shcheglov
222ce73a49
Add IncrementalKernelGenerator.acceptLastDelta()/rejectLastDelta().
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG= https://github.com/dart-lang/sdk/issues/30377
Review-Url: https://codereview.chromium.org/2996843002 .
2017-08-10 12:28:14 -07:00
Konstantin Shcheglov
06e94bc360
Add support for SDK outline in IKG.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2999563002 .
2017-08-07 17:09:04 -07:00
Konstantin Shcheglov
5011b024df
Replace fake directories with actual createDirectory().
...
R=paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2994683002 .
2017-08-07 13:25:16 -07:00
Paul Berry
89c910b9c1
Move byte_store.dart and file_byte_store.dart to their own subdirectory.
...
This allows us to use the subpackage relationships test to verify that
they don't import any other parts of front_end, which paves the way
for the possibility of moving them to their own package in the future.
R=scheglov@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2990323002 .
2017-08-07 11:04:48 -07:00
Konstantin Shcheglov
c28419bce0
Add support for SDK outline in KernelDriver.
...
I had to weaken file system createDirectory() to avoid conflicts when
we re-create SDK, and attempt to re-recreate its directory.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2993093003 .
2017-08-07 10:46:44 -07:00
Sigmund Cherem
b48584d3d0
Switch FE to use the libraries.json format.
...
This CL:
* introduces the Dart API to operate over libraries specifications and describes
the format we intend to use (see libraries_spec.dart)
* implements serialization/deserialization for this API
* switches over the front_end to use these APIs
* public options accept a URI to the JSON file and no longer
accept a `dartLibraries` map
* internal code uses the LibrariesSpecification API
* switches other dependencies on these APIs (resynthesizer_test and patch_sdk.dart)
This is the first step in migrating over to use the libraries.json format and
eventually remove the patched_sdk step. In particular, some of the next steps
include:
* add a build step to generate .json files from .yaml files
* add a libraries.yaml file for the sdk
* split the patched_sdk step in two:
* patching files
* generating .dill files
* add any missing support for patch-files in fasta
* finally remove the patching files step, and only have a build step for generating
.dill files
BUG=
R=ahe@google.com , paulberry@google.com , scheglov@google.com
Committed: https://github.com/dart-lang/sdk/commit/abf2d23af2315fae6dc688741147ef677ec34835
Review-Url: https://codereview.chromium.org/2986303003 .
2017-08-07 08:41:28 -07:00
Sigmund Cherem
b6d08264a3
Revert "Switch FE to use the libraries.json format."
...
This reverts commit abf2d23af2 .
Reason for revert:
- win build failed in patched_sdk (likely storing paths and not uris)
- dart2js bots failed (missing flag)
Will fix the issues and reland shortly.
Review-Url: https://codereview.chromium.org/2993113003 .
2017-08-04 19:46:17 -07:00
Sigmund Cherem
abf2d23af2
Switch FE to use the libraries.json format.
...
This CL:
* introduces the Dart API to operate over libraries specifications and describes
the format we intend to use (see libraries_spec.dart)
* implements serialization/deserialization for this API
* switches over the front_end to use these APIs
* public options accept a URI to the JSON file and no longer
accept a `dartLibraries` map
* internal code uses the LibrariesSpecification API
* switches other dependencies on these APIs (resynthesizer_test and patch_sdk.dart)
This is the first step in migrating over to use the libraries.json format and
eventually remove the patched_sdk step. In particular, some of the next steps
include:
* add a build step to generate .json files from .yaml files
* add a libraries.yaml file for the sdk
* split the patched_sdk step in two:
* patching files
* generating .dill files
* add any missing support for patch-files in fasta
* finally remove the patching files step, and only have a build step for generating
.dill files
BUG=
R=ahe@google.com , paulberry@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2986303003 .
2017-08-04 17:41:27 -07:00
Konstantin Shcheglov
58df70b83b
Get logger / fileSystem / byteStore from ProcessedOptions.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2992173002 .
2017-08-01 16:19:59 -07:00
Sigmund Cherem
13a4906be9
Kernel driver: pass options and use it for its compiler context
...
This ensures we don't accidentally override options (e.g. strongMode was being
overriden accidentally as a result).
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2992773002 .
2017-07-31 13:22:50 -07:00
Konstantin Shcheglov
f603889766
Store dependency libraries canonical names during limited store.
...
R=ahe@google.com , brianwilkerson@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2991873002 .
2017-07-27 11:22:05 -07:00
Konstantin Shcheglov
72d14b8202
Replace typed_mock with mockito in front_end.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2984123002 .
2017-07-24 11:46:18 -07:00
Konstantin Shcheglov
a295f782c0
Include TypeEnvironment into KernelResult.
...
We need it to use kernel.Expression.getStaticType().
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2978333002 .
2017-07-19 09:40:33 -07:00