Commit graph

47931 commits

Author SHA1 Message Date
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
Brian Wilkerson
ec8505fc79 Fix hints and clean-up obsolete comment syntax (TBR)
Review-Url: https://codereview.chromium.org/2952233002 .
2017-06-22 10:59:26 -07:00
Siva Chandra
8b40507be3 Reland "Load service isolate from a .dill file."
This reverts commit e90aa9cb5f.

Because of 2883d7f416, it is expected that
this change will do better on the bots.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2952913002 .
2017-06-22 10:10:45 -07:00
Devon Carew
ae80af3abb Add a missing comma.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2949243002 .
2017-06-22 09:58:52 -07:00
Ryan Macnak
bcb4fcfa11 [vm-service] Encode ticks directly as integers, since they are expect to stay in JS integer range.
Fixes #29957

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2951803004 .
2017-06-22 09:50:36 -07:00
Ryan Macnak
1daac1c651 [vm-service] Use consistent success response for _requestHeapSnapshot.
Fixes #29956

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2951903002 .
2017-06-22 09:47:07 -07:00
William Hesse
5aef1e640b Update browser statuses for co19 roll
BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2951273003 .
2017-06-22 18:14:47 +02:00
Zachary Anderson
ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Brian Wilkerson
a420a1fbb5 Remove more dead code from analysis server
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2949103003 .
2017-06-22 08:21:03 -07:00
Brian Wilkerson
e28064f405 Restore partial analysis of analysis options files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2946313003 .
2017-06-22 08:00:50 -07:00
Martin Kustermann
ca6c60f447 More status file updates after co19 roll
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2953813002 .
2017-06-22 16:00:52 +02:00
danrubel
ebdc0eda11 add Parser.withoutFasta constructor
This renames an existing private Parser constructor as a short term fix
so that the angular plugin can extend the Parser.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2952113002 .
2017-06-22 09:41:46 -04:00
Martin Kustermann
42e2ae40e8 Update status file for dartk-checked (status files are out-dated due to builder being on FYI)
Closes https://github.com/dart-lang/sdk/issues/29225

R=jensj@google.com

Review-Url: https://codereview.chromium.org/2948153005 .
2017-06-22 15:36:30 +02:00
Erik Corry
8378b8fdbf VM: Reland Inline instance object hash code into object header on 64bit.
Inline instance object hash code into object header on 64 bit.

64 bit objects have 32 bits of free space in the header word.
This is used for the hash code in string objects. We take it
for the default hash code on all objects that don't override
the hashCode getter.

This is both faster and a memory reduction. Eg it makes the
MegaHashCode part of the Megamorphic benchmark 6 times faster.

This is a reland of https://codereview.chromium.org/2912863006/
It fixes issues with the 32 bit compare-swap instruction on
ARM64 and fixes a fragile tree shaking test that is sensitive
to which private methods are in the core libraries.

R=kustermann@google.com, vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2954453002 .
2017-06-22 14:56:24 +02:00