Commit graph

46204 commits

Author SHA1 Message Date
Johnni Winther 21a3455bd6 Introduce ParameterStructure
This is a substructure of FunctionType and FunctionSignature which
doesn't contain type information. This allows us to let FunctionEntity
have a ParameterStructure (which makes sense for both K and J elements)
but not require FunctionEntity to have a type (which K elements have
but J elements might not).

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2809603002 .
2017-04-11 10:19:14 +02:00
Johnni Winther 4d3c3b9305 Use entities in JavaScriptBackendClasses
This makes it reusable for kernel based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2799403003 .
2017-04-11 10:14:33 +02:00
Johnni Winther 77bd26f3d7 Add MemberEntity.isAbstract and use MemberEntity in function_set.dart
This makes function_set.dart reusable for kernel based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2804293002 .
2017-04-11 10:10:04 +02:00
Johnni Winther b4ef45d6e4 Use entities in impact transformers.
This makes the impact transformers reusable for kernel based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2807593002 .
2017-04-11 10:02:53 +02:00
Johnni Winther 8cf8e5f437 Use entities in TypeVariableResolutionAnalysis and TypeVariableCodegenAnalysis
This makes this reuseable for kernel based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2801873006 .
2017-04-11 09:56:14 +02:00
Johnni Winther 364ecead7e Remove most direct uses of 'backend' and 'compiler' in GraphBuilder.
This is a step towards using data objects instead of directly accessing
JavaScriptBackend and Compiler. This is needed to support an element model
switch between resolution and codegen.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2808683003 .
2017-04-11 09:50:24 +02:00
Johnni Winther 35ea089be2 Decouple LocalsHandler from Compiler and JavaScriptBackend
This is a step towards passing data object to codegen in order
to allow an element model switch between resolution and codegen.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2812633002 .
2017-04-11 09:43:05 +02:00
Johnni Winther da22833d8a Less direct Compiler use in SSA
This is a step towards using data object rather than Compiler and
JavaScriptBackend in codegen. This is needed to support a shift in
element models between resolution and codegen.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2813603002 .
2017-04-11 09:36:07 +02:00
Regis Crelier d0a7bad121 Pass a second type argument vector to all type instantiation calls in the VM.
With generic methods, uninstantiated types will require 2 instantiators, one
reflecting the class type arguments (as of today) and one reflecting the
function type arguments (new).
This is work in progress and the second instantiator is always null for now.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2799373002 .
2017-04-10 21:25:33 -07:00
Konstantin Shcheglov 2c46a154b8 Drop the 'analyzeWithoutTasks' flag for AnalysisDriver.
We're not going back, I think.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2806353005 .
2017-04-10 16:56:56 -07:00
Zachary Anderson 6756e4d3ce [fuchsia] Fix shutdown crash
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2812753002 .
2017-04-10 15:46:08 -07:00
Regis Crelier 820f8d74e6 Added missing canonicalization of typedef signature instantiated during
finalization (fixes #29300).

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2811643004 .
2017-04-10 15:15:31 -07:00
Regis Crelier 54784f1cdc Fix bad status file modification. Tests are still failing in kernel debug mode.
Review-Url: https://codereview.chromium.org/2806353004 .
2017-04-10 14:50:00 -07:00
Ryan Macnak 42ec925a9e GN: Add libdart_jit and dart_api.
libdart_jit is always the JIT, unlike libdart which is either the JIT or AOT runtime depending on dart_runtime_mode. Clients of libdart will be updated to explicitly choose libdart_jit or libdart_precompiled_runtime.

dart_api allows libraries such as tonic or intermediate components of the Flutter engine to be agnostic as to whether they're in a JIT or AOT runtime, allowing the final executable making the choice without having to deal with a conflicting dependency brought in by a library.

Remove dead libdart_embedder_noio.

Replace all used of dart_nosnapshot* with dart_nosnapshot_with_precompiler*. We don't care about binary size of their clients, so it's better to have fewer targets.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2814513003 .
2017-04-10 13:44:25 -07:00
John McCutchan 94df115e4b Revert "Fix updating packages map on reload and add a regression test"
This reverts commit 7a2d67f3ba.

BUG=

Review-Url: https://codereview.chromium.org/2808953003 .
2017-04-10 12:30:38 -07:00
John McCutchan bf3d374541 Dump some state when complex_reload_test fails
BUG=

Review-Url: https://codereview.chromium.org/2814573002 .
2017-04-10 12:13:16 -07:00
Konstantin Shcheglov 3e9d358131 Add missing checks for null imported/exportedLibraries.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2812673002 .
2017-04-10 11:29:38 -07:00
John McCutchan 80c27841a3 Fix logic bug in loader code
BUG=

Review-Url: https://codereview.chromium.org/2815433002 .
2017-04-10 11:13:46 -07:00
Regis Crelier 8ca244ba27 Make finalization of recursive function types more robust, especially since
the Kernel frontend may omit the information that a function type is a typedef.
Re-enable several previously failing tests for dartk.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2806893002 .
2017-04-10 11:06:14 -07:00
John McCutchan d75edfb408 Attempt to fix loader hangs
I cannot reproduce locally so I'm going off scraps from the buildbot logs

BUG=

Review-Url: https://codereview.chromium.org/2814543002 .
2017-04-10 10:12:04 -07:00
Konstantin Shcheglov 3be10faaee Issue 29303. Prefer import updates and SDK imports over other imports.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29303

Review-Url: https://codereview.chromium.org/2808803003 .
2017-04-10 09:52:43 -07:00
Konstantin Shcheglov d5521a52b2 Add a tool for inspecting AnalysisDriver crash logs.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2809693002 .
2017-04-10 09:11:27 -07:00
John McCutchan 7a2d67f3ba Fix updating packages map on reload and add a regression test
- [x] Update the isolate's .packages path when requested.
- [x] Always refresh package map when loader is initialized.
- [x] Add regression test.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2797923008 .
2017-04-10 08:59:10 -07:00
Brian Wilkerson 69fa11d912 Fix compilation errors
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2807103003 .
2017-04-10 08:04:33 -07:00
Devon Carew fb4828d2e1 Add integration tests for edit.getAssists and edit.getFixes.
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2812483002 .
2017-04-10 07:50:12 -07:00
Devon Carew 9a852506c6 Tweaks to the analysis server --help output.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2810553002 .
2017-04-10 07:06:19 -07:00
Dmitry Stefantsov 078847f2cc Mark lib/async/stream_type_test with Pass
The fix 170bf10904 made the test pass.

R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2808743003 .
2017-04-10 14:18:10 +02:00
Dmitry Stefantsov 4cac62b47c Fix multitest lines in status files for strong-mode async libs
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2807103002 .
2017-04-10 11:30:58 +02:00
Dmitry Stefantsov 3ad84ed150 Mark tests in "tests/lib_strong" as not strong-mode ready
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2811593003 .
2017-04-10 10:36:02 +02:00
Konstantin Shcheglov 021d99e05d Issue 29288. Resynthesize Import/Export/PartElement for every directive.
We need all of them because there might be associated annotations,
which should be applied to corresponding AST nodes.

https://github.com/dart-lang/sdk/issues/29288
https://github.com/dart-lang/sdk/issues/29188

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29288

Review-Url: https://codereview.chromium.org/2809523002 .
2017-04-09 10:12:43 -07:00
Devon Carew e572bf93ec Add 4 integration tests for the analysis domain.
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2808623002 .
2017-04-08 20:56:00 -07:00
Bob Nystrom 8abc899c0a Bring in the latest Pub.
R=nbosch@google.com

Review-Url: https://codereview.chromium.org/2805893004 .
2017-04-07 17:57:04 -07:00
Bob Nystrom 611f014645 Bring the latest scheduled_test into the repo.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2809473002 .
2017-04-07 17:47:34 -07:00
Vijay Menon bc3089838c Reify implicit casts for FutureOr
Before landing, two issues to resolve:
(1) We appear to allow sideways casts now without static error - e.g.,

List<Object> -> FutureOr<List<String>>

Is that intended?  If so, it breaks an assumption that implicit casts
are from supertype to subtype.

(2) LUB and FutureOr

It appears that the LUB of, e.g., String and Future<String> is Object.
See fixes in tests to record casts back to FutureOr.

Fixes #29251

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2801683004 .
2017-04-07 17:33:34 -07:00
Vijay Menon 10c5de82c8 Invoke debugger on nsm
Missed this one when I added debugger statements earlier

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2565183004 .
2017-04-07 14:45:09 -07:00
Jennifer Messerly 8ada796a86 fix #29233, final fields can be settable in a mock
also fix #29273, user mixins can override native methods

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2803673007 .
2017-04-07 14:12:49 -07:00
Steve Messick eadc6af226 Statement completion framework with a few examples
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2803313002 .
2017-04-07 13:55:50 -07:00
Ryan Macnak daddec8308 Mark optimized code for the crash handler and disassembler output.
Optimized code has its function name prefixed with an asterisk, which is also how we display optimized code in Observatory.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2803013004 .
2017-04-07 13:31:51 -07:00
Konstantin Shcheglov 07347d84fc Parse type substitution comments /*=T*/ in variable declarations with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2804753003 .
2017-04-07 12:59:02 -07:00
Vijay Menon 1975c8431a Migrate async tests to strong
No modifications to the actual tests

R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2802973005 .
2017-04-07 12:46:12 -07:00
Stephen Adams 4f358a21d6 Redo "dart2js: Insert HTypeKnown refinement nodes on dominated edges of HPhi nodes."
TBR=efortuna@google.com

Review-Url: https://codereview.chromium.org/2802323002 .
2017-04-07 12:45:58 -07:00
pq 2bc70e6a26 Bump Linter to latest (0.1.30).
R=brianwilkerson@google.com

Fixes: https://github.com/dart-lang/linter/issues/491
Review-Url: https://codereview.chromium.org/2807633002 .
2017-04-07 12:37:14 -07:00
Konstantin Shcheglov ee89054fe9 Issue 29288. When infer new FunctionType, makes its FunctionElement own its ParameterElement(s).
Never share.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29288

Review-Url: https://codereview.chromium.org/2799093007 .
2017-04-07 12:21:53 -07:00
Brian Wilkerson 1910147425 Partial fix for generic function types - non-driver case
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2802203003 .
2017-04-07 11:17:37 -07:00
Ryan Macnak 170bf10904 Do not create method extractors during JitOptimizer::TryExpandClassesInICData.
Closes #29230
Issue #29292
Issue #29293

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

Review-Url: https://codereview.chromium.org/2796283006 .
2017-04-07 09:45:09 -07:00
Johnni Winther d0e450d501 Use Set<ClassEntity> instead of Set<MixinApplicationElement>
To make benefit glorious type system of Dart.

Review-Url: https://codereview.chromium.org/2804233002 .
2017-04-07 14:26:00 +02:00
Dmitry Stefantsov cd501b2db3 Switch to Fasta in "golden" tests of closure conversion
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2808443002 .
2017-04-07 14:21:04 +02:00
Peter von der Ahé 6b150cb01f Verify rethrow and parents of variables.
R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2800853005 .
2017-04-07 12:59:03 +02:00
Peter von der Ahé 20aefd34f5 Document file names in deps files.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2805663002 .
2017-04-07 12:37:29 +02:00
Peter von der Ahé b8d63c3890 Use identical to compare strings.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2801963003 .
2017-04-07 12:35:34 +02:00