Dmitry Stefantsov
f3139f57b4
[cfe][nnbd] (De)Serialize nullability modifiers in .dill files
...
Closes #37688 .
Bug: http://dartbug.com/37688
Change-Id: Ie3aa8fe09d859cd65bbb58da3f56297483b7b725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112085
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2019-08-07 10:06:40 +00:00
Teagan Strickland
48f18231ba
[vm/compiler] More serialization support for closures and instances.
...
* Adds non-static final field printing for `Instance`s
* Adds specialized printing for `Closure`s (tearoffs).
* Instances of `Mint` and `Type` can also appear in constant
pools, so handle both in ObjectToSExp.
* DartValueToSExp is a wrapper method for ObjectToSExp that
also checks to see if the value is defined in the constant
pool. If it is, the object is serialized as a reference to
that definition.
* Reworks the `tmp_*_` fields used for non-reentrant cases
to be per function to make it easier to understand how they
interact. (Only cross-function tmp field that remains is
`tmp_string_`, since its contents are always immediately
converted to a C string and then no longer needed.)
Bug: https://github.com/dart-lang/sdk/issues/36882
Change-Id: Ibad4bc2497dd1f580d1daa536c4a267818981c14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111425
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-08-07 08:28:18 +00:00
Aart Bik
193985777d
[vm/compiler] Propagate call type to load indexed
...
Rationale:
AOT's TFA sometimes knows a bit more about the result
type of a call that is later recognized as an indexed
load. This CL preserves that type for later use, improving
decision on operations that consume this load.
https://github.com/dart-lang/sdk/issues/37719
Change-Id: I5f88e03b68b4f7aec6e39a8ca94f243c2796730d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112028
Commit-Queue: Aart Bik <ajcbik@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-08-06 19:28:29 +00:00
Alexander Markov
53fe0627ec
[vm/bytecode] Recognize calls to _StringBase._interpolate in bytecode flow graph builder
...
ia32/TypedData.Int8ListBench(RunTime): 22.8us -> 14.9us
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: Ib9e68df107c9bbc97c3d75fb13728efb77615c6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112029
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-08-06 15:49:57 +00:00
Alexander Markov
8cd01287b4
[vm/aot/tfa] Infer types from generic return types of native methods
...
Issue: https://github.com/dart-lang/sdk/issues/37719
Change-Id: I35a8cd7a5e20e13d705f005e17ebc80fb8e8f80e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111900
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-08-05 16:43:47 +00:00
Teagan Strickland
c271c599af
[vm/compiler] Move S-exp deserialization into sexpression.{cc,h}.
...
This way, users of S-expression deserialization will not also pull in
the rest of the upcoming IL deserialization functionality (and
anything extra needed by that).
Also changes SExpParser::ReportError to just print the error
information to stderr and abort, instead of using the Dart VM
exception machinery.
Change-Id: Id01b2a6fdca1a6204d502f398df139c2faa12d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111644
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Teagan Strickland <sstrickl@google.com >
2019-08-05 13:59:22 +00:00
Jens Johansen
fd7baa4fd9
[CFE] Serialize language version
...
Change-Id: I6ea448df722a7e1e51c31f06d42bfbe743855a45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111725
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-08-05 09:14:09 +00:00
Alexander Markov
ac45ee7e63
[vm/bytecode] Support exactness tracking in bytecode
...
MicroClosureCreateTearoffClassSecondTime(RunTime) 3922 us -> 2030 us.
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I3a6f93950a469969d82243fd1744d5a4f7fb1e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111868
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-08-03 17:36:31 +00:00
Ryan Macnak
6653611ae4
[vm, gc] Check if we should start concurrent marking after external allocations and background code finalization.
...
Bug: https://github.com/flutter/flutter/issues/36808
Change-Id: I2577ffa22e4dec5d659198948d490b4e17aae8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111664
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-08-02 22:08:59 +00:00
Aart Bik
19085e3819
[dart/vm] Check SSA def-use dominance only
...
Rationale:
PushArguments violate some def-use dominance relations
after inlining. Fixing this seems not worth the engineering
effort. Rather we wait until we remove PushArguments
altogether (the optimizing compiler has no need for them).
https://github.com/dart-lang/sdk/issues/36899
Change-Id: I9265420ae8ec4981fe7170b9a1869dd56ae323cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111880
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Aart Bik <ajcbik@google.com >
2019-08-02 20:29:39 +00:00
Ryan Macnak
d08c203e30
Add various missing argument checks to dart:io natives.
...
Avoid reflective access to mirrors creating invalid reflectees.
Change type checks in embedding API functions to return UnhandledExceptionErrors instead of APIErrors so they are catchable by Dart.
Fixes invocation_fuzz_test.
Bug: https://github.com/dart-lang/sdk/issues/15274
Bug: https://github.com/dart-lang/sdk/issues/23869
Bug: https://github.com/dart-lang/sdk/issues/37680
Change-Id: Ife3e3cb894c59620b0318e4e08947a3d1d45bab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110620
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2019-08-01 23:32:40 +00:00
Aart Bik
150e8f89d5
[dart/vm] Fix dominance violation
...
Rationale:
The flow graph checker still had a few ugly exceptions
due to dominance violation after inlining. This CL fixes
the violation, removes the exceptions from the flow graph
checker, and also adds a new utility that can be used in
some other places.
https://github.com/dart-lang/sdk/issues/36899
Change-Id: I42766af22a3696fe050b0e5c4a2dfe930933fc40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111502
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Aart Bik <ajcbik@google.com >
2019-08-01 15:54:33 +00:00
Martin Kustermann
91dadded66
[vm/compiler] Recognize _asyncStackTraceHelper and build special graph if !FLAG_causal_async_stacks
...
This is a follow-up to [0] necessary due to mixed bytecode compiled code mode.
[0] https://dart-review.googlesource.com/c/sdk/+/110919
Issue https://github.com/dart-lang/sdk/issues/37668
Closes https://github.com/dart-lang/sdk/issues/37702
Change-Id: If3ac86224644bf02160722ff23eac0c30dbd4697
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111641
Reviewed-by: Teagan Strickland <sstrickl@google.com >
Auto-Submit: Martin Kustermann <kustermann@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2019-08-01 10:47:59 +00:00
Martin Kustermann
130c654dcd
[vm/compiler] Avoid runtime call for _asyncStackTraceHelper if !FLAG_causal_async_stacks
...
Even though the FLAG_causal_async_stacks can be used to disable causal
async stack traces, the generated code would still call to the runtime,
which would simply return `null`.
To avoid this runtime call we recognize the method in the 2 flow graph builders.
Issue https://github.com/dart-lang/sdk/issues/37668
Change-Id: I896807060db911714d47a462c34696a0a3def62f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110919
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-07-31 19:49:51 +00:00
Teagan Strickland
2e197ae4de
[vm/compiler] Tweaks and additions to IL serializer/S-expressions.
...
* Add a new `SExpDouble` atom and change `SExpNumber` to `SExpInteger`.
* Allow for negative integers in deserialization.
* Add support for `LocalVariable`s and related instructions.
* Function objects are now represented by actual S-expressions generated
with the new `FunctionToSExp` method. Previously, they were only represented
by a symbol containing their canonical name.
* The top-level tag for a serialized flow graph is now `FlowGraph`, not
`function`. This avoids confusion between serialized flow graphs and
serialized function references. Similarly, the old `FunctionToSExp`
method is now called `FlowGraphToSExp`.
* Made all SExpression* returning functions that take Object (or subclass)
instances return nullptr if the passed in instance is the null object,
except for ObjectToSExp, which returns the symbol `null`.
* Factored out creating tags for the different kind of block/function
entry and also created an `Entries` section to the top-level `FlowGraph`
form that contains function entry points similar to the `Constants` one
instead of inlining entries as separate elements in the `FlowGraph` form.
* Additional extra information in verbose mode for some elements.
Bug: https://github.com/dart-lang/sdk/issues/36882
Change-Id: Iede3865ec64f81955a87fd57b10e74d49ee8414c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110917
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-07-31 11:52:44 +00:00
Alexander Markov
40e6954a30
[vm/bytecode] Update error messages for dart:mirrors and dart:ffi
...
This is a follow-up for https://dart.googlesource.com/sdk/+/821efa642c648ffe4c3c871b79ba618517bed774 .
Error messages are aligned between bytecode reader and default kernel loader.
Change-Id: I2d4d3712f041cbbc0feb865d7f25d5df2ddbdf34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111380
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-07-31 01:39:18 +00:00
Aart Bik
361d27e20b
[dart/vm] Fix bug in parallel move/register allocator
...
Rationale:
Another one bites the dust due to fuzzing! The attached
small reproducer assert failed in debug and crashed
in release due to "any" allocation in the parallel move.
https://github.com/dart-lang/sdk/issues/37633
Change-Id: Ie9044cb7fa86dfdb1ba312599f57db76bec47611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110540
Commit-Queue: Aart Bik <ajcbik@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2019-07-30 20:42:05 +00:00
Martin Kustermann
80c4954d4d
[vm/compiler] Remove unnecessary load in product mode
...
Change-Id: Id4cad1f543024cf473a0068786b7a849893d24af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111320
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2019-07-30 18:43:21 +00:00
Teagan Strickland
795290a614
[vm/compiler] Free, not delete, buffer taken from TextBuffer.
...
Change-Id: Ic4309c097689d4dade2efc5d027cc04493b8f7d4
Cq-Include-Trybots: luci.dart.try:vm-kernel-asan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111281
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Clement Skau <cskau@google.com >
2019-07-30 14:48:57 +00:00
Teagan Strickland
4932ee6d80
Reland "[vm/compiler] Use pragmas instead of separately-maintained lists for inlining."
...
This closes https://github.com/dart-lang/sdk/issues/36571 .
Change-Id: I14c623aba6b7183191ae93e294e26af9f4dcf34f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110441
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-07-30 13:14:57 +00:00
Teagan Strickland
f822dfa3ea
Reland "[vm/compiler] Implement new inlining pragmas."
...
This change introduces two new pragmas:
* `@pragma('vm:never-inline')`
* `@pragma('vm:prefer-inline')`
These replaces the old way of specifying AlwaysInline or NeverInline
annotations when the (now removed) --enable-inlining-annotations flag
was used.
Bug: https://github.com/dart-lang/sdk/issues/36571
Change-Id: Iee152c1d67abde8d58c58fa967449d36e77c8c93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110440
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Samir Jindel <sjindel@google.com >
2019-07-30 12:01:06 +00:00
Martin Kustermann
5f627b7a54
[vm/compiler] Fix inliner bug which did not emit an explicit unboxing instruction for the value
...
The StoreIndexedInstr have been changed to require their value to be
unboxed. Even though SelectRepresentations will insert an unboxing
instruction, we want to manually create the unbox instruction to ensure
it is marked as truncating.
Closes https://github.com/dart-lang/sdk/issues/37551
Change-Id: I31e2204c6ecacd0d27ac9b6fd71974c84b882ef2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110912
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2019-07-30 11:51:27 +00:00
Teagan Strickland
b87386da26
[vm/compiler] Add S-expression deserializer.
...
Bug: https://github.com/dart-lang/sdk/issues/36882
Change-Id: I991d160ecbde45a09e7533867f51f1ab72c3b215
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110220
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-07-30 11:08:06 +00:00
Alexander Markov
b3293a4263
[vm/bytecode] Use faster method/field lookups
...
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I9d6b209529394aebe8ba64bf1c06cee72e7082b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111200
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-07-30 00:04:59 +00:00
Martin Kustermann
8db1408ffd
[vm] Use RareType for fast is-checks optimization instead of TypeArguments::null() comparison
...
This fixes the ASSERT introduced in 92faca77d9
Change-Id: I6564a1b0436b15e2adf762ead111860f8dd5650c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110909
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-07-29 19:58:34 +00:00
Martin Kustermann
92faca77d9
[vm/compiler] Use simpleInstanceOf for is checks if the type to test against is a rare type
...
For is checks where the type is a rare type we can use the faster _simpleInstanceOf implementation,
since there is no need to consider the type arguments.
By using the simpleInstanceOf implementation more optimizations get done
by our call specializer (e.g. simply doing a cid check).
This can improve type checks for code like `if (object is Future) {}`
Change-Id: I88497b9d2bdb4693ab79cd23cd19e727169eed63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110566
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
2019-07-29 15:06:57 +00:00
Alexander Markov
16f7076547
[vm/bytecode] Generate bytecode for expression evaluation
...
Issue: https://github.com/dart-lang/sdk/issues/36427
Change-Id: I0a07bd8ff1be357d2962e6745c8ef1e500d45477
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109984
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-07-26 18:22:51 +00:00
Alexander Markov
75c2c7faf0
[vm/bytecode] Fix number of checked args when calling setters
...
TypeChecks.CovariantCheck +9.571%
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: Ib8ae0160e47d309e9f98b9ba5981c5be77c583d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110680
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-07-26 17:33:11 +00:00
Teagan Strickland
d44076efea
[vm/compiler] Add S-expression layer to serializer.
...
Instead of hand-writing S-expression output in the methods used by the
serializer, just create an appropriate S-expression data structure (with
handling of extra info maps) that handles serialization.
Bug: https://github.com/dart-lang/sdk/issues/36882
Change-Id: I9b56827d7452271de4b32c0c01cc2e4c4bcc0367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109706
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-07-26 09:09:18 +00:00
Alexander Aprelev
dd59b193c7
Revert 52cace8160 as it breaks flutter tests on android nexus 5x.
...
This reverts 'Reland "[vm/ffi] Support structs on 32bit architectures"' 52cace8160 reviewed on https://dart-review.googlesource.com/c/sdk/+/108818 , reverts FfiStruct part of https://dart-review.googlesource.com/c/sdk/+/108724 .
```
runtime/vm/compiler/ffi.cc:63:1: error: static_assert failed "FFI transformation alignment"
static_assert(alignof(double) == 4, "FFI transformation alignment");
^ ~~~~~~~~~~~~~~~~~~~~
runtime/vm/compiler/ffi.cc:64:1: error: static_assert failed "FFI transformation alignment"
static_assert(alignof(uint64_t) == 4, "FFI transformation alignment");
^ ~~~~~~~~~~~~~~~~~~
````
Change-Id: I0c3bf985f68b2184261e8999320f8ee89fe3f896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110362
Commit-Queue: Alexander Aprelev <aam@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2019-07-25 04:00:23 +00:00
Ryan Macnak
9fe8865f4a
[vm, bytecode] Implement ParameterMirror and enable mirror tests.
...
In particular, mirrors_reader_test no longer crashes.
Change-Id: I602e7d85755dafd943fe84d20831f0f35484b387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108968
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-07-25 00:04:02 +00:00
Aart Bik
1ac0a36fcb
[dart/vm] Fix division-by-zero bug in range analysis
...
Rationale:
The attached test, a simplified version from a case found
by fuzzing, yielded the range [4,4] for the left hand side
of the division but [25,0] (sic!) for the right hand side.
This reverse range caused the logic in the TRUNC evaluation
to pass the >= 1 test but introduce the division by zero
in the compiler code. The true culprit, however, was
the reason for [25,0] which was due to a difference
in C++ and Dart shift right semantics. This CL fixes
the bug and adds some sanity assert to find more of
such cases.
https://github.com/dart-lang/sdk/issues/37622
Change-Id: I60e07428435d99589e1177c113ef5e24e1611d0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110420
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Aart Bik <ajcbik@google.com >
2019-07-25 00:00:39 +00:00
Alexander Markov
0c97c31b6e
[vm] Add assertions for number of parameters in recognized methods
...
This is a follow-up for review comments
https://dart-review.googlesource.com/c/sdk/+/107680/4/runtime/vm/compiler/frontend/kernel_to_il.cc#901
https://dart-review.googlesource.com/c/sdk/+/109887/4/runtime/vm/compiler/backend/il.cc#4631
Change-Id: I9b0ef0f9baa5102974d911ffdaaf7bdf47095c9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110127
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-07-24 16:16:53 +00:00
Alexander Markov
d3a09dda15
[vm/bytecode] Recognize list factories and set result type for static calls
...
Sudoku +15.62%
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I58cde03ffc9788b2eebe889fcc1a98a82698c39a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109887
Reviewed-by: Aart Bik <ajcbik@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-07-22 21:50:34 +00:00
Alexander Markov
fedd74669a
[vm/bytecode] Support multiple entry points when compiling from bytecode
...
DeltaBlueClosures +26.54%
Closes https://github.com/dart-lang/sdk/issues/36889
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I8920c7985366a2c955a06013aa9f58763fcbced9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109580
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-07-20 00:05:23 +00:00
Aart Bik
ebc180be95
[dart/vm] Fix bug on missed exception in AOT
...
Rationale:
The regression test in this CL should throw
with a NoSuchMethod on null. However, before
the fix, AOT did not throw at all.
https://github.com/dart-lang/sdk/issues/37408
Change-Id: I4037b163092caf78d313815624fd3b20c20f88ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109550
Commit-Queue: Aart Bik <ajcbik@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-07-19 22:43:31 +00:00
Aart Bik
873cc9a787
[dart/vm] peek prior to constant class evaluation
...
Rationale:
Only look for "external" and "pragma" to avoid
cyclic or unloaded class evaluation
https://github.com/dart-lang/sdk/issues/37533
https://github.com/dart-lang/sdk/issues/36220
Change-Id: I78ef5dcd2c7e7dee0d196394320e994f8aa8a695
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109300
Commit-Queue: Aart Bik <ajcbik@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-07-18 17:17:49 +00:00
Ryan Macnak
63120303a7
[vm] Guard against double finalization from annotations on fields.
...
Bug: https://github.com/dart-lang/sdk/issues/37544
Change-Id: Ie3620dd9adf8382afc018cf764965b4ff74d2b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109440
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-07-18 00:39:47 +00:00
Alexander Markov
f450cf399e
[vm/bytecode] Add UncheckedClosureCall instruction
...
This improves performance of closure calls:
DeltaBlueClosures: +25.14%
DartMicroBenchMM.MaxLib +40.91%
DartMicroBenchMM.MinLib +42.58%
Change-Id: I13000e20b9433ce77bb2ba5209513de575656036
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109220
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-07-17 21:05:44 +00:00
Ryan Macnak
c3043367cd
[vm] Fail more gracefully when reload removes a static target.
...
Bug: https://github.com/dart-lang/sdk/issues/37517
Change-Id: I83b6bed09235d2abe3e168a49ca28434b127442f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109140
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2019-07-17 17:47:34 +00:00
Ryan Macnak
8cb7e4c237
[vm] Fix gcc build.
...
Change-Id: I78c5826ec042212a32fe50d6fe53a78f8e05fdf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109314
Reviewed-by: Liam Appelbe <liama@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-07-17 16:23:45 +00:00
Teagan Strickland
2b3336b51e
[vm/compiler] Initial IL serialization implementation.
...
Adds the --serialize_flow_graphs_to flag, which takes a
filename to which to serialize all compiled functions.
This flag is only active for the AOT compiler.
Bug: https://dartbug.com/36882
Change-Id: Ib7e328ad93373168806539f0a61ec0a07506a51d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107400
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-07-17 09:11:15 +00:00
Siva Annamalai
1eaaca642d
Revert "[vm/compiler] Use pragmas instead of separately-maintained lists for inlining."
...
This reverts commit 33a757284b .
Reason for revert: This CL seems to depend on
@pragma('vm:never-inline')`
@pragma('vm:prefer-inline')`
being implemented which has been reverted.
Original change's description:
> [vm/compiler] Use pragmas instead of separately-maintained lists for inlining.
>
> This closes https://github.com/dart-lang/sdk/issues/36571 .
>
> Change-Id: I4d77192f2c33dd4872d58ef07ccd32069b8b63df
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99154
> Commit-Queue: Teagan Strickland <sstrickl@google.com >
> Reviewed-by: Martin Kustermann <kustermann@google.com >
TBR=kustermann@google.com ,sstrickl@google.com
Change-Id: Ied0686ad282f2ed772ff9adbc551f64ba8855aff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109340
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2019-07-16 22:44:50 +00:00
Siva Annamalai
27001fb289
Revert "[vm/compiler] Implement new inlining pragmas."
...
This reverts commit 629f38cf87 .
Reason for revert: This CL seems to depend on constant_update_2018 flag being turned on by default. The CL that turns on constant_update_2018 has been reverted, so this CL is also being reverted.
Original change's description:
> [vm/compiler] Implement new inlining pragmas.
>
> This change introduces two new pragmas:
>
> * `@pragma('vm:never-inline')`
> * `@pragma('vm:prefer-inline')`
>
> These replaces the old way of specifying AlwaysInline or NeverInline
> annotations when the (now removed) --enable-inlining-annotations flag
> was used.
>
> Bug: https://github.com/dart-lang/sdk/issues/36571
> Change-Id: I2495c72819d94e43cefc837d4eb454b7b3d4140c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99148
> Commit-Queue: Teagan Strickland <sstrickl@google.com >
> Reviewed-by: Samir Jindel <sjindel@google.com >
TBR=sjindel@google.com ,sstrickl@google.com
Change-Id: Idc8e8344adb026a308af20c8b0d0224edb891d9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36571
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109320
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2019-07-16 22:33:00 +00:00
Teagan Strickland
33a757284b
[vm/compiler] Use pragmas instead of separately-maintained lists for inlining.
...
This closes https://github.com/dart-lang/sdk/issues/36571 .
Change-Id: I4d77192f2c33dd4872d58ef07ccd32069b8b63df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99154
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-07-16 10:37:02 +00:00
Teagan Strickland
629f38cf87
[vm/compiler] Implement new inlining pragmas.
...
This change introduces two new pragmas:
* `@pragma('vm:never-inline')`
* `@pragma('vm:prefer-inline')`
These replaces the old way of specifying AlwaysInline or NeverInline
annotations when the (now removed) --enable-inlining-annotations flag
was used.
Bug: https://github.com/dart-lang/sdk/issues/36571
Change-Id: I2495c72819d94e43cefc837d4eb454b7b3d4140c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99148
Commit-Queue: Teagan Strickland <sstrickl@google.com >
Reviewed-by: Samir Jindel <sjindel@google.com >
2019-07-16 09:41:12 +00:00
Ryan Macnak
c6bc0031f3
[vm, bytecode] Field initializer for schema changes.
...
Bug: https://github.com/dart-lang/sdk/issues/32299
Change-Id: Id6359ad36db183f4cdd091e7fd778c879e868d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108901
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-07-15 22:58:16 +00:00
Alexander Markov
6eb357c7fe
[vm] Print better error message if trying to use class which is not loaded yet
...
Issue: https://github.com/dart-lang/sdk/issues/37533
Issue: https://github.com/dart-lang/sdk/issues/36391
Change-Id: Ib1addecabd60c7de4387afe5f6b8d7cf856a548b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109103
Auto-Submit: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Aart Bik <ajcbik@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-07-15 19:22:16 +00:00
Daco Harkes
52cace8160
Reland "[vm/ffi] Support structs on 32bit architectures"
...
Fixed Flutter iOS build.
Fixes: https://github.com/dart-lang/sdk/issues/36334
Change-Id: Idee38671cf0f33797824b37f08a92f32f931d8e0
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-ffi-android-product-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108818
Reviewed-by: Samir Jindel <sjindel@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2019-07-15 16:57:36 +00:00
Ben Konyi
70bafa8864
Revert "[vm/ffi] Support structs on 32bit architectures"
...
This reverts commit 0c9abb8816 .
Reasoning: breaking iOS build for Flutter engine, blocking SDK roll.
Change-Id: I8905f09114a192202e5d1144d189ba0ae0fd62eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108962
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2019-07-12 22:40:51 +00:00