Commit graph

46576 commits

Author SHA1 Message Date
Zachary Anderson
cc968ca45b [infra] Roll clang to match the version used by Flutter
Flutter uses the same clang toolchain as Fuchsia. This CL puts Dart
on that toolchain, as well. This roll should entail no changes to
glibc version requirements on Linux.

The Fuchsia buildtools distribute clang-format with the toolchain
rather than separately, so this CL introduces forwarding scripts
that are copied to the right place under //buildtools.

This CL sets the default for the number of workers in //tools/gn.py
to 1, as the newer GN version fails occasionally when run
concurrently with other invocations.

As Flutter does, this CL uses the clang toolchain to build for
Android. Thus, it is now possible to build for Android on MacOS.

This change is a prerequisite for assembling the SDK in GN
rather than with a python script:

https://codereview.chromium.org/2848943003/

and will be nicer for making prebuilt SDKs for Fuchsia.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2854583002 .
2017-05-03 14:50:59 -07:00
Devon Carew
99d21dd9d0 Prepare package:analyzer 0.30.0.
BUG=
R=kevmoo@google.com

Review-Url: https://codereview.chromium.org/2862713002 .
2017-05-03 14:34:55 -07:00
Stephen Adams
ea2c9cba39 dart2js_html: Fix for issue 29538 - some returned lists may be null
Annotate querySelectorAll as not-null to recover code quality.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2857143003 .
2017-05-03 14:26:38 -07:00
Kevin Millikin
f13bcbcab6 Support BottomType in the VM Kernel reader
Implement the boilerplate necessary to support BottomType.  In the VM
we use the type Null.

BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2863493002 .
2017-05-03 23:17:33 +02:00
Konstantin Shcheglov
b567aeaeef Change Accessor(s) to use AstFactory to create MethodInvocation, PropertyGet/Set.
R=ahe@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2857133004 .
2017-05-03 14:10:54 -07:00
pq
374871da75 Add default implementation when fixing missing required closures (flutter-intellij#975)
Fixes: https://github.com/flutter/flutter-intellij/issues/975

Also improves code generation for required lists to include empty list literals.

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2862623002 .
2017-05-03 13:22:52 -07:00
Brian Wilkerson
78eec999e5 Fix a broken test (TBR)
Review-Url: https://codereview.chromium.org/2861593003 .
2017-05-03 13:21:00 -07:00
Brian Wilkerson
84ca84b1a7 Implement more of the behavior of a plugin; refactor some API
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2857233002 .
2017-05-03 12:48:39 -07:00
Stephen Adams
1472eba52d js_runtime: Split _asyncHelper into separate functions
The separate functions have smaller call-sites and less overhead.

_asyncStart uses Future._nullFuture to avoid 1 allocation.

BUG=
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2858463002 .
2017-05-03 12:38:35 -07:00
Devon Carew
5d0056df88 Make the exit code for dartanalyzer more deterministic.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2857203002 .
2017-05-03 11:38:35 -07:00
Paul Berry
45d06d718c Fix prepareTopLevel's initialization of classHierarchy.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2854333003 .
2017-05-03 10:50:44 -07:00
Paul Berry
d842f35bb2 Add a strong mode implementation of LUB to fasta; use it to infer ?:
R=ahe@google.com, leafp@google.com

Review-Url: https://codereview.chromium.org/2849213002 .
2017-05-03 10:36:47 -07:00
Kevin Millikin
514281b8a7 Move the Kernel canonical name table into the VM's heap
The canonical name table is copied into a typed data array in the VM's
heap.  The encoding is the same as in the binary except that the
integer indexes are fixed-size.

Canonical names are now integer indexes instead of objects allocated
in the C++ heap.

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

Review-Url: https://codereview.chromium.org/2853423002 .
2017-05-03 19:27:11 +02:00
Florian Loitsch
4b35d3995b Revert "Void is not required to be null anymore."
This reverts commit 4e52c457a9.

BUG=

Review-Url: https://codereview.chromium.org/2863463002 .
2017-05-03 19:22:22 +02:00
Dan Rubel
4752b67c62 Note that .analysis_options is deprecated (#29531) 2017-05-03 11:54:35 -04:00
Konstantin Shcheglov
ec4c247efb Add KernelXyzExpression stubs and factory methods.
Some of the factories methods don't accept yet enough tokens, and fileOffset(s) for them are set externally.

Also PropertyGet, SuperPropertySet, MethodInvocation which are used in accessors, are not converted yet.

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

Review-Url: https://codereview.chromium.org/2861523003 .
2017-05-03 08:50:42 -07:00
Florian Loitsch
4e52c457a9 Void is not required to be null anymore.
In checked mode, `void` now accepts any value.

Fixes #28937.
Fixes #28938.

BUG= http://dartbug.com/28937
BUG= http://dartbug.com/28938
R=johnniwinther@google.com, lrn@google.com, regis@google.com

Committed: 521dc6620f
Reverted: a3c0cb65af
Review-Url: https://codereview.chromium.org/2718513002 .
2017-05-03 17:43:23 +02:00
Konstantin Shcheglov
3820e630ca Create NullLiteral using AstFactory in BodyBuilder.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2856893002 .
2017-05-03 08:38:19 -07:00
Florian Loitsch
a3c0cb65af Revert "Void is not required to be null anymore."
This reverts commit 521dc6620f.

BUG=

Review-Url: https://codereview.chromium.org/2855173002 .
2017-05-03 17:36:39 +02:00
Florian Loitsch
521dc6620f Void is not required to be null anymore.
In checked mode, `void` now accepts any value.

Fixes #28937.
Fixes #28938.

BUG= http://dartbug.com/28937
BUG= http://dartbug.com/28938
R=johnniwinther@google.com, lrn@google.com, regis@google.com

Review-Url: https://codereview.chromium.org/2718513002 .
2017-05-03 17:31:21 +02:00
Vyacheslav Egorov
7b2e162775 Gardening: update path to capture_screenshot.ps1 script
R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2857923002 .
2017-05-03 16:04:20 +02:00
Vijay Menon
d5ecaf1088 Loosen type check on runZoned errorHandler
R=floitsch@google.com, lrn@google.com

Review-Url: https://codereview.chromium.org/2858843002 .
2017-05-03 05:30:06 -07:00
Lasse R.H. Nielsen
5a1a1509fc Fix some bad documentation links.
Addresses some of the cases of issue #29534.
BUG= http://dartbug.com/29534

Review-Url: https://codereview.chromium.org/2856123003 .
2017-05-03 13:10:46 +02:00
Asger Feldthaus
3a162d4241 Add flag to track if a constructor is the synthetic default constructor.
BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2856123002 .
2017-05-03 12:48:11 +02:00
Vyacheslav Egorov
1930aaf1ef Gardening: Mark two tests passing on dark(p).
lib/mirrors/immutable_collections_test: Pass
lib/mirrors/parameter_test/none: Pass

BUG=

Review-Url: https://codereview.chromium.org/2858903002 .
2017-05-03 12:12:34 +02:00
Johnni Winther
c3e28939b1 Fix Instantiation equivalence
Instantiations of abstract native classes need to be marked as
Instantiation.ABSTRACTLY_INSTANTIATED.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2849363003 .
2017-05-03 11:05:19 +02:00
Johnni Winther
6e508a8f57 Handle symbol literals in closed_world2_test
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2851163002 .
2017-05-03 10:41:59 +02:00
Johnni Winther
6a57511763 Register local functions with async markers
- in kernel computation of WorldImpact.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2848243002 .
2017-05-03 10:32:15 +02:00
Martin Kustermann
ac8d2056a3 Fix asserts in StackFrameIterator which were effectively disabled
The assertions which tried to assert that we only use
StackFrameIterator to walk frames of the current thread was incorrect.
We already have cases where other threads will walk the stack of the
mutator thread, see below for an example where this can happen.

Thread::VisitObjectPointers was incorrectly passing Thread::Current() to
the StackFrameIterator instead of 'this'.  (Code in thread_registry.cc will
loop over a number of threads and calls VisitObjectPointers on them)

  Mutator thread:

    0  pthread_cond_wait@@GLIBC_2.3.2
    1  dart::Monitor::WaitMicros
    2  dart::Monitor::Wait
    3  dart::MonitorLocker::Wait
    4  dart::ThreadBarrier::Sync
    5  dart::GCMarker::MarkObjects
    6  dart::PageSpace::MarkSweep
    7  dart::Heap::CollectOldSpaceGarbage
    8  dart::Heap::CollectNewSpaceGarbage
    9  dart::Heap::CollectGarbage
    10 dart::DN_HelperObject_<native>
    11 dart::BootstrapNatives::<native>
    <dart frames>

  MarkTask thread:

    1  dart::EntryFrame::VisitObjectPointers
    2  dart::Thread::VisitObjectPointers          <---- Walks mutator thread stack
    3  dart::ThreadRegistry::VisitObjectPointers  <---- Iterates over a number of threads
    4  dart::Isolate::VisitStackPointers
    5  dart::Isolate::VisitObjectPointers
    6  dart::GCMarker::IterateRoots
    7  dart::MarkTask::Run
    8  dart::ThreadPool::Worker::Loop
    9  dart::ThreadPool::Worker::Main
    10 dart::ThreadStart

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2845053003 .
2017-05-03 10:27:01 +02:00
Johnni Winther
08474aecdf Add BackendStrategy
This strategy pattern defines the element model used in type inference and codegen.
This allows for creating an element model for the backend that is different from
the frontend model.

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

Review-Url: https://codereview.chromium.org/2858513002 .
2017-05-03 10:24:42 +02:00
Johnni Winther
859bb784ed Make JavaScriptBackend.processAnnotations element-model agnostic
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2854013002 .
2017-05-03 10:14:03 +02:00
Johnni Winther
e4131c2d37 Reuse RuntimeTypesNeedBuilderImpl and _RuntimeTypesNeed for kernel based elements
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2850143002 .
2017-05-03 09:54:21 +02:00
Lasse R.H. Nielsen
7998f590b1 Update documentation on trignometric functions.
Fixes #17515
BUG= http://dartbug.com/17515
R=floitsch@google.com

Committed: 40220ec076
Review-Url: https://codereview.chromium.org/2852053002 .
2017-05-03 09:49:14 +02:00
Johnni Winther
66ead732b1 Move JsInteropAnalysis.onQueueClosed to AnnotationProcessor.processJsInteropAnnotation
R=sigmund@google.com

Committed: 86671fdd56

Reverted: 9a1460dc43
Review-Url: https://codereview.chromium.org/2852603003 .
2017-05-03 09:33:23 +02:00
Stephen Adams
bdea03cbde Fix status for new custom-elements + mirrors test
TBR=sigmund@google.com

BUG=

Review-Url: https://codereview.chromium.org/2858563003 .
2017-05-02 18:42:30 -07:00
Stephen Adams
9338844b10 Fix for issue 28196 - constant interceptors for mixin applications
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2862433002 .
2017-05-02 17:53:32 -07:00
Bob Nystrom
cf3be14b9b Fix path to test.dart in analyzer test for it.
Review-Url: https://codereview.chromium.org/2854283002 .
2017-05-02 17:01:53 -07:00
Kevin Millikin
1e9143987a Fix building of parameter descriptors from Kernel
When building parameter descriptors from Kernel functions, the
function's script is needed to get access to the string table.

BUG=
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2857853003 .
2017-05-03 01:56:59 +02:00
Bob Nystrom
53b2ef34ca Move test.dart into testing/dart.
This is mainly so that all of the code relating to test.dart is in one
directory tree so things like "Find All Usages" work a little better.
It felt weird to me to have a .dart file two directories up importing a
bunch of stuff within "testing/dart/".

Also cleaned up the affected code since it could use a little love. I'm
working on getting test.dart running DDC tests, but from poking around,
it seems like it could use some housekeeping as well.

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

Review-Url: https://codereview.chromium.org/2848103002 .
2017-05-02 16:48:28 -07:00
Zachary Anderson
4b4b8e8783 [Fuchsia] Allows non-regular files to be opened.
Fuchsia has lots of different file types that aren't covered by all of
the things that stat() understands, so we have to switch to
blacklisting directories.

See the discussion on https://codereview.chromium.org/2844493004/

R=abarth@google.com

Review-Url: https://codereview.chromium.org/2856913004 .
2017-05-02 14:47:33 -07:00
Jennifer Messerly
5e82b8c2e9 fix #29530, field metadata generation
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2861503002 .
2017-05-02 14:45:34 -07:00
pq
a51af38461 Widget details for Flutter children: param completions.
R=brianwilkerson@google.com

See: https://github.com/flutter/flutter-intellij/issues/463
Review-Url: https://codereview.chromium.org/2855883003 .
2017-05-02 13:50:34 -07:00
Vijay Menon
075158557e Allow canary to timeout
This is running for me locally, but timing out consistently on travis.

TBR=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2856953002 .
2017-05-02 10:02:51 -07:00
Kevin Millikin
865e0669b2 Move the Kernel string offsets into the VM's heap.
Copy the Kernel string offsets into a uint32 array in the VM's heap.
This avoids allocating small string objects with new and avoids having
a table of the canonical strings.

Instead of an offset and a size, strings are now represented as
indexes into the string table in the heap.  The start offset of string
N is found at byte offset N*4 because it is a uint32, and the end
offset is found at byte offset (N+1)*4.  The strings themselves are
just integer indexes instead of pointers.

In the stream flow graph builder, string access is all random access.

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

Review-Url: https://codereview.chromium.org/2852943003 .
2017-05-02 17:35:55 +02:00
Karl Klose
8a9775e8ab [Gardening] Revert status file change for contexts_test on dartk after reverting 7a463a
TBR=jensj@google.com

Closes #29513

Review-Url: https://codereview.chromium.org/2854093002 .
2017-05-02 16:53:38 +02:00
Florian Loitsch
953ce8c9fb Mark tests as flaky.
Review-Url: https://codereview.chromium.org/2859473002 .
2017-05-02 15:57:18 +02:00
Brian Wilkerson
9eee213363 Fix bugs found while working on tests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2849253002 .
2017-05-02 06:15:25 -07:00
William Hesse
f7c508d661 Update checked-in SDK to 1.24.0-dev.2.0
BUG=
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2856843002 .
2017-05-02 15:09:46 +02:00
Florian Loitsch
f6020b6d7e Make json-maps implement Map<String, dynamic>.
Fixes #26407.
http://dartbug.com/26407

R=lrn@google.com

Review-Url: https://codereview.chromium.org/1980663002 .
2017-05-02 14:51:32 +02:00
Florian Loitsch
0367d955fb Fix typing in dart2js serialization.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2852053003 .
2017-05-02 13:27:10 +02:00