Commit Graph

56224 Commits

Author SHA1 Message Date
William Hesse 2247843f48 Update checked-in SDKs to 2.0.0-dev.47.0
Update the README to say that linux and macos use the 64-bit SDK
and windows uses the 32-bit SDK.

Change-Id: Id98d6aa49ed0a486aa8553b4d08f76a2462fb6b7
Reviewed-on: https://dart-review.googlesource.com/50503
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2018-04-10 21:25:41 +00:00
Terry Lucas 34be5de0c7 Fixed _DomRect class to map to both ClientRect and DOMRect for browser backward compat.
R=sra@google.com,sigmund@google.com

Change-Id: I2f5ccae15bcd993ab1e15ab556a25d6e0cd1d450
Reviewed-on: https://dart-review.googlesource.com/50504
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2018-04-10 21:18:45 +00:00
danrubel 5c508ff785 Update more IdentifierContext type reference recovery
Change-Id: I7268bce4379ac4613ecd182c9d41022f2a08e7c4
Reviewed-on: https://dart-review.googlesource.com/50521
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-10 19:38:41 +00:00
Brian Wilkerson 8054721512 Move DeclaredVariables to a better location
Change-Id: I17190a8e888cc37cded141cbaf028691db061e49
Reviewed-on: https://dart-review.googlesource.com/50540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-10 19:25:11 +00:00
Alexander Thomas 3851591642 [infra] Keep comments intact when updating status files.
* Preserve empty lines in the file header.
* Add empty entry to the tool's newly created sections.
* Remove extra empty line at the end of the file.

Change-Id: I271583774d5f5497025a9d85bcadf8b0b9e39e81
Reviewed-on: https://dart-review.googlesource.com/37600
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-04-10 19:03:21 +00:00
Brian Wilkerson 7764e6962e Initial API to build analysis contexts (replaces ContextLocator.locateContexts)
Change-Id: If00ce6321efb6ff4da96e654cfe2a0a8501bed95
Reviewed-on: https://dart-review.googlesource.com/50323
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-10 15:48:10 +00:00
Lasse R.H. Nielsen 5ea271bb01 Clean up documentation of implicit new/const insertions tests.
Add Expect.allIdentical to complement Expect.allDistinct.

Change-Id: I65e4e0005f141434bd8fb47d9c60153f32b293aa
Reviewed-on: https://dart-review.googlesource.com/50421
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-04-10 14:49:41 +00:00
Erik Ernst cf93009caf Removed the magic const feature from implicit-creation.md
Here is a rendered version of the document which was
updated to match patch set 7:
https://gist.github.com/eernstg/cc2e6bc384fc722416a5fb58a1166034.

Change-Id: I2902fe4fcb86d01b4fe70ba1aab0d749f833ff39
Reviewed-on: https://dart-review.googlesource.com/49903
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-10 14:33:56 +00:00
Aske Simon Christensen bd39320b3b Recover from error on undefined continue label.
Closes https://github.com/dart-lang/sdk/issues/32800

Change-Id: Idbd11f1c17affc1e9a6dd7f4c6999464bac8982e
Reviewed-on: https://dart-review.googlesource.com/50220
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-10 14:33:11 +00:00
Lasse R.H. Nielsen 5d89a1ac32 Add tests for mixin application constructor forwarding.
Forwarding should work for constructors with optional parameters,
and for const constructors as long as the mixin doesn't declare any
instance variables.

Add tests for forwarding of constructors in mixin applications.

Bug: http://dartbug.com/31543, http://dartbug.com/32223
Change-Id: Iaf950f48703e14391050338f7ae2d80854ec8286
Reviewed-on: https://dart-review.googlesource.com/50460
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-04-10 14:27:30 +00:00
Jens Johansen e6962790a1 Use import URIs when invalidating files
Fixes https://github.com/flutter/flutter/issues/16368
Note that this is mostly a copy of
https://dart-review.googlesource.com/c/sdk/+/48180

Change-Id: Ibdf7719d8b362a4c179fd7a4a6ab5ae7028a5429
Reviewed-on: https://dart-review.googlesource.com/50420
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-10 13:52:42 +00:00
Johnni Winther 23c59bd819 Fix compare_failures
+ and --force flag to always analysis past results (slower)

Change-Id: I9df760b61cfb71ecdf9a4b69d256895812f2eff1
Reviewed-on: https://dart-review.googlesource.com/50500
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2018-04-10 13:38:41 +00:00
Aske Simon Christensen 290cc58e71 Use actual receiver when error-wrapping a null-aware property get.
Fixes the crash on conditional_property_access_test_{05,06}.dart
from https://github.com/dart-lang/sdk/issues/32800

Change-Id: Ic3928b345c235472d6632e8bc443f28d59b81f6b
Reviewed-on: https://dart-review.googlesource.com/49920
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-04-10 13:24:29 +00:00
Martin Kustermann 34763bc4c9 Reland "[VM] Introduction of type testing stubs - Part 1-4"
Relands 165c583d57

    [VM] Introduction of type testing stubs - Part 1

    This CL:

      * Adds a field to [RawAbstractType] which will always hold a pointer
        to the entrypoint of a type testing stub

      * Makes this new field be initialized to a default stub whenever a
        instances are created (e.g. via Type::New(), snapshot reader, ...)

      * Makes the clustered snapshotter write a reference to the
        corresponding [RawInstructions] object when writing the field and do
        the reverse when reading it.

      * Makes us call the type testing stub for performing assert-assignable
        checks.

    To reduce unnecessary loads on callsites, we store the entrypoint of the
    type testing stubs directly in the type objects.  This means that the
    caller of type testing stubs can simply branch there without populating
    a code object first.  This also means that the type testing stubs
    themselves have no access to a pool and we therefore also don't hold on
    to the [Code] object, only the [Instruction] object is necessary.

    The type testing stubs do not setup a frame themselves and also have no
    safepoint.  In the case when the type testing stubs could not determine
    a positive answer they will tail-call a general-purpose stub.

    The general-purpose stub sets up a stub frame, tries to consult a
    [SubtypeTestCache] and bails out to runtime if this was unsuccessful.

    This CL is just the the first, for ease of reviewing.  The actual
    type-specialized type testing stubs will be generated in later CLs.

    Reviewed-on: https://dart-review.googlesource.com/44787

Relands f226c22424

    [VM] Introduction of type testing stubs - Part 2

    This CL starts building type testing stubs specialzed for [Type] objects
    we test against.

    More specifically, it adds support for:

      * Handling obvious fast cases on the call sites (while still having a
        call to stub for negative case)

      * Handling type tests against type parameters, by loading the value
        of the type parameter on the call sites and invoking it's type testing stub.

      * Specialzed type testing stubs for instantiated types where we can
        do [CidRange]-based subtype-checks.

        ==> e.g. String/List<dynamic>

      * Specialzed type testing stubs for instantiated types where we can
        do [CidRange]-based subclass-checks for the class and
        [CidRange]-based subtype-checks for the type arguments.

        ==> e.g. Widget<State>, where we know [Widget] is only extended and not
                 implemented.

      * Specialzed type testing stubs for certain non-instantiated types where we
        can do [CidRange]-based subclass-checks for the class and
        [CidRange]-based subtype-checks for the instantiated type arguments and
        cid based comparisons for type parameters.  (Note that this fast-case migth
        result in some false-negatives!)

        ==> e.g. _HashMapEntry<K, V>, where we know [_HashMapEntry] is only
                 extended and not implemented.

       This optimizes cases where the caller uses `new HashMap<A, B>()` and only
       uses `A` and `B` as key/values (and not subclasses of it).  The false-negative
       can occur when subtypes of A or B are used.  In such cases we fall back to the
       [SubtypeTestCache]-based imlementation.

    Reviewed-on: https://dart-review.googlesource.com/44788

Relands 25f98bcc75

    [VM] Introduction of type testing stubs - Part 3

    The changes include:

      * Make AssertAssignableInstr no longer have a call-summary, which
        helps methods with several parameter checks by not having to
        re-load/re-initialize type arguments registers

      * Lazily create SubtypeTestCaches: We already go to runtime to warm up
        the caches, so we now also create the caches on the first runtime
        call and patch the pool entries.

      * No longer load the destination name into a register: We only need
        the name when we throw an exception, so it is not on the hot path.
        Instead we let the runtime look at the call site, decoding a pool
        index from the instructions stream.  The destination name will be
        available in the pool, at a consecutive index to the subtype cache.

      * Remove the fall-through to N=1 case for probing subtypeing tests,
        since those will always be handled by the optimized stubs.

      * Do not generate optimized stubs for FutureOr<T> (so far it just
        falled-through to TTS).  We can make optimzed version of that later,
        but it requires special subtyping rules.

      * Local code quality improvement in the type-testing-stubs: Avoid
        extra jump at last case of cid-class-range checks.

    There are still a number of optimization opportunities we can do in
    future changes.

    Reviewed-on: https://dart-review.googlesource.com/46984

Relands 2c52480ec8

    [VM] Introduction of type testing stubs - Part 4

    In order to avoid generating type testing stubs for too many types in
    the system - and thereby potentially cause an increase in code size -
    this change introduces a smarter way to decide for which types we should
    generate optimized type testing stubs.

    The precompiler creates a [TypeUsageInfo] which we use to collect
    information.  More specifically:

       a) We collect the destination types for all type checks we emit
          (we do this inside AssertAssignableInstr::EmitNativeCode).

          -> These are types we might want to generate optimized type testing
             stubs for.

       b) We collect type argument vectors used in instance creations (we do
          this inside AllocateObjectInstr::EmitNativeCode) and keep a set of
          of used type argument vectors for each class.

    After the precompiler has finished compiling normal code we scan the set
    of destination types collected in a) for uninstantiated types (or more
    specifically, type parameter types).

    We then propagate the type argument vectors used on object allocation sites,
    which were collected in b), in order to find out what kind of types are flowing
    into those type parameters.

    This allows us to extend the set of types which we test against, by
    adding the types that flow into type parameters.

    We use this final augmented set of destination types as a "filter" when
    making the decision whether to generate an optimized type testing stub
    for a given type.

    Reviewed-on: https://dart-review.googlesource.com/48640

Issue https://github.com/dart-lang/sdk/issues/32603

Change-Id: I6d33d4ca3d5187a1eb1664078c003061855f0160
Reviewed-on: https://dart-review.googlesource.com/50482
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-04-10 12:20:10 +00:00
Jens Johansen a86b864fa9 Handle updated .packages in incremental compiler
Change-Id: I6de6cb643b14b14ce54944f57b9e15f502750206
Reviewed-on: https://dart-review.googlesource.com/49901
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-04-10 10:57:31 +00:00
Johnni Winther f555ae505a Trust type annotations in strong mode
Change-Id: I59019ec56e432a71c52637307fa4dd346fa27c1f
Reviewed-on: https://dart-review.googlesource.com/50240
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-10 09:16:46 +00:00
Kevin Millikin 0a4a3bed68 When cloning YieldStatement, copy the flags
Cloning a YieldStatement should not lose the value of the flags.
Fixes https://github.com/dart-lang/sdk/issues/32466

Change-Id: I084a81882fdc404184c343cbf477ce8e9a1d521e
Reviewed-on: https://dart-review.googlesource.com/50400
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-04-10 08:47:40 +00:00
Johnni Winther 91bbc798fa Skip abstract forwarding stubs
Change-Id: If0c0967e55038d330fef48d97bc96a92b0f4b506
Reviewed-on: https://dart-review.googlesource.com/49860
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-10 07:48:39 +00:00
Natalie Weizenbaum 7689dc9e06 Bring in the latest pub_semver
Change-Id: Ibd772c70d596fdc32c6654a058bf44ef0ab787a0
Reviewed-on: https://dart-review.googlesource.com/49827
Commit-Queue: Natalie Weizenbaum <nweiz@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-04-10 01:41:09 +00:00
Sigmund Cherem f71d204185 Fix expected type in substByContext
Note: the crash in language_2.status was added as a result of
https://dart-review.googlesource.com/c/sdk/+/49835.
Change-Id: I0dbd69a7cf80c6c432938f9bfd9df60703d5b367
Reviewed-on: https://dart-review.googlesource.com/50361
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-10 00:05:01 +00:00
Dan Rubel 5e99872770 Improve missing/invalid type reference recovery
Change-Id: I52231fba7ebce51242393a0030325198bf51dfbf
Reviewed-on: https://dart-review.googlesource.com/50340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-09 22:53:28 +00:00
Stephen Adams 899dbe4dae Forward type arguments in one-shot interceptors.
The status change is unrelated.

TBR=sigmund@google.com

Change-Id: Ic611ec7e9fa6b8e5dae9de7fc106fd839dd35bb6
Reviewed-on: https://dart-review.googlesource.com/50322
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-09 22:29:15 +00:00
Harry Terkelsen 1fd3011f47 dart2js: Add more whole-program information to dump-info
Change-Id: I39c8778aae26ebb2b7d39db092e043d101bc63c5
Reviewed-on: https://dart-review.googlesource.com/50321
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Harry Terkelsen <het@google.com>
2018-04-09 21:40:47 +00:00
Alexander Thomas 5e23c2843d Revert "[infra] Temporarily disable Windows SDK builder on CQ"
This reverts commit 7594c1543f.

Reason for revert: https://crbug.com/830533 has been fixed and the
windows bots are back again.

Original change's description:
> [infra] Temporarily disable Windows SDK builder on CQ
> 
> TBR=whesse@google.com
> 
> Change-Id: I348d14b021fc7fc859dec39e88de4e3876385c7a
> Reviewed-on: https://dart-review.googlesource.com/50180
> Reviewed-by: Alexander Thomas <athom@google.com>

TBR=whesse@google.com,athom@google.com

Change-Id: I50c24d65a96f8f45b0ee2b821176a00c61998590
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/50241
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2018-04-09 20:58:17 +00:00
Konstantin Shcheglov 2471888d4a Serialize any MethodInvocation as possible const.
Bug: https://github.com/dart-lang/sdk/issues/32823
Change-Id: I0be8d25cf9d5ac16aacb693c4730ddaba3ccad5a
Reviewed-on: https://dart-review.googlesource.com/50160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-09 18:58:06 +00:00
Sigmund Cherem b430570364 dart2js: handle constant casts with type variable substitutions
Closes https://github.com/dart-lang/sdk/issues/32811

Change-Id: Ibf108405a3a36092a42902e5be806310a34c067c
Reviewed-on: https://dart-review.googlesource.com/49835
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-09 18:31:46 +00:00
Brian Wilkerson 3575b810b3 Only add const in a constant context (issue 32819)
Change-Id: Ia149d812d2540fa98d76765ffb8b54fe32ecf010
Reviewed-on: https://dart-review.googlesource.com/50120
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-09 18:11:36 +00:00
Sigmund Cherem 09f7d2aee5 dart2js: naive support for instantiations in constants - ignore the actual
instantiation

Change-Id: Ic214ac3688fe7639ce98daf0eb1ab7ba4705b81c
Reviewed-on: https://dart-review.googlesource.com/50023
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-04-09 18:09:16 +00:00
Stephen Adams 4dd5e6e6ad js_runtime: fix _JsonMap keys list type
TBR=sigmund@google.com

Change-Id: Iec7d7e5229cb96e739e3d3bde73f5ce3534c5827
Reviewed-on: https://dart-review.googlesource.com/50020
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-09 17:19:36 +00:00
Brian Wilkerson 71ffe976a9 Correctly handle constant fields when computing constness (take 2)
Change-Id: I03e78ff4a2ea18fa7362f159a07d6d035c59a4ae
Reviewed-on: https://dart-review.googlesource.com/50280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-09 16:02:26 +00:00
Erik Corry d58b0e2d44 [VM] Mark bigint test slow after small Smi change
R=kustermann@google.com

Change-Id: I553c364be1ce2a29306f44f3a641441cdcb911ca
Reviewed-on: https://dart-review.googlesource.com/50223
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-04-09 15:23:32 +00:00
Martin Kustermann 1e997ee6b7 Revert "Reland "[VM] Introduction of type testing stubs - Part 1-4""
This reverts commit 8054409a02.

Reason for revert: Potential cause of flakes, not entirely clear yet if it was caused by this CL.

Change-Id: Icb119a107f22245ba2f303c7f2ae11f061f605f5
Reviewed-on: https://dart-review.googlesource.com/50261
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-04-09 14:29:07 +00:00
Brian Wilkerson 00097adce0 Remove reference to deprecated setter
Change-Id: Ie775c23175363135f58ebc12d476db2640cf200b
Reviewed-on: https://dart-review.googlesource.com/50060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-09 13:54:06 +00:00
Alexander Thomas cb065a116f [infra] Update checked-in SDK version to 2.0.0-dev.46.0
Change-Id: Ib4e53bba660b01453506d493058f967d13dd259e
Reviewed-on: https://dart-review.googlesource.com/50222
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2018-04-09 12:52:47 +00:00
Erik Corry 0e9a77a360 [VM] Reduce Smi size to 32 bit on 64 bit platforms
This reduces small tagged integers on 64 bit platforms from 63 bits to
31 bits plus one tag bit.
This is a step on the way to compile-time-optional compressed pointers
on 64 bit platforms.  See more about this at go/dartvmlearnings
This causes a slowdown for some uses of integers that don't fit in 31
signed bits, but because both x64 and ARM64 have unboxed 64 bit
integers now the performance hit should not be too bad.

This reapplies the change reviewed at
https://dart-review.googlesource.com/c/sdk/+/46244

R=kustermann@google.com

Change-Id: I605c21506ec7d4c69fa7049bc419b3ee370685fc
Reviewed-on: https://dart-review.googlesource.com/50202
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-04-09 12:45:57 +00:00
Johnni Winther 34bfefd508 [gardening] Update status file
Apparently zero-width-characters_t01 may pass on mac as well.

Change-Id: Iaca83d774f0db384eddc18c13b65a28bbb4dfa68
Reviewed-on: https://dart-review.googlesource.com/50260
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-04-09 12:35:15 +00:00
Johnni Winther 969c0de335 Avoid crash on EOF error in file with Windows line encoding
+ start using spans from CFE (now that they're available)

Change-Id: I4fe82070d32948a64fb0fab527bd4cc857eebeb4
Reviewed-on: https://dart-review.googlesource.com/49841
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-09 12:16:20 +00:00
Martin Kustermann 8054409a02 Reland "[VM] Introduction of type testing stubs - Part 1-4"
Relands 165c583d57

    [VM] Introduction of type testing stubs - Part 1

    This CL:

      * Adds a field to [RawAbstractType] which will always hold a pointer
        to the entrypoint of a type testing stub

      * Makes this new field be initialized to a default stub whenever a
        instances are created (e.g. via Type::New(), snapshot reader, ...)

      * Makes the clustered snapshotter write a reference to the
        corresponding [RawInstructions] object when writing the field and do
        the reverse when reading it.

      * Makes us call the type testing stub for performing assert-assignable
        checks.

    To reduce unnecessary loads on callsites, we store the entrypoint of the
    type testing stubs directly in the type objects.  This means that the
    caller of type testing stubs can simply branch there without populating
    a code object first.  This also means that the type testing stubs
    themselves have no access to a pool and we therefore also don't hold on
    to the [Code] object, only the [Instruction] object is necessary.

    The type testing stubs do not setup a frame themselves and also have no
    safepoint.  In the case when the type testing stubs could not determine
    a positive answer they will tail-call a general-purpose stub.

    The general-purpose stub sets up a stub frame, tries to consult a
    [SubtypeTestCache] and bails out to runtime if this was unsuccessful.

    This CL is just the the first, for ease of reviewing.  The actual
    type-specialized type testing stubs will be generated in later CLs.

    Reviewed-on: https://dart-review.googlesource.com/44787

Relands f226c22424

    [VM] Introduction of type testing stubs - Part 2

    This CL starts building type testing stubs specialzed for [Type] objects
    we test against.

    More specifically, it adds support for:

      * Handling obvious fast cases on the call sites (while still having a
        call to stub for negative case)

      * Handling type tests against type parameters, by loading the value
        of the type parameter on the call sites and invoking it's type testing stub.

      * Specialzed type testing stubs for instantiated types where we can
        do [CidRange]-based subtype-checks.

        ==> e.g. String/List<dynamic>

      * Specialzed type testing stubs for instantiated types where we can
        do [CidRange]-based subclass-checks for the class and
        [CidRange]-based subtype-checks for the type arguments.

        ==> e.g. Widget<State>, where we know [Widget] is only extended and not
                 implemented.

      * Specialzed type testing stubs for certain non-instantiated types where we
        can do [CidRange]-based subclass-checks for the class and
        [CidRange]-based subtype-checks for the instantiated type arguments and
        cid based comparisons for type parameters.  (Note that this fast-case migth
        result in some false-negatives!)

        ==> e.g. _HashMapEntry<K, V>, where we know [_HashMapEntry] is only
                 extended and not implemented.

       This optimizes cases where the caller uses `new HashMap<A, B>()` and only
       uses `A` and `B` as key/values (and not subclasses of it).  The false-negative
       can occur when subtypes of A or B are used.  In such cases we fall back to the
       [SubtypeTestCache]-based imlementation.

    Reviewed-on: https://dart-review.googlesource.com/44788

Relands 25f98bcc75

    [VM] Introduction of type testing stubs - Part 3

    The changes include:

      * Make AssertAssignableInstr no longer have a call-summary, which
        helps methods with several parameter checks by not having to
        re-load/re-initialize type arguments registers

      * Lazily create SubtypeTestCaches: We already go to runtime to warm up
        the caches, so we now also create the caches on the first runtime
        call and patch the pool entries.

      * No longer load the destination name into a register: We only need
        the name when we throw an exception, so it is not on the hot path.
        Instead we let the runtime look at the call site, decoding a pool
        index from the instructions stream.  The destination name will be
        available in the pool, at a consecutive index to the subtype cache.

      * Remove the fall-through to N=1 case for probing subtypeing tests,
        since those will always be handled by the optimized stubs.

      * Do not generate optimized stubs for FutureOr<T> (so far it just
        falled-through to TTS).  We can make optimzed version of that later,
        but it requires special subtyping rules.

      * Local code quality improvement in the type-testing-stubs: Avoid
        extra jump at last case of cid-class-range checks.

    There are still a number of optimization opportunities we can do in
    future changes.

    Reviewed-on: https://dart-review.googlesource.com/46984

Relands 2c52480ec8

    [VM] Introduction of type testing stubs - Part 4

    In order to avoid generating type testing stubs for too many types in
    the system - and thereby potentially cause an increase in code size -
    this change introduces a smarter way to decide for which types we should
    generate optimized type testing stubs.

    The precompiler creates a [TypeUsageInfo] which we use to collect
    information.  More specifically:

       a) We collect the destination types for all type checks we emit
          (we do this inside AssertAssignableInstr::EmitNativeCode).

          -> These are types we might want to generate optimized type testing
             stubs for.

       b) We collect type argument vectors used in instance creations (we do
          this inside AllocateObjectInstr::EmitNativeCode) and keep a set of
          of used type argument vectors for each class.

    After the precompiler has finished compiling normal code we scan the set
    of destination types collected in a) for uninstantiated types (or more
    specifically, type parameter types).

    We then propagate the type argument vectors used on object allocation sites,
    which were collected in b), in order to find out what kind of types are flowing
    into those type parameters.

    This allows us to extend the set of types which we test against, by
    adding the types that flow into type parameters.

    We use this final augmented set of destination types as a "filter" when
    making the decision whether to generate an optimized type testing stub
    for a given type.

    Reviewed-on: https://dart-review.googlesource.com/48640

Issue https://github.com/dart-lang/sdk/issues/32603

Change-Id: I44a1d5d4b27454ae026aef2a301aada3dd399ea0
Reviewed-on: https://dart-review.googlesource.com/49861
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-09 11:25:36 +00:00
Martin Kustermann ef926f98f5 Update status file after 0fedb9b9d
Change-Id: I9045c9a3cabd5db0e1c88b731e036a1422d30333
Reviewed-on: https://dart-review.googlesource.com/50181
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-04-09 11:13:21 +00:00
Alexander Thomas 7594c1543f [infra] Temporarily disable Windows SDK builder on CQ
TBR=whesse@google.com

Change-Id: I348d14b021fc7fc859dec39e88de4e3876385c7a
Reviewed-on: https://dart-review.googlesource.com/50180
Reviewed-by: Alexander Thomas <athom@google.com>
2018-04-09 08:20:30 +00:00
Devon Carew 07a05906c5 Remove an unused flag from dartanalyzer.
Change-Id: I4250f4accd98fe83a81d9845f09653bf860024a7
Reviewed-on: https://dart-review.googlesource.com/49980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-07 02:51:14 +00:00
danrubel 8abbb2eb4b Remove unused SubStringScanner
Change-Id: I49502dcbf3d3520814730ca3bdbd7fb67f2e8751
Reviewed-on: https://dart-review.googlesource.com/50000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-07 00:10:43 +00:00
pq 516b59bd65 Bump linter to 0.1.47
* new `avoid_double_and_int_checks` lint
* fix to handle uninitialized vars in `prefer_const_declarations`
* fix for generic function type handling in `avoid_types_as_parameter_names`
* new `prefer_iterable_whereType` lint
* new `prefer_generic_function_type_aliases` lint
* Dart 2 compatibility fixes

Change-Id: Ie871c0dd20933d700ab8a77724b7a6d4ee044cdd
Reviewed-on: https://dart-review.googlesource.com/50022
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-06 23:20:10 +00:00
Sigmund Cherem 133cd9d182 Use JavaScriptFunction for _registerCustomElement
"=Object" was inacurate and contradicted the inferred type <Function> in strong mode.

Change-Id: Ibee4351357dde4aaacf95ff7265cd335fc5d06ea
Reviewed-on: https://dart-review.googlesource.com/49832
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-04-06 23:14:13 +00:00
Stephen Adams 6656233fcc Strong-mode fixes in js_runtime
Fixes errors in RegExp and String.fromCharCodes.

TBR=sigmund@google.com

Change-Id: I7f84d2b9ee2dfead6d0cf634e36c06b9071bf991
Reviewed-on: https://dart-review.googlesource.com/49981
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-04-06 21:44:32 +00:00
Johnni Winther 62670f05ad Update rti and deferred tests to run strong mode
Change-Id: I3b209f720c7f35f4dd977c2d2b373e45d063f29d
Reviewed-on: https://dart-review.googlesource.com/49502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-06 21:20:12 +00:00
Kevin Moore e17b36a4ff Fix references to operator [] and == in SDK doc comments
Change-Id: I6005b40207e312fdfdc8fb78fa5dab7abb0bf8c7
Reviewed-on: https://dart-review.googlesource.com/49961
Reviewed-by: Janice Collins <jcollins@google.com>
2018-04-06 21:01:22 +00:00
Dmitry Stefantsov 0fedb9b9d8 [fasta] Disable upwards new/const completion
Change-Id: If2c14bf402bbcbacbf4cf2da351eb7234e1e0944
Reviewed-on: https://dart-review.googlesource.com/49900
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-04-06 19:31:22 +00:00
Johnni Winther 3d8524be3f Propagate freeVariablesForRti through nested closures
Closes #32770

Change-Id: Id7a24d5a7ea98c786a27f2e952f6b37e8607778e
Reviewed-on: https://dart-review.googlesource.com/49960
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-04-06 19:22:02 +00:00
Devon Carew 70a61e7e6e more fixes to windows tests for path issues
Change-Id: Ic5e63be99cba833ee96f7b5c1c342b63095e0f47
Reviewed-on: https://dart-review.googlesource.com/49833
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-06 18:10:17 +00:00