Request particular attention to generic_creation_test and generic_field_mixin6_test, but all of the following required tweaks
to the status files to pass tests:
generic_closure_test
generic_function_bounds_test
generic_function_dcall_test
generic_function_typedef_test
generic_field_mixin6_test
generalized_void_syntax_test
generic_functions_test
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/3008573002 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
The new test is specifically for `dart2js --generic-method-syntax ..`,
executed programmatically using 'memory_compiler.dart'.
It verifies that each method type variable is treated as if it had
been an alias for `dynamic` (so the static analysis allows almost
all usages of these type variables, silently). Note that this behavior
is unlikely to be available with any other tools, and even `dart2js`
will behave differently when generic methods are implemented fully.
Hence, the new test will only be useful as-is during a transitional
period.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/1939053002 .
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 .
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 .