Commit graph

47869 commits

Author SHA1 Message Date
Régis Crelier
eabcc23b33 Fix type argument finalization of some recursive generic types (fixes #29949).
Add regression test.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2952743003 .
2017-06-21 14:54:12 -07:00
Paul Berry
95aaba5085 In strong mode, properly infer the return types of setters as void
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2952873002 .
2017-06-21 14:51:40 -07:00
Paul Berry
348b42c98b Properly type infer for-in loops when the iterator type is a type parameter.
Also, fix a minor bug in variable declaration inference that was
preventing a local variable without an initializer from having its
type properly "inferred" as `dynamic`.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2949093002 .
2017-06-21 14:46:54 -07:00
Ben Konyi
86fdbde70a Added timeout parameter to RawSocket and Socket connect, which allows for the specification of a maximum time to wait for a valid connection to be established.
fixes #19120

R=zra@google.com

Review-Url: https://codereview.chromium.org/2946333002 .
2017-06-21 14:31:52 -07:00
Bob Nystrom
47aa77f139 Fix test.dart test.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2951163002 .
2017-06-21 14:09:21 -07:00
Ryan Macnak
e1b31c6b4b [arm, arm64] Convince the Android toolchain not to bypass memcpy in Read/StoreUnaligned.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2953653002 .
2017-06-21 14:03:50 -07:00
Paul Berry
b2c4b0ac0a Implement override-based type inference for instance methods.
Also, fix a rare infinite loop bug in analyzer exposed by one of the
tests.

R=brianwilkerson@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2946273002 .
2017-06-21 13:56:04 -07:00
Siva Chandra
e90aa9cb5f Revert "Load service isolate from a .dill file."
This reverts commit b0c2a382ca as the
vm-kernel mac bots are unhappy.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2947243002 .
2017-06-21 13:46:17 -07:00
Bob Nystrom
b452b39962 Basic support for dev_compiler in test.dart.
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 .
2017-06-21 13:19:28 -07:00
Régis Crelier
1f5f3ed79f Set and keep parent function of signature functions.
Fix function type parameter comparison in type tests.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2951803005 .
2017-06-21 13:16:23 -07:00
Siva Chandra
b0c2a382ca Load service isolate from a .dill file.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2925203002 .
2017-06-21 12:16:44 -07:00
Brian Wilkerson
fcb23e967c Remove the unused class SingleContextManager
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2945313002 .
2017-06-21 11:21:25 -07:00
Emily Fortuna
a721f87f99 More rearranging the deck chairs on the titanic.
According to the comments, only closures proper have free variables. Running tests support this. So let's move it into that branch.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2951923002 .
2017-06-21 10:47:54 -07:00
Brian Wilkerson
53e01faa43 Remove unused implementation of SearchEngine and rename the driver-based implementation
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2949823002 .
2017-06-21 09:33:51 -07:00
Brian Wilkerson
6e89075952 Disable finding plugin locations in the pubspec
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2947153002 .
2017-06-21 09:30:32 -07:00
Ryan Macnak
dddd96cfd2 [arm] Avoid unaligned access fault in Int32x4/Float32x4::value().
R=zra@google.com

Review-Url: https://codereview.chromium.org/2947783002 .
2017-06-21 09:11:04 -07:00
Ryan Macnak
095ff155fd VM: Allow trailing comma in assert statements.
Issue #29959

R=regis@google.com

Review-Url: https://codereview.chromium.org/2946173002 .
2017-06-21 09:08:16 -07:00
Régis Crelier
a62107cfaf Check for a passed-in type argument vector in the prolog of generic functions.
Do this in unoptimized code only, when --reify-generic-functions is specified.
This is still work in progress, and support in optimizer, in inliner, in DBC,
in kernel to ir, and other areas, will follow.
Many small fixes and added todos.

R=rmacnak@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2941643002 .
2017-06-21 09:02:16 -07:00
Brian Wilkerson
ab8158f582 Revert status change after disabling problematic test
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2951773003 .
2017-06-21 08:45:12 -07:00
Janice Collins
517b0adbaf Update dartdoc to v0.13.0+1.
Also update markdown.  I have reviewed the changes from 0.11.2 to
0.11.3 and they LGTM.  With this change, dartdoc tests should
pass reliably from within the SDK.

BUG=
R=devoncarew@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2950973002 .
2017-06-21 07:58:25 -07:00
Brian Wilkerson
6e8453ed94 Fix invalid initializing formal by adding a field
R=pquitslund@google.com

Review-Url: https://codereview.chromium.org/2946093002 .
2017-06-21 07:56:26 -07:00
Jens Johansen
80860e7fb7 [kernel] Stream kernel_reader
Mostly stream kernel_reader, i.e. the code that sets up the libraries,
classes, methods etc.

Mostly because it still takes a "Program" ast node, and looks at the
"Library" ast nodes to get their kernel offset in the binary.
Currently the scripts (containing breakable points etc) are also created
from the ast nodes.

The rest is now streamed.
This also means that more ast visitors could be deleted.

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2931813002 .
2017-06-21 14:58:58 +02:00
Dmitry Stefantsov
8d583bde5b Revert "VM(RegExp): Allow OSR optimization of RegExp :matcher functions."
This reverts commit d87cc52c3e.

TBR=vegorov@google.com

Review-Url: https://codereview.chromium.org/2947143002 .
2017-06-21 14:17:21 +02:00
Jens Johansen
d03a0d798e Re-insert linebreak in dwarf_stack_trace_test
This file was auto-formatted 2 months ago.
This - among other things - removed a linebreak which shifted linenumbers
by one, but didn't update the expected linenumbers from a throw accordingly.
Somehow the testserver has claimed that this has passed until now.
I have no idea how that happened.

This CL re-introduces the linebreak by inserting a comment,
which (currently) forces dartfmt to have the wanted linebreak.

BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2945273002 .
2017-06-21 13:47:38 +02:00
Vyacheslav Egorov
d87cc52c3e 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.

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).

[1] https://benchmarksgame.alioth.debian.org/u64q/program.php?test=regexredux&lang=dart&id=2

BUG=
R=erikcorry@google.com

Review-Url: https://codereview.chromium.org/2950783003 .
2017-06-21 13:46:48 +02:00
Jens Johansen
202306f39b [kernel] Fix loading of type argument in catch.
Catch simply gave NullConstant as arguments to _instanceOf,
now I've copied what the IsExpression does, and made
LoadInstantiatorTypeArguments actually work in this case
(by filling out the scopes_->this_variable value,
by actually visiting the catch guard in the scope builder
rather than skipping it).

Fixes #29553.

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2938173002 .
2017-06-21 10:56:21 +02:00
Jens Johansen
ccf5c13127 [kernel] Update vm.status file for mac
4b9f8eb460 didn't update the status file properly.

BUG=

Review-Url: https://codereview.chromium.org/2945253002 .
2017-06-21 10:34:30 +02:00
Jens Johansen
29036d398b [kernel] Fix loss of supertype arguments.
Before this, if a generic class was instantiated with only dynamic,
TypeArgument::null would be used as the type argument, ignoring
types from the super.
Now it only returns TypeArguments::null if the class directly gives all
type arguments (and they are all dynamic).

Fixes #29537

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2941983002 .
2017-06-21 10:22:40 +02:00
Johnni Winther
0600f0ad9a Add closure_test for kernel based members
+ change id_equivalence_test to check kernel from .dill

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2951723002 .
2017-06-21 09:52:46 +02:00
Jens Johansen
4b9f8eb460 [kernel] Add TokenPosition to AllocateObject, fix some cc tests
- Add TokenPosition to AllocateObject
  meaning that kernel more often has a TokenPosition available.
  This might influence profiling, especially it influences some
  of the vm/cc/Profiler* tests.

- Update profiler_service to also be able to find the current token
  via kernel (as opposed to either returning NULL or crashing).
  This makes use of the source code included in the kernel file.

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

Review-Url: https://codereview.chromium.org/2944433003 .
2017-06-21 09:41:16 +02:00
Jens Johansen
be9a3043aa [kernel] Make fasta call a new constructor on FallThroughError
On a switch fall through error, Fasta currently generates
```
throw new core::FallThroughError::•();
```

which generates the error-message via the VM:
```
'null': Switch case fall-through at line null.
```

This introduces a new constructor taking a url and a linenumber,
which then can give a better error message.

BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2951453002 .
2017-06-21 08:40:59 +02:00
William Hesse
823e7c6b03 Revert "Merge branch 'co19roll'"
This reverts commit 42cc7d570c.

BUG=
TBR=sortie@google.com

Review-Url: https://codereview.chromium.org/2952573003 .
2017-06-21 07:15:25 +02:00
William Hesse
42cc7d570c Merge branch 'co19roll'
Update co19 status files with results from buildbot.

Update co19 to revision dec2b67aaab3bb7339b9764049707e71e601da3d

BUG=
R=sortie@google.com

Review-Url: https://codereview.chromium.org/2948763003 .
2017-06-21 06:34:55 +02:00
Terry Lucas
092cbd561d Support for IPV6 for observatory in Dartium.
R=rmacnak@google.com
BUG=62811100

Review-Url: https://codereview.chromium.org/2944303003 .
2017-06-20 19:32:01 -07:00
Ryan Macnak
1905d2bbe2 Consider Contexts to be user objects for purposes of Obervatory's dominator analysis.
User data in may be reachable only through a closure's environment, represented as a Context object. Note we still don't consider Functions to be user objects here, and so avoid blaming the size of compiled code against any user object.

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2947673002 .
2017-06-20 16:59:29 -07:00
Alan Knight
12e93cc41e Revert "Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658."
This reverts commit 9755a98b00.

BUG=

Review-Url: https://codereview.chromium.org/2949943002 .
2017-06-20 15:25:55 -07:00
Ryan Macnak
dd996fc4be [fuchsia] Make symbols in the Dart VM visible, so they are available to the profiler.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2946123002 .
2017-06-20 15:21:07 -07:00
Paul Berry
e981c6fdbc Add tests of null-aware constructs in void contexts.
Fasta desugares some expressions differently in void contexts, so to
be on the safe side, we should test that null-aware invocations and
property accesses work in both void and non-void contexts.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2948843002 .
2017-06-20 15:12:01 -07:00
Paul Berry
5dd84a802e Only set types of conditional expressions in strong mode.
In spec mode the types aren't meaningful anyway (due to the fact that
the spec mode type system is unsound), and they don't match the
behavior of Rasta (causing bot failures).

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2953503002 .
2017-06-20 14:59:29 -07:00
Ben Konyi
9755a98b00 Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658.
BUG=
R=zra@google.com

Example:
Foo {
  final int x = 10;
  Foo(this.x); // Error
  Foo.named() : x = 42; // Error
}
Review-Url: https://codereview.chromium.org/2947043002 .
2017-06-20 14:40:36 -07:00
Zachary Anderson
8bf8623eb4 [infra] Uses github mirror for protobuf and tuple.
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2946923002 .
2017-06-20 12:35:24 -07:00
Siva Chandra
b9bf4fcc48 Remove vmservice_patch.dart.
The code in the patch is now inlined into the vmservice library.
This is being done because, the vmservice related libraries are
now compiled directly from source instead of from the "patched_sdk".
So, what is being compiled now does not have the vmservice_patch
applied. By removing the patch, we are removing the need to
artificially patch the vmservice library and making the
vmservice_io.dill complete.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2946773002 .
2017-06-20 12:24:16 -07:00
Paul Berry
d514347a44 Add type inference for null-aware method invocations.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2950923002 .
2017-06-20 12:16:34 -07:00
Mike Fairhurst
47c9dcad97 Update plugin whitelist to accomodate angular plugin rename
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2947953002 .
2017-06-20 12:01:51 -07:00
Paul Berry
eadfe2816b Record static types in the desugaring of null-aware property gets.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2946943002 .
2017-06-20 11:29:50 -07:00
Brian Wilkerson
5582824e3c Rename the plugin location key and directory name
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2952583003 .
2017-06-20 11:06:39 -07:00
Paul Berry
d0f8a47f33 Rename "field" -> "accessor" in several type inference methods.
No functional change.  This just adjusts nomenclature to reflect the
fact that much of the type inference logic for dealing with fields
also applies to getters/setters.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2948773002 .
2017-06-20 10:34:27 -07:00
Jennifer Messerly
070f31a899 optimize null safe ops by using DDC's let abstraction
We were already using it for most other things (increment ops, op assign, ??, cascades, etc)

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2944413002 .
2017-06-20 10:31:30 -07:00
Dan Rubel
d0910ce078 translate fasta parser error to analyzer error
* translate fasta parser BuiltInIdentifierAsType error to analyzer error
* remove unused error listener field

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2944383002 .
2017-06-20 13:18:48 -04:00
Dan Rubel
966d1a4701 integrating fasta parser
* start integrating fasta parser into analyzer
* extract new Scanner.fasta factory

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2948473002 .
2017-06-20 12:24:13 -04:00