Commit Graph

15 Commits

Author SHA1 Message Date
Régis Crelier 6504f342ab [VM] Remove obsolete flags.
--generic_method_syntax
--assert_initializer
--warn_super
--initializing_formal_access

Change-Id: Id2e9f15b1dfecb933df97fb954618ce122cb3e4b
Reviewed-on: https://dart-review.googlesource.com/15643
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-20 18:13:00 +00:00
Bob Nystrom 14011f47e3 Resurrect deleted language tests.
They're back from the grave, and ready to party!

Change-Id: I088134a9be7ecabf1fbf751c015a656a15cabff9
Reviewed-on: https://dart-review.googlesource.com/12821
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-11 17:47:11 +00:00
Bob Nystrom 615be6451e Migrate block 114 (and some of 113).
generic_instanceof ... getter_closure_execution_order_test.

The main interesting one is generic_methods_type_expression_test. It
was testing old Dart 1.0-specific behavior and needed a lot of changes.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3001803002 .
2017-08-24 10:52:29 -07:00
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
Erik Ernst 9bf3b95cc5 Enable syntax-only support for generic functions by default, take 2.
Fixed some status entries since the first land-revert of this CL.

This addresses https://github.com/dart-lang/sdk/issues/27501.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2520293002 .
2016-11-22 12:33:43 +01:00
Erik Ernst cf4cff3812 Revert "Enable syntax-only support for generic functions by default."
This reverts commit 70fa0defe9.

(There were too many tests previously failing and now passing on
browsers to fix it right now, will sort it out on Monday.)

Review URL: https://codereview.chromium.org/2514693003 .
2016-11-18 15:54:32 +01:00
Erik Ernst 70fa0defe9 Enable syntax-only support for generic functions by default.
This CL removes the 'DartOptions=--generic-method-syntax' directives in
test cases concerned with generic functions and enables that feature by
default. The option '--generic-method-syntax' is still allowed, but the
feature is always enabled so the option makes no difference.

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

Review URL: https://codereview.chromium.org/2476423005 .
2016-11-18 09:56:17 +01:00
Matthias Hausner 4d4ebafad3 Implement parsing support for generic functions
Take two. (This version adds status file entries for checked
tests.)

Type parameters and arguments are parsed but ignored. Proper
handling of the parameters will be added subsequently.

The feature must be enabled with --generic-method-syntax.

Compiling all of dart2js consumes about 2.2% more tokens with
this change, due to the necessary lookahead to distinguish
generic functions from generic types.

===== with this change =========

Number of tokens:        1056691
Source length:           5850143 characters
Number of source tokens: 936226

Total tokens consumed:   3628934  <<<<<
Classes parsed:          2457
  Tokens consumed:       977999
Functions parsed:        49607
  Tokens consumed:       2430638

===== without this change ======

Number of tokens:        1056691
Source length:           5850143 characters
Number of source tokens: 936226

Total tokens consumed:   3547765 <<<<<
Classes parsed:          2457
  Tokens consumed:       942536
Functions parsed:        49607
  Tokens consumed:       2371357

(This reverts commit a1edb1766fd16b1268f3506feb7c9856b32bedfc.)

BUG= 25869

Review URL: https://codereview.chromium.org/2269693002 .
2016-08-22 10:58:55 -07:00
Matthias Hausner a1edb1766f Revert "Implement parsing support for generic functions"
This reverts commit 19af852471.

Checked tests failed. Will work on this on Monday.

TBR=asiva

Review URL: https://codereview.chromium.org/2267473002 .
2016-08-19 16:40:03 -07:00
Matthias Hausner 19af852471 Implement parsing support for generic functions
Type parameters and arguments are parsed but ignored. Proper
handling of the parameters will be added subsequently.

The feature must be enabled with --generic-method-syntax.

Compiling all of dart2js consumes about 2.2% more tokens with
this change, due to the necessary lookahead to distinguish
generic functions from generic types.

===== with this change =========

Number of tokens:        1056691
Source length:           5850143 characters
Number of source tokens: 936226

Total tokens consumed:   3628934  <<<<<
Classes parsed:          2457
  Tokens consumed:       977999
Functions parsed:        49607
  Tokens consumed:       2430638

===== without this change ======

Number of tokens:        1056691
Source length:           5850143 characters
Number of source tokens: 936226

Total tokens consumed:   3547765 <<<<<
Classes parsed:          2457
  Tokens consumed:       942536
Functions parsed:        49607
  Tokens consumed:       2371357

BUG=25869
R=asiva@google.com

Review URL: https://codereview.chromium.org/2260693002 .
2016-08-19 16:21:00 -07:00
Erik Ernst 7da48f3a95 Adds DartOptions to generic method syntax tests (updated CL).
This CL was landed and reverted. The bot failures caused by the first
landing of this CL turned out to be caused by checked mode execution.
This is an adjustment of that CL which marks the relevant tests as
failing. The underlying issue is that the compiler phases after
resolution do not expect to receive method type variables, only class
type variables; that will be addressed in a separate CL.

R=floitsch@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org/1963703003 .
2016-05-11 09:46:32 +02:00
Erik Ernst a9d90f4a09 Revert "Adds DartOptions to generic method syntax tests."
This reverts commit ae31db041d,
which seemed to cause failures on dart2js-d8-minified.

BUG=

Review URL: https://codereview.chromium.org/1960193002 .
2016-05-09 18:06:34 +02:00
Erik Ernst ae31db041d Adds DartOptions to generic method syntax tests.
This CL adds a `DartOptions` comment to the '--generic-method-syntax'
related tests specifying that option, and changes the entries for these
tests in status files to expect success for dart2js except when running
in a browser (where the option gets dropped rather than passed on to
the compiler).

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1962633002 .
2016-05-09 17:15:33 +02:00
Erik Ernst 377b806bbc Adds support for remaining generic method syntax constructs.
CL https://codereview.chromium.org/1863053003/ added support for most
syntactic constructs in relation to generic methods/functions, and
this one adds the missing ones: Declarations of function typed arguments
with type parameters, declarations of generic local functions, and
declarations of generic literal function expressions. It also adds
support for `super` bounds, because they were discussed recently and
may be quite useful (and it turns out to be no problem to parse them).
Finally, a new test file is added to tests the additional constructs.

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1878253002 .
2016-04-14 15:25:44 +02:00
Erik Ernst 4dd22a87bb Adds tests for syntactic support for generic methods.
This CL adds tests for syntactic support for declaration of type
parameters on methods and named functions, and for passing actual type
parameters in invocations.

The status files declare all the tests to be `CompiletimeError`s
(there is no support for `// AnalyzerOptions=`, so no `--options=..`
can be passed to `dartanalyzer`, even though it does succeed with
`--options=tests/language/X.options` where `X` is the name of the
test).

BUG=
R=brianwilkerson@google.com, leafp@google.com, regis@google.com

Review URL: https://codereview.chromium.org/1779173003 .
2016-03-11 10:27:37 +01:00