Commit graph

55417 commits

Author SHA1 Message Date
Ryan Macnak c32e0e4bf3 [vm] Clear trailing bytes of objects that end up in snapshot images.
Previously, these bytes contained (parts of) the address of null, which is not deterministic.

Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: Id3eb16b32d15ff5e0648571a1168dc6f9e3fcbe5
Reviewed-on: https://dart-review.googlesource.com/51181
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-04-16 17:55:51 +00:00
Devon Carew 3a5fcf5a87 Upgrade the dep on package:isolate.
Change-Id: Ie9c52c6dd24672e2469787220505bd85a50ed5ff
Reviewed-on: https://dart-review.googlesource.com/51241
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-04-16 17:08:48 +00:00
Lasse R.H. Nielsen 973a1a0219 Remove uses of upper-case constants in remaining SDK code.
This includes Fasta, tools and observatory, so the checked-in SDK must
have the lower-case constants.

Change-Id: I8380ad041ad058f7d02ae19caccfecd434d13d75
Reviewed-on: https://dart-review.googlesource.com/50201
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-16 16:11:57 +00:00
Martin Kustermann b3595d59b3 [VM] Revert small change in FlowGraphCompiler::EmitTestAndCallCheckCid
This "innocent" change was included in the type testing Part 1-4 and is
reverted here.

Apparently this causes uncorrect behavior in 1.0 precompiler
configuration.

Change-Id: I93c70400f621aca7185a17edea00907f4624d703
Reviewed-on: https://dart-review.googlesource.com/51301
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-16 12:30:02 +00:00
Peter von der Ahé 0cbd4b520a Address review comments from change 51120
Change-Id: I017fae6b5bc2c9f8afacd08e9e4d6a1edff2d1db
Reviewed-on: https://dart-review.googlesource.com/51127
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-04-16 12:13:01 +00:00
Jenny Messerly 5dd283e783 fix #32270, DDC tests can now work with preview-dart-2
Also removes unsafe-force-compile for DDC's selfhost during snapshot
build, and fixes DDK's snapshot to train by selfhosting.

This does not enable preview-dart-2 for DDC/DDK's snapshots or on
the buildbots yet.

Change-Id: Id0b395eb67677d0e69dc5e827536a9039bc95816
Reviewed-on: https://dart-review.googlesource.com/51206
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-16 07:03:07 +00:00
Dan Rubel ce2b0db370 Improve fasta parser "assert" recovery
Change-Id: Idf5a9c7fd73a0a4b34ab26fdf1032a516750928d
Reviewed-on: https://dart-review.googlesource.com/51180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-15 21:52:22 +00:00
Vyacheslav Egorov f8f5365a94 [vm/compiler] Fix sorting of instructions stats.
If you are sorting array of T* with qsort
your comparator is getting T** values.

TBR=kustermann@google.com

Change-Id: I159b4ba5c7757c9f585de60165e0eb63576d873a
Reviewed-on: https://dart-review.googlesource.com/51260
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-15 12:54:25 +00:00
Vyacheslav Egorov 30655dcea0 [vm/aot] Treat Endian.host as a compile time constant.
VM only supports little-endinian targets at the moment so it makes sense
to default Endian.host to be equal to Endian.little when AOT compiling.

JIT (non app-jit configuration) does not have this problem because it can treat
static final fields as constants.

Bug: https://github.com/dart-lang/sdk/issues/32836
Change-Id: Id186c3d384cd06c304111cb5a5bfc7d8eda89166
Reviewed-on: https://dart-review.googlesource.com/50720
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-04-15 11:36:06 +00:00
Sigmund Cherem eeaea82b75 Update status on test that often times out
TBR

Change-Id: Ib694101b3795ddf74ef1c9a7943e5715cdd913e1
Reviewed-on: https://dart-review.googlesource.com/51205
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-13 22:35:01 +00:00
Brian Wilkerson 805c08d8bf Fix a run-time type issue when running in Dart 2 mode
Change-Id: Ic612510dbdc893c86a8b66afd12fe044cbf50f02
Reviewed-on: https://dart-review.googlesource.com/51204
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-13 22:17:51 +00:00
Johnni Winther b1bc4ed2b5 Handle as in nested const constructors
Change-Id: I8ee105594022b7c64a3f1dd0228501b06f48cebe
Reviewed-on: https://dart-review.googlesource.com/51126
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-13 22:02:35 +00:00
Sigmund Cherem 823dfda5a5 Delete serialization, except for equivalence and helpers used in other tests.
Move such helpers under the test folders.

Change-Id: Ic8718374741b1e3e46e63ae552fa57e49fc97bb2
Reviewed-on: https://dart-review.googlesource.com/51203
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-13 21:31:51 +00:00
Stephen Adams 7383cd46e0 Fix for issue 32872
Don't insert receiver-conditioning checks for JSArray.+

Change-Id: I77a300f3eecaec54f2f75f0d32c3d99db5eeb1ef
Reviewed-on: https://dart-review.googlesource.com/51202
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-13 21:28:51 +00:00
Brian Wilkerson 86ba29265a Clean up the use of deprecated API in the analyzer_plugin package
Change-Id: If63afeea8042814fd87a109aa40a6ed14ea7ee59
Reviewed-on: https://dart-review.googlesource.com/51102
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-13 18:32:19 +00:00
Johnni Winther fbb60b786f Add generic bounds test to function_type_variable_test
Change-Id: I7c4daa99fa6c9ec8b20b413023e75a5a6232235a
Reviewed-on: https://dart-review.googlesource.com/51123
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-04-13 18:20:59 +00:00
Ryan Macnak fd5f998796 [vm] Delta-encode offsets into ROData.
Objects are added to the read-only image as the cluster is writing, so their offsets are always monotonically increasing.

flutter_gallery:
Isolate(CodeSize): 2288788 -> 2135954 (-6.7%)
Total(CodeSize): 11526463 -> 11372810 (-1.3%)

Change-Id: I2097cb95cb52854ef38c0dcf2678d41afa684934
Reviewed-on: https://dart-review.googlesource.com/51045
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-13 18:05:29 +00:00
Konstantin Shcheglov 6fe7a86e7f Replace SourceFactory.resolveUri() with resolveRelativeUri() in resynthesizer.
This makes Flutter repository analysis another 10% faster.

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

Before: 65.6 66.0 67.2 67.1
After:  60.7 60.3 59.7 61.1
Change-Id: Ie0282f9480c2553b549f9636edbab8a59df32e3f
Reviewed-on: https://dart-review.googlesource.com/51160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-13 17:55:05 +00:00
Aske Simon Christensen 2fb94418cd Mark mirrors test crashing.
Bug: https://github.com/dart-lang/sdk/issues/32879
Change-Id: I66633e44d1a8a46aa54b6309b94603887fdfb16e
Reviewed-on: https://dart-review.googlesource.com/51130
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-04-13 16:55:00 +00:00
Leaf Petersen c2b338f1b7 Remove fuzzy arrow support from analyzer
Fixes #31637

Change-Id: I87767b92814455187ea71cc4caca786043dbbe3d
Reviewed-on: https://dart-review.googlesource.com/51100
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-04-13 16:47:16 +00:00
Konstantin Shcheglov 9976cddcd7 Shared cache of FileState contents.
This makes Flutter repo analysis about 12% faster.

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

Base: 76.2 74.9 75.9
After: 65.6 66.0 66.6 67.1
Change-Id: I5afffdae15eacf2c09c4ede40d7312c8827bae0c
Reviewed-on: https://dart-review.googlesource.com/51061
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-13 16:43:36 +00:00
Martin Kustermann b52931ff30 Revert "[vm/kernel] Fix non-canoncialized type arguments in partial instantiation."
This reverts commit bd12c869ae.

Reason for revert: Made many dartkp builders result in crashes.

Change-Id: I908f3929bf3a0227fcc3979b8ba134b1904c8e1c
Reviewed-on: https://dart-review.googlesource.com/51140
Reviewed-by: Régis Crelier <regis@google.com>
2018-04-13 16:39:20 +00:00
Brian Wilkerson c214c43758 Make LineInfo a public class
Change-Id: I1bc7f5302797374609752ea5293b96c30719b41f
Reviewed-on: https://dart-review.googlesource.com/51101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-13 16:23:47 +00:00
Samir Jindel bd12c869ae [vm/kernel] Fix non-canoncialized type arguments in partial instantiation.
Also lay the foundation for partial instantiation of regular closures.

Change-Id: If1c0afd9291d2f9202d8287ebc3ec563679eb06f
Reviewed-on: https://dart-review.googlesource.com/50182
Reviewed-by: Régis Crelier <regis@google.com>
2018-04-13 13:24:17 +00:00
Aske Simon Christensen 51a2f96a71 Always call writeAnnotationList to write annotations.
This fixes an issue where an (illegal) annotation contained a
variable declaration, but the variable indexer was not set up.

Closes https://github.com/dart-lang/sdk/issues/32800

Change-Id: I50e828256e1ec0d14004aa38eaab2dce93ca7112
Reviewed-on: https://dart-review.googlesource.com/50942
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-04-13 12:41:17 +00:00
Peter von der Ahé 974a8ee21d Fix crash in named function expression
Fixes https://github.com/dart-lang/sdk/issues/32694

Change-Id: Idfc2dbe11e44d6d927924a6fc54cf31cee66a6ae
Reviewed-on: https://dart-review.googlesource.com/51120
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-04-13 12:02:47 +00:00
Peter von der Ahé 988de9c925 Thread forest object through calls
Change-Id: I4365fca44761c27609c28ac8c36b031e06caf0de
Reviewed-on: https://dart-review.googlesource.com/51124
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-04-13 11:36:16 +00:00
Martin Kustermann 51f9d243e7 [VM] Mark type as finalized before calling the Canonicalize() method
Change-Id: I08d8378e952a3437b12924269842cf09a5cd4f05
Reviewed-on: https://dart-review.googlesource.com/51125
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-13 10:09:03 +00:00
Kevin Millikin a8578eaf69 Clean up some imports in Fasta type inference
It looks like we are importing messages.dart twice which should be
unnecessary.

Change-Id: If2d752920fb1ef70d1fd2db02c7915189b840a91
Reviewed-on: https://dart-review.googlesource.com/51122
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-04-13 09:49:26 +00:00
Dan Rubel e9616da13e Cleanup TypeInfo
This CL cleans up the TypeInfo library including:
* moving ComplexTypeInfo to type_info_impl.dart
* splitting up and enhancing the tests
* adding a new ensureTypeOrVoid method for use in a subsequent CL

Change-Id: I2d13f74152f8c4eb2e8b3ee504f108225cfa60eb
Reviewed-on: https://dart-review.googlesource.com/51080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-13 09:25:47 +00:00
Martin Kustermann 3b414a277c 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

Closes https://github.com/dart-lang/sdk/issues/32852

Change-Id: Ib79fbe7f043aa88f32bddad62d7656c638914b44
Reviewed-on: https://dart-review.googlesource.com/50944
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-04-13 09:06:56 +00:00
Johnni Winther c5f69dff2d Include call on Closure in inference
Closes #32835

Change-Id: Ief2096544e01f74e6cc52abd6131a24a10ffe75f
Reviewed-on: https://dart-review.googlesource.com/50680
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-13 08:46:26 +00:00
Johnni Winther 826928e2ab Use _trust to test inference of --omit-implicit-checks
+ update the comment in ParameterTypeInformation.potentiallyNarrowType to
match the current expectations.

Change-Id: Ic98025f8314e8ac9eee6225c8c77e407a9fdabb9
Reviewed-on: https://dart-review.googlesource.com/50481
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-13 08:42:56 +00:00
Erik Ernst 6802746ad7 Fixed a couple of typos in subtyping.md
Sergey pointed out a couple of name clashes, and I renamed some indices
in order to avoid them. At the same time, I fixed a couple of typos
and adjusted the whitespace to be more similar to other *.md files.

Finally, I adjusted the wording involving 'algorithmic' and 'syntax
directed' in order to make it explicit that they stand for the same
thing.

Change-Id: Ic03b907f4bdc722d9ba218d38077addf9cc4a777
Reviewed-on: https://dart-review.googlesource.com/50981
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-13 05:59:02 +00:00
Jenny Messerly 782cfe04d1 fix #32756, DDC dynamic calls to generics will work with emit-metadata
Also fixes DDK to disable metadata by default.

Change-Id: Ic5fd637c1048cb5ccfd035b8e0dd07b0985c1364
Reviewed-on: https://dart-review.googlesource.com/51040
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-04-13 03:01:06 +00:00
Jenny Messerly 8613938e33 fix DDK to track mock setters correctly.
Also fix nosuchmethod_forwarding_arguments_test to work in dart4web compilers

Change-Id: If19bf74561c716845e24862c2400e0ab5cfc135c
Reviewed-on: https://dart-review.googlesource.com/48891
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-13 00:27:26 +00:00
Ian McKellar 92f1d0fab4 [gn] Allow single or double quotes in .config
Change-Id: I1b80d14d2f89c8f652005313860e9003f6856a9a
Reviewed-on: https://dart-review.googlesource.com/51001
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-12 23:07:56 +00:00
Brian Wilkerson e2ee654cd1 Make a method in MempryResourceProvider private
Change-Id: Iae42ab38e3ae379fa015fbbd5c0341f6539996db
Reviewed-on: https://dart-review.googlesource.com/51060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-12 22:04:16 +00:00
Stephen Adams b0fafbd1f4 Clean up js_runtime parse/tryParse methods
Change-Id: Ibbb79650053fb6777e1694f2540f21bf699d6b52
Reviewed-on: https://dart-review.googlesource.com/51044
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-04-12 21:23:56 +00:00
Brian Wilkerson 5e1cb4d41b Make SourceRange part of analyzers public API
Change-Id: I06376814ab2992623fed6d3121baa861522186c9
Reviewed-on: https://dart-review.googlesource.com/51046
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-12 21:13:16 +00:00
Devon Carew 1ab4cee181 Add a benchmark for running flutter analyze --flutter-repo against flutter head.
Change-Id: I0e4cb66808126b37b43edede43ec7fdd2bbec45a
Reviewed-on: https://dart-review.googlesource.com/51042
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-04-12 21:01:36 +00:00
Sigmund Cherem ff24a5ee6b fasta: make strong-mode inference aware of the type of LoadLibrary and CheckLibraryIsLoaded
Closes https://github.com/dart-lang/sdk/issues/32841

Change-Id: I270b11b33460b66cd400fa8145ce5e968096a2bf
Reviewed-on: https://dart-review.googlesource.com/50622
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-12 19:44:51 +00:00
Konstantin Shcheglov 6d7df88fa3 Delay computing file name sets until they are requested.
This makes Flutter repo analysis about 1 second faster.

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

Before: 74.8 74.8 73.3 72.7
After:  72.3 72.2 72.2 72.6
Change-Id: Iedc6a3d25a4de051b9207fbb6e549e7f3575a75a
Reviewed-on: https://dart-review.googlesource.com/51020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-12 19:36:09 +00:00
Johnni Winther b7cc1e7ce7 Fix stack overflow in RTI computation
Closes #32853

Change-Id: Ic759780799830dde655fafc7839c7d5387eb75d6
Reviewed-on: https://dart-review.googlesource.com/50943
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-12 17:45:39 +00:00
Ryan Macnak 6db4ea4ca5 [vm] Use unsigned varints when possible in the clustered snapshot.
- References
 - ROData offsets
 - Cluster sizes
 - Variable-length object lengths

flutter_gallery:
Isolate(CodeSize): 2384368 -> 2302404 (-3.4%)
Total(CodeSize): 11651807 -> 11569439 (-0.7%)

Change-Id: I59ea4d4a48fcbecf5236d3895b495c88ed548ec3
Reviewed-on: https://dart-review.googlesource.com/50841
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-12 17:37:39 +00:00
Alexander Aprelev f76dad0adc [frontend-server] Report error count on compile and recompile.
This allows frontend-server users(flutter) to do quick check whether frontend compilation reported errors as it produced output kernel file.

Change-Id: I6e4da8fac33104968eb7720200a1b7153ec8f3de
Reviewed-on: https://dart-review.googlesource.com/51000
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-04-12 16:54:19 +00:00
Alexander Markov 17fc446579 [vm/kernel/aot] Fix handling of calls via fields/getters in TFA
Bug: https://github.com/flutter/flutter/issues/16182
Change-Id: Ib2021212fd2dde8b549ca5db9b23287276dc33c9
Reviewed-on: https://dart-review.googlesource.com/50840
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-12 16:48:39 +00:00
Brian Wilkerson 16a4ed7dc4 Remove an unused subclass of LineInfo
Change-Id: I9503b52de9ed43c94432dd9c6b36719c4192d610
Reviewed-on: https://dart-review.googlesource.com/50960
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-12 16:26:59 +00:00
Ben Konyi c7e4a7d333 [ VM / CFE ] Added override to allowPlatformPrivateLibraryAccess in VmTarget for tests which need to import dart:_internal.
Change-Id: I7421c43b6949092c16af59df449a7c63cfa954c2
Reviewed-on: https://dart-review.googlesource.com/49623
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-04-12 15:39:39 +00:00
Peter von der Ahé 1e312819ca Ensure errors guard erroneous expressions.
This changes wrapInCompileTimeError so we are certain that
compile-time errors are reported before the erroneous nodes.

We want to preserve erroneous nodes as, long term, this should help
with code completion.

Also introduce a located version as my next CL I'll have slightly
more accurate locations.

Change-Id: Id83d4b7a7d4fe260916816d72fac331251bad948
Reviewed-on: https://dart-review.googlesource.com/50422
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-04-12 14:51:19 +00:00