Commit Graph

14 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
Régis Crelier d9cc3b0e67 Allocate local variable holding type arguments in generic functions in Kernel.
Capture instantiators when calling generic functions with uninstantiated type
arguments.
Add VM flag to generic functions tests that do not expect reification.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2958833003 .
2017-06-27 15:19:37 -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
Stephen Adams 3cec399d2c Add test case for type with partial parameterization by method type parameter
BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2257813003 .
2016-08-23 10:45:22 -07: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 af79c19a53 Revision of "Adjusts dart2js backend to handle method type arguments"
Adjusted version of CL https://codereview.chromium.org/1976213002/,
only changed by adding entries in status files for the test
'tests/language/generic_methods_type_expression_test.dart'.

Review URL: https://codereview.chromium.org/2001393003 .
2016-05-24 11:12:02 +02:00
Erik Ernst 912bcc8418 Revert "Adjusts dart2js backend to handle method type arguments."
This reverts commit 04e45eb634.

BUG=

Review URL: https://codereview.chromium.org/2000223002 .
2016-05-23 18:35:53 +02:00
Erik Ernst 04e45eb634 Adjusts dart2js backend to handle method type arguments.
This CL has the same purpose as 1969753002, stated in the title line,
but it works for checked mode execution (where 1969753002 was broken),
and for usage of method type arguments in additional situations.

Approach: `DartType` and subtypes have been extended with new methods
to erase `MethodTypeVariableType` to `DynamicType`. This is done early
(after resolution, before SsaBuilder), such that only few parts of the
compiler need to deal with anything new. This approach handles method
type variables in checked mode, in `new` expressions, and in function
typed parameters. Finally, tests are added for the new cases, and
status files updated.

UPDATE: See message #10 and #12 for an updated description of the approach.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1976213002 .
2016-05-23 17:17:29 +02:00