Commit Graph

56224 Commits

Author SHA1 Message Date
Konstantin Shcheglov c6cf61752e Update PluginWatcherTest to the fact that async functions start running synchronously.
R=brianwilkerson@google.com

Change-Id: I944c1e0941f727049b7a5acfc7d059d815451e0c
Reviewed-on: https://dart-review.googlesource.com/58003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-01 21:30:04 +00:00
Johnni Winther e1549df93f Fix regression introduced in 'Use AbstractValue in most of ssa'
Change-Id: Ie6159eb750ece1748ba1bb0b3c4f4d13a0dff9d6
Reviewed-on: https://dart-review.googlesource.com/58021
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-06-01 21:18:03 +00:00
Konstantin Shcheglov 184df3aee0 Make AnalysisServer.getAnalysisResult() sync to avoid changing behavior between Dart1 and Dart2.
R=brianwilkerson@google.com

Change-Id: I35e01907a6e8286b5ffd48a3b5ac6fcaf23034b3
Reviewed-on: https://dart-review.googlesource.com/58000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-06-01 21:17:33 +00:00
Vyacheslav Egorov 99a5f149ac [vm] Enable type stubs based type checks in JIT mode for some types.
Relanding 4be50d6fa1 with fixes to DBC
and location summaries: AssertAssignable must save FPU registers.

For now we are limiting this to type checks against type parameter types.


In Dart 1 mode Dart2JS compiles itself in 28s when running from source
and in 23s when running from ideal app-jit snapshot (trained on the
same workload).

Before this change in Dart 2 mode numbers were 51s and 57s respectively.

After this change in Dart 2 mode numbers are 38s and 32s. Meaning
that regression is reduced by 50%.

Issue https://github.com/dart-lang/sdk/issues/31798
Issue https://github.com/dart-lang/sdk/issues/33257

Change-Id: Ifb55f86453bfdf36a2e03bcd7f3197cfde257103
Reviewed-on: https://dart-review.googlesource.com/57980
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-06-01 20:58:33 +00:00
Zach Anderson 90c4215af4 [vm] Adds full GC check on all external allocations
related #33314

Change-Id: I3f715f5c3580c9f865a4579b732ba56c39c69012
Reviewed-on: https://dart-review.googlesource.com/58001
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-01 20:42:49 +00:00
Paul Berry bef7cd354f Observatory strong mode fix: Use .nodes= instead of .children= to accommodate text nodes.
This is necessary because HtmlElement.children= requires its parameter
type to be a List<Element>, and text nodes are not elements.

Change-Id: I99c91fe060c16f02d737d904f6869b3dad19c196
Reviewed-on: https://dart-review.googlesource.com/57005
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-01 20:39:34 +00:00
Paul Berry 72aae537a2 Observatory strong mode fix: clean up port mocking.
Change-Id: If2077620c0243838587d8d689a74f37c54b19c08
Reviewed-on: https://dart-review.googlesource.com/57360
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-01 20:34:43 +00:00
Stephen Adams 312f02532a [js_runtime] JavaScriptFunction matches any Dart function type
Change-Id: Ib9ce3658c06cef15e2b57d5585a2bae51d69586e
Reviewed-on: https://dart-review.googlesource.com/57720
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-06-01 19:57:54 +00:00
Alexander Markov c8860b4ca2 Remove all uses of --limit-ints-to-64-bits VM option
VM option --limit-ints-to-64-bits was enabled by default a while ago,
and now we're preparing to remove it from Dart VM.

This CL removes all uses of this option in preparation for this cleanup.

Issue: https://github.com/dart-lang/sdk/issues/33306
Change-Id: I8f33cf4ca8ce7ef9a171a982346e43dd8cb722a9
Reviewed-on: https://dart-review.googlesource.com/57960
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-01 19:32:24 +00:00
Paul Berry 5db95fbb61 Upgrade mockito to latest version.
And fix frontend_server_test.dart accordingly.

Change-Id: Ic6a57afc9582780e55015a36f3cec6969de13c54
Reviewed-on: https://dart-review.googlesource.com/56709
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-01 19:32:13 +00:00
Paul Berry 1bc9b8d00c Mark ContextRoot.pathContext constructor argument as required.
This should be a non-breaking change since this is an internal
analyzer API.  All clients that were making use of this internal API
have been updated to pass in the required argument.

Change-Id: Iec81454f6382c8de9ff6340d372338e678a3c73a
Reviewed-on: https://dart-review.googlesource.com/57920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-01 18:37:24 +00:00
Vyacheslav Egorov b7bc0d06c4 Fix state machine in _DiscoverAvailableFilesTask.perform
* When iterating over folders with folderIterator we must check
elapsed time and decide to exit before we call moveNext. If we
do it in an oposite order we will skip the current element when we
come back - because we will call moveNext again.

* Only add driver.addedFiles *once* to the list of files. Previous
we were adding it everytime we called perform() leading to duplicates
in the list.

Change-Id: Idd1d2a272661fe204b24af0be4539c3a154c9652
Reviewed-on: https://dart-review.googlesource.com/57826
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-06-01 18:34:14 +00:00
danrubel 2c44dc11c7 Improve type variable recovery
Change-Id: I159508d07d28f1e2d02f5de66a67938b37bc82cd
Reviewed-on: https://dart-review.googlesource.com/57940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-01 18:29:13 +00:00
Emily Fortuna 789ceee184 Update version number in DEPS for dart2js_info pkg
Change-Id: I12c77392f95415bba150c0510612b27ffb63db46
Reviewed-on: https://dart-review.googlesource.com/57740
Reviewed-by: Stephen Adams <sra@google.com>
2018-06-01 17:52:28 +00:00
Martin Kustermann 0629e3afa5 [VM] Fix vm/cc/DartAPI_TypeGetParameterizedTypes test
This test was looking up "int", "List" ... in a generated test library
instead of the "dart:core" library.

It seems like the old lookup has succeded because the C++ parser adds all
imports to the library object and the lookup mechanism uses the library scope,
which most likely falls back to the import scope.

Issue https://github.com/dart-lang/sdk/issues/33042

Change-Id: I37ea756fe53fe5dcbd8efe24053591816d5fc4af
Reviewed-on: https://dart-review.googlesource.com/57821
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-06-01 17:48:14 +00:00
Konstantin Shcheglov e18fd7c3e7 Remove the test for getNavigation() and removing the analysis context.
The test times out, because we don't get any answer on our getNavigation().
Technically this happens because we dispose the corresponding instance
of AnalysisDriver, so it is removed from the AnalysisDriverScheduler,
and getResult() never completes.

Which, I think makes sense.
Once the analysis root is removed, the client cannot expect answers.
So, there is no need for the test.

R=brianwilkerson@google.com

Change-Id: I124ac3d6a4a903880c7b8f82cafe692b38c59017
Reviewed-on: https://dart-review.googlesource.com/57903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-01 17:41:04 +00:00
Brian Wilkerson 2a545d7153 Initial implementations for some of the generator methods
Change-Id: Idb4d5c2b6c5b6d283d27823d9ec9f9fb66900a74
Reviewed-on: https://dart-review.googlesource.com/57902
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-01 17:34:43 +00:00
Konstantin Shcheglov 5f42fe5822 Simplify DartCompletionContributorTest.computeSuggestions() async behaviour.
R=brianwilkerson@google.com

Change-Id: I8a797e49406dd0b8eeb34c21d5ed824765c90abb
Reviewed-on: https://dart-review.googlesource.com/57901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-01 17:21:23 +00:00
Konstantin Shcheglov f6ece48aba Fix the test that want to run async code to be async.
R=brianwilkerson@google.com

Change-Id: Ia428ac71dd7a0e86daf4542d256fa6ffee3a65b5
Reviewed-on: https://dart-review.googlesource.com/57900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-01 17:03:08 +00:00
asiva e9a60098bb [VM] Use UserVisibleName for types in error messages reported to users to make the error more clear. This fixes the case in issue 33303.
Bug: 33303
Change-Id: Idd31eadea3d2caca1cc9416b3286d39102bc2108
Reviewed-on: https://dart-review.googlesource.com/57880
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-06-01 16:41:44 +00:00
Brian Wilkerson cb07f74f4b Clean up some of analyzers generators based on feedback
Change-Id: I3d12bd1a253becef162df4a78e6844e04634c1cd
Reviewed-on: https://dart-review.googlesource.com/57860
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-01 16:25:06 +00:00
Aske Simon Christensen e9818eefd8 Update analyzer status about type parameters on constructors.
Change-Id: I3e7a48b608246dc512e415d8b6a11e16ac42e48f
Reviewed-on: https://dart-review.googlesource.com/57824
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-06-01 15:28:22 +00:00
Erik Ernst 6f68bec1bc TBR: Typos fixed
Change-Id: I8c48953541a36f516d7a9bd27de85193bf189930
Reviewed-on: https://dart-review.googlesource.com/57825
Reviewed-by: Erik Ernst <eernst@google.com>
2018-06-01 15:15:32 +00:00
Brian Wilkerson 545ad130a2 Fix a couple of bugs in the analyzer forest implementation
Change-Id: Iff246ba92976bab87b643ee9e96efa8f1db0cccb
Reviewed-on: https://dart-review.googlesource.com/57715
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-06-01 15:11:34 +00:00
Konstantin Shcheglov 85b4a799eb Search references to elements and subtypes in all known (and discovered) files.
We discover classes in packages, so it should improve situation for Flutter.

We don't yet discover files in SDK per se (although I already see a lot
of subclasses), so might still miss some files, but all search bits are
in place, we just need to do discovery in SDK. Should be easy to do
in a day or two.

Also search for private and local elements probably still work only
for added files, again will get to it in a following CL.

https://github.com/flutter/flutter-intellij/issues/2296
https://github.com/flutter/flutter-intellij/issues/2258
https://github.com/dart-lang/sdk/issues/26762
https://github.com/dart-lang/sdk/issues/29112

R=brianwilkerson@google.com

Change-Id: Ib2b73b4cb31fd14b2514e70fbfe58735418e74d5
Reviewed-on: https://dart-review.googlesource.com/57760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-01 14:47:43 +00:00
Aske Simon Christensen 4fb6395058 Report error when a constructor has type parameters.
Fixes https://github.com/dart-lang/sdk/issues/30678
Fixes https://github.com/dart-lang/sdk/issues/33110

Change-Id: I7d3fcd56d408fefce7a0b43ffd68cc5427eb0940
Reviewed-on: https://dart-review.googlesource.com/57507
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-06-01 12:48:09 +00:00
Lasse R.H. Nielsen 315a186dc4 Better test error handler argument types.
Change-Id: I460a40dc9db096f3ae95602ba9c8dc86b4576c56
Reviewed-on: https://dart-review.googlesource.com/53208
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-01 12:26:37 +00:00
Vyacheslav Egorov 0aadba1189 Revert "[vm] Enable type stubs based type checks in JIT mode for some types."
This reverts commit 4be50d6fa1.

Reason for revert: Failures on SIMDBC64 and Analyzer bots.

Original change's description:
> [vm] Enable type stubs based type checks in JIT mode for some types.
> 
> For now we are limiting this to type checks against type parameter types.
> 
> # Performance improvements
> 
> In Dart 1 mode Dart2JS compiles itself in 28s when running from source
> and in 23s when running from ideal app-jit snapshot (trained on the
> same workload).
> 
> Before this change in Dart 2 mode numbers were 51s and 57s respectively.
> 
> After this change in Dart 2 mode numbers are 38s and 32s. Meaning
> that regression is reduced by 50%.
> 
> Issue https://github.com/dart-lang/sdk/issues/31798
> Issue https://github.com/dart-lang/sdk/issues/33257
> 
> Change-Id: I34bf5385a5cc3c7702dc281c6dfa89da85d3dde1
> Reviewed-on: https://dart-review.googlesource.com/57601
> Reviewed-by: Régis Crelier <regis@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,kustermann@google.com,regis@google.com

Change-Id: I85a30c962b0cd556310e19193f5993ab76ecf2e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/57840
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-06-01 11:23:08 +00:00
Vyacheslav Egorov 4be50d6fa1 [vm] Enable type stubs based type checks in JIT mode for some types.
For now we are limiting this to type checks against type parameter types.

# Performance improvements

In Dart 1 mode Dart2JS compiles itself in 28s when running from source
and in 23s when running from ideal app-jit snapshot (trained on the
same workload).

Before this change in Dart 2 mode numbers were 51s and 57s respectively.

After this change in Dart 2 mode numbers are 38s and 32s. Meaning
that regression is reduced by 50%.

Issue https://github.com/dart-lang/sdk/issues/31798
Issue https://github.com/dart-lang/sdk/issues/33257

Change-Id: I34bf5385a5cc3c7702dc281c6dfa89da85d3dde1
Reviewed-on: https://dart-review.googlesource.com/57601
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-06-01 10:50:09 +00:00
Kevin Millikin 1d8bef0d89 Remove class TypeInferenceEngineImpl
The abstract class TypeInferenceEngineImpl does not really serve any
purpose, so remove it.  If nothing else, it makes it easier to
understand what is going on and change things.

Change-Id: I9aabcb041b3fbc7d5b7b63dfef9effeb73a6bab8
Reviewed-on: https://dart-review.googlesource.com/57822
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-06-01 10:18:17 +00:00
Lasse R.H. Nielsen dd83e698d8 Add 64-bit integer semantics to the specification.
Change-Id: I4dd2dfece2a78a4f96074886771036ee2942470f
Reviewed-on: https://dart-review.googlesource.com/38020
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-06-01 08:49:57 +00:00
Stephen Adams a10eda4988 update dart2js status files
Change-Id: I7ca813e8d10382530115644918479214491c95aa
Reviewed-on: https://dart-review.googlesource.com/57721
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-06-01 01:06:40 +00:00
Konstantin Shcheglov 6458b5da2f Always include added files into the list of files to discover.
R=brianwilkerson@google.com

Change-Id: Ida9f306652f7b991303dc849bb21dc1d384fa6e3
Reviewed-on: https://dart-review.googlesource.com/57711
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-31 22:44:06 +00:00
Ryan Macnak c984e63f61 Skip tests of snapshot determinism in checked mode.
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: Ie762ed4be07d6b67cfc35fbcf5a6ba11bfb96d76
Reviewed-on: https://dart-review.googlesource.com/57713
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-31 22:40:05 +00:00
Mike Fairhurst 99dadf4d7f Remove unneeded (and incorrectly typed) mock step
Correctly typed as far as old mockito is concerned because it does not
check types. With this fixed we'll be clear to upgrade mockito inside
the SDK to the one that does.

Change-Id: If68c0bb02c8652be6b891c189fabee135423f94c
Reviewed-on: https://dart-review.googlesource.com/57712
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-05-31 22:38:37 +00:00
Paul Berry f87933d845 Introduce tests specific to behaviors of FunctionType.
I am about to start embarking on bug fixes and refactors to
FunctionType, so I want a set of tests that I can use to make sure I
don't break any important behaviors.  These tests use a mock element
model, so they don't rely on any behaviors outside of FunctionTypeImpl
itself.

Change-Id: I037f6a8cd2ee2a94fba13bb9b6be9e7090e254e8
Reviewed-on: https://dart-review.googlesource.com/57708
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-31 22:04:27 +00:00
Paul Berry 64cfdb4cc6 Remove _explicitTypeParameters and substitute4 from FunctionTypeImpl.
substitute4 was only used by the kernel resynthesizer, which is not
being maintained at the moment (and which I believe needs to be
reworked anyhow).  With substitute4 gone, _explicitTypeParameters was
always null (except in the case of CircularFunctionTypeImpl, where it
had no effect), so we can just replace it with literal `null`.

Change-Id: I5248e0f93b9a39c55d3e4e8b62150536656608e8
Reviewed-on: https://dart-review.googlesource.com/57709
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-31 21:58:06 +00:00
Sigmund Cherem b930ae19b1 Fix regression in deferred loading (part2)
Change-Id: If38e0c40c8997af65da470285cdbd8e45a20af7d
Reviewed-on: https://dart-review.googlesource.com/57705
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-05-31 21:42:07 +00:00
Aart Bik a0c4ac14c1 Omit redundant bounds check for Dart2 on typed setters/getters.
Rationale:
Some native typed setters/getters in the typed_data library
are only called from clients that perform explicit bounds checks
first. Under strongly typed Dart2, there is no need to repeat
these tests. Avoids overhead, and reduces the polymorphicness
of these calls (preparing more inlining later).

https://github.com/dart-lang/sdk/issues/33205

Tests:
./tools/test.py --mode release --arch x64 -r vm
tools/test.py -m release -r vm -c dartk --strong standalone_2/typed_data_test
Change-Id: I81771a4f4b41a21e344f2d50745bbc30480b2a6c
Reviewed-on: https://dart-review.googlesource.com/57460
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-31 21:34:16 +00:00
Brian Wilkerson 2ad29cbd15 Remove unnecessary uses of toExpression
Change-Id: I07933f647ee71c5357a599d06ce9268c0020cbd6
Reviewed-on: https://dart-review.googlesource.com/57707
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-31 21:03:46 +00:00
Brian Wilkerson 7a76a40438 Add several other generators
Change-Id: I328eeff5bdf87387ddb9b2a4d31825fc3b630824
Reviewed-on: https://dart-review.googlesource.com/57706
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-31 20:25:06 +00:00
Emily Fortuna 483c42b899 Switch dart2js to use dart 2 vm.
Change-Id: I39e807e10f53f647414d4e419b9f3ef3862bd651
Reviewed-on: https://dart-review.googlesource.com/57440
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-31 19:44:36 +00:00
Konstantin Shcheglov f5d991e6a1 Support extracting selected statements into a new Flutter widget.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2283
Change-Id: I778f5b06e0f995026219bee32c4a2253aa6595c5
Reviewed-on: https://dart-review.googlesource.com/57704
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-31 19:41:26 +00:00
Brian Wilkerson 89c2da2846 Add generator for unlinked names
Change-Id: I5841b3ff86133eedd14d8bef26c3d1b2dd78f34d
Reviewed-on: https://dart-review.googlesource.com/57703
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-31 19:21:16 +00:00
Emily Fortuna c911a1bef6 Clean up additional dart2js strong mode runtime error and don't add method type variable in dart 1 version.
Change-Id: I8f8a62fe2b4fcc00c05fbab22ed9e7a55eb95ccf
Reviewed-on: https://dart-review.googlesource.com/57523
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-31 18:52:06 +00:00
Samir Jindel 9a02f5bf4d [vm/kernel] Fix bugs with expression evaluation in debug mode.
Fixes #33170: We had an assert that type variables are not bounded by "dynamic".
This assert was previously valid because the FE replaces "extends dynamic" with
"extends Object". However, it's not necessary in any way, and it's difficult to
access the Object type from outside the FE when synthesizing type parameters for
expression compilation.

Fixes #33171: The synthetic class generated during serialization to hold the
synthetic method may need to extend core library classes if the expression's
scope was within a core library class. In this case, the class finalizer needs
to avoid applying the restrictions on class extension to the synthetic class.

To facilitate this, we now use a single class name for all synthetic classes,
rather than copying the original class name. The name of the synthetic class has
no function at all, since the synthetic method is reparented to the original
class before execution.

Fixes #33239: The arguments descriptor passed to InvokeFunction for expression
functions which capture generic type parameters was using the wrong argument
count.

Fixes #33270: Use LookupClassAllowPrivate instead of LookupClass when resolving
the expression's scope in the VM.

Test Plan:

#33170: python tools/test.py -m debug -c dartk --strong service/evaluate_function_type_parameters_test
#33171: python tools/test.py -m debug -c dartk --strong service/eval_test
#33239: Updated "evaluate_function_type_parameters_test.dart".
#33270: Updated "eval_test.dart".

Change-Id: I376926bddd2224ec2322b43685d6c13831f1a8e7
Reviewed-on: https://dart-review.googlesource.com/56060
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-31 18:46:07 +00:00
Konstantin Shcheglov 0aad13db00 Revert 'Copy @failingTest annotations to mixin applications.'
This reverts commit 242bc3413c.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33099
Change-Id: I8a1b24926072fe64e3ab73d38a1fa73695237fc4
Reviewed-on: https://dart-review.googlesource.com/57701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-31 18:40:27 +00:00
Samir Jindel 41c5da8919 [vm] Fix non-reproducibility of VM builds.
We recently removed two kind bits from `Function` to free up space for other
bits. This left two bits in `RawFunction::kind_tag_` unused and no longer
deterministically initialized. This caused `Function` objects saved in the
snapshot within the `.rodata` section of the `dart` binary to be serialized with
a non-deterministic kind tag. We now zero-initialize the kind tag.

# Test Plan

I built the `runtime` target (which includes `dart`) 10 times locally and
received the same SHA256 hash for `dart` each time.

Change-Id: Ib0de4b4b040e26a92a1ba3364460bcec0f665789
Reviewed-on: https://dart-review.googlesource.com/57624
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-31 18:36:46 +00:00
Dan Rubel e8659b0f28 Remove skipTypeVariables
Change-Id: Ibb7863cfd914ed1675f3cd977037c4857edb575a
Reviewed-on: https://dart-review.googlesource.com/57660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-31 18:11:58 +00:00
Konstantin Shcheglov 1a185867a9 Search for element declarations in discovered available files.
R=brianwilkerson@google.com

Change-Id: Idb8d4528aa1edffe60db63067e3d42fd89058b6b
Reviewed-on: https://dart-review.googlesource.com/57700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-31 17:38:53 +00:00