Commit Graph

1972 Commits

Author SHA1 Message Date
Peter von der Ahé b4dcb76518 Read patch files directly when building legacy platform files.
Change-Id: Ib2e614b676021660c6a053dfc59f639c004279b9
Reviewed-on: https://dart-review.googlesource.com/18520
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-11-03 12:43:50 +00:00
Samir Jindel 9029ee09c5 Revert "[kernel] Fix NoSuchMethod errors for generic functions."
This reverts commit 52e1466588.

Bug:
Change-Id: Ic1b37a5df2f50ede4f6873b6d2a701663673bcbb
Reviewed-on: https://dart-review.googlesource.com/18261
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-02 16:52:32 +00:00
Paul Berry 00b292511d Avoid a crash when an invalid assignment is detected during top level inference.
Change-Id: I382a4fdcd25bca529ca424ccdb7fd313d6a95066
Reviewed-on: https://dart-review.googlesource.com/18143
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-02 15:22:55 +00:00
Samir Jindel 52e1466588 [kernel] Fix NoSuchMethod errors for generic functions.
Bug:
Change-Id: I8ad90e34a7b1f77b29f1d711f158bcb69f5928f4
Reviewed-on: https://dart-review.googlesource.com/17941
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-02 15:16:08 +00:00
Paul Berry c4e00daf70 Create a front_end test case for invalid assignment errors.
Change-Id: I5c23f7eb6d07b551397ca2301ed5485910083b8d
Reviewed-on: https://dart-review.googlesource.com/18140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-01 22:09:27 +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
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
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
Paul Berry 8620e6b24a Insert implicit downcasts for ??= assignments.
Change-Id: I272eeea96a19ad5c781113211ee466f844ffbe4b
Reviewed-on: https://dart-review.googlesource.com/17240
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-31 15:58:55 +00:00
Paul Berry 6f9d6965fe Insert implicit downcasts for simple assignments.
Notes on test changes:

- This revealed runtime failures in some tests in
  pkg/front_end/testcases/inference.  Since these tests were never
  meant to exercise runtime behavior in the first place, I just
  changed them so that main() does nothing.

- This revealed runtime failures in some tests in tests/language_2.
  These tests began failing because they used "var" for a fields and
  then later assigned a value to the field that was incompatible with
  the inferred type.  It looks like the intent was for these fields to
  have type "dynamic", so I changed the tests accordingly.

Change-Id: I0ddb2063427b52b5e4be1884fa333e25be4bf4f3
Reviewed-on: https://dart-review.googlesource.com/16881
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-27 18:27:09 +00:00
Samir Jindel 031a7ffe41 [kernel] Improve Enum representation.
Dart2JS and the VM prefer for Enum names to be stored inline in the Enum
object to avoid having the static array of all Enum values. A base class
for Enums is provided to avoid repeating the common fields and accessors
between Enum definitions.

Bug:
Change-Id: I783f863015b45f13317fda06e627d14844fe2ddf
Reviewed-on: https://dart-review.googlesource.com/16526
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-27 12:10:53 +00:00
Paul Berry 5c143d4353 Test a corner case of forwarding stubs.
Change-Id: Ifa41ee5caa8b353c34163d76ea799a8402527b2d
Reviewed-on: https://dart-review.googlesource.com/16685
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-26 13:58:51 +00:00
Dan Rubel 49eb459c11 test for issue 31155
Change-Id: I0ac565a8ffc27a921c331fc50343e32b907f3100
Reviewed-on: https://dart-review.googlesource.com/16335
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-26 13:58:41 +00:00
Paul Berry cc3f95b41d Check procedure kind when matching up forwarding stubs during mixin resolution.
Otherwise we might match up a getter to a setter and crash.

The test cases indirectly verify that mixin resolution does the right
thing by checking the semantics of the generated code.  These tests do
not pass yet, because covariance checks are not yet implemented in the
VM.

Change-Id: Ibe6d8b7479f86151c515c45c20ed7c880bf2ad43
Reviewed-on: https://dart-review.googlesource.com/16686
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-26 12:54:08 +00:00
Paul Berry 5a6ae2877a Fix expectations for test "multiple_interface_inheritance".
The behavior was fixed some time ago, but I failed to notice that I
should have re-enabled the test because its expectations were wrong.

Fixes #30547.

Change-Id: I8b740a8b7f478cc9223cd5d91d2bc0e7e5cf2855
Reviewed-on: https://dart-review.googlesource.com/16700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-25 21:40:28 +00:00
Paul Berry cb51e4b26d Fix forwarding stubs when inherited interface is different from super method.
When the interface inherited for a method is different from the super
method (due to the inherited interface method having a more specific
type than the super method), we determine the set of covariance fixes
that need to be made by looking at the inherited interface method
(since that's the method that the forwarding stub will be created
from).  However, in order to decide whether the forwarding stub needs
to be concrete, we need to compare the checks needed against the
checks that are made by the super method.

A few unit tests of this functionality didn't have the correct
expectations (or contained other errors); they have been fixed.

Change-Id: I70cff371be3bf8f3680c756feb6047794b650a9d
Reviewed-on: https://dart-review.googlesource.com/16680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-25 21:19:16 +00:00
Paul Berry cded10154c Fix type inference of compound assignments when getter/setter have different types.
For compound assignments, we need to look up the "combiner" operation
in the type of the getter (not the setter), since the receiver of the
combiner operation is the value that was read.  This is necessary for
soundness.

Change-Id: I02e0e93310b6b6b94d4a6253d4cf2fc1d3c69cd5
Reviewed-on: https://dart-review.googlesource.com/16607
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-25 18:54:17 +00:00
Aske Simon Christensen 6e406c78e8 Check if target of redirecting factory is constructor of abstract class
Update status of tests fixed by https://dart-review.googlesource.com/c/sdk/+/13926

Change-Id: I81f3ed273b5a2e17a278ff8b86129c8fdf161749
Reviewed-on: https://dart-review.googlesource.com/14520
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-25 12:23:39 +00:00
Paul Berry f5cb2b52e6 Test a corner case of forwarding stubs.
These tests check that forwarding stubs are properly generated when
the type of the forwarding stub comes from a different class than the
superclass.

Two of the tests currently fail--I will follow up with a CL that fixes
them.

Change-Id: Id3db38bdc869e91d74fc279f39696f108d174a0d
Reviewed-on: https://dart-review.googlesource.com/16334
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-25 01:22:19 +00:00
Paul Berry fa7296a25e Add annotations to testcases for contravariance.
Change-Id: I1ce20f30948af8ff3de304ace036cbcf914861c9
Reviewed-on: https://dart-review.googlesource.com/16380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-24 22:13:28 +00:00
Peter von der Ahé e82d91efc9 Recover from bad setter in abstract method
Closes https://github.com/dart-lang/sdk/issues/31154

Change-Id: I50cac9a5873e191f72fe02314a2bb061270c684d
Reviewed-on: https://dart-review.googlesource.com/15540
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2017-10-24 11:01:18 +00:00
Kevin Millikin 034501e805 Handle forwarding stubs in mixin application classes
Before: mixin application classes could not have methods of their
own.

After: type inference will sometimes insert forwarding stubs in mixin
application classes.  In the mixin elimination transformation, these
forwarding stubs are replaced with the methods of the mixin class if
they have the same name, but the parameter flags from the forwarding
stub are retained.  The other forwarding stubs are left as methods of
the class.
Change-Id: I5ee89d6b1fc83194df82009c2800b54ce856e8c5
Reviewed-on: https://dart-review.googlesource.com/15887
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-10-24 08:04:18 +00:00
Paul Berry 9aa3a0eec0 Desugar a method invocation into a getter/call when necessary to add an "as" check.
Change-Id: Ic0754a9cfa80a1a91f7c421fb5a1cd55e63e1534
Reviewed-on: https://dart-review.googlesource.com/15762
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-21 11:59:43 +00:00
Paul Berry e16478ed2e Fix instrumentation logic to annotate when forwarding stubs are abstract.
Change-Id: I8e59a55ad70988efa8743afd1875a8085f3e8d15
Reviewed-on: https://dart-review.googlesource.com/15652
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-20 21:51:30 +00:00
Brian Wilkerson 7932a17557 Recover from having a missing closing bracket in an index expression
Change-Id: I2fa44b001cf3b72f21a9c3b5859e41d0ecdd7ad3
Reviewed-on: https://dart-review.googlesource.com/15680
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-10-20 21:06:59 +00:00
Paul Berry c3dcd3af44 Add "as" checks to assignment combiners when needed due to return type contravariance.
Change-Id: If3a84f02cb45104a673d567472ffac4c55b0be61
Reviewed-on: https://dart-review.googlesource.com/15648
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-20 20:13:00 +00:00
Paul Berry b8f81c45a5 Standardize on calling synthetic setter parameters '_'.
This has no effect on the generated kernel output; it just affects tests.

Also fix an incorrect type in field_forwarding_stub_explicit_covariant.dart.

Change-Id: Ic89d59a52648dc37a43cb12c4289611daaf422c6
Reviewed-on: https://dart-review.googlesource.com/15647
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-20 19:41:28 +00:00
Paul Berry 123b82b787 Add "as" checks to indexed assignments when needed due to return type contravariance.
Change-Id: Id6fb88ba32298e6d2298bae650bd0a0087ca5fb4
Reviewed-on: https://dart-review.googlesource.com/15641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-20 18:30:00 +00:00
Vyacheslav Egorov 9cd7bc724d [VM, Kernel] Fix sync* implementation in checked mode
Change abefb7b432 introduced a typing issue
instead of fixing it: _SyncIterator<T>._current was actually used to return
either a value of type T (for yield) or value of type Iterable<T> (for yield*)
from the move callback.

This change refactors implementation of _SyncIterator in such a way that
_current is only used to return value for yield and a separate field
_yieldEachIterable is used to return Iterable<T> for yield*.

Change-Id: I3e3c832bbc8986d6976ddbb0856a1b5a127d845b
Reviewed-on: https://dart-review.googlesource.com/15542
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-20 18:15:28 +00:00
Peter von der Ahé f34d02dfd5 Preserve line breaks in messages.yaml
Change-Id: Ib830ffd257a6d2d351a169bc6a37fd7b00f026e6
Reviewed-on: https://dart-review.googlesource.com/11662
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-10-20 14:10:58 +00:00
Peter von der Ahé 226102b16a Add README file to testcases directory.
Change-Id: Ifc70ea501ea7197bf187ce9470c7b9de850f78e0
Reviewed-on: https://dart-review.googlesource.com/10040
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-10-20 12:52:41 +00:00
Paul Berry 270e4c186d Add "as" checks to getter invocations when needed due to return type contravariance.
Change-Id: Ib0151e7f19021c87a08198580dcc6d56425882af
Reviewed-on: https://dart-review.googlesource.com/15221
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-19 19:08:28 +00:00
Paul Berry f2a50e9b5b Convert conditional "then" expression to a value before calling typePromoter.enterElse.
Otherwise this conversion will be done in the context of the "else"
expression, so promotions might not take effect properly.

Fixes #31132

Change-Id: I480f9c13636ce79f440b9c7e812f2bbaf217d975
Reviewed-on: https://dart-review.googlesource.com/14941
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-19 18:00:07 +00:00
Konstantin Shcheglov 3fedd483f3 Parse metadata for import/export directives and resynthesize in Analyzer.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug: https://github.com/dart-lang/sdk/issues/30284
Change-Id: I57af6f4d58b6de39f13b9656af25f0be6949cf79
Reviewed-on: https://dart-review.googlesource.com/14363
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-19 16:35:17 +00:00
Paul Berry ca0933c487 Add the appropriate "as" nodes when needed due to return type contravariance.
Also add a test to verify that contravariance is properly handled for
method calls using "if-null" syntax (since this is handled by a
slightly different code path in the front end).

Change-Id: I93ee8b38ff39d78e25cac23ff048fcf69f15b5db
Reviewed-on: https://dart-review.googlesource.com/15000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-19 16:13:26 +00:00
Paul Berry 485aa072d9 Fix type inference of expressions in for loop initializers.
BodyBuilder converts an expression in a for loop initializer to the
initialization of a dummy variable.  It needed to create this dummy
variable using ShadowVariableDeclaration to ensure that type inference
would be applied to the dummy variable.

Fixes #31133

Change-Id: Ibe5ed95f20429af633cbe8d49b06aabaa9df41fd
Reviewed-on: https://dart-review.googlesource.com/15001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-18 22:44:23 +00:00
Paul Berry b51d5035aa Annotate getter accesses with @callKind.
Change-Id: I56453f2824776f4d63de58a09f8ecc5b6f2df8ad
Reviewed-on: https://dart-review.googlesource.com/14622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-18 17:51:07 +00:00
Paul Berry c2d1260c4a Annotate procedures with contravariant return types.
This will allow the front end to efficiently decide where to insert
"as" checks.

Change-Id: I4776488684acdbf356ed3cb286e8d516d18719e1
Reviewed-on: https://dart-review.googlesource.com/14507
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-17 20:20:40 +00:00
Paul Berry 18c87cbb64 Skip type inference for fields that have no type inferrer.
This can happen in certain error recovery circumstances.

Fixes #31124.

Change-Id: Id814f2434ada93030b40f6dfcb5e62ec1a323d0e
Reviewed-on: https://dart-review.googlesource.com/14504
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-17 19:11:42 +00:00
Vyacheslav Egorov abefb7b432 [kernel] Assign proper types and interface targets to nodes created by async transformer.
Bug: https://github.com/dart-lang/sdk/issues/31070
Change-Id: Iaedbd425fcb6d243c0bfa93495335658553a9301
Reviewed-on: https://dart-review.googlesource.com/14481
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-10-17 17:44:00 +00:00
Aske Simon Christensen 60be83aed4 Reland "Suite for Fasta crashes and verification errors in language tests"
Remove obsolete "language" suite.

Original review: https://dart-review.googlesource.com/13741

Change-Id: I713fa2684fe478f6e9123d33ee7b7d2a961b1c00
Reviewed-on: https://dart-review.googlesource.com/14460
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2017-10-17 13:54:40 +00:00
Aske Simon Christensen 8a2a9e4622 Reland "Error on setter having not exactly one parameter"
Rewrite setter with invalid parameters into one with one parameter
and a body throwing a compile-time error.

Some analyzer tests fail until we sort out the expected form of the
generated kernel code in situations like this. This is tracked in
https://github.com/dart-lang/sdk/issues/31096

Closes https://github.com/dart-lang/sdk/issues/31069
Original CL: https://dart-review.googlesource.com/13080

Change-Id: I432240c33d6daf0ec6bfe2b73c609ab4762cda8c
Reviewed-on: https://dart-review.googlesource.com/14381
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2017-10-17 13:16:30 +00:00
Samir Jindel dcf48efa23 [kernel] Un-revert support for generic closures in VM's kernel frontend.
Change-Id: I09dbcfdb13600fe694863db628b379bcf1f56684
Reviewed-on: https://dart-review.googlesource.com/14200
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-10-16 22:27:03 +00:00
Paul Berry 250585a70e Split forwarding node resolution into two phases.
The first phase, called `resolve`, happens during top level type
inference; it determines which inherited method a forwarding node
resolves to, and ensures that dependencies are type inferred.  The
second phase, called `finalize`, happens at the end of top level type
inference; it creates forwarding stubs if necessary and propagates
covariance annotations.

The reason we need two phases is illustrated by the new test
pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart.
There should be a type inference dependency from I1::x to y, and from
y to C::x.  But there shouldn't be a type inference dependency from
C::x to I1::x, since C::x's type is fully specified.

Splitting into two phases makes this work: during type inference, we
can resolve C::x without needing to consult the type of I1::x.  Once
type inference is over, and the type of I1::x has been determined, we
can finalize C::x and determine whether any covariance annotations
need to be propagated.

Change-Id: If96e7b23e16723c421f91b3e37fe2a4485919c5c
Reviewed-on: https://dart-review.googlesource.com/13600
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-16 21:44:23 +00:00
Paul Berry 10771e2836 Remove old code for computing formal safety.
This fixes a bug where we were unnecessarily placing covariance
annotations on final fields.

Change-Id: I2a787439890c9d258b2cbf55499706aa6a5a6d2f
Reviewed-on: https://dart-review.googlesource.com/13964
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-16 21:07:16 +00:00
Konstantin Shcheglov 1e6c488ef5 Parse annotations for library directives.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug: https://github.com/dart-lang/sdk/issues/30284
Change-Id: I9354e114eb2d603543a964030482af7ac9198760
Reviewed-on: https://dart-review.googlesource.com/12802
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-16 17:35:06 +00:00
Martin Kustermann 25dc42f5d8 Revert "Error on setter having not exactly one parameter"
This reverts commit 4bb83e9311
This reverts commit f1b07b2789.

Reason for revert on analyzer bots:

    Analyzing pkg/analyzer...
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:625:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:625:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:626:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:635:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:635:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:636:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:645:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:645:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:646:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:655:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:655:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:656:13 • undefined_identifier
    12 errors found.

Change-Id: Ie2035bf40e50c48f85b514c7a3786141cd0f2453
Reviewed-on: https://dart-review.googlesource.com/14061
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-16 16:32:13 +00:00
Aske Simon Christensen 4bb83e9311 Suite for Fasta crashes and verification errors in language tests
Remove obsolete "language" suite.

Change-Id: I8daad8b7fd2d6e19124850626a5815aa9dcca347
Reviewed-on: https://dart-review.googlesource.com/13741
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-16 16:01:55 +00:00
Aske Simon Christensen f1b07b2789 Error on setter having not exactly one parameter
Rewrite setter with invalid parameters into one with one parameter
and a body throwing a compile-time error.

Some analyzer tests fail until we sort out the expected form of the
generated kernel code in situations like this. This is tracked in
https://github.com/dart-lang/sdk/issues/31096

Closes https://github.com/dart-lang/sdk/issues/31069
Change-Id: I65033709813671ecb933e6a4dc00d1ff3b504661
Reviewed-on: https://dart-review.googlesource.com/13080
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2017-10-16 15:07:49 +00:00
Paul Berry 078da9f5c0 Exchange the order of looping in _computeCovarianceFixes.
The outer loops are now through the arguments of the method to be
fixed, and the inner loops are through the inherited methods.  This
allows us to handle the situation where a forwarding stub is needed
because isGenericCovariantInterface changes from true to false, but
the forwarding stub doesn't need to be concrete, since
isGenericCovariantImpl is inherited from the base class.  (Previously
that situation didn't work because by the time we processed the
inheritance of isGenericCovariantImpl, we had already created a
concrete forwarding stub).

Additional fixes in this CL (necessary to get tests to pass in
meaningful ways):

- Updated InstrumentationValueForForwardingStub to print covariance
  annotations on type parameters.

- Updated _createForwardingStub to copy covariance annotations from
  the target procedure to the procedure being created.

- Moved call_through_this.dart from runtime_checks/ to
  runtime_checks_new/ because the analyzer implementation doesn't
  handle this case correctly.

Change-Id: I984a46826a3a4d8ad1a1ce840269498df049fef0
Reviewed-on: https://dart-review.googlesource.com/13963
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-10-16 04:07:18 +00:00