Commit Graph

1240 Commits

Author SHA1 Message Date
Dmitry Stefantsov 6b8826f336 [kernel] Rename failure classes for TextSerializationVerifier
Change-Id: I51240e069a1a518fe35d25d2a44e8d7a84343946
Reviewed-on: https://dart-review.googlesource.com/c/88562
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-01-08 10:31:42 +00:00
Dmitry Stefantsov c76c5a023d [kernel] Rename 'errors' to 'failures' in TextSerializationVerifier
Change-Id: I9886e1c7ba4fbacff18f79a627f8e75b50c960c7
Reviewed-on: https://dart-review.googlesource.com/c/88561
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-01-08 10:31:42 +00:00
Dmitry Stefantsov cebd469ecd [kernel] Move RoundTripVerifier to pkg/kernel/lib/text and rename it
Change-Id: Icb61feab76be161e99b8c2fd316e41271470182a
Reviewed-on: https://dart-review.googlesource.com/c/88560
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-01-08 10:31:42 +00:00
Kevin Millikin a2844bdfd4 [Kernel] Add serializers for public names
This will enable serialization of expressions blocked on names.
Supporting private names requires a map from from serialized library
ID to library.  More generally, we need to support something like the
dill file's canonical names.

Change-Id: I7d470e6a49b167f7755d130ea6c3e543e188da65
Reviewed-on: https://dart-review.googlesource.com/c/88703
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-01-08 10:28:42 +00:00
Dmitry Stefantsov 5e609d7946 [kernel] Implement serialization round-trip check for dart types
Change-Id: Ie97439e6f822eb1e94c17cc4a5f3c04f1f58a4bc
Reviewed-on: https://dart-review.googlesource.com/c/88444
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-01-04 16:05:26 +00:00
Dmitry Stefantsov 39539773bb [kernel] Implement serialization round-trip check for expressions
Change-Id: Ibf3766f5325a9bf0b1016232319e0b308eca188c
Reviewed-on: https://dart-review.googlesource.com/c/88442
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-01-04 16:05:26 +00:00
Dmitry Stefantsov 3b728c0a04 [kernel] Wire round-trip verification down to expressions and types
Change-Id: Iab7a41fced28c58ea1280b5a8960d3440bc29e23
Reviewed-on: https://dart-review.googlesource.com/c/88441
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-01-04 16:05:26 +00:00
Dmitry Stefantsov 1cbae9fe48 [kernel] Start implementing verifier for serialization round trips
Change-Id: I907e92cf7b7f791a4bc64cac6739489d38d2c224
Reviewed-on: https://dart-review.googlesource.com/c/88322
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-01-04 16:05:26 +00:00
Jens Johansen d53f02aa8a Remove writeOptionalReference
References can be null --- it's written as the byte [0].
Thus in the null case it would before be [0] and now be [0].
In the non-null case it would before be [1, xyz] (1 for Tag.Something
and xyz for the actual, now positive, uint30). Now it would be [xyz].

Change-Id: Ibc08d3afb7275b0429a4d6c5e667fbd381121489
Reviewed-on: https://dart-review.googlesource.com/c/85394
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-01-04 13:31:03 +00:00
Jens Johansen c3b0ebd391 dill serialization: Specialize some writeNodes
Golem says:

x64
AstToBinaryP90 (Intel Core i5)	-1.995% (0.0 noise)
AstToBinaryP90 (Intel Xeon)	-4.005% (0.1 noise)
AstToBinaryP50 (Intel Core i5)	-2.209% (0.2 noise)
AstToBinary (Intel Core i5)	-2.551% (0.3 noise)
AstToBinaryP50 (Intel Xeon)	-3.982% (0.4 noise)
AstToBinary (Intel Xeon)	-4.184% (0.4 noise)


ia32
AstToBinaryP90 (Intel Core i5)	-2.417% (0.2 noise)
AstToBinaryP50 (Intel Core i5)	-2.445% (0.2 noise)
AstToBinary (Intel Core i5)	-2.491% (0.2 noise)
AstToBinary (Intel Xeon)	-2.666% (0.2 noise)
AstToBinaryP90 (Intel Xeon)	-2.611% (0.2 noise)
AstToBinaryP50 (Intel Xeon)	-2.690% (0.2 noise)


Change-Id: I5e864fb9a8cf3aece1c4ad279cb5a1192dae4a07
Reviewed-on: https://dart-review.googlesource.com/c/85364
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-01-04 10:12:28 +00:00
Jens Johansen 6c909a0efa Be explicit about whether a reference is allowed to be null or not
Before this change we allowed to serialize some references as null,
and would only complain when trying to read the dill back in.
This CL changes that so it complains up front.

It is unknown if any of this would ever occur in practise.

Change-Id: Id5e1af89abfb88a2d4249bd439b53b062d7aeffa
Reviewed-on: https://dart-review.googlesource.com/c/85392
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-01-04 08:39:36 +00:00
Aske Simon Christensen 8170d27b99 Flag on target to indicate set literal support
Change-Id: Ide5f2c32a3f1a6709142f1144ebff12fd62de141
Reviewed-on: https://dart-review.googlesource.com/c/88331
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-01-03 18:35:35 +00:00
Kevin Millikin 9f866c8696 [Kernel] Do not serialize list lengths
The length is redundant if the list is delimited.  Serializing the
length had the slight advantage of preallocating a list of the correct
size and the disadvantages of being harder to maintain by hand and
ugly to read.

Instead, delimit lists.  The empty list is naturally ().

Change-Id: I17c14f4e0ca4934cfd3dcdf2a0047f87df80bb79
Reviewed-on: https://dart-review.googlesource.com/c/88320
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-01-03 10:16:14 +00:00
Kevin Millikin 66fa918fd3 [Kernel] Add text serializers for Let expressions
Serializing Let requires us to serialize variable declarations which are
complicated.  They require us to support optional values because they
have an optional initializer.  This is done by using a _ for none.

Having support for Let will allow us to support variable get and set.

Change-Id: I207183730389de70409ae6ca5017510420e36830
Reviewed-on: https://dart-review.googlesource.com/c/88182
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-01-02 15:49:49 +00:00
Kevin Millikin 01b23e23a4 [Kernel] Add text serializers for lists, sets, and maps
Use separate tags for the non-const and const versions of these
literals, just like the binary serializer does.

Change-Id: I3fabf02ce758a46ce55ff258723dd3ae11e6d497
Reviewed-on: https://dart-review.googlesource.com/c/88181
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-01-02 12:12:49 +00:00
Kevin Millikin 94e77946a0 [Kernel] Add text serializers for some DartTypes
Add serializers for some simple DartTypes and some expressions that
were blocked on being able to serializer DartTypes.

Change-Id: Ib16aa59e5782bddc820ea88e0885f258fc17bbd0
Reviewed-on: https://dart-review.googlesource.com/c/88180
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-01-02 10:45:35 +00:00
Kevin Millikin da0216e92d [Kernel] add serializers for more simple expressions
Support the rest of the expressions that do not require serializing
DartType, Name, Arguments, or references to other parts of the AST.

Change-Id: Icef3c2824354add1b13fa8c34fa7ff7c48bd2148
Reviewed-on: https://dart-review.googlesource.com/c/87963
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-21 14:00:10 +00:00
Kevin Millikin aeb873187d [Kernel] Add text serializers for lists
Add a serializer for lists that writes the length and then the elements.
Use it for serializing/deserializing StringConcatenation.

Change-Id: I61eb0ec319b0dbf94a2f3965b392a7ad12ce01dc
Reviewed-on: https://dart-review.googlesource.com/c/87962
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-21 10:46:00 +00:00
Kevin Millikin d0c2cdcd4c [Kernel] Remove the syncAsync flag
This flag was always true so we can remove it and specialize the
remaining code that used it.  The only code that used it was in the
Dart VM's async transformation.

Specializing that code led to some unused fields in the async helper
class which were removed.  This triggered me to look at core types
which seems to have a lot of unused stuff.

Change-Id: I7da800ca17ac05478149f4c90337a38d2c2b1459
Reviewed-on: https://dart-review.googlesource.com/c/87960
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-21 10:07:04 +00:00
Alexander Markov 8dea340fda [vm/kernel] Ensure alignment of metadata in case of concatenated kernel files
Alignment of metadata sections in kernel binary files was introduced in
https://dart-review.googlesource.com/c/sdk/+/83543 in order to
keep bytecode instructions aligned without copying them from kernel
binaries.

When multiple kernel files are concatenated, metadata sections
could become unaligned if sizes of kernel files are not aligned.

This change adds padding into kernel binaries (before component index)
to make sure that size of kernel binaries is a multiple of 8.

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

Change-Id: Ic7dc0da66c699ef406a325e69fe277e9d9e3b836
Reviewed-on: https://dart-review.googlesource.com/c/87741
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-12-21 00:12:01 +00:00
asiva dff358223e [VM/Runtime] Delete flag --sync-async and it's uses.
Remove all references to the --sync-async flag which was added as a transition step
when the feature was being introduced.

Change-Id: Ic5b1c8c8b3e2d92a70d954d401afeddfd43f5e92
Reviewed-on: https://dart-review.googlesource.com/c/87381
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-20 23:37:45 +00:00
Peter von der Ahé e45e334548 Rename strong mode to legacy mode in package:kernel
Change-Id: Ia4a8a9cac7817a8db5771ec82541b556c705f7c8
Reviewed-on: https://dart-review.googlesource.com/c/86353
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-12-20 18:06:34 +00:00
Kevin Millikin 9d77f18784 [Kernel] Serialize logical expressions
Use the operator string as the tag.  This requires us to be able to
serialize a sequence of (two) things.  Homogeneous lists don't give us
static typing so we introduce a pair class.

This requires allocating a pair (serializing a list would require
allocating a list anyway).  When we start generating and optimizing
the combinator applications we expect to eliminate the pair allocation
overhead.

Change-Id: I5a00c6973b9065ac8a91f1a69b52d97554f1e823
Reviewed-on: https://dart-review.googlesource.com/c/87840
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-20 15:24:15 +00:00
Kevin Millikin 091e38afcb [Kernel] Implement more text serialization
Begin serializing expressions.  Fairly quickly you encounter the cyclic
dependency between class Expression and any subclass that contains
nested expressions.  It isn't possible to implement this with immutable
values in Dart.

A quick solution is to break the cycle somewhere.  Here, the cycle is
broken by late initialization of the serializer for Expression.
Serializers are still immutable (either const or with all final fields)
and still singleton instances (by virtue of being static fields).

Change-Id: I9886bcd57041744e0ef9e95f7b901fcb94b5e042
Reviewed-on: https://dart-review.googlesource.com/c/87801
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-20 13:45:04 +00:00
Kevin Millikin ff44e27c5a Implement text serialization of strings
Use json.encode/json.decode.  This gets some strings wrong but it
should be enough to make more progress.

Testing with hardcoded strings is already getting awkward.

Change-Id: Ie0b168bec611ed93da13fff90f86232bb56c713f
Reviewed-on: https://dart-review.googlesource.com/c/87663
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-20 11:12:49 +00:00
Peter von der Ahé cbe30dc0d5 Remove Target.disableTypeInference
Change-Id: I440b07258a79796092e14abf816f257d9af40427
Reviewed-on: https://dart-review.googlesource.com/c/86357
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-12-19 17:21:51 +00:00
Peter von der Ahé a6e37888ee Merge legacy and disable inference modes
Change-Id: I05d402414e63cd70675b39e5a5976a4d97dd9d0d
Reviewed-on: https://dart-review.googlesource.com/c/85956
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-12-19 17:21:51 +00:00
Kevin Millikin 612b6884c4 Split the text serializer into libraries
Move the combinators and the reader into their own libraries.

Change-Id: I85042a3f319c0fc945d658dd23a3959c74b7cbca
Reviewed-on: https://dart-review.googlesource.com/c/87660
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-19 14:24:22 +00:00
Kevin Millikin 4283735fa1 First pieces of Kernel text serialization
Combinator-based serialization of Kernel basic literals.

Change-Id: I6d08c80f47f233b178aa57ee6fc887ac91ed9e9c
Reviewed-on: https://dart-review.googlesource.com/c/87320
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-12-19 12:16:24 +00:00
Paul Berry 6ece9f910c Prepare to publish analyzer version 0.34.1.
Change-Id: I81a9053e4ab3dacd1dcbb8e72d2b80f19752b758
Reviewed-on: https://dart-review.googlesource.com/c/87609
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-12-18 23:02:44 +00:00
Kevin Millikin a8493e1b50 Flip the default value of the Kernel syncAsync flag
In Kernel's TargetFlags, this flag still defaulted to false.  Flip the
default to true and update all client code in the SDK.  The
expectation is that many of the places that now pass false explicitly
really just want the default, but that will be verified separately and
then the flag will be removed.

Change-Id: I2a38eb53f280f21f59bb1d2e88c42516f827fd39
Reviewed-on: https://dart-review.googlesource.com/c/85448
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-12 14:23:54 +00:00
Aske Simon Christensen 05fb37a808 Add SetLiteral node to kernel.
Change-Id: I2f12662efc8ae3f064674bba03c333e0c23ffa0d
Reviewed-on: https://dart-review.googlesource.com/c/85681
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-12-06 14:46:58 +00:00
Paul Berry 0a4873bb35 Merge commit '191a09f540ac0516c4088fb8454c693743be8b3f' into analyzer 2018-12-04 09:41:55 -08:00
Alexander Markov 9f49b47823 [vm/bytecode] Revise representation of objects and strings in bytecode
This is a major revamp of bytecode metadata format. Now bytecode has
its own serialization mechanisms.

This CL adds 'bytecode component' metadata, which contains bytecode
object table and string table. All references from bytecode (constant
pools) to libraries, classes, members, types and strings now have a new
format. References to frequently used objects are represented as indices
in object table, while rarely used objects are written inline.
This allows VM to cache frequently used objects while reading bytecode.

Representation of strings is aligned with VM - string characters are
stored in separate pools of one-byte and two-byte strings. This allows
VM to avoid UTF-8 decoding and extra copying.

Closure declarations are now explicit. Type parameters no longer require
enslosing scopes when reading/writing them.

Benchmarks:
GenKernelKernelReadAllBytecode (Intel Core i5) +29.84%
GenKernelKernelReadAllBytecode (Intel Xeon) +28.74%
Change-Id: I4b80009733a8f8c038264af74f97c4e094b9e311
Reviewed-on: https://dart-review.googlesource.com/c/85469
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-12-03 19:08:42 +00:00
Paul Berry 6f5d6db9c2 Cherry-pick analyzer CHANGELOG and pubspec from analyzer-0.33 branch.
Also includes changes to the kernel and front_end pubspecs, since
those packages are tightly coupled to the analyzer.

These changes were made on the analyzer-0.33 branch in preparation for
previous releases of the analyzer.  Merging them to the master branch
makes it easier to keep the pubspec and CHANGELOG files up to date on
that branch.

Change-Id: I08a7bdcd49b6b2396166953131927656eca2c563
Reviewed-on: https://dart-review.googlesource.com/c/85727
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-12-01 17:23:47 +00:00
Paul Berry 63770042aa Merge commit '80c23f87a3e3123d7e337c1fc8bc3b5ec49b34a0' into analyzer 2018-11-30 08:12:45 -08:00
Jens Johansen 7f8e6f8bb6 Be more verbose in loops etc in kernel
Benchmarks have shown that old-style for-loops are faster than for-in
for instance.

Golem says

ia32

whole stack (i.e. including utf8 and change to VariableIndexer)

AstToBinaryP90 (Intel Core i5)	6.617% (0.4 noise)
AstToBinary (Intel Xeon)	5.158% (0.4 noise)
AstToBinaryP90 (Intel Xeon)	5.104% (0.4 noise)
AstToBinaryP50 (Intel Xeon)	5.148% (0.4 noise)
AstToBinary (Intel Core i5)	6.579% (0.4 noise)
AstToBinaryP50 (Intel Core i5)	6.741% (0.4 noise)

by itself (i.e. compared to a build with utf8 and change to VariableIndexer)

AstToBinaryP90 (Intel Core i5)	0.7724% (0.0 noise)
AstToBinaryP50 (Intel Core i5)	0.7848% (0.0 noise)
AstToBinary (Intel Core i5)	0.8559% (0.0 noise)
AstToBinaryP90 (Intel Xeon)	0.7730% (0.1 noise)
AstToBinaryP50 (Intel Xeon)	0.8195% (0.1 noise)
AstToBinary (Intel Xeon)	0.9319% (0.1 noise)



x64

whole stack (i.e. including utf8 and change to VariableIndexer)

AstToBinaryP90 (Intel Core i5)	5.555% (0.2 noise)
AstToBinaryP50 (Intel Xeon)	6.352% (0.4 noise)
AstToBinaryP50 (Intel Core i5)	5.395% (0.5 noise)
AstToBinary (Intel Xeon)	6.928% (0.5 noise)
AstToBinaryP90 (Intel Xeon)	7.180% (0.5 noise)
AstToBinary (Intel Core i5)	5.824% (0.5 noise)

by itself  (i.e. compared to a build with utf8 and change to VariableIndexer)

AstToBinaryP90 (Intel Core i5)	0.1039% (0.0 noise)
AstToBinaryP50 (Intel Core i5)	0.6154% (0.0 noise)
AstToBinary (Intel Core i5)	0.7640% (0.1 noise)
AstToBinaryP50 (Intel Xeon)	1.268% (0.1 noise)
AstToBinary (Intel Xeon)	1.457% (0.1 noise)
AstToBinaryP90 (Intel Xeon)	1.512% (0.1 noise)



Change-Id: If091a3a01f2fe6574712946a01644413033739b6
Reviewed-on: https://dart-review.googlesource.com/c/85341
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-11-30 13:15:47 +00:00
Jens Johansen 8db293ed70 Lazy VariableIndexer in ast_to_binary.dart
Often a VariableIndexer was initialized with no use.
This CL eliminates that by creating it as needed.

Golem says:

ia32

whole stack (i.e. together with the utf8 stuff)

AstToBinary (Intel Xeon)	4.265% (0.3 noise)
AstToBinaryP50 (Intel Xeon)	4.364% (0.3 noise)
AstToBinaryP90 (Intel Xeon)	4.365% (0.3 noise)
AstToBinaryP90 (Intel Core i5)	5.890% (0.3 noise)
AstToBinary (Intel Core i5)	5.772% (0.3 noise)
AstToBinaryP50 (Intel Core i5)	6.004% (0.4 noise)

by itself (i.e. compared to the one with hte utf8 stuff)

AstToBinary (Intel Xeon)	0.4910% (0.0 noise)
AstToBinaryP50 (Intel Xeon)	0.6186% (0.0 noise)
AstToBinaryP90 (Intel Xeon)	0.6415% (0.0 noise)
AstToBinaryP90 (Intel Core i5)	1.974% (0.1 noise)
AstToBinary (Intel Core i5)	1.854% (0.1 noise)
AstToBinaryP50 (Intel Core i5)	2.072% (0.1 noise)


whole stack (i.e. together with the utf8 stuff)

whole stack

AstToBinaryP90 (Intel Core i5)	5.457% (0.2 noise)
AstToBinaryP50 (Intel Xeon)	5.150% (0.4 noise)
AstToBinary (Intel Xeon)	5.552% (0.4 noise)
AstToBinaryP90 (Intel Xeon)	5.756% (0.4 noise)
AstToBinaryP50 (Intel Core i5)	4.809% (0.4 noise)
AstToBinary (Intel Core i5)	5.099% (0.5 noise)

by itself (i.e. compared to the one with hte utf8 stuff)

AstToBinaryP50 (Intel Core i5)	-0.6758% (-0.1 noise)
AstToBinary (Intel Core i5)	-0.0593% (-0.0 noise)
AstToBinaryP90 (Intel Core i5)	1.292% (0.0 noise)
AstToBinaryP50 (Intel Xeon)	0.6355% (0.0 noise)
AstToBinaryP90 (Intel Xeon)	0.9089% (0.1 noise)
AstToBinary (Intel Xeon)	0.9836% (0.1 noise)

Change-Id: Ia9a86958f9a9280c6ee40695fe3020debb8312a5
Reviewed-on: https://dart-review.googlesource.com/c/85340
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-11-30 12:39:27 +00:00
Jens Johansen e520f2480a Do UTF8 encoding slightly differently when serializing kernel
Instead of creating two small-ish utf8lists for every string we encode,
do fewer bigger allocations and convert to utf8 via a (new) method that
will hopefully eventually be moved into String.

Golem says:

ia32

AstToBinaryP90 (Intel Core i5)	3.995% (0.2 noise)
AstToBinary (Intel Core i5)	3.992% (0.2 noise)
AstToBinaryP50 (Intel Core i5)	4.015% (0.2 noise)
AstToBinary (Intel Xeon)	3.793% (0.3 noise)
AstToBinaryP90 (Intel Xeon)	3.748% (0.3 noise)
AstToBinaryP50 (Intel Xeon)	3.769% (0.3 noise)


x64


AstToBinaryP90 (Intel Core i5)	4.220% (0.1 noise)
AstToBinaryP50 (Intel Xeon)	4.543% (0.3 noise)
AstToBinary (Intel Xeon)	4.614% (0.3 noise)
AstToBinaryP90 (Intel Xeon)	4.891% (0.3 noise)
AstToBinaryP50 (Intel Core i5)	5.448% (0.5 noise)
AstToBinary (Intel Core i5)	5.155% (0.5 noise)

Change-Id: I0532778d69205a7a187342d3bdfe503c660b1004
Reviewed-on: https://dart-review.googlesource.com/c/84413
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-11-30 11:27:03 +00:00
Paul Berry 1d14b8a94e Prepare to publish analyzer 0.34.0.
Change-Id: I66fe8810655b6ae2089e70d50af327909fecd5e1
Reviewed-on: https://dart-review.googlesource.com/c/85418
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2018-11-29 22:13:08 +00:00
Paul Berry b72ca19f33 Merge commit 'c9aaa7a654b1cac1307c854ba38f4dc995c86f09' into analyzer 2018-11-29 09:43:36 -08:00
Jens Johansen 56bccac775 Remove unused kernel/lib/application_root.dart
Change-Id: If02becd542935c9e9db6cbfdf8a40b47a712cd7c
Reviewed-on: https://dart-review.googlesource.com/c/85481
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-11-29 08:08:33 +00:00
Jens Johansen 9c7bdf4aae Remove unused dependencies on logging and package_config
package_config was not used at all.
logging was only used by kernel/lib/log.dart which in turn was not used
at all.

Change-Id: If57f084661c5cc1c361fb38555e903ec3f724904
Reviewed-on: https://dart-review.googlesource.com/c/85480
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-11-29 08:08:23 +00:00
Paul Berry 854a7cfe15 Merge commit '43113760f2ea114c183f8965b0d48fbb7469dc7f' into analyzer
Conflicts:
	DEPS
2018-11-28 08:38:52 -08:00
Jens Johansen 498994487b Cleanup of ast_to_binary
Change-Id: Ib065dd32c23c88f64b668a6b9bcefbdb4a8e038d
Reviewed-on: https://dart-review.googlesource.com/c/85241
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-11-28 10:57:01 +00:00
Jens Johansen 1ec63ec7d5 Only one source of truth for uriToSource
Previously we had several places where different uriToSource was used.
This was both weird and led to errors when something refering to
some state was used to look up in another state.
This CL makes it so we only have one source of truth.

To not include sdk sources when serializing a component that only mixes
something from the sdk in, (or extends it or...), the serialization is
changed slightly to keep track of which uris come from actual
implementation. Before the sdk sources was explicitly removed in the
incremental compiler, but we want to limit those kinds of things,
which is why we're doing it differently here.

Fixes #35215.

Bug: 35215
Change-Id: Iaa5618fcb0ea42b13aba7720f34a87a85144e047
Reviewed-on: https://dart-review.googlesource.com/c/85175
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-11-28 10:57:01 +00:00
Paul Berry d7ee7b9516 Merge commit '880dfa0bca19b024bea57a20434da6f3f0fe9c87' into analyzer 2018-11-26 08:35:57 -08:00
Dmitry Stefantsov dcc9f74a3c [kernel] Make instantiate-to-bound implementation in Kernel private
Change-Id: I04983b1d99a75054dd93ec6e7131eb7f0492540b
Reviewed-on: https://dart-review.googlesource.com/c/84638
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Auto-Submit: Dmitry Stefantsov <dmitryas@google.com>
2018-11-22 11:50:27 +00:00
Jens Johansen 4646e804dc Wrap last debugPath.add in assert
For all other "debugPath.add"s we've wrapped it in assert to avoid
doing it in the general case.
One apparently have slipped through.

Change-Id: Ib0dfc4a671428993e393d57a75db6612785e37b4
Reviewed-on: https://dart-review.googlesource.com/c/85161
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-11-22 09:32:49 +00:00
Jens Johansen f0b26ca685 Add offsets to kernel size breakdown
Change-Id: If61195da74aa97fb1891cdee95ac1f964894058c
Reviewed-on: https://dart-review.googlesource.com/c/85100
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-11-22 07:31:11 +00:00