Commit graph

45834 commits

Author SHA1 Message Date
Konstantin Shcheglov
b417df8259 Update final fields inference according to the clarified specification.
The change to the specification:
8f2be46aac

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2777733002 .
2017-03-26 13:01:41 -07:00
Dan Rubel
0fa52686f3 fix missing digit error translation
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2772513006 .
2017-03-25 22:33:59 -04:00
Dan Rubel
05300ea2df change "deferred" keyword isPseudo --> isBuiltIn
Fix https://github.com/dart-lang/sdk/issues/29069

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

Review-Url: https://codereview.chromium.org/2769253002 .
2017-03-25 21:20:11 -04:00
Devon Carew
0fcb91aa06 Fix analyzer tests when run in checked mode.
BUG=

Review-Url: https://codereview.chromium.org/2775073002 .
2017-03-25 15:34:40 -07:00
Devon Carew
b51d1fd8e3 Use ansi color in the dartanalyzer cli output.
BUG=
R=brianwilkerson@google.com, danrubel@google.com

Review-Url: https://codereview.chromium.org/2775633002 .
2017-03-25 15:02:47 -07:00
Martin Kustermann
fac6cda661 Add documentation to ALPN functionality in dart:io
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2770573003 .
2017-03-25 12:38:37 +01:00
Brian Slesinsky
ef48584f1f Fix package URI calculation when in third_party but not third_party/dart
In this case we should use a dotted package name, similar to other
packages outside third_party.

Previously, restoreAbsolute() didn't return a package URI at all,
which would result in a relative path being suggested for a
missing import.

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2771323002 .
2017-03-24 16:59:41 -07:00
John McCutchan
ada90ae4f2 Update the correct status file for the kernel bots
BUG=

Review-Url: https://codereview.chromium.org/2773073004 .
2017-03-24 14:54:30 -07:00
Ryan Macnak
a42b802bcc Standalone support for AOT as dylibs on Fuchsia.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2774993002 .
2017-03-24 14:52:18 -07:00
John McCutchan
bfde95b58f Update status file for kernel bot
BUG=

Review-Url: https://codereview.chromium.org/2775863005 .
2017-03-24 14:49:35 -07:00
Ryan Macnak
a52db232d6 When generating CodeSourceMaps, reassign function ids once per function instead of once per inlining site.
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2768153002 .
2017-03-24 14:41:36 -07:00
Konstantin Shcheglov
0adfef9471 Remove trailing semicolons to make the tests pass with Fasta.
The Fasta's unit test checks that the token stream is fully consumed,
i.e. that the next token after the parsed entity is EOF.

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

Review-Url: https://codereview.chromium.org/2772943004 .
2017-03-24 14:34:51 -07:00
Konstantin Shcheglov
4752e6947f Include comments when parsing with Fasta in file_state.
This makes many inference tests pass, because they use comments to
annotate expected errors.

The number of unit tests that are failing now (with this CL): 269.

R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2777613002 .
2017-03-24 14:30:06 -07:00
Vijay Menon
ac68d598cf Add patch code for List.filled growable param
Looks like a missing param doesn't break patch_sdk.  I think this was a recent add.

Fixes #28508

R=jakemac@google.com, jmesserly@google.com

Review-Url: https://codereview.chromium.org/2771953004 .
2017-03-24 14:27:47 -07:00
Emily Fortuna
184c2a5778 Lazily initialize library elements.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2771303002 .
2017-03-24 13:43:55 -07:00
Emily Fortuna
4156ca6a2b Eliminate multi-callback structure for LibraryLoader.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2760923004 .
2017-03-24 12:20:46 -07:00
John McCutchan
dacadf89d1 Hacky fix for kernel bots
BUG=

Review-Url: https://codereview.chromium.org/2766353005 .
2017-03-24 12:18:21 -07:00
Brian Wilkerson
4f28d97ac2 Add error checking for the immutable annotation (issue 27750)
R=pquitslund@google.com

Review-Url: https://codereview.chromium.org/2775863004 .
2017-03-24 11:56:24 -07:00
pq
5a237935f0 Fix tests to verify defaultArgListString specified as null are null.
* introduces a sentinel default value to ensure that we know when asserting if `null` was specified or the result of an excluded optional arg

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2769223004 .
2017-03-24 11:53:00 -07:00
Konstantin Shcheglov
713847a71b Parse LabeledStatement and SwitchStatement with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2776743002 .
2017-03-24 11:49:47 -07:00
Konstantin Shcheglov
4f6882d617 Include CompilationUnit begin/endToken(s) with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2776733002 .
2017-03-24 11:47:05 -07:00
Harry Terkelsen
eb712bb767 store constructor and arguments for constant values
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2772943002 .
2017-03-24 11:33:04 -07:00
Ryan Macnak
b43827350e Use Linux-style section names for DWARF on Fuchsia.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2768003004 .
2017-03-24 10:01:35 -07:00
Ben Konyi
9ea672efc0 Revert "Added page to Observatory to display native memory allocation information."
This reverts commit f30f312b48.

Revert "Fixed missing method referenced when MallocHooks is unsupported."

This reverts commit a0b9c5a178.

TBR=johnmccutchan@google.com

BUG=

Review-Url: https://codereview.chromium.org/2773073003 .
2017-03-24 09:47:29 -07:00
Brian Wilkerson
5227e74dfd Update the pubspec to capture new dependencies
R=jakemac@google.com

Review-Url: https://codereview.chromium.org/2778473002 .
2017-03-24 09:43:06 -07:00
pq
4a9cabf493 Arglist children: default value gen fixes.
* fixed arglist codegen (include params)
* fixed defaultTextRange generation (and added tests)
* cleanup (followup from https://codereview.chromium.org/2768273003/

R=brianwilkerson@google.com, danrubel@google.com

See: https://github.com/flutter/flutter-intellij/issues/832
Review-Url: https://codereview.chromium.org/2771123002 .
2017-03-24 09:36:24 -07:00
Vyacheslav Egorov
52e2dadea3 VM: [Kernel] Ensure that result of v.operator[]=(...) invocations is never used.
Currently Fasta translates cascade of indexed assignments into a cascade of
let-statements.

For example code like

```dart
  indices
    ..[0] = 0
    ..[_schemeEndIndex] = start - 1
    ..[_hostStartIndex] = start - 1
    ..[_notSimpleIndex] = start - 1
    ..[_portStartIndex] = start
    ..[_pathStartIndex] = start
    ..[_queryStartIndex] = end
    ..[_fragmentStartIndex] = end;
```

gets translated to

```
  let final dynamic #t826 = indices in
    let final dynamic #t827 = #t826.[]=(0, 0) in
      let final dynamic #t828 = #t826.[]=(core::_schemeEndIndex, start.-(1)) in
        let final dynamic #t829 = #t826.[]=(core::_hostStartIndex, start.-(1)) in
          let final dynamic #t830 = #t826.[]=(core::_notSimpleIndex, start.-(1)) in
            let final dynamic #t831 = #t826.[]=(core::_portStartIndex, start) in
              let final dynamic #t832 = #t826.[]=(core::_pathStartIndex, start) in
                let final dynamic #t833 = #t826.[]=(core::_queryStartIndex, end) in
                  let final dynamic #t834 = #t826.[]=(core::_fragmentStartIndex, end) in
                    #t826;
```

This later becomes in IL (on the example of `#t826.[]=(0, 0)`):

```
    t0 <- InstanceCall:120( []=, t0, t0, t0)
    StoreLocal(:var1 @-19, t0)
```

After SSA construction if locals liveness analysis is disabled
(`--no-prune-dead-locals`) we get essentially redundant phis constructed for
temporary let-variables which actually use result of the instance call:

```
    v25 <- InstanceCall:120( []=, v22, v24, v24)
...
    v629 <- phi(v636, v25)
```

These phis are redundant because their values can never be observed by the
program because they correspond to dead stores. In fact these phis only have
environment uses.

However subsequent optimization passes assume that result of a `v.[]=(...)`
invocation can never be used and replace `v.[]=(...)` with IL sequences that
don't actually produce any value - leading to malformed graphs where phis
refer to instructions outside of the graph.

To workaround the issue we explicitly drop the actual result of `v.[]=(...)`
and push a null-value to be used instead.

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

R=kmillikin@google.com, kustermann@google.com

Review-Url: https://codereview.chromium.org/2769313004 .
2017-03-24 17:35:05 +01:00
Ben Konyi
a0b9c5a178 Fixed missing method referenced when MallocHooks is unsupported.
Added page to Observatory to display native memory allocation information.

BUG=

Review-Url: https://codereview.chromium.org/2778463002 .
2017-03-24 09:34:48 -07:00
Ben Konyi
f30f312b48 Added page to Observatory to display native memory allocation information.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2748403002 .
2017-03-24 09:20:25 -07:00
Brian Wilkerson
ea2adbce82 Fix status file (TBR)
Review-Url: https://codereview.chromium.org/2778453002 .
2017-03-24 08:55:14 -07:00
Vijay Menon
d8c8a7b327 Mark tests no longer expected crash
Brian: looks like these started working on a recent CL of yours.

TBR=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2769333003 .
2017-03-24 08:46:21 -07:00
Dan Rubel
186c6f23bd fasta scanner recovery and error code translation improvements
* cleanup defaultRecoveryStrategy next/previous and eof

* add SymbolToken.eof() constructor to ensure that EOF tokens
  are correctly self referencing

* add fasta.scanString method to match scan method

* add fasta.ScannerResult.hasErrors field
  so that scan and scanString callers can quickly check for errors

* new scanner replacement test
  which scans using fasta then asserts as if it were from analyzer

* improve SymbolToken.toString() for EOF
* update analyzer test :: fasta scanner considers "<" to be an opener
* extract and move translateErrorToken into front_end
* address comments in https://codereview.chromium.org/2763833002

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

Review-Url: https://codereview.chromium.org/2767083002 .
2017-03-24 11:40:22 -04:00
Paul Berry
415c868589 Introduce a shadow hierarchy and factory class for use by fasta's BodyBuilder.
In the long run, this shadow hierarchy is intended to be used both for
kernel and analyzer ASTS; this should allow a single BodyBuilder class
to build either a kernel or an analyzer AST depending on which factory
it's connected to.

For now we only have a kernel shadow hierarchy, and it's incomplete,
so the code is not yet used.  I intend to follow up with CLs that
complete the implementation and hook it up to BodyBuilder.

R=ahe@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2769723004 .
2017-03-24 08:25:59 -07:00
Brian Wilkerson
ccf768144f More generic function type cases working
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2770143002 .
2017-03-24 08:08:23 -07:00
Vijay Menon
27d14402fa Skip test on chrome canary
TBR=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2770033004 .
2017-03-24 08:07:51 -07:00
Zhivka Gucevska
02251a05eb Add support for implicit getters and setters
BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2764073002 .
2017-03-24 16:04:02 +01:00
Peter von der Ahé
1f712e68fd Mark summarize_fasta_test as slow.
Review-Url: https://codereview.chromium.org/2777593002 .
2017-03-24 15:59:53 +01:00
John McCutchan
07a257573d Debugger support for step-into async and async* functions.
- [x] Support stepping into an async function.
- [x] Support stepping into the async generator in an await for loop.
- [x] Unit test for async function.
- [x] Unit test for async* function.

BUG=
R=asiva@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2768103002 .
2017-03-24 07:56:50 -07:00
Kevin Millikin
74c576911b Ignore LaTeX output files in docs/language.
BUG=
R=eernst@google.com, zhivkag@google.com

Review-Url: https://codereview.chromium.org/2763393006 .
2017-03-24 15:45:15 +01:00
Peter von der Ahé
ec5d7cba1a Implement character offsets for fields and enum constants.
R=jensj@google.com

Review-Url: https://codereview.chromium.org/2771983004 .
2017-03-24 15:29:42 +01:00
Peter von der Ahé
0c17ebba9f Report errors on non-final fields in const classes.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2775633004 .
2017-03-24 15:10:31 +01:00
Peter von der Ahé
91e290b610 Allow identical as a compile-time constant.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2770243002 .
2017-03-24 14:42:59 +01:00
Peter von der Ahé
62b39e746a Report compile-time error on invalid constructors.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2777533002 .
2017-03-24 14:11:32 +01:00
Konstantin Shcheglov
9b6c63a39d Parse YieldStatement with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2769133004 .
2017-03-23 17:32:26 -07:00
Konstantin Shcheglov
0842fb4b3e Parse RedirectingConstructorInvocation with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2772773003 .
2017-03-23 16:53:34 -07:00
pq
bcdcc6edb3 Git ignore vscode project files.
Reviewed: https://codereview.chromium.org/2756463005/
Review-Url: https://codereview.chromium.org/2772953002 .
2017-03-23 15:26:06 -07:00
pq
6f846bcd53 <Widget> boilerplate for Flutter children: suggestions.
Cleanup (tracked in TODOs) and consolidation to follow.

R=brianwilkerson@google.com, danrubel@google.com

See: https://github.com/flutter/flutter-intellij/issues/832
Review-Url: https://codereview.chromium.org/2768273003 .
2017-03-23 15:20:42 -07:00
Bob Nystrom
c62ddf2d40 Update dartfmt to 1.0.0
R=kevmoo@google.com

Review-Url: https://codereview.chromium.org/2765093002 .
2017-03-23 14:19:52 -07:00
Jacob Richman
0fb7bc5bb8 Line numbers changed due to formatting
BUG=

Review-Url: https://codereview.chromium.org/2775613003 .
2017-03-23 14:02:25 -07:00
Leaf Petersen
dba842bcc8 Handle casts from Number to FutureOr<double>.
Fixes https://github.com/dart-lang/sdk/issues/29128 .

BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2772573003 .
2017-03-23 13:33:33 -07:00