Commit graph

42882 commits

Author SHA1 Message Date
Martin Kustermann
e697ce94af VM: [Kernel] Remove assertion in TranslateStatement() - we use it inside let expressions
Review URL: https://codereview.chromium.org/2535823002 .
2016-11-28 16:17:04 +01:00
Vyacheslav Egorov
8eceda053f VM: [Kernel] Don't add implicit getters for top level fields into the library dictionary.
Tree shaker can't cope with this and produces incorrect snapshots that contains tree shaken classes.

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org/2536683002 .
2016-11-28 15:50:24 +01:00
Martin Kustermann
0c6beaca1c VM: [Kernel] Need to keep stack_ correct, fixes failures in debug JIT mode
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2535813002 .
2016-11-28 15:40:40 +01:00
Martin Kustermann
aaec324001 Add more flags to the blacklist of reproduction commands
Currently failures on the buildbot will look for example like this:

Short reproduction command (experimental):
    python tools/test.py -cdartk -t120 --write-debug-log --write-test-outcome-log --copy-coredumps --exclude-suite pkg language/transitive_private_library_access_test

But developers only would like to see

    python tools/test.py -cdartk -t120 language/transitive_private_library_access_test

R=whesse@google.com

Review URL: https://codereview.chromium.org/2532123002 .
2016-11-28 14:18:27 +01:00
Asger Feldthaus
50c199c224 Skip kernel unit tests on jsshell due to #26103.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2536633002 .
2016-11-28 13:44:34 +01:00
Asger Feldthaus
0ae961f428 Document that setter expressions return their right-hand side.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2530203003 .
2016-11-28 12:27:08 +01:00
Asger Feldthaus
8f12489839 Add --verify-ir flag to dartk and test.py.
This replaces the old --sanity-check flag from dartk. Some files have
been renamed to avoid the wording "sanity check".

Compared to --sanity-check, the following checks have been added:
- variables are not referenced out of scope
- variables are not redeclared
- class type parameters are not referenced from static context

A unit test has been added to check that the verifier rejects certain
invalid ASTs.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2531873002 .
2016-11-28 12:21:19 +01:00
Lasse R.H. Nielsen
c05eb97461 Add message to assert in specification.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2530083002 .
2016-11-28 09:19:28 +01:00
Lasse Reichstein Holst Nielsen
7957a1c256 Make EfficientLength extend Iterable.
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.

It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.

R=floitsch@google.com

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

Committed: b08fb1373f
2016-11-28 08:04:04 +01:00
Stephen Adams
b20b10a0af dart2js-kernel: Implement Let and PropertySet.
The Accessor builders capture some subexpressions to help map kernel
Nodes to Ast Nodes.

R=asgerf@google.com

Review URL: https://codereview.chromium.org/2526123002 .
2016-11-26 12:42:37 -08:00
Matan Lurey
d92107e01d Remove scary warning from dart:convert#Codec (#27897)
Seems unnecessarily scary given that a breaking change here would now be a huge breaking change.
2016-11-25 15:42:01 -08:00
Konstantin Shcheglov
a69b7f3fb0 Add AnalysisDriver.getIndex().
AnalysisResult.index is not quite enough.

While the index can be used to find where an element is used in the file,
we need to know also the enclosing Element, which we can find from the
full CompilationUnitElement.

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

Review URL: https://codereview.chromium.org/2526373002 .
2016-11-25 09:51:05 -08:00
Konstantin Shcheglov
d16dfdc2c9 Store individual LinkedLibrary objects instead of PackageBundle(s).
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2531723002 .
2016-11-25 09:38:40 -08:00
Konstantin Shcheglov
483fa6de3a Prefer a driver to which the file is added.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2533533002 .
2016-11-25 09:28:07 -08:00
Erik Ernst
1edb84bf8f Removed status entries for initformal tests with dart2js/browser.
Needed after landing https://codereview.chromium.org/2141023002/.

Review URL: https://codereview.chromium.org/2532733002 .
2016-11-25 17:21:24 +01:00
Brian Wilkerson
b923dafd25 Add parser support for using a URI in a part-of directive
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2526063002 .
2016-11-25 08:16:45 -08:00
William Hesse
c3333f9c40 Update dartium status for issue 26644
BUG=https://github.com/dart-lang/sdk/issues/26644

Review URL: https://codereview.chromium.org/2526283005 .
2016-11-25 14:49:12 +01:00
William Hesse
52cb4500b5 Update co19 status for issue 26644
BUG=https://github.com/dart-lang/sdk/issues/26644

Review URL: https://codereview.chromium.org/2528103003 .
2016-11-25 14:32:01 +01:00
William Hesse
177f9c690f Update MacOS dartium status for co19 tests
BUG=
R=sortie@google.com

Review URL: https://codereview.chromium.org/2534583002 .
2016-11-25 13:51:47 +01:00
William Hesse
30db1d7ab0 Update status for passing co19 tests
BUG=https://github.com/dart-lang/co19/issues/68
BUG=https://github.com/dart-lang/co19/issues/81
R=sortie@google.com

Review URL: https://codereview.chromium.org/2531033002 .
2016-11-25 13:15:02 +01:00
Erik Ernst
f234278474 Status updates required after CL 2141023002.
Review URL: https://codereview.chromium.org/2524363004 .
2016-11-25 12:16:49 +01:00
Sergey G. Grekhov
76425f920f Update co19 test suite dependency to commit f05d5aee5930
co19 test suite updated to commit f05d5aee5930bfd487aedf832fbd7b832f502b15 of dart-lang/co19 repository, dated Nov 21 2016.

Status files are updated for this roll.
2016-11-25 12:06:39 +01:00
Asger Feldthaus
084bd8add2 Speed up kernel sanity checks.
Sanity checks now run in a single pass rather than two, and
instead of building a set consisting of all members, it uses
a bit from the transformer flags to remember which members are
not orphaned.

As an additional check, it now checks that members are not
declared more than once.

R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2529973002 .
2016-11-25 12:02:05 +01:00
Asger Feldthaus
963e1ebc55 Do not sort named parameters on FunctionNode.
This was originally done to be consistent with FunctionType,
where the named parameters are sorted, but for FunctionNode
it is not necessary.

It causes issues for natives that expect parameters to be
declared in a certain order. It is also an issue if we
ever want to reuse the kernel format for summaries, where
it is also preferable to present the named parameters in
their original order.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2527933002 .
2016-11-25 11:22:37 +01:00
Kevin Millikin
c0bfda8a08 Remove an unnecessary (empty) scope, streamline the function parsing code.
The scope containing function expressions is always empty.

R=hausner@google.com

Review URL: https://codereview.chromium.org/2013233003 .
2016-11-25 10:24:17 +01:00
Erik Ernst
4912fd1501 Make initializing formal access available by default
This CL changes dart2js such that the effect that we used to get with
option '--initializing-formal-access' is now obtained unconditionally,
i.e., that extension is now enabled by default.

dart2js will continue to accept the option, such that scripts passing
the option will not break.

The CL is _not_ intended to be landed at this time, the plan is to
enable the feature in a coordinated manner when all tools are ready.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2141023002 .
2016-11-25 10:15:21 +01:00
Lasse Reichstein Holst Nielsen
843bb96813 Change how the language specification describes control flow.
Changed to compositionally describing how an expression or statement can
complete (normally, throw, return, break, continue), and propagating the
completion to the surrounding statements handling those behaviors.

This should not change the current behavior except in a few cases where
the existing specification was vague, misleading or just wrong.

Actual changes:
- The super call in an initializer list is now always called at the end,
  even if it is allowed to be written earlier. This matches existing
  VM behavior.
  Initialization of initializer expressions are specified
  as part of constructor execution, not something happening
  at the `new` operator.
- The cancel call to a stream subscription when exiting an async for-in
  loop is now made explicit, and its returned future is explicitly
  awaited for.
  Previously it was unclear what happened with that future.
- Pausing a surrounding async-for loop has been added everywhere
  the body of the loop can suspend, just before the suspension.
  The loop subscription is not resumed until reaching the end of the body,
  which is equivalent to resuming it after each suspend
  and then pausing it again when the synchronous execution reaches
  the next suspend.
  So, easier and doesn't change the behavior of the loop itself,
  but it's a visible change if you check the onPause/onResume
  of the loop stream.
  Spec now recognizes that the pause call may throw on an invalid
  implementation of StreamSubscription.

Addresses issues #25859, #25856, #25850, #25848, #25847, #25749, #25634, #25539, #25421, #25412, #25381, #25234, #25005, #24859, #24748, #23779, #23700, #23628, #22908, #21858 (and likely more).

BUG= http://dartbug.com/25859 http://dartbug.com/25856 http://dartbug.com/25850 http://dartbug.com/25848 http://dartbug.com/25847 http://dartbug.com/25749 http://dartbug.com/25634 http://dartbug.com/25539 http://dartbug.com/25421 http://dartbug.com/25412 http://dartbug.com/25381 http://dartbug.com/25234 http://dartbug.com/25005 http://dartbug.com/24859 http://dartbug.com/24748 http://dartbug.com/23779 http://dartbug.com/23700 http://dartbug.com/23628 http://dartbug.com/22908 http://dartbug.com/21858
R=eernst@google.com

Review URL: https://codereview.chromium.org/2399343002 .
2016-11-25 09:30:17 +01:00
Vyacheslav Egorov
584788a47c VM: [Kernel] Don't emit ReturnInstr that are not connected to the graph.
This breaks inlining because it expects that all collected ReturnInstr
are strongly connected to the rest of the graph.

Source based FlowGraphBuilder achieves that by eagerly stopping construction
as constructed fragment is closed (e.g. Throw is emitted).

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org/2528673002 .
2016-11-24 16:19:53 +01:00
Vyacheslav Egorov
73ef820ec1 VM: [Kernel] Relax assertions in SSA construction and in Kernel loading.
- Kernel-to-IL translation leaves behind some unused constants without temp indices assigned.

- Let compile time errors propagate instead of failing with FATAL error in the post load class finalization.

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org/2528763002 .
2016-11-24 16:19:22 +01:00
William Hesse
81b71e74f8 Revert "Roll co19 tests and status files"
This reverts commit 27883bfbc0.
We will reland this once the status file updates are (nearly) perfect.

BUG=
R=sortie@google.com

Review URL: https://codereview.chromium.org/2530863002 .
2016-11-24 15:19:31 +01:00
William Hesse
27883bfbc0 Roll co19 tests and status files
This updates co19 to commit 2e98931a4d40781110220d4b2d131efa6fc4669d
Merge branch 'co19patch' into rebased_co19_patch

Sort status lines ignoring alphabetical order

Status files updated according lates buildbot run results

Status files updated according the latest Chrome run

dart2js files updated for FF and Chrome on Linux

DEPS and VM status files updated

status file updated according Linux run

Status files updated according latest Dartium run

dart2js status file updated according the last tests run on FF

dart2js status file updated according the last tests run on Chrome and FF

Analyzer and VM status files are updated according last versions of co19 and sdk

BUG=
R=sortie@google.com

Review URL: https://codereview.chromium.org/2528953002 .
2016-11-24 15:01:53 +01:00
Kevin Millikin
c33789c4f5 Dart VM: Simplify token positions in the translation of await.
We can reuse the token position given by ST(node->token_pos()).  This
allows the token positions for the final result to fit the pattern
assumed by MakeName.

R=hausner@google.com
BUG=

Review URL: https://codereview.chromium.org/1875643002 .
2016-11-24 09:44:40 +01:00
Ian Hickson
5ad01b1acc Clean up the licensing situation of the third_party/tcmalloc directory (#27879) 2016-11-24 09:37:21 +01:00
Jens Johansen
f0da43445e Use field.RawOwner() for initializer to keep correct script.
E.g.

file1:
------------
library crash;

part "file2.dart";

main() {
  print(field2);
}

crash() {
  try {
    throw "Crashing!";
  } catch(exception, stacktrace) {
    print(stacktrace);
  }
}

file2:
------------
part of crash;

var field2 = crash();

We want something like

#0      crash (whatnot/file1.dart:11:5)
#1      field2 (whatnot/file2.dart:3:14) <-- good line
#2      field2 (whatnot/file2.dart:3:5)
#3      main (whatnot/file1.dart:6:9)

and not like

#0      crash (whatnot/file1.dart:11:5)
#1      field2 (whatnot/file1.dart:3:14) <-- bad line
#2      field2 (whatnot/file2.dart:3:5)
#3      main (whatnot/file1.dart:6:9)

R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2519133004 .
2016-11-24 09:27:25 +01:00
Kevin Millikin
ec84b87ebf Fix some puzzling code in object.cc.
Jens was looking through object.cc and he spotted:

    if (Original()) ...

where it seems like Original returns a RawField* which is never 0, so
it is always true.  It looks like it was intended to be a call to
IsOriginal().

(See https://codereview.chromium.org/1722733002/diff/120001/runtime/vm/object.cc)

BUG=

Review URL: https://codereview.chromium.org/2525633003 .
2016-11-24 09:13:08 +01:00
Siva Annamalai
42e4370818 Adjust status files for some test failures.
TBR

BUG=

Review URL: https://codereview.chromium.org/2530783002 .
2016-11-23 22:54:29 -08:00
Siva Annamalai
ae7c951b6b Fix status file.
TBR

BUG=

Review URL: https://codereview.chromium.org/2527613004 .
2016-11-23 16:44:52 -08:00
Siva Annamalai
22ac70a563 Fix status file
- Some DBC tests (regexp, field guards) was turned on inadvertantly
 - Skip cc/Profiler_InliningIntervalBoundry on release builds
  (need to figure how to handle the inlining difference between
   debug/release builds)

BUG=

Review URL: https://codereview.chromium.org/2528793003 .
2016-11-23 16:34:38 -08:00
Brian Wilkerson
5b1236cfe7 Fix the setting of analysis options when there is an embedded SDK
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2523313002 .
2016-11-23 15:48:42 -08:00
Siva Annamalai
501720c644 Retry landing cl for issue with TSAN.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2525103003 .
2016-11-23 15:40:26 -08:00
Ryan Macnak
12de13d1ae An isolate created with spawn function doesn't necessarily agree with its parent on the library private keys.
(The long-standing issue that spawn function should use snapshots would also fix this.)

Encountered by the analyzer in https://codereview.chromium.org/2492933002/

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2509413002 .
2016-11-23 15:36:01 -08:00
Ryan Macnak
2cf2297b4f Print snapshot size in PRODUCT mode as well.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2525063002 .
2016-11-23 14:30:24 -08:00
Ryan Macnak
1b51889447 Allow binding the vm service to IPv6 addresses.
Change the default bind address to 'localhost', which will be resolved to '127.0.0.1' or '::1' depending on the host's support for IPv6.

Fixes #27841

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2515023002 .
2016-11-23 14:24:52 -08:00
Siva Annamalai
93043a3662 Set the default value for use_corelib_source_files to true on windows as we do not have the source bits baked in.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2522943004 .
2016-11-23 11:09:25 -08:00
Ryan Macnak
8d57e3d540 Enable SecureSocket on Fuchsia using BoringSSL and compiled-in certificates from dart-sdk/root_certificates.
Implement OS::CurrentTimeMicros in terms of gettimeofday.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2519133005 .
2016-11-23 10:48:18 -08:00
Florian Schneider
6cfce40fab Fix product and Mac build.
BUG=

Review URL: https://codereview.chromium.org/2518063008 .
2016-11-23 10:47:44 -08:00
Florian Schneider
6cd141def5 Dump stack trace on segfault in the VM.
Install a signal handler in the standalone VM that dumps a backtrace
similar to what we already do on assertion failures.

For now only Linux and MacOS are supported.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2514113002 .
2016-11-23 10:29:07 -08:00
Siva Annamalai
7d287b232b Add flag use_corelib_source_files to control how dart_bootstrap and gen_snapshot load core libraries during the boot strap process. If this flag is true then an attempt is made to read the core library sources files and if not present fallsback to the source bits baked in the binary.
By default the flag is false.

BUG=#27860
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2527693002 .
2016-11-23 10:26:06 -08:00
Konstantin Shcheglov
e0c5a60f3e Remove accidentally committed 'print'.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2523263002 .
2016-11-23 10:00:25 -08:00
Paul Berry
08fa512ff2 Fix MemoryCachingByteStore._evict after an unsuccessful get.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2524693003 .
2016-11-23 09:47:43 -08:00