Commit Graph

7577 Commits

Author SHA1 Message Date
Mike Fairhurst 2f65830aeb Add null checks for spread operator
Change-Id: Ib3b0f46643a24e22e0344a4505743518f885e9e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-06-12 20:58:03 +00:00
Paul Berry 69d88daeb9 Remove unused imports
Change-Id: I08ae4f32ea9eb08f1147db2d056917fe4833e5e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105780
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-12 17:54:24 +00:00
Konstantin Shcheglov 0e4e14a288 Build summary2 in DDC.
New summary2 will unblock fixing long standing inference issues in
Analyzer.

We build it in addition to summary1, and will switch clients to summary2
incrementally. With this CL DDC will build summary2, but will not
consume it yet for analyzing code. This will be done in a separate CL.

This change was also tested in the internal repo, and does not cause
related build failures.

Change-Id: Ic2c635e45b514a2610e938129fa7527fd8d070b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105261
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-12 16:09:24 +00:00
Konstantin Shcheglov a173d22fe7 Record reference to the typedef from which a FunctionType was instantiated.
It seems that this is necessary for Angular compiler.

R=brianwilkerson@google.com

Change-Id: Ib5c0501d8f900ec9ca358cb4f4b4be90004cce77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-12 14:22:03 +00:00
Paul Berry 686df33d99 Add parseString() to replace the deprecated parseCompilationUnit().
Change-Id: Ib272f6a281b09a02ba037049e76bf08dd78dbbab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105540
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-12 12:56:57 +00:00
Mike Fairhurst dab4eb045f Add a "legacy type asserter," manage broken test cases
Change-Id: Ic046805c3246ad7e5e7c56fb9188d6ebd197e2fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105560
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 23:17:43 +00:00
Brian Wilkerson e6567601af Add a notice that the markdown file is generated and remove documentation specific to nnbd
Change-Id: Iece4cd98399b243c9d7fb69af888460bb45421fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-06-11 19:57:19 +00:00
Konstantin Shcheglov 1b9d5b47ed Make sure that we have a unit in unit_withDirectives.
I still was not able to reproduce the issue, but I think this fixes it.

R=brianwilkerson@google.com

Change-Id: I209812bd2f2e8f0a5568ef14f7bfeaa4093c1341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-11 18:59:28 +00:00
Konstantin Shcheglov 8e9e1877b5 Perform AST rewrite during metadata resolution.
R=brianwilkerson@google.com

Change-Id: I3e19bb1bc6e7d6f3f42134090ed7e7a4920420ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-11 18:13:04 +00:00
Konstantin Shcheglov 149ebf683b Support for 'uri' property of Import/Export/CompilationUnitElement.
_Builder in source_gen uses code like this to check that the generated
file is expected in the library. While it is a questionable approach,
I don't feel that I have time to fix it, and remove the `uri` property
completely. So, we fix in in Analyzer with summary2.

`if (!library.parts.map((c) => c.uri).contains(part)) { ...fail... }`

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

Change-Id: I983f29589cbb2613d5f896b87f6218c31a47afa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-11 16:53:03 +00:00
Mike Fairhurst c167374232 Add Never*, use it in type provider etc
Change-Id: I8b7496a56d0479bdbcee3fd8a6e8937aeff8bb10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105471
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-06-10 21:29:04 +00:00
Brian Wilkerson ed9d185a9e Top-level getters do not have parameters
Change-Id: If8e079987f957538286afed162073fe4f323dea2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105469
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-10 20:36:16 +00:00
Konstantin Shcheglov 4270982dd1 TypeSystem tests code motion.
Drop `Strong` prefix, extract LeastUpperBoundFunctionsTest.

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

Change-Id: I2ab28f23e28698f4c2063eb07362ae6df2938054
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-10 14:47:53 +00:00
Brian Wilkerson f94628fb1b Convert the remaining diagnostics tests to test for location
Change-Id: I00fef7e7228bbe6d63c48267f42b5efc4900556d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105414
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-10 13:21:52 +00:00
Brian Wilkerson 9559e4d444 Initial documentation for a small sample of diagnostics and a script to generate a markdown file containing that documentation
Change-Id: I06602a29c95829b42add1d655ad8d7190ae7100a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-07 22:31:16 +00:00
Sam Rawlins 7a1af14458 Do not report that abstract methods should call super.
Change-Id: Ib365361c91b8b489c0d40c9097f2248ecca54176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-06-07 21:12:56 +00:00
Konstantin Shcheglov 2bba747ae3 Don't attempt to serialize FunctionExpression(s).
R=brianwilkerson@google.com

Change-Id: I18df1789eca4460edc40285a3fde08c81cdbe96d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105351
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-07 15:46:00 +00:00
Brian Wilkerson da66902e4f Fix a bug in constructor element display string (issue 37165)
Change-Id: Ie5fe3b5c4e78be67887cf56e4698554d44095fd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105349
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-07 13:21:59 +00:00
Paul Berry 85cadff46b Revert "Fix implementation of isDartCore and isDartAsync."
This reverts commit 0779751b82.

Reason for revert: Broke test unittest-asserts-release-win:pkg/analyzer/test/generated/resolver_test (see https://ci.chromium.org/p/dart/builders/ci.sandbox/analyzer-win-release/5691)

Original change's description:
> Fix implementation of isDartCore and isDartAsync.
> 
> It's not sufficient to check the name of the library, since a
> user-provided library could always name itself `dart.core` or
> `dart.async`.
> 
> Change-Id: Id99cfc1ec89c5941e16b556e3c4dd175875a673f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104580
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

TBR=paulberry@google.com,brianwilkerson@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I7a27b46f4b2d1b3b43f9943933ec2a75b5a5b806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105346
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-07 12:29:09 +00:00
Konstantin Shcheglov fd77972d8f Print time to prepare linking inputs.
R=brianwilkerson@google.com

Change-Id: I1e2779bb5468dd77a3551276796f5725900c1603
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105350
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-07 01:20:58 +00:00
Konstantin Shcheglov 8c9765c648 Clean up lazy_ast a bit.
R=brianwilkerson@google.com

Change-Id: Idf4ca6535088e5646474ac8728dbc6cff44eac4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105348
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-07 00:40:07 +00:00
Konstantin Shcheglov 6e0d978505 Build elements in default values.
R=brianwilkerson@google.com

Change-Id: I67c9e15832b28eeb49eeb7f8ecfd91734551b4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-06 22:38:21 +00:00
Konstantin Shcheglov 587806476f Remove parsed units caching for now.
I see that we leak them when using DAS.
So, lets remove them for now until we can do this safely.

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

Change-Id: Iaf349225c6e338eacb40e82deb5f84dfaa82e48d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105326
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-06 21:49:53 +00:00
Mike Fairhurst 527dffd21b Use StringSource in type provider tests to prevent bad path lookups.
Prevent windows from doing a path lookup for 'dart:core' which will
crash. All we need is a string source with a uri..

Change-Id: I742060633f3bd89323ad3e3f0f19ae80c1aedbae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104806
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-06-06 19:38:27 +00:00
Mike Fairhurst 09296499c2 Resolve type names in decls to * types in legacy libs
Change-Id: Icac40493e069d93abedc0422e77e3bcf29e965d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104960
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-06 18:45:20 +00:00
Konstantin Shcheglov 4bdd6e160b Compute unlinked API signatures from AST.
With this change summary2 does not use content hash as API signature,
so can reuse linked bundles when method bodies are changed.

The implementation of the API signature computation is from:
https://dart-review.googlesource.com/74925

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

Change-Id: I2a53957b8fff5208055aa28a188d6481ba24f5df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105321
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-06 18:22:50 +00:00
Brian Wilkerson 30390c6ba1 Prepare to compute the documentation URL for diagnostics
Change-Id: Ib1b7e4887e18b90c1552f3f8501948ee8d8d2c1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105260
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-06 16:41:46 +00:00
Brian Wilkerson c34f74fd68 Update the minimum SDK constraint to allow the use of ui-as-code features
Change-Id: Iaa8e6bb3427f486c3432f76dac8e35052b5664ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105280
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-06 15:59:52 +00:00
Konstantin Shcheglov b9e877be78 Extract informative data from linked data.
So, that when changes to code that don't affect APIs are made, we
can use already linked bundles, and fuse it with informative data to
create elements with actual offsets and comments.

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

Change-Id: Ia0aa8af3c734b2cff497b49363064a26d601ebf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-06 14:14:10 +00:00
Brian Wilkerson 3894b0896e Add partial code tests for extension methods
Change-Id: I5886c275383302566e997cb2f7e968c446b79369
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105160
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-06 12:41:19 +00:00
Brian Wilkerson 7e933abe68 Convert more tests to include diagnostic location information
Change-Id: If0d0dec8839fd6f836cff2b5f021cc8c40969b0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-06 12:40:39 +00:00
Brian Wilkerson 0c1c0afba3 Fix the documentation for ElementVisitor (issue 37151)
Change-Id: I03fbcb022bc92aaa88f65aeb895cad5de0b38e6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105100
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-06-06 01:31:04 +00:00
Konstantin Shcheglov cabd3237f5 Build new elements for GenericFunctionType in DeclarationResolver.
It seems that we don't really need to have the same elements for them
for resynthesizing element model and resolved AST.

R=brianwilkerson@google.com

Change-Id: I05efdf90671f596f2f8b85a3808eb2c4c87ea8c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-06 01:09:50 +00:00
Brian Wilkerson 9efd0fa899 Use the right type provider based on the feature set of the library
Change-Id: I82a22cef142b89579c19e2063fb888e2827f2bb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104362
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-05 21:36:51 +00:00
Nicholas Shahan 9cfe9bd34e [analyzer] Fix runtime error when creating SDK manager
Caused by a ternary operator with differently typed branches.

Change-Id: I5f9cfc28c274c125db0a999237f81dc3523896cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104240
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-06-05 20:44:56 +00:00
Dan Rubel 487326eef4 fix AstTextPrinter
This fixes a bug found in
https://dart-review.googlesource.com/c/sdk/+/105000

Change-Id: I9d2e12557ad506a1b5a433cdae35229c04affed4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-05 16:52:54 +00:00
Dan Rubel 9b22dd8e92 remove hard coded feature index
Change-Id: Ib01f2c9b1516987ec39591a5a320bab81138718d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104786
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-05 16:49:24 +00:00
Brian Wilkerson 37976dd26d Improve test so that snippet is displayed when an exception is thrown
Change-Id: Ib5a7ed985df42b7d56dd98e104a145fddc895599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-05 16:44:52 +00:00
Brian Wilkerson 788dcf681e Set or map literals can be ambiguous in invalid code
Change-Id: Ic17f5b80836bdf1891065af97adf5e9a5e021995
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105021
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-05 16:30:12 +00:00
Dan Rubel 9197b34a0e generate analyzer experimental flags
Change-Id: I7dc2be03e7266b6ef0a936269a2dbe584096e3db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104785
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-05 14:17:35 +00:00
Dan Rubel 4181185070 parse nullable function typed formal parameter
Change-Id: I502d4c6649a8974883b9ded038ce8927d34eea10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-05 13:37:01 +00:00
Konstantin Shcheglov cf4a9f4f75 Revert "Restore explicit SimpleIdentifier."
This reverts commit bb6e558534.

I found a problem with --use-summary2 in DAS.
When we implement actual API signatures, changes in bodies
change offsets for nodes, but summary2 also includes offsets,
and they don't match. So, DAS crashes. I will need to rework
offsets and other @informative data storage, so its turns
out that we cannot pretend so use real SimpleIdentifier(s)
anymore.

R=brianwilkerson@google.com

Change-Id: I1193cc3f6fd25aea1c39531e8a685b60b347166e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104949
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-05 00:34:22 +00:00
Paul Berry 0779751b82 Fix implementation of isDartCore and isDartAsync.
It's not sufficient to check the name of the library, since a
user-provided library could always name itself `dart.core` or
`dart.async`.

Change-Id: Id99cfc1ec89c5941e16b556e3c4dd175875a673f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-04 03:12:28 +00:00
Konstantin Shcheglov d24b407568 Add --use-summary2 flag to AnalysisServer.
So that we can start dogfooding it.

I noticed that we logged too much data, so I reworked what we
log in LibraryContext.

Currently performance will be subpar, due to using content hash as
file's API signature. So, any change to a file, even in a method
body will cause the whole library cycle (and everything that depends
on it) invalidation. I will implement computing API signatures for
parsed unit (hopefully reusing something already existing) in a
following CL.

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

Change-Id: Ifb77e29188484b6784edbaa6a6d5daca6800ef2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104603
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-04 02:58:29 +00:00
Mike Fairhurst 55d3bbf13f Promote parameter of == to nullable when invoked.
This is required because otherwise

Object() == null

requires the type signature of Object.operator==(Object o) to be
changed to Object.operator==(Object? o). Which I don't think is the
behavior we want.

Confirmation that this CL is correct has been sent to the language
team. I recommend we land, which will unblock my subtyping CL, and
roll back/readdress later if need be.

Change-Id: I498f9870e7128b2cac3012fff0cb1ab50fcc8df7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104344
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-06-04 00:36:24 +00:00
Brian Wilkerson 34a45de500 Add support for representing nullable function-typed parameters
Change-Id: Ia667236d5d60bb5c1aca7fc0747702f244182a19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104621
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-06-03 19:06:09 +00:00
Konstantin Shcheglov c54eac55ad Reuse field tails/offsets in VTable instances.
So, that we don't have to allocate these lists for each instance.
This makes it cheaper to have serialize more objects.

In a synthetic performance test, where we turn IDL builders into
bytes 100 times, this improves time to bytes from 45 to 34 seconds.

R=paulberry@google.com

Change-Id: Ie8c9a8ed01b4c0d4abeba96ed5e99bd430f9309d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104600
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-03 18:28:19 +00:00
Mike Fairhurst 15e6c0bca9 Fix Never? in two ways: print ? in diagnostics, and don't set on element.type
Change-Id: I3f846f18c2c52d459c6876de108e9228f1082747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-06-03 18:01:38 +00:00
Konstantin Shcheglov bb6e558534 Restore explicit SimpleIdentifier.
It does not look that using name/nameOffset saves us much.

R=brianwilkerson@google.com

Change-Id: I00c297d64399ad1027a5ff0c2b8d7c757b190b78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-03 17:01:51 +00:00
Kevin Millikin 907f31e6de Reland "[cfe] Build some annotations during outlining"
Reland the change to build some annotations during outlining, with a
bug fix.  Annotations from patch classes and procedures were not
applied to the actual class or procedure, which is fixed.

The original commit was reviewed at
https://dart-review.googlesource.com/c/sdk/+/103806

The revert was reviewed at
https://dart-review.googlesource.com/c/sdk/+/104220

The original commit message was:

    During the outline phase, after top-level type inference, compile
    annotations for libraries, classes, fields, procedures, and
    constructors.

Change-Id: I836160ddad4114ded72701e8a3938f703228931c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104560
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-06-03 10:20:15 +00:00