Commit graph

42905 commits

Author SHA1 Message Date
John McCutchan
6bf86eacd7 Add getIsolateID to Service class in dart:developer
Fixes https://github.com/dart-lang/sdk/issues/23924

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2542003002 .
2016-12-01 12:48:49 -08:00
Konstantin Shcheglov
1e5fc38884 Compute top-level declarations in a file.
This is the first step to implement 'Add Import' Quick Fix with the new
analysis driver.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2545753003 .
2016-12-01 11:43:15 -08:00
Paul Berry
c4f50f53cb Remove old AST factory constructors from analyzer.
This reapplies the remainder of
1d028eed8d (which was reverted due to
conflicts with dev_compiler), since dev_compiler has now been fixed to
use analyzer's new astFactory.

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

Review URL: https://codereview.chromium.org/2549613002 .
2016-12-01 11:17:10 -08:00
Florian Loitsch
222d80ad9d Update documentation for num.clamp.
(partially) fixes #27923
BUG= http://dartbug.com/27923
R=lrn@google.com

Review URL: https://codereview.chromium.org/2541513002 .
2016-12-01 11:01:44 -08:00
Paul Berry
0c31815f1c Transition analyzer and analysis_server to new astFactory.
This is the same as 1d028eed8d (which
was reverted) except that it doesn't remove the old AST factory
constructors (which broke dev_compiler).  The removal of old AST
factory constructors will be done in a follow-up CL so that if it
unexpectedly breaks any other clients we will be able to revert it
without reverting this CL.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2536373008 .
2016-12-01 10:56:21 -08:00
Paul Berry
2d289c2df6 Modify dev_compiler to use analyzer's new AstFactory class.
The old mechanism for creating analyzer ASTs (factory constructors on
the interface classes) will be going away in analyzer 0.30.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2545843002 .
2016-12-01 10:37:22 -08:00
Konstantin Shcheglov
2368a59d60 Add libraries in corrections using SourceInfo instance of LibraryElement.
We are not going to have LibraryElement(s) for the new analysis driver.

The current approach: get known library sources, compute their elements,
import these elements does not work well when there is no analysis cache.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2532393008 .
2016-12-01 10:22:48 -08:00
Stephen Adams
f62009a3aa dart2js-kernel: Handle some more 'is' cases
Adds type variables and function types.
Still missing parameterized interface types.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2542783002 .
2016-12-01 09:28:02 -08:00
Konstantin Shcheglov
53b04631bc Move running tasks for fixed time to the scheduler.
This improves recovery time for change/undo from 300 ms to 200 ms for
analyzer + analysis_server + front_end.

_FilesReferencingNameTask does not degrade in any noticeble way, it is
still about 0-1 ms for this code base, as compared to 60 ms without
fixing runing time in the task or the scheduler.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2540403002 .
2016-12-01 09:15:36 -08:00
Konstantin Shcheglov
aaaeee5bc4 Make MemoryResourceProvider.convertPath() work with partially posix paths.
So that 'C:\some\path/to/file.dart' -> 'C:\some\path\to\file.dart'.

R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2542793003 .
2016-12-01 08:39:44 -08:00
Vijay Menon
106c623a9f Some fixes for lazy JS types
R=jacobr@google.com

Review URL: https://codereview.chromium.org/2542833002 .
2016-12-01 07:44:38 -08:00
Jonas Termansen
3676af3168 Ensure consistent file ordering in observatory tarball
R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org/2545783002 .
2016-12-01 16:01:09 +01:00
Martin Kustermann
117924ed15 Update kernel status files for precompilation after refactoring
The tests for which dartk is missing a compile-time error will run the precompiler on the result and will therefore have a different status entry (even though it is caused by dartk).

Review URL: https://codereview.chromium.org/2547523002 .
2016-12-01 14:48:24 +01:00
Paul Berry
cb2fef0c45 Add a front end perf test that computes unlinked summaries.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2544643002 .
2016-12-01 05:46:47 -08:00
Jonas Termansen
c0172aba48 Don't store git commit in observatory version string
The observatory assets tarball would be different every time due to the
version string, which makes it compress to a different size. The size
changes would then move the program data around, making it much more
difficult to determine if dart builds of different revisions are
actually identical.

Google Analytics doesn't need to know the exact version numbers, it will
be fine to say they are bleeding edge builds of a particular version.

BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org/2540383003 .
2016-12-01 14:16:23 +01:00
Martin Kustermann
37dfdbdc97 VM: Remove unused (and incomplete) HashMap::Remove() function
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2542103002 .
2016-12-01 13:51:49 +01:00
Martin Kustermann
ff8951a515 VM: [Kernel] Allocate objects in KernelReader/kernel::FlowGraphBuilder in Heap::kOld if appropriate
If we generate too much surviving objects in Heap::kNew during program reading
time or flow graph construction time we trigger (very aggressive) growth of new
space.

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2539173002 .
2016-12-01 13:51:29 +01:00
Martin Kustermann
abd77cab64 Refactor kernel-related status files
To make it clear in the status file whether a crash (or other issues) are coming
from the dartk compiler or from the vm, this CL introduces new status file
markers which are the normal markers prefixed with Dartk (e.g. DartkCrash).

Furthermore this CL groups common failures
  * compiler: dartk & dartkp
  * runtime: vm & dart_precompiled
into shared status file blocks, thereby deduplicating failures (which removes around 500 lines).

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2543973002 .
2016-12-01 13:48:35 +01:00
Johnni Winther
27afcc4296 Remove EnqueuerImpl.processInstantiatedClassMembers
R=het@google.com

Review URL: https://codereview.chromium.org/2539043002 .
2016-12-01 11:10:36 +01:00
Lasse R.H. Nielsen
c6412af7bb Don't use [operator==] to refer to [==] in DartDoc. It doesn't work.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2548433002 .
2016-12-01 11:00:33 +01:00
Johnni Winther
489199eff1 Disallow null in spanFromSpannable.
Closes #27938

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2537303004 .
2016-12-01 10:53:56 +01:00
Johnni Winther
cffc20cdf5 Update dart2js/pubspec
R=het@google.com

Review URL: https://codereview.chromium.org/2540103002 .
2016-12-01 10:44:46 +01:00
Bob Nystrom
aa749dbd8d Sprinkle some types on the SDK like the static typing fairy.
When I'm looking at the dynamic call profiles of an internal app test,
I see a bunch coming from the SDK itself. In fact, the top five most
common dynamic call sites are in the SDK.

This fixes four of them. (The fifth is in runUnary() in Zone, and I
don't think can be made typed yet.)

R=vsm@google.com

Review URL: https://codereview.chromium.org/2542723003 .
2016-11-30 17:04:54 -08:00
Stephen Adams
ece7725d90 dart2js-kernel: Emit error trap for unimplemented features
The test will fail with an error like the following, rather than proceed with an incorrect null value.

R=efortuna@google.com

Review URL: https://codereview.chromium.org/2540363002 .

TypeError: Cannot read property 'Unhandled ir.FunctionExpression  (dynamic x) → dynamic => x' of null
2016-11-30 16:52:07 -08:00
Vijay Menon
b8d3758dcd Revert "Transition analyzer and analysis_server to new astFactory; remove old AST factory methods."
This reverts commit 1d028eed8d.

This was breaking DDC.

TBR=paulberry@google.com

Review URL: https://codereview.chromium.org/2542753002 .
2016-11-30 14:57:49 -08:00
Martin Kustermann
554c3c9683 VM: Enforce correctly formatted C++ code
Currently the presubmit script for 'git cl upload' will just warn the developer
that code is incorrectly formatted and asks whether to proceed. This makes
developers sometimes just ignore the warning and upload incorrectly formatted
C++ code.

This causes incorrectly formatted code to be committed to the repository and
will cause a presubmit warning/question for all developers afterwards.

This CL will therefore turn the warning into an error to ensure our c++ code is
always correctly formatted.

R=zra@google.com

Review URL: https://codereview.chromium.org/2525633002 .
2016-11-30 23:52:52 +01:00
Martin Kustermann
d822f36f15 VM: Fix memory leak during shutdown
The way runtime/platform/hashmap.h:HashMap was implemented so far did not allow
deleting elements while iterating over the map. If one iterated like this

  HashMap::Entry* cursor = map.Start();
  while (cursor != NULL) {
    if (cond) {
      map.Remove(cursor->key, cursor->hash);
    }
    cursor = map.Next(cursor);
  }

Then the iteration `cursor` will skip elements. This is due to the fact that
`HashMap::Remove()` is left-rotating elements in certain cases and
`HashMap::Next()` will unconditionally advance to the next position in the
backing store.

PROBLEM IS: There was existing code which did remove elements while iterating
over a HashMap.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2533303005 .
2016-11-30 23:52:04 +01:00
Zachary Anderson
c8ecd31aa5 Properly label vm_tests as tests
This will allow build tools that are interested in target types to work
properly.

BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2540853002 .
2016-11-30 14:34:37 -08:00
Konstantin Shcheglov
c3e2c45cb3 Extract 'computeMissingOverrides' in ErrorVerifier.
So, we can reuse it in Quick Fixes.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2541153002 .
2016-11-30 14:04:43 -08:00
Konstantin Shcheglov
a0fa2083d3 Fix for constructor search.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2539263002 .
2016-11-30 13:59:56 -08:00
Stephen Adams
dfd38a0463 Use precomputed constant for determining if static is lazy-init
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2541753002 .
2016-11-30 13:31:56 -08:00
Paul Berry
1d028eed8d Transition analyzer and analysis_server to new astFactory; remove old AST factory methods.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2539243002 .
2016-11-30 12:28:51 -08:00
Dan Rubel
aff6b796f3 update analyzer cli to support include directive in analysis options file
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2541933002 .
2016-11-30 15:16:55 -05:00
Konstantin Shcheglov
666d4efce2 Issue 27903. Use shared logic for computing new method location.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27903

Review URL: https://codereview.chromium.org/2538143003 .
2016-11-30 12:15:07 -08:00
Konstantin Shcheglov
fa0b825269 Search for ImportElement(s).
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2542583003 .
2016-11-30 12:12:22 -08:00
Konstantin Shcheglov
4686d364bb Add a new Analysis Server option '--new-analysis-driver-log'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2543713002 .
2016-11-30 12:10:06 -08:00
Zachary Anderson
cec2a1cab2 Adjust memory pressure from SSL
This includes the size of the internal memory buffers for the filter
and the trusted certs in the security context.

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

Review URL: https://codereview.chromium.org/2542663002 .
2016-11-30 10:26:45 -08:00
Konstantin Shcheglov
2537784f92 Stop using Element.unit directly.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2541873002 .
2016-11-30 09:37:55 -08:00
Konstantin Shcheglov
9a9e037e61 Show priority files on the status page.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2542673002 .
2016-11-30 09:25:31 -08:00
Paul Berry
0cf5215560 Update analyzer pubspec to reflect dependency on collection.
The dependency was added in 27a3275495.
Note that analyzer previously had a transitive dependency on
collection.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2536373004 .
2016-11-30 09:24:02 -08:00
William Hesse
10e535a5ee Update status for dart_style package and dom/shadowroot co19 windows.
BUG=https://github.com/dart-lang/dart_style/issues/562
TBR=rnystrom@google.com

Review URL: https://codereview.chromium.org/2543463003 .
2016-11-30 16:52:17 +01:00
William Hesse
35904c4f7e Update package building status for pkg/kernel
BUG=https://github.com/dart-lang/sdk/issues/27937
R=asgerf@google.com

Review URL: https://codereview.chromium.org/2543473003 .
2016-11-30 15:18:10 +01:00
Erik Ernst
f2907070d8 Added CHANGELOG.md entry on syntax-only generic methods.
R=lrn@google.com, mit@google.com

Review URL: https://codereview.chromium.org/2532863002 .
2016-11-30 13:36:02 +01:00
Johnni Winther
33303ffea5 Resolve type arguments to generic methods.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2535373003 .
2016-11-30 12:44:29 +01:00
Kevin Millikin
bda2c1d534 Update kernel/binary.md.
Update a few things that are out of date and consistently use List for
arrays preceded by a UInt length.

BUG=
R=asgerf@google.com

Review URL: https://codereview.chromium.org/2539063002 .
2016-11-30 12:26:03 +01:00
Martin Kustermann
f9c9c4e767 VM: Fix segfault during shutdown of socket listening registry
The following happened:

A listening socket (ipv4, first-port) was created.  Afterwards another
listening socket (ipv6, 0) is being created.  We look up in the hashmap
if there is already a listening socket on port `0` (which is never the case).
So we create a new socket, the OS assigns the socket a random port
(which just happens to be `first-port` as well).  Then we insert a new OSSocket
entry into the hashmap with key `first-port` (and set its `next` field to NULL).
This will simply override the existing entry.

During shutdown we loop over all (fd, OSSocket) pairs and try to remove
`OSSocket` from the port->socket map (via the linked `next` list).  We cannot
find the `OSSocket` which we accidentally droped earlier, so we dereference
`0->next` and hit a SEGFAULT.

What should've happend is to correctly link the `OSSocket`s via the next field.

Fixes #27847

R=asiva@google.com, fschneider@google.com

Review URL: https://codereview.chromium.org/2540013002 .
2016-11-30 11:48:08 +01:00
Erik Ernst
2812738546 Added CHANGELOG.md entry for initializing formal access.
R=kevmoo@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/2540643002 .
2016-11-30 11:47:03 +01:00
William Hesse
de0c7acfd7 Update status for flaky Windows tests
BUG=https://github.com/dart-lang/sdk/issues/27935
R=eernst@google.com

Review URL: https://codereview.chromium.org/2539033002 .
2016-11-30 11:41:17 +01:00
Asger Feldthaus
709c1e0b75 Store library paths relative to a given application root folder.
In kernel, library import URIs now support an "app" scheme as an
alternative to the "file" scheme, representing a path relative to
the application root.

dartk takes an --app-root flag giving the application root. If none
is given, file URIs are used instead.

The intention is that kernel binaries should not carry irrelevant
path information, such as the path to the home directory of the
user who compiled a given file.

It is not the intention that end-users should see an app URI.
Import paths are currently not shown to users at all, and if we need
to do this, they should be translated to file paths first.

In theory we could stick to file URIs with relative paths, but the Uri
class from dart:core makes this difficult, as certain operations on it
assume that file paths should be absolute.

Source mapping URIs are not yet affected by this change.

R=kmillikin@google.com

Committed: 60adb852ad

Review URL: https://codereview.chromium.org/2532053005 .

Reverted: bb540416f2
2016-11-30 10:39:48 +01:00
Asger Feldthaus
ecf9acd26c Update vm-kernel status file.
BUG=
R=jensj@google.com

Review URL: https://codereview.chromium.org/2538063002 .
2016-11-30 10:38:21 +01:00