Commit graph

48129 commits

Author SHA1 Message Date
Régis Crelier 164a602a80 [VM parser] Mark class as typedef class before parsing its function type when
using the new function type syntax.
This issue prevents committing of https://codereview.chromium.org/2893893002

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2966583002 .
2017-06-29 14:33:36 -07:00
Ryan Macnak f1b7e8ed8c Add gdb helper functions for creating a handle and using ToCString with RawObjects.
Improves gdb debugging when Object::Handle() is optimized away.

Replace some intermediate static_libraries with source_sets to fix export issue.

R=regis@google.com, vegorov@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2957843002 .
2017-06-29 14:31:44 -07:00
Brian Wilkerson d29c5d3a72 Fix the resolution of uri-based part-of directives in the SDK (issue 29598)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2967503002 .
2017-06-29 13:51:45 -07:00
Natalie Weizenbaum f4750db137 Bring in the latest pub. (#30053) 2017-06-29 13:50:09 -07:00
Brian Wilkerson d1bb233f52 Remove timeStamp from the ChangeBuilder API
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2962223002 .
2017-06-29 13:48:46 -07:00
Paul Berry e2037dc9d1 Introduce a reusable mechanism for representing synthetic kernel objects.
We introduce a class KernelSyntheticExpression which can be used for
synthetic expressions introduced by the front end.  It is used for
expressions that represent errors detected by the front end, and it is
also the base class for KernelComplexAssignment.  By default, type
inference skips these synthetic expressions, inferring a type of
`dynamic`.  (Note, however, that classes dervied from
KernelComplexAssignment override this behavior).

We also introduce a class KernelSyntheticStatement which behaves
similarly, but is used for statements rather than expressions,
e.g. the synthetic assignment introduced at the top of a "for" loop
whose loop variable is defined elsewhere.

Finally, we modify KernelTypeInferrer.inferFieldTopLevel() so that it
deliberatly infers `dynamic` for fields that lack an initializer.
Previously this behavior happened as a result of the hack in
KernelTypeInferrer.inferExpression which caused type inference to
infer `dynamic` for anything that didn't implement KernelExpression.

All of these changes should help pave the way for removing the
aforementioned hack.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2968563002 .
2017-06-29 13:47:53 -07:00
Bob Nystrom 0b2c9b048d Dynamically load packages for dartdevc tests in test.dart.
This involves a few pieces:

- Add support to DDC for specifying the module name associated with a
  given summary. This lets test.dart invoke DDC using summaries in the
  build directory outside of the directory containing the test itself.

- Add support to the build scripts for building the packages. This adds
  a new GN target that builds everything needed to run test.dart with
  dartdevc. In particular, it invokes build_pkgs.dart to compile the
  relevant packages to JS+summary so that the tests can use them.

  This requires some changes to build_pkgs.dart so it can output to a
  given directory.

- In test.dart, when tests are compiled with dartdevc, pass in the
  summaries for the packages so they don't get compiled in. Then, when
  the test is run, configure require.js with the right paths to their
  JS files so they can be loaded.

  I also removed a bunch of unneeded buildDir parameters being passed
  around the various CompilerConfiguration class methods now that they
  have direct access to the configuration.

Fix #29923.

R=vsm@google.com, whesse@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2955513002 .
2017-06-29 13:45:57 -07:00
Konstantin Shcheglov f6b7fd307a Pass target elements being renamed into validator.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2963173002 .
2017-06-29 13:42:01 -07:00
Alexander Aprelev 501688de4c Drop custom dart_host_sdk used for Flutter.
Instead have Flutter fetch prebuilt host sdk into same location where standalone dart expects it.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2963053002 .
2017-06-29 13:18:43 -07:00
Konstantin Shcheglov 077b6b687d Remove incremental: logger, validator, options.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2968473002 .
2017-06-29 11:51:12 -07:00
Stephen Adams 6651f58674 dart2js kernel: Rewrite logical expression trees to short-circuit
The Ast builder does this, so it makes the comparison of generated
code easier.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2960303003 .
2017-06-29 11:26:00 -07:00
Ryan Macnak 987d98cfe8 [profiler] Demangle native symbols on Android too.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2966553002 .
2017-06-29 10:47:27 -07:00
Ryan Macnak 399ade26aa [observatory] Add a 'GC' button to heap map.
R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2953373002 .
2017-06-29 10:45:26 -07:00
Paul Berry 1e9c0d9722 Update expectations now that #30000 is fixed.
Test inference/unresolved_super now passes; it just needed an
expectation file.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2965513002 .
2017-06-29 10:44:56 -07:00
Jennifer Messerly 94af6bf093 fix #29733, handle variables that completely shadow parameters
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2961863003 .
2017-06-29 10:39:09 -07:00
Konstantin Shcheglov 8f5c21ea68 Use SearchEngine.membersOfSubtypes() instead of actual elements in ImplementedComputer.
This makes 'implemented' notification 10x faster for files with
many types and implemented methods, like visitor.dart - from 400 ms
down to 36 ms. Still not as fast as I would like, but much better.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2955313003 .
2017-06-29 10:11:26 -07:00
Carlo Bernaschina 0d86f5f3c5 Added Editor stream and sendObjectToEditor RPC into Service Protocol
Related=https://github.com/dart-lang/sdk/issues/30023

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2962593002 .
2017-06-29 10:08:12 -07:00
Konstantin Shcheglov b3fe985371 Use AnalysisDriver.getCachedResult() for 'implemented' notification.
In general case we cannot use getResult() in this notification.
We generate these notifications after analysis is complete in scheduler.
But if there is no cached result, getResult() will schedule analysis.
So, we might get into a loop.

In practice this worked, because IDEA always makes files priority,
so their results cached, and then subscribes for notifications.
But in general case we need this protection.

This also means that the 'implemented' notification works (and will
work) only for priority files.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2965533002 .
2017-06-29 09:57:20 -07:00
Vijay Menon e84fd776cb Improve runtime error when a module is not loaded
R=alanknight@google.com

Review-Url: https://codereview.chromium.org/2959323002 .
2017-06-29 08:09:26 -07:00
Zachary Anderson 50475dd351 [Fuchsia] Fix test image. Update status files for vm and language suites
IN-70

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2957233003 .
2017-06-29 07:45:19 -07:00
William Hesse 6c4dcd6800 Remove support for multivm branch and runners
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2956043002 .
2017-06-29 15:59:07 +02:00
Brian Wilkerson 84dd01904d Missed change to conform to other APIs
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2965453002 .
2017-06-29 06:15:38 -07:00
Johnni Winther 34290dca77 Split inference type-info accessors into members, parameters and local functions
This prepares for using LocalFunctionElement.callMethod as the key for local
functions instead of the local functions themselves - corresponding to the world
after closure conversion.

Main changes in
  elements/elements.dart
  inferrer/inferrer_engine.dart
  inferrer/type_graph_inferrer.dart
  inferrer/type_system.dart

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2955353002 .
2017-06-29 14:46:48 +02:00
Paul Berry 7ee5d4b3a2 Create an option to disable type inference and type promotion.
This is intended for profiling, to ensure that type inference and type
promotion do not slow down compilation too much.

Currently the option is just plumbed through to the kernel Target
class since I'm not exactly sure how we'll want to enable/disable this
option; we can plumb it the rest of the way in a future CL.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2962913002 .
2017-06-29 05:31:06 -07:00
Peter von der Ahé ba84f801f4 Change how unresolved super sends are handled.
The mixin transformer is now responsible for adding no-such-method calls.

Fixes https://github.com/dart-lang/sdk/issues/30000

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

Review-Url: https://codereview.chromium.org/2963763002 .
2017-06-29 12:21:49 +02:00
Jens Johansen 6cb702b723 [Kernel] Add check in the constant evaluator.
Currently some tests pass in checked mode but fails in non-checked mode
because we don't check the result of a constant-evaluation that should
be bool in non-checked mode.
This CL changes it so we always check the bool result in the constant-evaluator.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2956493003 .
2017-06-29 11:18:10 +02:00
Johnni Winther fc1ec82757 Move locals and closure classes from kernel/ to js_model/
- and rename K* to J*

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

Review-Url: https://codereview.chromium.org/2960153002 .
2017-06-29 11:08:24 +02:00
Emily Fortuna 4250923832 Fix order of visitChildren in Constructors.
BUG=
R=ahe@google.com, kmillikin@google.com

Review-Url: https://codereview.chromium.org/2956153002 .
2017-06-28 18:12:46 -07:00
Bob Nystrom 8d90363dce Start getting the DDC bot to run tests using test.dart.
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2960343002 .
2017-06-28 16:50:27 -07:00
Zachary Anderson 10d343f295 [Fuchsia] Fix definition of Process::ClearSignalHandler()
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2960233003 .
2017-06-28 15:55:26 -07:00
Konstantin Shcheglov 4484160ce9 Include types of ClassTypeAlias into subtyped names.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2963003002 .
2017-06-28 15:01:30 -07:00
Paul Berry 0958e40357 Adjust return types of spec-mode function expressions to match VM.
R=scheglov@google.com

The spec is unclear about what is supposed to happen here (see
https://github.com/dart-lang/sdk/issues/30044).  Matching the VM
behavior allows us to pass the existing tests.
Review-Url: https://codereview.chromium.org/2958363002 .
2017-06-28 14:36:00 -07:00
Konstantin Shcheglov 256d6fa704 Remove the stale test for discarding notifications.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2961173002 .
2017-06-28 14:27:38 -07:00
Konstantin Shcheglov ef45b380fc Record ClassTypeAlias(s) as subtypes.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2956403002 .
2017-06-28 14:26:16 -07:00
Emily Fortuna 7c89075a4f Entity-ify BoxLocal.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2956393002 .
2017-06-28 14:21:28 -07:00
Konstantin Shcheglov e0f4c7b467 Report only private members in the same library as overrides.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2959273002 .
2017-06-28 13:47:33 -07:00
Konstantin Shcheglov 911263f240 Remove the old index.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2963773003 .
2017-06-28 13:44:05 -07:00
Konstantin Shcheglov f09be80615 Record only names of instance members in subtypes.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2961143002 .
2017-06-28 12:55:07 -07:00
Paul Berry 0efe02372b In non-strong mode, don't infer the type of for-in loop variables.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2960003003 .
2017-06-28 12:43:05 -07:00
Paul Berry c99f11cf80 More fixes for missing interface targets when not in strong mode.
In my previous CL, I only addressed method invocation targets.  This
CL addresses getter and setter interface targets.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2963833002 .
2017-06-28 12:20:56 -07:00
Konstantin Shcheglov 2b64bbed6a Add SearchEngine.membersOfSubtypes().
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2962023002 .
2017-06-28 11:44:48 -07:00
Brian Wilkerson 7bd9e6c443 Add a mixin for assists similar to that for fixes
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2956353002 .
2017-06-28 11:44:22 -07:00
Paul Berry 37a5c124ee Fix for missing interface targets when not in strong mode.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2959213002 .
2017-06-28 11:23:01 -07:00
Konstantin Shcheglov 166c47d771 Issue 29968. When a file is added, and it is already known, refresh it.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29968

Review-Url: https://codereview.chromium.org/2959903005 .
2017-06-28 11:05:57 -07:00
Zachary Anderson 4ecf748d5e [dart:io] Fixes a crash in VM shutdown when signals are watched
This CL fixes a crash in VM shutdown which is triggered by Dart programs
that throw unhandled exceptions while watching OS signals.

fixes #30033

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2961993002 .
2017-06-28 11:05:07 -07:00
Brian Wilkerson 6248e7cab2 Add support code to make fixes easier in plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2962903002 .
2017-06-28 10:52:06 -07:00
Brian Wilkerson 563720617c Allow trailing comma in assert
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2961063002 .
2017-06-28 10:46:44 -07:00
Konstantin Shcheglov 7d7689ab5c Implement search for direct subtypes in a single AnalysisDriver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2956193003 .
2017-06-28 10:35:16 -07:00
Devon Carew 83d9e3fc91 Fix a few unused imports and symbol warnings.
BUG=
R=messick@google.com

Review-Url: https://codereview.chromium.org/2961013002 .
2017-06-28 09:44:38 -07:00
Stephen Adams fc7d880c60 Implement _ChildNodeListLazy.removeRange as throwing UnsupportedError
_ChildNodeListLazy.removeRange used to throw UnsupportedError because ListMixin.removeRange calls setRange.
Make throwing UnsupportedError explicit to avoid relying on the implementation of ListMixin.removeRange
This will unblock the '_closeGap' change.

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2955103003 .
2017-06-28 09:42:55 -07:00