Commit graph

45018 commits

Author SHA1 Message Date
Paul Berry c6d1a0d381 Re-remove AstBuilder.accumulateIdentifierComponents.
This was removed in 3fbeb5d064 and
accidentally re-introduced in 4500bb0920
(presumably due to merge conflict resolution).

Review-Url: https://codereview.chromium.org/2724143002 .
2017-03-01 15:30:34 -08:00
pq d826b1f931 Default arg support continued (flutter-intellij#553).
Default arg support for:
  * inherited refs
  * imported refs
  * type members
  * local constructors

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

See: https://github.com/flutter/flutter-intellij/issues/553
Review-Url: https://codereview.chromium.org/2728653004 .
2017-03-01 15:00:47 -08:00
Paul Berry 70408f7549 Add a data structure to keep track of modifiers in AstBuilder.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2725983002 .
2017-03-01 14:43:11 -08:00
Paul Berry 8decc11ac0 Add AstBuilder support for fields.
R=ahe@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2723883002 .
2017-03-01 13:24:17 -08:00
Konstantin Shcheglov 9fa139215b Parse 'x.y' as PrefixedIdentifier, not PropertyAccess with Fasta.
OTOH, 'x?.y' or '(x).y' should be parsed as PropertyAccess.

R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2722283002 .
2017-03-01 13:12:51 -08:00
Konstantin Shcheglov 86b5a088ad Parse InstanceCreationExpression with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2727753002 .
2017-03-01 13:04:46 -08:00
Konstantin Shcheglov 270a6900f6 Fix cascade tests with Fasta.
There are still failing cascade tests, but these are because of parsing
differences, not because of problems with the test implementation.

R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2726753003 .
2017-03-01 11:45:35 -08:00
pq d1bfe8bccb Calculate default args for local reference completions.
First step towards wiring up default args for completions.

See: https://github.com/flutter/flutter-intellij/issues/553

Next up: similar enhancements for type_members, imported_refs, etc.

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

Review-Url: https://codereview.chromium.org/2722253002 .
2017-03-01 11:45:01 -08:00
Konstantin Shcheglov 99b1f617dc Mark not-optional-parameters methods of AstFactory as deprecated.
...and use non-deprecated versions in AstTestFactory.

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

Review-Url: https://codereview.chromium.org/2726943002 .
2017-03-01 11:43:55 -08:00
Konstantin Shcheglov 93bf98045c Fix parseAssignableSelector() tests and parse '?.' with Fasta.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2727663005 .
2017-03-01 11:33:22 -08:00
Konstantin Shcheglov 3d0a94278e Parse FunctionExpressionInvocation with Fasta.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2728703002 .
2017-03-01 11:19:27 -08:00
Florian Schneider 67c42c7d10 Fix compiler warning with shift of negative value.
It seems newer versions of gcc complain about undefined behavior.

Fixes #28923.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2723233002 .
2017-03-01 10:47:07 -08:00
Konstantin Shcheglov cc7c61124b Always parse 'x.y' as a prefixed identifier.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2722153003 .
2017-03-01 10:42:51 -08:00
Kevin Millikin d921f94367 Change a C++ type to avoid triggering an ASSERT.
Malloc'd memory is uninitialized so C++ constructors are not run.  For
class Ref, operator= asserts (basically) that the constructor has been
run.

BUG=
R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2723123002 .
2017-03-01 16:50:24 +01:00
Dmitry Stefantsov 9c340f9eb1 Revert last 4 commits by @lrn
Reverted commits:
* ef097edad6. ("Make Analyzer, VM and
  dart2js accept URI strings as part-of library identifier.")
* e8e1857814. ("Fix bad example of URI
  part-of to be bad, not good.")
* 58f7a92ede. ("Add changelog entry for
  allowing URI in part-of.")
* a4a7d98dce. ("Use FutureOr in
  Completer.complete.")

TBR=lrn@google.com

Review-Url: https://codereview.chromium.org/2724853002 .
2017-03-01 16:44:52 +01:00
Lasse R.H. Nielsen a4a7d98dce Use FutureOr in Completer.complete.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2722203002 .
2017-03-01 14:36:46 +01:00
Lasse R.H. Nielsen 58f7a92ede Add changelog entry for allowing URI in part-of.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2722183002 .
2017-03-01 14:04:44 +01:00
Lasse R.H. Nielsen e8e1857814 Fix bad example of URI part-of to be bad, not good.
Review-Url: https://codereview.chromium.org/2722173002 .
2017-03-01 13:40:03 +01:00
Lasse R.H. Nielsen ef097edad6 Make Analyzer, VM and dart2js accept URI strings as part-of library identifier.
R=brianwilkerson@google.com, floitsch@google.com, hausner@google.com, johnniwinther@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2640853005 .
2017-03-01 12:15:11 +01:00
Peter von der Ahé bb72d5e8a0 Let parser handle factory modifiers.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2721623002 .
2017-03-01 11:38:01 +01:00
Asger Feldthaus ea4a89ba03 Add some tests for calls with checks in strong mode.
Tests checks due to covariant subtyping, dynamic calls, and their
interaction with tear-offs.

The tests use explicit type annotations so they can run
independently of frontend type inference.

R=dmitryas@google.com, leafp@google.com

Review-Url: https://codereview.chromium.org/2725563003 .
2017-03-01 11:28:23 +01:00
Kevin Millikin 8166deb009 Mark vm/lazy_deopt_vm_test as slow
BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2722113002 .
2017-03-01 11:27:48 +01:00
Vyacheslav Egorov 8e267b29c1 Update status files for debug mode dartk/dartkp.
R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2722103002 .
2017-03-01 10:31:42 +01:00
Asger Feldthaus af10678cb3 Add source information to the covariance checks inserted for strong mode
BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2718363003 .
2017-03-01 09:51:10 +01:00
danrubel 0c290ae456 echo analysis options information if dartanalyzer --verbose is specified
With this change, if the dartanalyzer --verbose option is specified
then you will see additional output indicating which analysis options
file was read:

Loaded analysis options from /path/to/.analysis_options

In addition, if there are any command line flags that specify/override
an analysis option then you will see something similar to this:

Analysis options: strong = true

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2726783002 .
2017-02-28 17:49:43 -08:00
Jacob Richman a6a206062d Custom formatter cleanup Fix case where displaying a class constructor generated unreadable huge output. Fix case where exceptions were throw. Correct display of statics, fix indentation bugs. Add improved custom formatter test to main repro. As a drive by fix, switch hashCode to use a symbol instead of the name $identityHash as $identityHash was making custom formatter test output unstable.
BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2703263002 .
2017-02-28 17:47:53 -08:00
Jennifer Messerly fe294f3753 unfork DDC's copy of most SDK libraries
There's some changes in strong mode errors we may want to follow up on.

Unforks the following: async, collection, convert, core, developer, internal, io, isolate, math, mirrors.

Does not unfork: html, indexed_db, js, js_util, svg, typed_data, web_audio, web_gl, web_sql.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2698353003 .
2017-02-28 17:10:52 -08:00
Paul Berry 79cce42e38 Add an AST factory method for fieldDeclaration with all optional named parameters.
Also add 'covariantKeyword' to the Impl constructors and named factories.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2722033002 .
2017-02-28 16:43:31 -08:00
Paul Berry 8849a29406 Implement AstBuilder.handleOperatorName.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2723873002 .
2017-02-28 16:36:03 -08:00
Chris Bracken c9442bb8a2 Unset GREP_OPTIONS when extracting processor count
If GREP_OPTIONS includes -n or --line-number, matches will be emitted
with a line number following the filename. Unset GREP_OPTIONS to ensure
we're getting expected output.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2721953004 .
2017-02-28 16:00:32 -08:00
Dan Rubel bfb8e82c6e Document dartanalyzer analysis options changes (#28928) 2017-02-28 15:19:52 -08:00
Konstantin Shcheglov 36cec1faef Parse ParenthesizedExpression as Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2726693002 .
2017-02-28 15:08:23 -08:00
Paul Berry fb1bc6ad83 Add preliminary support for method declarations to AstBuilder.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2706293014 .
2017-02-28 15:05:31 -08:00
Paul Berry f55f111d7a Update kompile.status to reflect e260980624
Commit e260980624 changed some Fasta
tests from "crash" to "fail".

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2725683003 .
2017-02-28 15:04:03 -08:00
Jennifer Messerly 18c4f5cf08 fix future onError handler wrapping to avoid cast error
the return type was invalid, which caused a runtime cast failure. Many of the onError handlers return `void` which is not assignable to T.

This was discovered in internal testing as we attempted to run DDC against the unforked SDK sources.

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2718643003 .
2017-02-28 14:59:48 -08:00
Konstantin Shcheglov 4d4275d36e Replace the sequence isInstanceOf/assign with assist-with-cast in ExpressionParserTestMixin.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2719403004 .
2017-02-28 14:31:41 -08:00
John McCutchan 6cb83f037e Address comments from Matthias on previous CL
original CL: https://codereview.chromium.org/2692803006/

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2720723006 .
2017-02-28 14:02:32 -08:00
Konstantin Shcheglov 25fb3dabdb Parse ThisExpression with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2719083007 .
2017-02-28 13:52:01 -08:00
Konstantin Shcheglov e260980624 Parse SuperExpression with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2721973002 .
2017-02-28 13:48:57 -08:00
Konstantin Shcheglov f7d379a494 Run ExpressionParserTestMixin tests with Fasta.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2726543003 .
2017-02-28 13:33:52 -08:00
Vyacheslav Egorov 9fd4823e9d VM: Fix simdbc and darkp builds.
- When generating app-aot snapshot we are currently running Kernel isolate
in the precompiler mode, which means we can't have field guards enabled.

- DBC does not support field guards so flags must be correctly initialized.

BUG=
TBR=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2720893004 .
2017-02-28 22:20:44 +01:00
Vyacheslav Egorov a9a756df8e VM: Allow configuring use_field_guards on the per-isolate basis and include it into snapshot features.
We have tests that disable it but we train app-jit snapshot for Kernel with field guards enabled so
we need to make sure that Kernel isolate runs with correct settings matching the settings at the time
when app-jit snapshot was created.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2715213008 .
2017-02-28 21:17:17 +01:00
Vyacheslav Egorov a5e1f89583 VM: Fix an app-jit related shutdown race.
IsolateData contains AppSnapshot which might own some HeapPage-s, so we can't
destroy IsolateData in the Dart_IsolateShutdownCallback, because some thread
running in the isolate (e.g. background compiler) might still touch
thoses pages or objects they host.

We need to delay destruction of AppSnapshot until after the isolate shutdown.

Current API does not allow that, so we introduce a new isolate lifecycle
callback - Dart_IsolateCleanupCallback, which is invoked at the end of the
isolote lifecycle when things like background compiler have been stopped
and no Dart code is supposed to run.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2720723005 .
2017-02-28 21:10:04 +01:00
Vyacheslav Egorov ff9c17504a VM: Make Dart::FeaturesString respect isolate flags controlling asserts and type checks.
Before it simply looked at FLAG_enable_{asserts/type_checks}.

We allow disabling or enabling type checks / asserts for newly created isolates
through Dart_IsolateFlags even when they are enabled globally through
FLAG_enable_{asserts/type_checks} flags.

This change allows isolates to use app-jit snapshots trained with type checks /
asserts disabled as long as isolate itself has type check and asserts disabled,
independent of whether FLAG_enable_{asserts/type_checks} is set globally or not.

Additionally disable type checks and asserts on Kernel isolate even if flags
FLAG_enable_{asserts/type_checks} are set.

This change allows to train Kernel app-jit snapshot once and use it both for

$ dart --dfe=...

and for

$ dart --checked --dfe=...

configurations.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2720123004 .
2017-02-28 21:05:29 +01:00
Jennifer Messerly 373149e003 fix ListMixin _filter and sort to work in strong mode
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2715833004 .
2017-02-28 10:37:28 -08:00
Florian Loitsch 169bcf98b7 Fix typo in IoSink.flush documentation.
Review-Url: https://codereview.chromium.org/2720953004 .
2017-02-28 19:34:27 +01:00
Florian Loitsch 37b7a6719a Fix typo in URI documentation.
Fixes #28556
BUG= http://dartbug.com/28556
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2723563003 .
2017-02-28 19:32:50 +01:00
Stephen Adams 1ae1ec7df4 Remove HRuntimeType implementation
Use the legacy RTI format, which should be replaced with something that lets types and tests be cached and amortized.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2722753002 .
2017-02-28 09:33:32 -08:00
Asger Feldthaus 3a7529a363 Remove status file sections for the CPS IR.
BUG=
R=kmillikin@google.com

Committed: 2d6c90a6b3
Review-Url: https://codereview.chromium.org/2720513006 .
2017-02-28 17:11:19 +01:00
Asger Feldthaus e7b9672b3e Revert "Remove status file sections for the CPS IR."
This reverts commit 2d6c90a6b3.

BUG=

Review-Url: https://codereview.chromium.org/2720283002 .
2017-02-28 17:08:04 +01:00