This change makes big_integer_arith_vm_test strong-mode compatible, and allows
dartdevc/dart2js to build and run big_integer tests where they can.
New issue 30170 filed to track DDC big integer handling.
BUG=
R=rnystrom@google.com
Review-Url: https://codereview.chromium.org/2978013002 .
Revert "Precompiler doesn't report Dart 2.0 static type errors yet."
This reverts commit 7af2d86ed3.
Revert "Move absstract_exact_selector back into the language tests. (#30169)"
This reverts commit 452d2d0840.
Revert "Set up directories for migrated Dart 2.0 tests and migrate a couple. (#30149)"
This reverts commit 47985d6dbd.
R=zra@google.com
BUG:dartbug.com/30171
Review-Url: https://codereview.chromium.org/2979073002 .
* Set up directories for migrated Dart 2.0 tests and migrate a couple.
- Create new "_2" directories where tests that have been validated as
ready for Dart 2.0 will end up.
- Create empty status files for each directory.
- Add those directories to the set of default selectors you get when you
run test.py. This gets the VM bots running them.
- Get the DDC bots running those suites.
- Move abstract_exact_selector_test over to dart2js since it's a
dart2js-specific regression test and not an actual language test.
- Migrate corelib/apply_test.dart.
- Delete abstract_beats_arguments[2]_test.dart since that code is
statically wrong in 2.0 and can't be run.
This doesn't get the dart2js bots running the new suites. I'll email
the relevant folks to get help with that.
* Resurrect abstract_beats_arguments_test.dart.
It usefully checked that an implementation reports an warning (now
error) if you construct an abstract class.
Also added support to test.dart to mark a test as expecting to
generate a compile error in the test itself. That way, the status file
reflects what is *wrong* about the current status, not what is *right*.
* Change static error syntax to match front_end notation.
* Migrate abstract_getter_test.
Previously these functions would only contain a single CheckStackOverflowInstr
in a backtracking block and that CheckStackOverflowInstr would have a zero
loop_depth - which means it would not be considered eligable for OSR.
This change:
* adds CheckStackOverflowInstr with non-zero loop_depth in two other places
(Boyer-Moore lookahead skip loop and greedy loop) where loops arise in the
generated IL;
* sets non-zero loop depth on the CheckStackOverflowInstr in the backtracking
block;
* adds a flag on CheckStackOverflowInstr that allows optimizing compiler to
optimize away those checks that were inserted solely to serve as OSR entries.
* ensures that IR generated by IRRegExpMacroAssembler is OSR compatible:
* GraphEntryInstr has correct osr_id;
* GraphEntry and normal entry have different block ids (B0 and B1 - instead of B0 and B0);
* unreachable blocks are pruned and GraphEntry is rewired to point to OSR entry;
* IRRegExpMacroAssembler::GrowStack should not assume that stack_array_cell and :stack
are always in sync, because :stack can come from OSR or deoptimization why stack_array_cell
is a constant associated with a particular Code object.
* refactors the way the RegExp stack was growing: instead of having a special instruction
just emit a call to a Dart function;
* refactors the way block pruning for OSR is done by consolidating duplicated code
in a single function.
We allow the optimizing compiler to remove preemption checks from
non-backtracking loops in the regexp code because those loops
unlike backtracking have guaranteed O(input_length) time
complexity.
Performance Implications
------------------------
This change improves performance of regexps in cases where regexp spends a lot
of time in the first invocation (either due to backtracking or due to long non
matching prefix) by allowing VM to optimize the :matcher while :matcher is
running.
For example on regex-redux[1] benchmark it improves Dart performance by 3x
(from ~18s to ~6s on my Mac Book Pro).
CL history
----------
This relands commit d87cc52c3e.
Original code review: https://codereview.chromium.org/2950783003/
[1] https://benchmarksgame.alioth.debian.org/u64q/program.php?test=regexredux&lang=dart&id=2R=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2951053003 .
It can compile and run tests on Chrome. There are a lot of failing tests
that I (or the team) will need to triage, but I think at least basic
tests are working as expected.
There is code that could be cleaned up to more neatly factor how dart2js
and dartdevc are handled now that there are two separate compilers to
JS. There's also some redundant code between the path for testing
compile errors (enqueueStandardTest()) and the path for running a test
in the browser.
R=whesse@google.com
Review-Url: https://codereview.chromium.org/2947473002 .
directly inside dart2js.
A few notes:
* I ended up adding support for this feature also in dart2js with --use-kernel, it was not implemented correctly before. This is why more tests are passing.
* I played with two other ideas:
(a) making this a compile-time error instead
(b) making it a warning if the arguments were constant and implement it as a constant, treat it as an error if they were not.
Unfortunately both are a breaking changes, so I backed out from them. IMO (a) is the cleanest thing to do long term, and we should raise this with the language team.
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2896393003 .
This test is flaky (see #28712), but there are many test cases that hit this
line. This should help narrow things down when this fails in minified mode
(where it is hard to extract what the stack trace looks like).
R=whesse@google.com
Review-Url: https://codereview.chromium.org/2683403003 .
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 .
Update all tests
Support //# multitests for better dartfmt compatibility and fewer multitest false positives
All files under tests were manually updated with
find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'
For now both old and new styles are allowed to accommodate CO19 tests.
R=efortuna@google.com
BUG=
Review-Url: https://codereview.chromium.org/2765693002 .
Review-Url: https://codereview.chromium.org/2765893003 .