Commit graph

51488 commits

Author SHA1 Message Date
Zachary Anderson
02eebb0c69 [GN] Remove the dart_host_toolchain arg
This flag can be removed after: https://github.com/flutter/engine/pull/4308
lands.

Change-Id: I4730aaece1e43cf71ea569bda78c2cd546a66358
Reviewed-on: https://dart-review.googlesource.com/18060
Reviewed-by: Alexander Aprelev <aam@google.com>
2017-11-01 21:13:28 +00:00
Brian Wilkerson
6661da9b86 Make parseMapLiteralEntry accept the last consumed
Change-Id: I0d4c393ece13bbe8f1edad032053df90bd4fcf5d
Reviewed-on: https://dart-review.googlesource.com/18040
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-01 21:12:23 +00:00
Brian Wilkerson
0d94dfaf5c Make parseLiteralStringOrRecoverExpression accept the last consumed
Change-Id: Ia8b8ad0d9e8a86c7a782185ef00dd667bc2e457a
Reviewed-on: https://dart-review.googlesource.com/18002
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-01 21:07:18 +00:00
Konstantin Shcheglov
229fdff530 Triage a test for generic function types as a Fasta issue.
R=paulberry@google.com, sigmund@google.com

Bug: https://github.com/dart-lang/sdk/issues/31213
Change-Id: I0e791e20ac84d0bd3ddd0b2f9e489119a4eda9de
Reviewed-on: https://dart-review.googlesource.com/18020
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-01 21:04:17 +00:00
Jenny Messerly
1dfa9d2320 fix DDC SDK for Symbol.computeUnmangledName
Change-Id: I8b793744339dd934833f6188b5b8267d4dad1746
Reviewed-on: https://dart-review.googlesource.com/17864
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-11-01 20:38:06 +00:00
Brian Wilkerson
1e6490dbef Return last committed from parseTopLevelMember, parseTopLevelKeywordDeclaration, and parseTopLevelDeclarationImpl
Change-Id: If9fe159f4926c250cf06937cea9f1f4a78e21269
Reviewed-on: https://dart-review.googlesource.com/18003
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-01 20:31:36 +00:00
Konstantin Shcheglov
9d0d1fb6d2 Replace #30035 with #28434 in status files.
Kernel now supports these annotations, we need to start producing them.

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

Bug:
Change-Id: I1b2732ddad2674688d562f3be3ca29140a5e9381
Reviewed-on: https://dart-review.googlesource.com/17863
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-01 20:30:04 +00:00
Konstantin Shcheglov
9def9444cd Stop storing the parent node in AnalyzerMetadata.
We don't actually need it, and using any node disables lazy Kernel
loading.

R=brianwilkerson@google.com

Bug:
Change-Id: Ie92aa6c101c4b94c3585fc1ab7879ca2b6db6053
Reviewed-on: https://dart-review.googlesource.com/17983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-01 19:10:04 +00:00
Brian Wilkerson
895f771726 Make parseTopLevelMethod return the last consumed
Change-Id: I65b9a2a6842ed1ec8ce986cb83fa108ce38be6ba
Reviewed-on: https://dart-review.googlesource.com/18001
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-01 19:02:47 +00:00
Konstantin Shcheglov
a3ea40eb3b Fix for covariant function typed parameters with void return type.
R=brianwilkerson@google.com

Bug:
Change-Id: I8e46ebd0afb7d9812016bae584a2f53066e15019
Reviewed-on: https://dart-review.googlesource.com/17982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-01 18:58:35 +00:00
Paul Berry
d2e3c54941 Allow arguments of type DartType in error message templates.
Change-Id: Ief2c253dc287cb416f35d03d796383725c2982c3
Reviewed-on: https://dart-review.googlesource.com/17981
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-01 18:53:15 +00:00
Brian Wilkerson
f95e1475fc Remove the unused Listener.beginDottedName
Change-Id: I1c5752a9610f21dad62db6655972b4006ce632e9
Reviewed-on: https://dart-review.googlesource.com/17862
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-11-01 18:35:45 +00:00
Konstantin Shcheglov
9350925efe Add InvalidCodeTest with end-to-end cases of problematic invalid code.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I39d26ea0b333ddfa69f281eeba78b04212e95a96
Reviewed-on: https://dart-review.googlesource.com/17960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-01 18:16:25 +00:00
Brian Wilkerson
87a096e992 Remove the unused Listener.beginIdentifierList
Change-Id: I3644aaff3fa7a8a97b9e9bcc83f549f628a1fb71
Reviewed-on: https://dart-review.googlesource.com/17861
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-01 17:21:05 +00:00
Brian Wilkerson
8d9243b4f9 Fix an assertion to be stronger
Change-Id: Ie7a3fd7206b9b2a6acb8685e887ea53e31b0e4c5
Reviewed-on: https://dart-review.googlesource.com/17860
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-01 16:47:45 +00:00
Brian Wilkerson
dd18ef841b Parser conversion, part 3
Change-Id: Ibe48da9bfa89887fb04a4b958b913fe7c0087cf1
Reviewed-on: https://dart-review.googlesource.com/17600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-11-01 16:32:45 +00:00
Paul Berry
08b0120186 Begin reporting "invalid assignment" errors.
Change-Id: I1e47acd662032c63e56cb2349b2f349e9825b990
Reviewed-on: https://dart-review.googlesource.com/17680
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-01 16:28:35 +00:00
Martin Kustermann
19ac48da44 [VM] Disable recognized method inlining in CallSiteInliner (after enabling it recently)
It appears like the manual flow graph building code for
MethodRecognizer::kObjectRuntimeType is wrong and was exposed by
enabling it recently.
Change-Id: Ia4be8c4bc7c3342e0cdf1cb8b270dc48b5f2fde4
Reviewed-on: https://dart-review.googlesource.com/17920
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-11-01 16:15:12 +00:00
Martin Kustermann
56050f47fb [VM] Let FlowGraphTypePropagator know that LinkedHashMap.index is kTypedDataUint32ArrayCid
Now that we do eager rehashing of linked hashmaps we no longer have the
index field be `null` (which in the past signaled we needed rehashing).

This means we can teach the optimizer that loads from the index fied
always result in kTypedDataUint32ArrayCid.

Change-Id: Ic012881c12b2310a6337696521fa1355afd4069f
Reviewed-on: https://dart-review.googlesource.com/17447
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-01 15:52:14 +00:00
Peter von der Ahé
0023f99019 Changes to runtime patches so Fasta can understand them.
Change-Id: I7f8d6b110f2f0c90b131a2538240c1b81bfa1578
Reviewed-on: https://dart-review.googlesource.com/17162
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-01 15:16:04 +00:00
Martin Kustermann
bf9dd5342f [VM] Inling recognized methods even without speculation in some cases
Change-Id: I40df1c7f89952463a15fc43f24cd8925047717cf
Reviewed-on: https://dart-review.googlesource.com/17446
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-01 15:11:24 +00:00
danrubel
9319716c4f Ensure progress in parseUnit
This adds a check in the top level parseUnit loop to ensure
that parsing has not stalled causing an infinite loop.

Fix https://github.com/dart-lang/sdk/issues/31151

Change-Id: Ief7c12d60bd7e09111f9b1bbefa4a29b9fcf9175
Reviewed-on: https://dart-review.googlesource.com/17460
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-11-01 14:22:40 +00:00
Morten Krogh-Jespersen
f18d6e25e9 Revert "Add vm-linux-debug builder to CQ."
This reverts commit 939e295f9a.

Bug:
Change-Id: Iae0d040d00254e85904a5cbd9cb3b889aafcc0d6
Reviewed-on: https://dart-review.googlesource.com/17880
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-11-01 14:17:40 +00:00
Martin Kustermann
8d043ccb89 [VM] Use TryReplaceStaticCallWithInline also in the normal inlining path
Previously we would sometimes build specifically hand-crafted flow graph
code for recognized methods and sometimes let the normal flow graph
builder do it (depending on whether inlining was triggered via
[CallSiteInliner] or [CallSpecializer]).

This CL makes us use the hand-crafted flow graph building for recognized
methods in both cases.

Change-Id: I58405b16adca810fd7ccff32027b9d4a13858976
Reviewed-on: https://dart-review.googlesource.com/17445
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-01 13:55:01 +00:00
Peter von der Ahé
b7060891c1 Mention that libraries.json is generated.
Change-Id: I48fcc8443a0980c435e87642cf6a7aede07e68f0
Reviewed-on: https://dart-review.googlesource.com/17161
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-01 12:55:42 +00:00
Morten Krogh-Jespersen
939e295f9a Add vm-linux-debug builder to CQ.
Bug:
Change-Id: I17e861080021ded757a0d5c0c5b02c739d4f3e44
Reviewed-on: https://dart-review.googlesource.com/17780
Reviewed-by: William Hesse <whesse@google.com>
2017-11-01 11:17:51 +00:00
Martin Kustermann
239f45b5ca [VM] Combine use_speculative_inlining/inlining_blacklist into SpeculativeInliningPolicy
Change-Id: I20a1354842d825ed1df0a19de57405a6d4041bd8
Reviewed-on: https://dart-review.googlesource.com/17444
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-01 11:06:00 +00:00
Peter von der Ahé
16e4875629 Update supertype builder when breaking cyclic hierarchy
Change-Id: Ibae0a3d1759d79bf0d2e350347e390936fa314ff
Reviewed-on: https://dart-review.googlesource.com/16953
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-11-01 10:08:40 +00:00
Jens Johansen
c8e51ef922 [kernel] Add offset to this[i] and super[i]
Bug:
Change-Id: Ic65b69c4977be834c7b69638d6c030727c7210e5
Reviewed-on: https://dart-review.googlesource.com/17441
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-01 09:57:00 +00:00
Morten Krogh-Jespersen
8668511f85 Add asan vm builders to test matrix.
Bug:
Change-Id: I366e419d9f0d9a9c18a8b6d45a12330f856acfd4
Reviewed-on: https://dart-review.googlesource.com/17103
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morten Krogh-jespersen <mkroghj@google.com>
2017-11-01 09:33:40 +00:00
Johnni Winther
42a6bfac51 Update infrastructure on inference_equivalence and equivalence-based tests.
Reviewed in https://dart-review.googlesource.com/c/sdk/+/17440

Change-Id: I35c054517e72185d99eee2b438d62a5f5c52fdee
Reviewed-on: https://dart-review.googlesource.com/17782
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-01 09:28:31 +00:00
Johnni Winther
5017e573e3 Add test for index postfix/prefix
Reviewed in https://dart-review.googlesource.com/c/sdk/+/17440

Change-Id: Ibf6399ca4c3ccf41ce8307833e5a300368c02299
Reviewed-on: https://dart-review.googlesource.com/17781
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-01 09:22:40 +00:00
Johnni Winther
1852cbab70 Use the right receiver mask in expose this computation
Change-Id: I298eeb12fca7b1e78b904b63e64ceb6414d0996a
Reviewed-on: https://dart-review.googlesource.com/17440
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-01 09:14:59 +00:00
Siva Chandra
af44a37c1a Move the kernel_offset_ field of RawClass out of !DART_PRECOMPILED_RUNTIME.
Change-Id: I18b160955f7a690bf6c336cf328ef3ede24dca8d
Reviewed-on: https://dart-review.googlesource.com/17760
Reviewed-by: Siva Chandra <sivachandra@google.com>
2017-11-01 06:25:02 +00:00
Siva Chandra
fe2fa9e61f Do no write/read class' kernel offset for full AOT snapshots.
Change-Id: I736a9294c47f9b069ca87c910665f3d6275d3a5e
Reviewed-on: https://dart-review.googlesource.com/17740
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
2017-10-31 22:37:36 +00:00
Vijay Menon
48cfab5deb Fix source maps for better dev tools hover
Change-Id: Id706a1c5817f174a3b512e5c7e2f29599b078eb8
Reviewed-on: https://dart-review.googlesource.com/17700
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2017-10-31 22:09:10 +00:00
Alexander Markov
c84e2968ac [VM] Avoid dynamic call in _Double.==
Change-Id: Iab301370f33c375db1cd52f8eb87500955dfab09
Reviewed-on: https://dart-review.googlesource.com/17722
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-10-31 22:01:09 +00:00
Alexander Markov
6505994d58 [VM] Correct return type of _setHash
Change-Id: I3f02d584d30fc7a2f3bd93858eaf77abe3c9f5b7
Reviewed-on: https://dart-review.googlesource.com/17720
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-10-31 22:01:08 +00:00
Paul Berry
f382f3980c Run kernel type checker during front end strong mode unit tests.
This should help make sure that the front end is inserting all of the
necessary implicit downcasts.

The type checker is run after comparing to golden files, and before
running the test in the VM.  So if a test case fails to match its
golden file, the test's status will be "Fail" regardless of whether it
type checks.  If the test case matches its golden file but fails to
type chek, the test's status will be "TypeCheckError".  Rationale: the
type checker is still under development; if it has bugs leading to
false failures, we don't want that to get in the way of comparing
against golden files.

Change-Id: I6764aa5c7f2aab92a10edfa41afcdb056946530b
Reviewed-on: https://dart-review.googlesource.com/17522
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-31 21:25:45 +00:00
Konstantin Shcheglov
593d4b3087 Catch exceptions during parsing and store exception context.
It seems that we need, at least temporary, catch scanning / parsing
exceptions and store the exception and the corresponding content
in crash contexts.

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

Bug: https://github.com/dart-lang/sdk/issues/31098
Change-Id: Id3390b0f39acf13f44777ec9156fb237d14c57e8
Reviewed-on: https://dart-review.googlesource.com/17561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-31 21:13:36 +00:00
Jacob Richman
8b221d13a4 Fix ddc debugger_test Fix regression in custom formatters due to change in metadata signatures to use Object.__proto__ instead of a null __proto__.
Bug:
Change-Id: I68fdb980e777b7c3f335fd6b57181134e3159cc3
Reviewed-on: https://dart-review.googlesource.com/17060
Commit-Queue: Jacob Richman <jacobr@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-10-31 19:45:27 +00:00
Brian Wilkerson
c223a6d9d6 Add highlight region information to more tests
Change-Id: I5f2ffe440f9358b551e73eef205c465bfea7bdac
Reviewed-on: https://dart-review.googlesource.com/17580
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-10-31 19:34:25 +00:00
P.Y. Laligand
a28d599ab6 [gn] The Fuchsia build dir path may be relative.
Change-Id: I21f29233406ce6bb12c9fb2a95d5d988e85b5bf2
Bug:
Reviewed-on: https://dart-review.googlesource.com/17641
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-31 19:23:17 +00:00
Siva Chandra
9f0175059e Load class members lazily when loading from kernel.
This change brings down core snapshot size by ~750KB, and brings
down app-jit snapshot size of simple "Hello, World" dart script by
~650KB. The bot cycle times will also come down by around ~20%.

Change-Id: I2a01c98bedc7ebfa2a653983995486a71504daf3
Reviewed-on: https://dart-review.googlesource.com/16323
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-10-31 19:19:25 +00:00
Alan Knight
dfcce6d012 Make trapRuntimeErrors false by default
Bug:
Change-Id: I4e631113b00d5c39feaee74f4895a2e1f75641d0
Reviewed-on: https://dart-review.googlesource.com/17620
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2017-10-31 18:59:59 +00:00
Konstantin Shcheglov
2470d9fc74 Don't suggest to/from expression body Quick Assist when selection is in the expression.
Flutter return expressions in build() methods can be quite long,
and it is surprising to see this Quick Assist, and not clear to
what it will be applied. Especially when the method is so long that you
don't even see its beginning.

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

Bug:
Change-Id: Ib245c34f3cbc51add23810c025ebda9d8471ee9b
Reviewed-on: https://dart-review.googlesource.com/17621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-31 18:51:37 +00:00
Dan Rubel
2b681b2149 Disable scanning of &&= and ||= assignment operators
Fix https://github.com/dart-lang/sdk/issues/30340

Change-Id: Id27f37af9805ca09deaa3c6252817e3d9a926216
Reviewed-on: https://dart-review.googlesource.com/17361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-31 18:51:24 +00:00
Martin Kustermann
542083e5da Skip cc/LargeMap on simulators
Change-Id: I57b9729b74ab9bce4cb667a923ccdcacccffaa6a
Reviewed-on: https://dart-review.googlesource.com/17660
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-31 18:29:26 +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
Régis Crelier
9b14a361a8 [VM] Address more TODOs related to generic functions.
Remove parsing support for 'super' that was meant to declare lower bounds of
function type parameters, since this feature did not make it into the spec.

Change-Id: I4087d0e108c5984437083a05a065fe785888d2f7
Reviewed-on: https://dart-review.googlesource.com/17360
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-10-31 17:55:26 +00:00