Commit graph

12095 commits

Author SHA1 Message Date
Konstantin Shcheglov 3319e6d0e3 Fix for inlining async methods/getters.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2463493002 .
2016-10-31 08:48:37 -07:00
Vijay Menon e8fbfc4f0d Mark test as runtime failure
pkg collection is now clean.

TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/2466533002 .
2016-10-31 06:00:59 -07:00
Konstantin Shcheglov 1bdee25bdf Revert "Do nothing if [changeFile] reported, but the file content is the same."
This reverts commit 1ffda5601b.

There is a bug with reporting changeFile() twice, first time the change
be noticed and the file content hash updated. But the second time the
content hash is the same, and we unschedule the file from analysis :-(

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2462743003 .
2016-10-28 18:06:46 -07:00
Konstantin Shcheglov 1ffda5601b Do nothing if [changeFile] reported, but the file content is the same.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2458853003 .
2016-10-28 14:08:50 -07:00
Jan-Hendrik Dolling 89560c68a0 change "the the" to the 2016-10-28 21:47:50 +02:00
Konstantin Shcheglov 5ad24d5185 Clone SourceFactory to ensure that it does not bring a ContentAnalysis reference.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2453773006 .
2016-10-28 10:23:55 -07:00
Johnni Winther b0ecbef3cc Introduce isAbstractlyInstantiated to avoid exact masks of abstract classes.
Classes can be instantiated directly, abstractly or indirectly:

When [cls] is directly instantiated: This means that at runtime instances of exactly [cls] are assumed to exist.

When [cls] is abstractly instantiated: This means that at runtime instances of [cls] or unknown subclasses of [cls] are assumed to exist.

This is used to mark native and/or reflectable classes as instantiated. For native classes we do not know the exact class that instantiates [cls] so [cls] here represents the root of the subclasses. For reflectable classes we need event abstract classes to be 'live' even though they cannot themselves be instantiated.

When [cls] is indirectly instantiated: This means that a subclass of [cls] is directly or abstractly instantiated.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2443953002 .
2016-10-28 08:45:57 +02:00
Jennifer Messerly bdeb6023af fix #27672, call computeConstantValue for metadata
R=vsm@google.com

Review URL: https://codereview.chromium.org/2458693003 .
2016-10-27 14:05:54 -07:00
Jennifer Messerly 644c1dca75 fix #27429, html wrapper methods pass incorrect number of arguments
R=vsm@google.com

Review URL: https://codereview.chromium.org/2454173003 .
2016-10-27 13:16:00 -07:00
Konstantin Shcheglov 2625d6af37 More tests and a few fixed for the driver.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2450183004 .
2016-10-27 10:52:12 -07:00
Konstantin Shcheglov 0fcf8924d5 Several tests for AnalysisDriver and an elements.dart tweak.
I will not land this without review.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2455843002 .
2016-10-27 09:24:31 -07:00
Vijay Menon f276f3422f Mark test strong clean for DDC
TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/2457753002 .
2016-10-27 16:13:43 +02:00
Konstantin Shcheglov 9190ad6b6f Add the 'status' stream and transitions.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2450143003 .
2016-10-26 13:36:24 -07:00
Konstantin Shcheglov 755e26c4d9 Analyze requested files.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2453913002 .
2016-10-26 13:16:42 -07:00
Konstantin Shcheglov 6be23afcf2 Try to load the existing unlinked bundle by the content hash.
So that we don't create _File.forResolution() when we could use only
the content hash and the existing unlinked bundle. This makes loading
cached analysis results cheaper - no need to parse the unit.

TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2450283003 .
2016-10-26 13:06:03 -07:00
Konstantin Shcheglov bd594d453f Put fully resolved analysis results (just errors now) into the byte cache.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2455573003 .
2016-10-26 11:48:49 -07:00
Adão Júnior 205e9a58e1 DDC readme links pointing to current repository (#27662) 2016-10-26 10:50:46 -07:00
Konstantin Shcheglov 9b68e89be1 Tweaks for documentation.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2451093003 .
2016-10-26 09:53:20 -07:00
Zachary Anderson c1313a5ec7 Format GN files and add a presubmit check that GN is properly formatted
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2451613005 .
2016-10-26 08:50:54 -07:00
Konstantin Shcheglov f797154673 Fix for LibraryDirective annotations while applying resynthesized element model.
This allows us to clean up the analysis driver.

I will NOT land this without your review.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2445193003 .
2016-10-26 07:40:07 -07:00
Lasse R.H. Nielsen 1f7d8924c6 Adapt analyzer to new warnings around switch-case fallthrough.
Fixes issue #27664.
BUG= http://dartbug.com/27664
R=brianwilkerson@google.com

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

Committed: 1322877f5b
2016-10-26 11:30:55 +02:00
Lasse R.H. Nielsen 1322877f5b Adapt analyzer to new warnings around switch-case fallthrough.
Fixes issue #27664.
BUG= http://dartbug.com/27664
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2446093003 .
2016-10-26 10:51:50 +02:00
Konstantin Shcheglov fcce68e2df Analyze priority files first.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2453693002 .
2016-10-25 21:44:48 -07:00
Konstantin Shcheglov d59c39fee5 Verify one changed file at a time.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2446083003 .
2016-10-25 21:16:56 -07:00
Konstantin Shcheglov d1636b38b3 Replace Stream with monitor.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2450053003 .
2016-10-25 20:00:20 -07:00
Konstantin Shcheglov 3d730e3735 Fix and simplify _File creation.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2451973002 .
2016-10-25 18:34:19 -07:00
Konstantin Shcheglov b363f00d64 Move unlinked bundle access to _File itself.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2451733003 .
2016-10-25 11:21:40 -07:00
Konstantin Shcheglov 4a5d98fa37 Actually compute AnalysisResult(s).
For now we don't have state transitioning and perform all work in a
single loop. Later we will break the loop and wait for the "has work"
stream after each operation. BTW, I don't like this stream approach,
but I don't know yet anything better.

The promise to produce the resolved CompilationUnit for every added
file does not scale well for initial results. I want to weaken it to the
promise that only priority and getResult() results get full content/unit.
For all other files we need only errors, which can be cached.

For index we need to use another apporach. I have a plan :-)

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2446803003 .
2016-10-25 09:49:13 -07:00
Stephen Adams 7eaad70e2f Improve condition strengthening for last test in short-circuit.
This strengthens

   t1 = s == null || t == null;
   if (t1) return;
   known-here:  t != null

There are not many hits since the 'interesting' tests are usually
earlier in the short-circuit expression.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2438543004 .
2016-10-25 04:48:35 -07:00
Konstantin Shcheglov 581e6bc6e1 Extract _ReferencedUris information from UnlinkedUnit.
I considered removing it altogether, but reading unlinked bundles costs
something. So, we might consider caching this graph information.

OTOH, I agree that we might want to delay adding caching until we solve
the extra invalidation problem in _verifyUnlinkedSignatureOfChangedFiles.

TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2447903002 .
2016-10-24 14:05:45 -07:00
Konstantin Shcheglov d2347b6903 Exclude the file URI from _ReferencedUris.
Also fix a bug with adding bundles with the same content hash, but
different URIs. Add directly into the corresponding Map(s) for now.

TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2447873002 .
2016-10-24 13:13:43 -07:00
Konstantin Shcheglov a42e0e94d8 Delay invalidating linked hashes until after checking the API signature of the changed file.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2443083002 .
2016-10-24 12:16:07 -07:00
Konstantin Shcheglov b7c412c672 Apply tweaks to address other review comments.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2444993003 .
2016-10-24 10:55:46 -07:00
Konstantin Shcheglov 795be1983a Fixes for review comments.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2450483002 .
2016-10-24 10:23:11 -07:00
William Hesse 057b9ceba7 Update pkgbuild status for analyzer and front-end.
BUG=https://github.com/dart-lang/sdk/issues/27655
BUG=https://github.com/dart-lang/sdk/issues/27654
R=sortie@google.com

Review URL: https://codereview.chromium.org/2440423002 .
2016-10-24 13:37:10 +02:00
vsmenon 2cafc4d044 Update README.md 2016-10-24 09:01:50 +02:00
Konstantin Shcheglov e0563e7dbd Remove unused code.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2440363002 .
2016-10-23 23:48:01 -07:00
Konstantin Shcheglov 6ca7d24211 Cache URIs resolution.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2440343002 .
2016-10-23 21:34:20 -07:00
Konstantin Shcheglov 64c776d30d Include linked hashes into the current file state.
Also put the file content into the AnalysisContext to avoid race
condition if the file content is being changed.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2447603002 .
2016-10-23 20:59:38 -07:00
Konstantin Shcheglov e7b596ce5b Initial implementation of AnalysisDriver.
I will need to add more documentation, implement state transitions,
actually implement computing analysis results, add optimizations, etc.

TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2439343002 .
2016-10-23 20:08:04 -07:00
Konstantin Shcheglov f275b096c2 Update ByteStore documentation.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2445623002 .
2016-10-23 15:30:32 -07:00
Konstantin Shcheglov 46aa3ced6f Update the API documentations with Paul review comments.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2443013002 .
2016-10-23 13:55:54 -07:00
Konstantin Shcheglov c3e7be4f12 API for the new AnalysisDriver.
TBR

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2442993002 .
2016-10-22 20:12:29 -07:00
Brian Wilkerson b719474fd9 Intial support for unifying command-line handling
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2441053003 .
2016-10-21 13:16:25 -07:00
Brian Wilkerson 785b949894 Improve error recovery (issue 27646)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2444453002 .
2016-10-21 12:36:01 -07:00
Jennifer Messerly ce76fc1fe5 fix #27644, allow "dart" and "dartx" to be renamed if needed
R=vsm@google.com

Review URL: https://codereview.chromium.org/2435223002 .
2016-10-21 11:48:19 -07:00
Jennifer Messerly 982f9f46ed fix #27642, static members should now work
R=vsm@google.com

Review URL: https://codereview.chromium.org/2440863002 .
2016-10-21 11:25:47 -07:00
Paul Berry 396d7862b4 More improvements to DeclarationResolver.
This CL makes the following improvements:

- When visiting an executable element, local variables and labels are
  rebuilt rather than matching them up to the old element model.  This
  ensures that if the element model was resynthesized from an API
  summary (which doesn't contain local variables or labels), these
  elements are not lost.

- When matching up existing elements, if the elements did not
  previously contain offsets, offsets are recorded.  If they did
  previously contain offsets, the offsets are compared to verify that
  they match.  This ensures that if the element model was
  resynthesized from an API summary (which doesn't contain offsets),
  the offsets will be correct.

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2435313002 .
2016-10-21 11:13:55 -07:00
Paul Berry f1aee7cf68 Fix static modifier for synthetic fields coming from summaries.
R=jmesserly@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2439023002 .
2016-10-21 11:09:11 -07:00
Sigmund Cherem 02a14cd937 Add kernel generation to the compiler/perf script
R=het@google.com

Review URL: https://codereview.chromium.org/2436333002 .
2016-10-21 10:02:13 -07:00