Commit graph

16192 commits

Author SHA1 Message Date
Emily Fortuna dc99692b41 Add nonboxed closure class fields.
BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2978263003 .
2017-07-19 15:30:07 -07:00
Konstantin Shcheglov 607445ae9b Delay finishing dart:core and dart:async libraries until after TypeProvider is set for the context.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2986493002 .
2017-07-19 14:55:49 -07:00
pq 70869b61f4 Update meta version pre-publish.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2981313002 .
2017-07-19 14:30:47 -07:00
Vijay Menon 87ee6cc0d6 Polyfill only once
Avoid dcall on polyfill.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2983903002 .
2017-07-19 13:42:23 -07:00
Vijay Menon 99e672d1cb Registration-based approach to cross frame support.
This approach installs all Dart extension types onto a window whenever
that window is accessed.

See #28326

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2980853002 .
2017-07-19 12:53:43 -07:00
Konstantin Shcheglov 94815c7bdb Include default values for default field formal parameters into text dump.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2981303002 .
2017-07-19 12:42:14 -07:00
Konstantin Shcheglov 3a4c33cc93 Resynthesize binary, prefix, and conditional expressions from Kernel.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2979303002 .
2017-07-19 12:36:49 -07:00
pq d5539d7d32 Update meta SDK constraint to be 2.0.0 dev friendly.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2983853003 .
2017-07-19 12:31:08 -07:00
Konstantin Shcheglov f04aa833c1 Parenthesize expressions as needed in elements text dump.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2985503002 .
2017-07-19 12:29:38 -07:00
Sigmund Cherem 84828cff89 Random improvements in error reporting.
R=ahe@google.com

This mainly addresses comments and suggestions from
https://codereview.chromium.org/2979623002/
Review-Url: https://codereview.chromium.org/2980273002 .
2017-07-19 10:45:31 -07:00
Stephen Adams a433bfd3b3 Default value constants are created only call uses them
Currently this fails with:

Unhandled exception:
Expect.fail('Instantiated types mismatch:
 Unfound:
  _Marker')

The generated code also contains the class and the (unused) constant.

BUG=
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2980973003 .
2017-07-19 10:35:33 -07:00
Konstantin Shcheglov a295f782c0 Include TypeEnvironment into KernelResult.
We need it to use kernel.Expression.getStaticType().

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

Review-Url: https://codereview.chromium.org/2978333002 .
2017-07-19 09:40:33 -07:00
Konstantin Shcheglov bdd69ccd6c Remove UriReferencedElement with its uri/uriOffset/uriEnd properties.
The 'Move File' refactoring does not work, so I comment out most
of its code.

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

Review-Url: https://codereview.chromium.org/2982993003 .
2017-07-19 09:31:03 -07:00
Vijay Menon 12e32e230d Add hook to register global object
DDC will use this in a later CL.

R=alanknight@google.com, sra@google.com

Stephen: I assume this will get compiled out be dart2js.
Review-Url: https://codereview.chromium.org/2983813002 .
2017-07-19 05:46:07 -07:00
Johnni Winther 27a4cbeef9 Implement optimized mixin application in dart2js
This prepares for equivalence testing of shared mixins.

Review-Url: https://codereview.chromium.org/2983013002 .
2017-07-19 13:13:49 +02:00
Sigmund Cherem 2628d75c4b Fix bots, address duplicate error reporting later.
My CL broke dartk/vm tests because I stopped reporting some errors accidentaly.
I thought I was duplicating all error messages, but turns out that recoverable
errors were only reported in the line fixed here.

This reverts to the old behavior so we can address the reporting issues
separately. Added details to: https://github.com/dart-lang/sdk/issues/30194

BUG=

Review-Url: https://codereview.chromium.org/2977423002 .
2017-07-18 19:42:28 -07:00
Konstantin Shcheglov 90121b528a Remove the 'Move File' refactoring.
It has been broken since we switched to Analysis Driver.
Given that IDEA does not use it, there is little incentive to fix it.

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

Review-Url: https://codereview.chromium.org/2983783003 .
2017-07-18 17:59:20 -07:00
Sigmund Cherem 1aa139bc94 Unifying compiler context
Changes in this CL:
 - Updated CompilerContext:
    - it now contains a ProcessedOptions object

    - it no longer depends on CompilerCommandLine/CommandLine

    - it delegates to ProcessedOptions.report so all error reporting
      goes to one single place.

    - use "withContext" term instead of "withGlobalOptions" to be
      more clear about the intent

 - Changes in public API
    - added more options that correspond to flags in command-line
      fasta tools

    - default onError is different: we now use the
      command_line_reporting report, which prints and throws
      on fatal messages, but doesn't throw eagerly on all messages
      as before.

    - introduced "printMessages" option: make it easy to have
      both onError + command_line_reporting  (kernel-service.dart
      is the main use case at this time, other ideas welcome!)

    - renamed CompilationError to CompilationMessage

 - Other changes

    - set exit code is done on report, not on format
    - fixed corner cases not covered in previous CL
        - error reporting with missing-main needs to happen with
          a context
        - missing error cases when inferring .packages and input
          URIs are not file:* URIs

Ideas for follow up after this CL:
 - combine ProcessedOptions and CompilerContext into a single class
   (or extend one from the other)
 - switch onError to a stream

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2982093003 .
2017-07-18 17:02:59 -07:00
Konstantin Shcheglov 749b61f8ec Resynthesize List/Map literals from Kernel.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2984583002 .
2017-07-18 16:39:16 -07:00
Bob Nystrom 1d8c3af663 Delete old tests that aren't used and/or useful any more.
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2976313002 .
2017-07-18 14:12:57 -07:00
Vijay Menon 7365a24d98 Fix DDC status
TBR=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2981213002 .
2017-07-18 13:59:57 -07:00
Konstantin Shcheglov 9d5a249ed3 Resynthesize expressions for Kernel's StaticGet and PropertyGet.
Note, that we don't restore the original AST for StaticGet(s).
The original AST is not available in Kernel.
Instead we generate simple identifiers with correct elements.
It should be enough to compute constant values, although some clients
might have to adapt to the change.

R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2983773002 .
2017-07-18 13:09:16 -07:00
Vijay Menon ab39958ac5 Dummy DDC implementation of MirrorSystem
It's a bit absurd that a bunch of tests are passing with this.

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2978223002 .
2017-07-18 13:00:23 -07:00
Peter von der Ahé 4565719783 Remove number from operator mismatch message.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2978903002 .
2017-07-18 14:43:11 +02:00
Peter von der Ahé 3709ff5150 Add closeBraceTokenFor and use it instead of BeginToken.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2978073002 .
2017-07-18 13:57:10 +02:00
Zhivka Gucevska cbafc38513 Remove unused private methods in interpreter
BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2978193002 .
2017-07-18 13:48:09 +02:00
Zhivka Gucevska d62ff42f0e Add support for binding 'this'
BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2978893002 .
2017-07-18 13:18:54 +02:00
Zhivka Gucevska 1288ece5c8 Introduce statement continuations following the specification
The next statement to be executed is captured by a statement
continuation.

BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2975173002 .
2017-07-18 13:03:39 +02:00
Peter von der Ahé 3216bda008 Move parser helper classes to own files and clean them up.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2978063002 .
2017-07-18 13:02:41 +02:00
Peter von der Ahé c348f019ec Rename FunctionDeclaration to LocalFunctionDeclaration.
R=danrubel@google.com, johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2982033002 .
2017-07-18 12:35:41 +02:00
Johnni Winther c4c09b91bd Use entities in constant_emitter
R=sra@google.com

Review-Url: https://codereview.chromium.org/2981113002 .
2017-07-18 10:01:32 +02:00
Konstantin Shcheglov e77482de7e Resynthesize literal expressions from Kernel.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2978113002 .
2017-07-17 16:58:22 -07:00
Konstantin Shcheglov 32dd753aab Resynthesize class fields and accessors from Kernel.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2977263002 .
2017-07-17 16:43:20 -07:00
Konstantin Shcheglov 58b3421f5c Issue 30179. Infer return type of static setters to 'void'.
R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG= https://github.com/dart-lang/sdk/issues/30179

Review-Url: https://codereview.chromium.org/2977303002 .
2017-07-17 16:24:21 -07:00
Jennifer Messerly 34361bb02a fix #30138, reland with windows fix
Revert "Revert "fix #30138, synethic nodes causing crash generating source maps""

This reverts commit b7e3d9185d.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2977183002 .
2017-07-17 15:58:24 -07:00
Paul Berry 554c908082 Mark ast_builder_test as slow.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2978133002 .
2017-07-17 15:41:52 -07:00
Jennifer Messerly 87c0b757cb fix #27320, better DDC temp generation
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2980113002 .
2017-07-17 14:33:30 -07:00
Sigmund Cherem 45d2358fee Fix analyzer test after making CompilerContext mandatory
(Note: the use of "CompilerCommandLine" will go away in another CL this week)

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

Review-Url: https://codereview.chromium.org/2983703002 .
2017-07-17 14:07:49 -07:00
Sigmund Cherem 8ecb50d0de Throw if there is no compiler context available
BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2980033004 .
2017-07-17 13:16:18 -07:00
Vijay Menon 8913dd97df Update ddc dart:html
This is just a straight copy of the dart2js version to pick up sra's range fix.

TBR=sra@google.com,alanknight@google.com

Review-Url: https://codereview.chromium.org/2983693002 .
2017-07-17 12:14:30 -07:00
Vyacheslav Egorov c6815e8522 Reapply 0489249d29 with a fix for front_end tests.
Proper sequencing of _asyncStackTraceHelper in Kernel

This helper function was being called before its argument was
initialized so it was passing null.  Instead, it should be called
after its argument is initialized.

Because the initialization happens in Kernel code, it is simplest to
insert the call explicitly in Kernel code as well as part of the async
transformation.  This has the consequence that we now call the helper
function even when the flag causal_async_stacks is false.

Fixes issue #29771.
Fixes issue #30178
Fixes issue #30058

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

Review-Url: https://codereview.chromium.org/2936793003 .
Review-Url: https://codereview.chromium.org/2982943002 .
2017-07-17 20:56:28 +02:00
Konstantin Shcheglov 0c7e36bbfa Resynthesize top-level functions from Kernel.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2978093002 .
2017-07-17 10:16:41 -07:00
Konstantin Shcheglov ea40294eb3 Resynthesize parameters from Kernel.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2979133002 .
2017-07-17 10:11:53 -07:00
Devon Carew 8b7e3ef7e4 add env var info to the diagnostics page
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2981123002 .
2017-07-17 09:22:23 -07:00
Konstantin Shcheglov 892d7caab3 Resynthesize methods from Kernel.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2976263002 .
2017-07-17 08:37:32 -07:00
Peter von der Ahé efccdf7b1b Update expectations.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2976283002 .
2017-07-17 14:00:17 +02:00
Peter von der Ahé c50abfb1c4 Revert unrelated expectation changes.
This reverts a small fraction of ebb3dea075.

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

Review-Url: https://codereview.chromium.org/2981873002 .
2017-07-17 12:11:05 +02:00
Johnni Winther 94405484b4 Use entities in most of MirrorsData (part 2)
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2980953002 .
2017-07-17 11:29:31 +02:00
Johnni Winther 76fe8099d6 Use more entities in InferrerEngineImpl
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2983553002 .
2017-07-17 09:59:31 +02:00
Johnni Winther d8fcadbce9 Use entities in the InferrerEngine interface
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2977963002 .
2017-07-17 09:53:40 +02:00