Commit Graph

74728 Commits

Author SHA1 Message Date
Ben Konyi 4fb4e0af2d [ VM / DartDev ] Run dartdev from kernel instead of AppJIT snapshot
Fixes https://github.com/dart-lang/sdk/issues/42804

Change-Id: I32b19e72f038131b00059fff2f2db61686a8db74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157601
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-10 22:26:24 +00:00
Paul Berry d4e4abdef6 External field support: add a notion of external fields to the AST and element model.
In follow-up CLs I will update error reporting logic.

Change-Id: Id07b861aa117b93e0c869ad0b52c048085706ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-10 21:54:54 +00:00
Konstantin Shcheglov 7e86900c65 Remove DriverResolutionTest.
R=brianwilkerson@google.com

Change-Id: I1ca6918da9a51d5650ba9b76a960d7a3348ba4b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158081
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 21:43:58 +00:00
Konstantin Shcheglov a8f1be78a5 Migrate SdkConstraintVerifierTest to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: I0d6fa9ccdfbb4f9156226af2884a5f9b14dea495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 21:24:25 +00:00
Nate Bosch d5db03707e Update to latest package:crypto with null safety
Change-Id: I7051125f6084c89d4f262244fce840f59ae5f14d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158021
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-08-10 21:06:25 +00:00
Jeremy Pace a7e1fa08df Fix typo in README.md
Closes https://github.com/dart-lang/sdk/pull/43010
https://github.com/dart-lang/sdk/pull/43010

GitOrigin-RevId: 0625c86eef9f35697ee69bb5554c03e0b8f0d2c4
Change-Id: I00f8c70bc842521107977c2501f89c62c69e69e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158061
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-08-10 20:56:14 +00:00
Konstantin Shcheglov e626e47ea9 Migrate SubtypeOfSealedClassTest and language version tests.
R=brianwilkerson@google.com

Change-Id: I573a6223fb58b2a412d0dcbf961739ecd9a7af82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 20:52:01 +00:00
Alexander Markov 501a7ae7b0 [vm/compiler] Infer type of LoadIndexed from array type
After inlining we may have more accurate information about array being
accessed. This change adds computation of type of LoadIndexed
instruction based on the type of array being accessed.

The computation is able to skip loading of GrowableArray.data.
If array was loaded from a field, it takes static type of a field
into account.

Benchmarks with null safety in JIT mode on x64:
ForInLoop +80-106%
DeltaBlueIterators +15-31%

Change-Id: Ia61aa761f4ccd4692e05fdac043f8a2a46f88f21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157823
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-08-10 20:18:53 +00:00
Konstantin Shcheglov 287c796412 Migrate AnalysisDriverCachingTest to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: Iafcc25686d1eb70f638347ed4af06e09eb965cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-10 20:12:13 +00:00
Brian Wilkerson 276f10aaf6 Unify const_field_initializer_not_assignable with field_initializer_not_assignable for documentation purposes
Change-Id: I7b008febe4210d08768b81c59bf0ee6b2663fafd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 19:48:03 +00:00
Paul Berry 87f0d5d9dc Abstract field support: do not allow abstract fields to be late or static.
Although these error conditions are not reported by the parser, the
language grammar does not permit them, so from a customer perspective
they are parser errors.  Accordingly, they have been assigned
ParserErrorCodes and reported by the AstBuilder, as we do for other
similar errors.

Change-Id: I79d0ad1dcad518981b8b649c117df326279008f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 19:27:13 +00:00
Konstantin Shcheglov 8405d7c8e3 Remove dart2jsHint option, verifier, and tests.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I95b88940c862d463af03e85fcdf0f4bf81c2fbd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157641
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-10 19:19:43 +00:00
Konstantin Shcheglov 1af388c521 Move DEPRECATED_MEMBER_USE to AnalysisContextCollection.
Change-Id: I938891254b2bf3aae7d2c514a27a7ed49f95b775
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157883
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 17:46:33 +00:00
Nate Bosch abe95fdf84 Update to latest package:json_rpc_2
Change-Id: I6b66b38c9c2e5b7ec9245bbc913fbc642161798f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150462
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2020-08-10 17:16:23 +00:00
Daco Harkes ba19b1dd4b [vm/ffi] dart_api_dl.c fix MacOS build
Fixes "redefinition of typedef '...' is a C11 feature" on Mac bots.

Change-Id: I9f1114279106fa83ca491e069564a9931541d6ad
Cq-Include-Trybots:dart/try:vm-kernel-mac-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158001
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-08-10 16:57:23 +00:00
Daco Harkes d98f777da8 [vm/ffi] Change dart_api_dl.cc to dart_api_dl.c
Adapted the solution from
https://github.com/mraleph/go_dart_ffi_example/blob/master/dart_api_dl/include/dart_api_dl.c
such that we only have one carbon copy of the signatures.

This breaks existing code because the file is renamed, which is
added to the changelog.

Closes: https://github.com/dart-lang/sdk/issues/42982

Change-Id: If9300cac513c6cf5dac9e524bfc069764bb1a3f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157965
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-08-10 15:11:21 +00:00
pq e2a67723ca bulk fix for prefer_final_fields
Change-Id: Iabfb6aae5186171f4143d23aeb18a124ceab4a0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-10 15:10:41 +00:00
Johnni Winther 9d279d41e3 Add pseudo-packages for _fe_analyzer_shared test data folders
Change-Id: I6995cd65b547f0dc6159c90acb194babb819c4ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156908
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-08-10 08:03:29 +00:00
Timm Preetz 0341576448 Remove duplicate check for space character (32)
`_CharCode.SP` is 32, which is already covered by the `byte > 31` part.

Closes https://github.com/dart-lang/sdk/pull/40929
https://github.com/dart-lang/sdk/pull/40929

GitOrigin-RevId: bc2c0ea6d7e86a4a06135737da497f593ee9a03d
Change-Id: I5214775f76912e9985328f5c61b4a4ec4ef6b637
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138787
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-08-08 20:25:12 +00:00
Brian Wilkerson 570a75be7e Further disable the use of the language model
Change-Id: Ibd7c8bdd549ca17fbf6d53679973665661906a85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157802
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 15:47:12 +00:00
Paul Berry 92315c4b2d Abstract field support: do not allow initializing abstract fields.
There are three ways to initialize a field, so we have to check for
three error conditions:
- At the declaration site
- Via a field formal parameter
- Via a constructor initializer

Fixes #42981

Change-Id: Ifc32a28ffb62d60fd2171d4980e88da9eebcb481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-08 13:36:52 +00:00
pq 594434d5a0 Linter Changelog note fixes.
Follow-up from: https://github.com/dart-lang/sdk/commit/a2fdeaaa5371748457d3b9acf699687c6e8606e7#r41273696



Change-Id: Ife82a2ae2ff2f5707995ae405d9c6e5daa8c45c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157862
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-08 05:41:21 +00:00
pq b0d007a931 bulk fix for type_init_formals
Change-Id: I8b79e30f2ea811b97caa8fda1297dda054bbcc05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-08 05:04:50 +00:00
Konstantin Shcheglov 0aa5b0f019 Files generated for other packages in PackageBuildWorkspace do not belong to the package.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I1608caf8fb54187f8154dd1510841f46a247383f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 01:26:57 +00:00
Konstantin Shcheglov 940d7effbd Fix for crash in AddMissingEnumCaseClauses.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I0dc8c3158eb4b46247e415ff36c33991598bce9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157861
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 01:22:53 +00:00
pq 06cce87374 bulk fix for unnecessary_this
Change-Id: I61c0173c8fb1fd02d6119412bf925d08126a7a0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 22:58:17 +00:00
Tess Strickland 09ddcece30 [vm] Make BufferFormatter also a subclass of BaseTextBuffer.
Change-Id: I4d2759ffa80c0106838ad0ddbc6dd086fddda1dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157742
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-08-07 21:40:45 +00:00
Regis Crelier f8d1d003c9 Reland "[VM/runtime] Fix computation of the hash of recursive types."
This is a reland of a528b19d2c

Updating the hash of the empty type argument vector in write-protected memory caused a crash in precomp mode.
The fix is to correctly initialize the hash so it does not need an update.

Original change's description:
> [VM/runtime] Fix computation of the hash of recursive types.
>
> When computing the hash of a type, only include the hashes of the type arguments corresponding to the type parameters of the type's class and not of the whole type argument vector, otherwise, the variable location of TypeRefs in the base class type arguments may result in different hashes.
>
> Add a regression test (this test was not failing in all configurations, since the issue becomes visible depending on the order in which types are loaded and finalized).
>
> This fixes issue https://github.com/dart-lang/sdk/issues/42954
>
> Small improvement: pick hash value 1 for a vector of dynamic types, so it can be cached and not recomputed repeatedly, which was the case with value 0.
>
> Change-Id: I3468952cbf61944a82cf8e00efbf4952bd831fbe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157563
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Régis Crelier <regis@google.com>

Change-Id: I538b4538c69472e09b7bd745c6bd41023e1f154f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157781
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-08-07 21:13:35 +00:00
Jonas Termansen 2060964faa Roll benchmarks-internal 1682e8c568cf..991d4cb32af0
991d4cb32af0e914763ebbdeced91395bed874d8 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/2160

R=sra@google.com

Change-Id: I04ec1bd533b8e046a4656ca7737a1b0e66314adf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157280
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-07 20:48:42 +00:00
asiva a2170d1e58 [vm/aot] Use an explicit error message when run in non AOT mode.
Fixes #42961
Change-Id: I01f77739f4837e2fb9de4f837a03389a32bef72a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157561
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-08-07 19:30:58 +00:00
asiva cf96fa6721 [VM/C-API] - Fix errors reported by MSVC tool chain.
For details see https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket.appspot.com/8873403898611684880/+/steps/build_android_profile_gen_snapshot/0/stdout

Change-Id: I47fe33cab787595dff13b68c613fb216fb434f3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157560
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-08-07 19:30:05 +00:00
Konstantin Shcheglov a08a357bdb Remove unused code from PackageBuildWorkspacePackageTest.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I3e6fc8c87671b60c5152f273b3ff6da96c71b103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 18:57:51 +00:00
Konstantin Shcheglov 8ce4d6d6bf Replace 'non_nullable' with 'null_safety' in BUILD files.
The flag was renamed since the original issue was open.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: Ie92d43d09d97386f3e61ad226c0a0c88287d2ea3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 18:51:14 +00:00
Erik Ernst becf615d11 Add test for missing initializer on final instance variable
Add a test where a class that has no generative constructors
declares an instance variable which is final and has no initializing
expression. With https://github.com/dart-lang/language/pull/1130 this
is an error, and that error is expected by the test. Also test that
it is not an error to have an uninitialized final variable which is
abstract or external.

Change-Id: I6c4a46393f46587448612bd91fb99fa65f89704c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157490
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-08-07 18:19:35 +00:00
Tess Strickland fa03ee7782 [vm] Create a common base class for TextBuffer/ZoneTextBuffer.
Generally, methods that take a *TextBuffer pointer do not care how the
internal buffer is allocated, and so they could be used for either if
both were subclasses of a base class that contained the printing
methods.  This CL makes that base class, and now TextBuffer and
ZoneTextBuffer now share the exact same set of methods for printing to
the internal buffer.

Since the base class is in platform, this does mean dropping the
overload of AddString for Dart String objects that was part of
ZoneTextBuffer.  Instead, this CL just adds an intermediate call to
ToCString() for the small number of callers that used the overload,
keeping the printing interface the same for both.

In addition, one use of TextBuffer that then re-allocated the buffer
contents into the zone manually has been replaced with a ZoneTextBuffer
instead.

Change-Id: I438a085e7e20d55d93987fd7f36afd636f95955f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157741
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-08-07 18:09:35 +00:00
Srujan Gaddam e51623f81a [package:js] Add errors for missing @JS on class
Adds errors for class members that have a @JS annotation but the
enclosing class does not.

Change-Id: Id693af71678510047a723863846d89aa29cebe26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157004
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-07 17:09:23 +00:00
Srujan Gaddam 57a522eaaf [dart2js] Allow multiple errors in native_test
native_test is set up so that it validates only one error per static
error. This CL allows multiple errors to be reported and validates
that all are reported.

Change-Id: I97e9abbfbd8273c0c436e44d08f5768eea3f7785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157663
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-07 17:09:23 +00:00
Konstantin Shcheglov 5bd3e5a63f Use PubPackageResolutionTest for diagnostics snippets.
Change-Id: I4fd0e38d0ab431f96056fba0819ddefefea72e8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:45:07 +00:00
Konstantin Shcheglov 8a0d5c25ee Use lookup() in VariableResolverVisitor.
Change-Id: I101ba07997cabcfa5fbccc59194acb79d7abf7e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:39:36 +00:00
Joshua Litt d384b7a0a6 [dart2js] Gather only required classes in deferred_load.
Currently we are gathering classes for all supertypes, but we only need
to gather classes for applied mixins and super classes.

Change-Id: Ie55a6587b0bc9cacf5061a52d2d9a9ec5fdbf2eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156761
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-07 16:26:15 +00:00
Konstantin Shcheglov 6a5030981c Remove ResourceProviderMixin.newFileWithBytes().
R=brianwilkerson@google.com

Change-Id: I741d75149c1ff7108a458f661eb583b3fd711ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:14:41 +00:00
Christian Altamirano 7689769bfc [dart2js] Started skeleton for a powerset abstract value domain
This is based on the wrapped version that also includes a bit integer.
Right now the methods use the old abstract value domain but will use the integer bits in later CLs.
Also added and updated a flag so that now there is one for a wrapped domain and another for a powerset domain..

Change-Id: Iab6b93584a9a644dfef92f689c4be8c42ce8076a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157620
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-07 16:01:55 +00:00
pq 768fd39317 bulk fix for unnecessary_overrides
Change-Id: I9cdd051d7dcde5c9a9495e04cf0e7765aac8e714
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 15:30:55 +00:00
Jens Johansen 714ee1cd48 [CFE] Reproduction for flutter issue #63029
Change-Id: I9df135af44fe023e4795f0a042f1bc1297ace8d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157499
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-08-07 14:26:24 +00:00
Vyacheslav Egorov 3ebe4c534a [gardening] Mark regression test slow
TBR=sstrickl@google.com

Change-Id: I33ea1cd8fdf8607a81749785d06e004e77a686bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157740
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-08-07 10:25:07 +00:00
JustWe d6ef844a72 [front-end] bugfix: fix bug in constant eval .
fix bug in constant eval.
https://github.com/dart-lang/sdk/issues/42946

``` dart
main() {
  const x = (2 == 2.0);
  print(x); // prints `true`
}
```

@mraleph

Closes https://github.com/dart-lang/sdk/pull/42949
https://github.com/dart-lang/sdk/pull/42949

GitOrigin-RevId: 79feed76089dad86651e165faf12e41bdc6b1d88
Change-Id: I0af49901af7fdbc42a0f84d8ef49c3cbd1e32911
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157341
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-08-07 09:42:57 +00:00
Vyacheslav Egorov 8835116b19 [vm/compiler] Fix Slot::cid_ type
Concrete cids are 16-bit unsigned values, but Slot::cid_ was erroneously
declared as a signed value - which causes issues in program with large
amount of classes once it flows into variables of larger signed types
(classid_t or intptr_t).

Fixes b/162922506

Fixed: 162922506
Change-Id: Id116273aa34dbf6886c352427cf4565fc5dc2293
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157487
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-08-07 07:24:44 +00:00
Vyacheslav Egorov 1f27788f41 [vm_snapshot_analysis] Avoid name clash
dart:core contains a class Type and it can also contain objects which
are instances of this class. Previously we would try to put size
information for both under dart:core/Type bucket which caused issues.

To prevent the clash we now wrap snapshot node types in '<...>' before using
them as path components, so that the first case would remain dart:core/Type
but size of Type instances would be written into dart:core/<Type> bucket.

Fixes https://github.com/dart-lang/sdk/issues/42969

Fixed: 42969
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: Ie6c3400e90511507ff37b7ca037bd385dea1b11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157493
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2020-08-07 07:06:14 +00:00
pq b86f267151 bulk fix for unnecessary_lambdas
Change-Id: Idbf116b5194c122fae59526c3fc70b8a88f1b8a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157494
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 03:56:05 +00:00
Konstantin Shcheglov fdef50f096 Support for declared variables.
Declared variables cannot be configured using analysis_options.yaml,
so I put them into AnalysisContextCollectionImpl for now.

R=brianwilkerson@google.com

Change-Id: I2aaa3cfa94ad4a386f0be7d47acc979a89b69b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-07 03:33:39 +00:00