Rationale:
PushArguments violate some def-use dominance relations
after inlining. Fixing this seems not worth the engineering
effort. Rather we wait until we remove PushArguments
altogether (the optimizing compiler has no need for them).
https://github.com/dart-lang/sdk/issues/36899
Change-Id: I9265420ae8ec4981fe7170b9a1869dd56ae323cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111880
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
This fixes the issue with failing DDC tests like this:
co19_2/LayoutTests/fast/media/matchmedium-query-api_t01
R=brianwilkerson@google.com, paulberry@google.com
TypeError: html.window.styleMedia[$matchMedium] is not a function
Change-Id: Ic7a80c53122cdc3e0bcce835b5717413e342ce74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111862
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
`Error` isn't a recognized name in this script. Updated to `RuntimeError`
instead so we can see the errors when they are raised.
Change-Id: I55c548c7cd07dc1980a31dc96d22acec326602a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111483
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
HAsCheckSimple is a specialization of HAsCheck that calls a js_runtime
helper to do the check.
This CL specializes bool/double/int/num/String.
is-checks are not included but used by as/type checks, so there is not
much speedup for this CL.
Change-Id: Id65941d789e017350d3f9e181174e4cce768eea5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110422
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
t log b0220fc898c32d3944cb8c54cf7b78dd8c7cbadb..796f4de76de460e031bf3b20ce60a52e4ed417d9 --date=short --no-merges --format='%ad %ae %s'
2019-07-31 sgrekhov@unipro.ru Add another test for lexical resolution with conflicting extensions in a library
2019-07-31 sgrekhov@unipro.ru Fix typo and missing import added
2019-07-31 irina.arkhipets@gmail.com typo corrected.
2019-07-30 sgrekhov@unipro.ru Test fixed (listEquals -> iterableEquals)
2019-07-30 sgrekhov@unipro.ru Fix description of the current extension member tests and add new ones testing that instance method has higher priority than extension's one
2019-07-30 sgrekhov@unipro.ru More built-in types added to test on clause
2019-07-30 irina.arkhipets@gmail.com generic parameter inference test corrected, two new tests added.
2019-07-30 sgrekhov@unipro.ru Add test with 'call' method and no most specific extension
2019-07-30 sgrekhov@unipro.ru Change test assertion and rename
2019-07-30 sgrekhov@unipro.ru Change test description and add new one testing 'no most specific extension' case
2019-07-29 sgrekhov@unipro.ru Fix scope tests
2019-07-29 sgrekhov@unipro.ru Change all extensions in the test to not to be 'most specific'
2019-07-29 sgrekhov@unipro.ru Use more strong checking of 'this'
2019-07-29 sgrekhov@unipro.ru Check that it is no compile error if an extension declares a member with the same name as a member of the type it is declared on
2019-07-29 irina.arkhipets@gmail.com new test added, it checks that extension type parameter cannot be higher-order.
2019-07-29 irina.arkhipets@gmail.com test extension is appliedes expected.
2019-07-29 sgrekhov@unipro.ru Use correct checkings
2019-07-29 sgrekhov@unipro.ru Use correct functions call
2019-07-29 sgrekhov@unipro.ru Use correct functions call
2019-07-29 irina.arkhipets@gmail.com test expectations corrected.
2019-07-29 sgrekhov@unipro.ru Remove NNBD tests
2019-07-29 sgrekhov@unipro.ru Obsolete text removed from the test description
2019-07-29 sgrekhov@unipro.ru Use correct function type
2019-07-29 sgrekhov@unipro.ru Use correct function type
2019-07-29 sgrekhov@unipro.ru Use string interpolation
2019-07-27 irina.arkhipets@gmail.com got rid of higher order type variables.
2019-07-27 irina.arkhipets@gmail.com test check a parameter of unrelated type now; new test with implicit downcast added.
2019-07-27 irina.arkhipets@gmail.com expected result of the test corrected.
2019-07-27 irina.arkhipets@gmail.com more informative test description added.
2019-07-27 irina.arkhipets@gmail.com typo corrected.
2019-07-27 irina.arkhipets@gmail.com the test checks that an extension from non-platform libraries is not more or less specific than one from another non-platform library.
2019-07-27 irina.arkhipets@gmail.com the test checks that an extension from non-platform libraries is not more or less specific than one from another non-platform library.
2019-07-27 irina.arkhipets@gmail.com the test checks that an extension from non-platform libraries is not more or less specific than one from another non-platform library.
2019-07-26 sgrekhov@unipro.ru Add another tests with a call getter returning a function
2019-07-25 irina.arkhipets@gmail.com positive test case for the conflicting resolutions added, there should not be errors if members are not called directly.
2019-07-25 irina.arkhipets@gmail.com add a reference to the conflicting extensions.
2019-07-24 sgrekhov@unipro.ru Use correct syntax for unnamed extension with type parameters
2019-07-24 sgrekhov@unipro.ru Use correct syntax for unnamed extension with type parameters
2019-07-24 irina.arkhipets@gmail.com type parameters follow extension names now.
2019-07-24 sgrekhov@unipro.ru Use instance variable, not a class for testing
2019-07-24 sgrekhov@unipro.ru Fix typo (boolean -> bool)
2019-07-24 irina.arkhipets@gmail.com typo in the test corrected.
2019-07-24 irina.arkhipets@gmail.com "on" clause added to the tested extensions.
2019-07-23 irina.arkhipets@gmail.com typo in the test corrected.
2019-07-23 irina.arkhipets@gmail.com tests for Semantics of Invocations (Static extension methods)added.
2019-07-23 irina.arkhipets@gmail.com tests for Semantics of Invocations (Static extension methods)added.
2019-07-23 sgrekhov@unipro.ru Semantics of extension members tests added
2019-07-23 sgrekhov@unipro.ru Object methods test added
2019-07-23 irina.arkhipets@gmail.com tests for Static Members and Member Resolution (Static extension methods)
2019-07-22 irina.arkhipets@gmail.com tests for overriding access in extension methods added.
2019-07-22 irina.arkhipets@gmail.com removed needless @compile-error tags.
2019-07-22 irina.arkhipets@gmail.com added "on" clause to the extension declarations.
2019-07-22 sgrekhov@unipro.ru Static extension methods. Member conflict resolution tests added
2019-07-22 irina.arkhipets@gmail.com getter calls corrected.
2019-07-22 irina.arkhipets@gmail.com expected results of the test cases corrected.
2019-07-22 sgrekhov@unipro.ru Typo fixed
2019-07-22 sgrekhov@unipro.ru Remove wrong type argument
2019-07-22 irina.arkhipets@gmail.com typo in the getter corrected.
2019-07-22 sgrekhov@unipro.ru Typo fixed (Void -> void)
2019-07-22 sgrekhov@unipro.ru Typo fixed
2019-07-19 sgrekhov@unipro.ru Static extension methods. Member conflict resolution test added
2019-07-18 sgrekhov@unipro.ru Extension static methods acess fixed
2019-07-18 sgrekhov@unipro.ru Tearoff tests added and fixed
2019-07-18 sgrekhov@unipro.ru More tearoff tests
2019-07-17 sgrekhov@unipro.ru Tearoff tests added and small fixes
2019-07-15 irina.arkhipets@gmail.com added tests for overriding access in the static extension methods.
2019-07-15 sgrekhov@unipro.ru The call member tests added
2019-07-12 irina.arkhipets@gmail.com tests for extension conflict resolution added.
2019-07-10 irina.arkhipets@gmail.com tests for extension conflict resolution added.
2019-07-04 irina.arkhipets@gmail.com tests for static extension methods added: extension conflict resolution.
2019-07-04 sgrekhov@unipro.ru More extension member resolution tests
2019-07-03 sgrekhov@unipro.ru Typo in test fixed
2019-07-02 sgrekhov@unipro.ru Extension member resolution tests added
2019-07-02 sgrekhov@unipro.ru Covariant parameters test added
2019-07-02 sgrekhov@unipro.ru Typo in multitest fixed
2019-07-01 irina.arkhipets@gmail.com tests for static extension methods added (generic parameter interfaces and extension conflict resolution)
2019-07-01 sgrekhov@unipro.ru Fixes Test for scope completed
2019-07-01 sgrekhov@unipro.ru Fixes Another tests for Scope added
2019-06-28 sgrekhov@unipro.ru Test scope added
2019-06-28 sgrekhov@unipro.ru Ommited extension name test added
2019-06-27 irina.arkhipets@gmail.com tests for generic parameter inference added.
2019-06-27 sgrekhov@unipro.ru Tests for syntax scope added
2019-06-26 irina.arkhipets@gmail.com tests for the issues 32903, 34560 added, some typos fixed.
2019-06-26 sgrekhov@unipro.ru Issue number added to flaky test
2019-06-26 sgrekhov@unipro.ru Member declaration tests added
2019-06-24 sgrekhov@unipro.ru More tests for Static extension methods syntax
2019-06-24 sgrekhov@unipro.ru Added tests for Static extension methods syntax
2019-06-24 irina.arkhipets@gmail.com moved tests for triple-shift into LanguageFeatures/Triple-shift directory.
2019-06-21 sgrekhov@unipro.ru Name and value are mandatory for Cookie now. Also value check added
2019-06-19 sgrekhov@unipro.ru Add more NNBD static semantics tests
2019-06-18 sgrekhov@unipro.ru RGBA and UNSIGNED_BYTE constants were moved to WebGL class. Use them
2019-06-18 sgrekhov@unipro.ru Use approxEquals for math functions with tolerance 1-e15
2019-06-18 sgrekhov@unipro.ru Old multitest syntax replaced by new one
2019-06-17 sgrekhov@unipro.ru Initial commit. Tests for NNBD static errors
2019-06-17 sgrekhov@unipro.ru Revert "Initial commit. Tests for NNBD static errors"
2019-06-17 sgrekhov@unipro.ru Initial commit. Tests for NNBD static errors
2019-06-17 irina.arkhipets@gmail.com added static tests for non-function type aliases with simple bounds. Useless @compile-error tags removed.
2019-06-17 irina.arkhipets@gmail.com added dynamic tests for non-function type aliases with simple bounds.
2019-06-14 sgrekhov@unipro.ru Remove invalid use null from Language tests
Change-Id: I83d5ded8bc97a1b0bf3e8f19af401ae5283411f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111722
Reviewed-by: Alexander Thomas <athom@google.com>
The named of the recognized method `_GrowableList.withData` was changed to `_GrowableList._withData`.
Change-Id: I94b08fdbb39579c4713935b61a148db4baa751d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111780
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This refactors the way that dartfix finds lints to fix to be based on
error codes rather than manually running the lints. This prevents
a race condition that occurs between calling setAnalysisRoots and
requesting fixes.
Fix https://github.com/dart-lang/sdk/issues/37558
Change-Id: I35817a9b152a28db9e78662a5ea5096f275f68bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This change also copies the platform-appropriate tflite shared object into $SDK/bin/snapshots so that tflite_native running inside the analysis server snapshot will be able to resolve it correctly.
ariaye@ariaye1:~/sdk/sdk$ ./tools/build.py -a x64 -mrelease create_sdk
ariaye@ariaye1:~/sdk/sdk$ ls out/DebugX64/dart-sdk/bin/snapshots/
analysis_server.dart.snapshot dart2js.dart.snapshot dartanalyzer.dart.snapshot dartdevc.dart.snapshot dartdoc.dart.snapshot dartfmt.dart.snapshot kernel-service.dart.snapshot kernel_worker.dart.snapshot libtensorflowlite_c-linux64.so libtensorflowlite_c-mac64.so libtensorflowlite_c-win64.dll pub.dart.snapshot resources
Change-Id: I474a3b676f99feaa84dba9c7723dc867a7a01f52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111669
Reviewed-by: Samir Jindel <sjindel@google.com>
Also add tests for other forms of tearoffs
Change-Id: I43ee36ffcc9e69af6b2785153c6d95f5de814371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111668
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This also sorts the content of these files. The analyzer team uses the Sort Members function on all of the source code in our packages.
Change-Id: Id0700954aefe63f6c7d2e43df021997f95ad7e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111663
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This causes some of the language_2 tests to stop crashing, but doesn't
fully implement support for extensions of function types.
Change-Id: Ie1fad540f3ed0b5ed46aec7162f9fe3f15244db0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111661
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Enter a safepoint when waiting for child isolate spawns to complete, since the child isolate now requires its parent (along with all other members of the isolate group) to participate in safepoints.
Adjust shutdown of ThreadPool isolates to re-enter the isolate before waiting for outstanding spawns.
Bug: https://github.com/dart-lang/sdk/issues/37679
Change-Id: I760c0f75b77a3884ac3f4757f0c6920a417f3453
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111524
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
As I understand in early versions of strong mode generic function subtypes could
have contra-variance in the bounds of the type parameters. Now the spec states
they must be equal.
Fixes#36501
Tested and passing with the fixed language_2/generic_function_bounds_test
https://dart-review.googlesource.com/c/sdk/+/109726
Change-Id: Ie11d6318a542867e0541d81e2a18e5e25d3f0d9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110361
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Note: Changes in this CL will require some google3 changes (mostly in code related to test entrypoints).
We encountered an issue whereby cross-module programs importing files
with the same name (but separate identities/locations) were being
overridden throughout all of DDK's module builders. For example, a
module importing "x.dart" and "y/x.dart" would export {x: x, x: x$} -
the latter renamed module shadowing the first. DDC handles this by
prepending a formatted module-root-relative identifier string, so
"y/x.dart" becomes something like y__x, and the export becomes {x: x,
y__x: y__x}. However, this results in some code bloat, especially as
paths become deeply nested. More importantly, the $-renaming scheme is
not consistent across modules. Were we to export x$ instead of x, how
would the importing library know whether x or x$ referred to "y/x.dart"?
To have the best of both worlds, we're introducing the concept of a
module alias that exists at the boundary of module imports and exports.
We use this module-root-relative alias to differentiate modules with the
same name but use the shorter $-renaming scheme throughout the generated
code. Relevant points:
1) jsLibraryAlias has been introduced alongside jsLibraryName.
jsLibraryName no longer must be unique - that property having been
transferred to the alias. DDK no longer just outputs pathSegments.last,
instead adopting DDC's scheme of "creating" a special alias from the
module root. jsLibraryName's temporary IDs are renamed using the
existing DDK scheme.
2) Libraries are now associated with NameSpecifiers. The name and asName
fields represent jsName and jsAlias, respectively, for exports
(vice-versa for imports).
3) The test frameworks have been taking advantage of DDK's previous
naming scheme (throwing way the module root, keeping just the name). A
common pattern is to expect DDK's output symbol to be "someexport", then
forcing DDC's output (normally "some__path__someexport") to resemble
that with the deprecated "library-root" flag set to the path of the
output JS file. We resolve this by updating the scaffolding code to look
for the module-root-relative (long) name, which requires a bunch of
path-to-identifier subsitution logic. The "absoluteRoot" bool in the
sourcemap test runner is a way to reenable this DDC-specific deprecated
behavior. The test runner now requires this alias in the html generator.
Fixes https://github.com/dart-lang/sdk/issues/37473
Change-Id: Iaaa82f3350d424af195967b55c87cb32b30a3d85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108942
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
This hanging was exposed when running analysis server benchmark on the VM
with bytecode due to different timings.
Benchmark was sending a request to analysis server and then subscribing to
a broadcast stream, which was populated from the output of analysis server
process.
Before the fix it was possible that benchmark wouldn't see
CompletionResultsParams which was posted to test.onCompletionResults
between sending a request and subscribing to test.onCompletionResults.
As a result, benchmark was waiting on a Future for a skipped
CompletionResultsParams indefinitely.
Change-Id: I6f282b504437d687ccac3e96fada201bf25dbd10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111484
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Rationale:
The flow graph checker still had a few ugly exceptions
due to dominance violation after inlining. This CL fixes
the violation, removes the exceptions from the flow graph
checker, and also adds a new utility that can be used in
some other places.
https://github.com/dart-lang/sdk/issues/36899
Change-Id: I42766af22a3696fe050b0e5c4a2dfe930933fc40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111502
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
When compiling the SDK, nullable inference was marking optional and named
parameters as not nullable when they had default values that are not nullable.
This is wrong because the caller could pass null at the call site if they want.
Fixes: #37700
Change-Id: I9d2baae9e4491587b25dcacda4b3df151b9a2754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111602
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Handles property access, update and method invocation on explicit and
implicit this in extension methods. Also use ReadOnlyAccessGenerator
instead of ThisAccessGenerator to handle explicit this.
Change-Id: Ifd6861b1f931f854a39ddfb9ddae35ebf6094327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110904
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
We should also be able to test for larger examples, so this CL adds
support for directories where all files are included. If the directory
contains a .packages file that is used so we can test packages too.
Change-Id: Iceda03505575bd9e5604a6e374b7f5fa7185a82e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111421
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Add a "-s" (succinct) option to have a more dense output.
Meant for use together with "-a" so one can get a quick overview of how
many tests fail, e.g.
out/ReleaseX64/dart pkg/front_end/test/id_testing/id_testing_test.dart -a -s
Change-Id: I9e1d91694be76e6c66bf0f3c9168783f920a5bf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110914
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The constant evaluation method would produce a NullConstant whenever it
was given a null expresssion to evaluate. Since most expressions can't
be null, this could hide some internal inconsistencies and silently
emit incorrect output.
This change tightens the null checks to only check expressions which
can be null (default arguments and initializing expressions for
non-const variables).
Change-Id: Idcfc5df18ce2f8e0b2c51d64288b00fd3315d52b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111423
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>