Commit graph

47944 commits

Author SHA1 Message Date
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Erik Corry b683e47c1a VM-codegen: For polymorphic methods don't expand Cids at call sites
When dispatching polymorphic calls we try to recognize the case where
adjacent classes have the same method, so that we can group the classes
in the dispatch.  That fails for polymorphic methods, which are pretending to
be the same method, but actually do a class test on the receiver internally. In
this case, we should not expand the classes, because it messes up some other
inlining optimizations.

R=vegorov@google.com
BUG=https://github.com/dart-lang/sdk/issues/29892

Review-Url: https://codereview.chromium.org/2956653002 .
2017-06-24 13:36:59 +02:00
Ryan Macnak 8aae79df3b Shrink the inital size of the message snapshot ref table to fit in the initial zone chunk.
This still fits typical messages from the IO service.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2958603004 .
2017-06-23 15:56:54 -07:00
Bob Nystrom dfb4f52b43 Simplify enqueueBrowserTest().
It's still big and monolithic, but it's not as big as it was before.

- Remove old unused Polymer stuff.
- Move some of the logic out into a helper function.
- Other small tweaks.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2949823003 .
2017-06-23 15:02:36 -07:00
Paul Berry 3b6f276c84 Implement inference tests for logical operators.
The tests for this are placed in inference_new because the analyzer
implemenation doesn't do proper downward inference.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2956723002 .
2017-06-23 14:47:41 -07:00
Bob Nystrom dd5c779b43 Update statuses for tests that don't touch dart:mirrors anymore.
BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2957613003 .
2017-06-23 14:44:52 -07:00
Paul Berry 2d0bfe2d54 Resolve type parameter bounds when looking up interface members.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2954133002 .
2017-06-23 14:39:19 -07:00
Paul Berry 312b4ae52c Add/fix/cleanup type inference for throw and rethrow.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2954693002 .
2017-06-23 14:32:58 -07:00
Paul Berry 0c1dab2933 Re-introduce corrupted type inference tests.
These two tests were added some time ago, but they became corrupted
(presumably due to a formatter bug that has since been fixed).  Later,
I moved the corrupted tests into the inference_new folder because they
didn't infer correctly with analyzer.

This CL re-introduces the original uncorrupted tests so that we don't
lose test coverage.

Note that these tests make use of a syntax that Fasta doesn't support
yet, so they are marked as failing.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2958623002 .
2017-06-23 14:26:53 -07:00
Emily Fortuna b3812ffc8e Add ScopeInfo class for variable information that doesn't actually involve closures.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2949293002 .
2017-06-23 14:20:23 -07:00
Régis Crelier bb527cb89e Avoid an assert fault in snapshot writer by making sure that the parent of a
signature function is also a signature function (fixes #29994).

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2949383003 .
2017-06-23 14:18:12 -07:00
Ryan Macnak 881bf01534 Allocate the profiler sample buffer and zone segments with virtual memory instead of malloc.
Allows naming their memory regions.

Add check for failed sample buffer allocation.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2955493002 .
2017-06-23 14:06:44 -07:00
Régis Crelier 252e75f30d Fix precedence of assert keyword in VM parser (fixes #29990).
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2954713002 .
2017-06-23 13:38:39 -07:00
Bob Nystrom 3144296c4f Remove unused PubCommand stuff.
The rest of the pub functionality was removed already, so I think this
is just a straggler.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2944163002 .
2017-06-23 12:55:46 -07:00
Devon Carew ebffa49eac Bump the deps for package:http and package:usage.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2958603002 .
2017-06-23 12:54:17 -07:00
Brian Wilkerson 4fab4a1f52 Clean up type parameters in comments
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2948393002 .
2017-06-23 12:53:11 -07:00
Brian Wilkerson 4a10003924 Update the plugin API
R=maxkim@google.com, mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2953093002 .
2017-06-23 12:31:00 -07:00
Bob Nystrom 556c0550bf Simplify CommandOutput and friends.
- Merge CommandOutputImpl and CommandOutput. There were no classes that
  implemented CommandOutput that didn't extend the Impl.
- Remove "Impl" from the other class names.
- Make stuff private when possible. Likewise final.
- Other tiny style changes.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2946783002 .
2017-06-23 12:13:31 -07:00
Kevin Moore 4d642466fb Update pkg/analyzer dependency on pkg/args to include v1.x
pkg/analyzer currently does not create an AgrParser so the breaking
behavior charge that came w/ the bump to args v1 does not affect any
code

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2955583003 .
2017-06-23 11:47:01 -07:00
Paul Berry 82561d8fa7 Avoid a crash if an initializing formal appears in the wrong context.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2947363003 .
2017-06-23 11:03:03 -07:00
Paul Berry 20c25f5cfc Small fixes to top level type inference.
This CL makes two fixes:

1. When a field is visited for the second time (to infer
subexpressions), don't use the inferred field type as the context;
this can change the inference results in a few rare circumstances,
making it different from what would be inferred inside a method body.

2. When doing extended top level type inference is enabled, only skip
subexpressions whose type is not needed.

Note that some tests had to be moved (either partially or completely)
into pkg/front_end/testcases/inference_new to reflect the fact that
front_end type inference now produces more correct results than
analyzer.  Also, the annotation comments in
pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart
were completely bogus and needed to be changed.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2954063002 .
2017-06-23 10:47:58 -07:00
Paul Berry f09c561a06 Fix type inference of PropertySet when the receiver is a generic class.
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2952883004 .
2017-06-23 10:41:47 -07:00
Zachary Anderson bad6b64062 [Fuchsia] EventHandler: epoll -> ports v2
This CL rewrites the EventHandler on Fuchsia to use
the low-level ports system call API instead of the
epoll() emulation in musl. This will allow the
Magenta team to remove the epoll() emulation and
the deprecated system call API it is based on.

The new ports API doesn't provide epoll()-like
edge-triggering that clients of the EventHandler
expect. Therefore, this CL emulates it by adding
a level of indirection through a new "IOHandle"
object, which the socket code now uses instead
of file descriptors. This is similar to what we do
on Windows. See the comment at the top of
eventhandler_fuchsia.cc for more details.

Fuchsia issue US-251

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2910853002 .
2017-06-23 10:41:21 -07:00
Paul Berry a9cf031831 Implement type inference for type literals
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2952313002 .
2017-06-23 10:35:52 -07:00
Siva Chandra a23178ee77 Load vmservice from a .dill file when generating AOT snapshots.
This will happen only if --dfe option is specified along with the
--kernel-binaries option.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2949323002 .
2017-06-23 09:39:18 -07:00
Brian Wilkerson 8cd2a4924d Disable a not-yet-defined lint
R=pquitslund@google.com

Review-Url: https://codereview.chromium.org/2955583002 .
2017-06-23 09:37:34 -07:00
danrubel b8b9e3eae4 add test for internal scanner API
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2952153003 .
2017-06-23 12:35:09 -04:00
Brian Wilkerson 55d735911b Remove the unused operations queue
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2957643002 .
2017-06-23 09:04:13 -07:00
Paul Berry a7ab70eb06 Move tests {list,map}_literals_can_infer_null_top_level to inference_new
These tests' expectations reflect a drawback in analyzer's type
inference--it doesn't infer the correct types lists and maps
containing `null` when those structures occur outside a method body.
The new front_end type inference engine does the right thing.

Accordingly, we have to move the test to inference_new, so that we can
update its expectations without breaking analyzer's test code.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2951373002 .
2017-06-23 07:40:52 -07:00
Paul Berry c4ecf098aa Move test infer_use_of_void to inference_new
This test's expectations reflect a drawback in analyzer's type
inference--it doesn't infer the correct types for calls to methods
returning `void` when those calls occur outside of a method body.  The
new front_end type inference engine does the right thing.

Accordingly, we have to move the test to inference_new, so that we can
update its expectations without breaking analyzer's test code.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2953903002 .
2017-06-23 07:33:50 -07:00
Lasse R.H. Nielsen c68e5cc67d Allow trailing comma in assert statements.
Fixes #28786
BUG= http://dartbug.com/28786
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2953223002 .
2017-06-23 14:45:25 +02:00
Paul Berry 6ac836fbb3 Make the kernel API for promoted type parameter bounds less error-prone.
I'm about to start introducing usages of TypeParameterType.bound, and
nearly all of the usage sites will need to fall back on
TypeParameter.bound if there is no bound stored in the
TypeParameterType.  This CL places the fallback behavior in the
TypeParameterType.bound getter so that we won't have to duplicate it
at every usage site (and risk making mistakes).  The few call sites
that don't want the fallback behavior (such as the one in
ast_to_binary.dart) can avoid it by referring to
TypeParameterType.promotedBound directly.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2952883003 .
2017-06-23 05:44:58 -07:00
Peter von der Ahé 03aad06299 Add regression tests from Luke's bug reports. Part 2.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2959463003 .
2017-06-23 14:37:27 +02:00
Paul Berry 7b60c094d7 Implement type inference for conventional for-loops.
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2951033004 .
2017-06-23 05:36:41 -07:00
Peter von der Ahé f1b7a97744 Move testing.json and status files to more natural locations.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2957623002 .
2017-06-23 14:27:53 +02:00
Peter von der Ahé 2434dc606a Add regression tests from Luke's bug reports. Part 1.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2955443002 .
2017-06-23 14:25:26 +02:00
William Hesse 6482690781 Rebased simplify CompilerConfiguration
BUG=

Review-Url: https://codereview.chromium.org/2954113002 .
2017-06-23 14:10:03 +02:00
Vyacheslav Egorov 7887c34a29 VM(RegExp): Allow OSR optimization of RegExp :matcher functions.
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=2

R=erikcorry@google.com

Review-Url: https://codereview.chromium.org/2951053003 .
2017-06-23 12:51:53 +02:00
Kevin Millikin 23083fdee1 Mark a crashing test
A recent VM change is triggering an assertion in the VM's snapshot
writer in the ahead-of-time compiler.  Since things seem to be
otherwise working, I've filed an issue and disabled the test for now.

BUG=
R=sortie@google.com

Review-Url: https://codereview.chromium.org/2957613002 .
2017-06-23 12:11:14 +02:00
William Hesse c01c51d195 Update co19 browser status for flaky tests
BUG=
R=sortie@google.com

Review-Url: https://codereview.chromium.org/2945423004 .
2017-06-23 11:20:29 +02:00
Kevin Moore 239b0c088c Fix a couple of doc comment references - and many spelling mistakes
Review-Url: https://codereview.chromium.org/2946283002 .
2017-06-22 17:32:29 -07:00
Vijay Menon daf960d5a4 Fix Object method tearoffs
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2953933002 .
2017-06-22 15:59:45 -07:00
Ben Konyi 89eda8a533 Updated status file to fix kernel bot failures.
TBR=zra@google.com
BUG=

Review-Url: https://codereview.chromium.org/2953933003 .
2017-06-22 15:09:49 -07:00
Vijay Menon 7d73159017 Fix ddc build
Not sure why this just started breaking.  I don't think Ben added this
param - just a use of it.  Our patch script might not be catching the
mismatch.

TBR=jmesserly@google.com,bkonyi@google.com

Review-Url: https://codereview.chromium.org/2954513003 .
2017-06-22 14:27:22 -07:00
Jennifer Messerly 635d95fccf cleanup unused useDisplayName parameter
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2953883002 .
2017-06-22 14:17:44 -07:00
Ben Konyi 143baba8fc Reintroducing parser changes to cause compile-time errors when trying to reinitialize a final field. Updated status files to hopefully address the test failures. Issue 29658.
This reverts commit 12e93cc41e.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2953843003 .
2017-06-22 13:48:57 -07:00
Ben Konyi 06456e83d8 Added timeout parameter to RawSecureSocket and SecureSocket connect methods. Also updated CHANGELOG and SecureSocket tests to reflect this change. Issue 19120.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2950413002 .
2017-06-22 13:45:26 -07:00
Alexander Aprelev 4f9b25e410 Fix previous CL where dart_bootstrap was accidently changed to dart_bootstrap_host_arch.
Also fix two missed places where host_toolchain should be replaced with dart_host_toolchain.

R=rmacnak@google.com

BUG:flutter/flutter#10841
Review-Url: https://codereview.chromium.org/2953873002 .
2017-06-22 13:17:53 -07:00
Alexander Aprelev 8cd713bed3 Introduce dart_host_toolchain argument for generate_patch_sdk.gni. This allows for Flutter build to make sure that host_toolchain used for patched_sdk generation word size matches target platform.
Flutter Dart in product configuration doesn't allow --checked option. So remove '--checked' from invocation.

R=rmacnak@google.com

BUG:https://github.com/flutter/flutter/issues/10841
Review-Url: https://codereview.chromium.org/2944103003 .
2017-06-22 12:41:31 -07:00
Paul Berry dd0a00f581 Infer the return types of local functions where appropriate.
Note that we do this in order to be consistent with type inference of
function expressions.  See https://codereview.chromium.org/2209293002.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2950213002 .
2017-06-22 12:17:10 -07:00