Visual Studio is at 2017 Update 9 now.
Change-Id: Id577de7bf08e8ebedffbeec4c467f78b0f76adcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108906
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
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>
This is a somewhat roundabout way to prevent a hot restart from redefining these types.
This fixes the issues arising: https://github.com/dart-lang/sdk/issues/37259.
Should more cleanly separate fields reset on a hot restart from ones preserved.
Change-Id: Id0c45cbeed67b574c3259e1f87a405137ae93575
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111315
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Previously, strict-inference would declare that the type of this list could not be inferred:
var a;
var l = [e];
Now it is considered that the types of elements of a collection are "settled",
("resolved"?) and that the collection should not be punished (marked as
inference failure) just because it contains dynamic types.
Change-Id: I5b0762420235da187e08bcf6f3fea0c0d3f2195e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111311
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The test cases are based on
pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart,
however those tests are removed because they exercise the old definite
assignment logic (which was never hooked up to the rest of the
analyzer, and was abandoned in favor of flow analysis). This CL also
removes the old definite assignment logic itself.
There are two behavioral regressions compared to the old definite
assignment logic:
- Assignments inside assert bodies are erroneously assumed to always
execute (they don't, because assertions may be disabled).
- Flow analysis does not yet understand that a function may be known
to never return (with NNBD, such a function would have a return type
of Never).
These regressions have been flagged with TODO comments (in the test
files assert.dart and if.dart respectively), and will be addressed in
later CLs.
Change-Id: I4a3923f667b151fe31cdcca69373ee1f8fb85607
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110400
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This ensures that we don't accidentally create a test case containing
errors.
Change-Id: I9b6220e15e70640833877f75a08a5a219574be34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110342
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
We still verify that the analyzer passes these tests, but we now do
the verification using the "ID test" mechanism that's shared with the
CFE. This will allow the front end to run these tests as soon as its
integration with flow analysis is complete.
Change-Id: I1a7e5ef9698ebac72a72d992f4d765723224fc95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110343
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Dart FFI which is now an analysis server dependency does not yet support 32 bit ARM. I also went ahead and updated dart_api_impl.h to address the TODO about removing the architectures enabled in https://github.com/dart-lang/sdk/issues/35773 from the blocklist.
Change-Id: Id2535520df1069e21eb4fa5818484ae6d92b2efd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111314
Reviewed-by: Samir Jindel <sjindel@google.com>
Specifies that the 'isolate' mentioned in the error message is always the
service isolate.
Also adds a specific error message for when the service isolate port isn't
found, which can indicate the service isn't there (yet?).
Change-Id: I1f29b7c4ccf4df2c3dbefafe05f410e4725488e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111426
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
* 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>
Programmers can use nullability modifiers on type parameters when using
them as types. However, the actual nullability of such types is
calculated from that and also from the bound of the type parameter, and
from the promoted bound if it has it. Previously, the final result of
the nullability calculation was stored on the type. This CL also stores
the nullability declared by the programmer.
Change-Id: Iabbddc1e8a477678975190fa00bf702c914f7777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111424
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
This allows us to properly handle contraviariant uses of generics,
where the nullability of a generic parameter needs to be propagated in
the reverse of the usual dependency direction.
Change-Id: Id31f906bb7e3fbbf0846144a4715b9a6591aceda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111303
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit d8160e0cb1.
Reason for revert: crashes in lib_2/isolate/spawn_uri_nested_vm_test
Original change's description:
> [vm] Fix deadlock in isolate shutdown.
>
> Enter a safepoint when waiting for child isolate spawns to complete, since the child isolate now requires its parent (along with all other members of the isolate group) to participate in safepoints.
>
> Change-Id: Ia75f76a08a59bb73d116301ec5e1a3c0fd1db99c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111313
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
TBR=kustermann@google.com,aam@google.com,rmacnak@google.com
Change-Id: I32d8e291b85754461d919ca258ecb479e54f072d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111317
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Allows for VM service clients to determine information about the system
the service is running on. Needed for some DevTools functionality.
Change-Id: I530984816e6cc1e4ca378454882219085e2d9de8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111361
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This is needed because some clients rely on the path showing up in
error messages.
Change-Id: I3746db3fc9eecef048b4e50c37b6a0b60a13dc7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110340
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Enter a safepoint when waiting for child isolate spawns to complete, since the child isolate now requires its parent (along with all other members of the isolate group) to participate in safepoints.
Change-Id: Ia75f76a08a59bb73d116301ec5e1a3c0fd1db99c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111313
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
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>
Fix these issues:
Function breakpoint could wrongly be set before the first DebugCheck opcode.
Loaded bytecode closures were not found by FindCompiledFunctions.
Improve verbose debug output by providing address and offset of breakpoint.
Change-Id: Icfeb1204348af313de21cab358603c11e89d2503
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111309
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
This is a reland of b71d2d9996
Original change's description:
> [llvm] Add initial scaffolding
>
> This change adds the gclient and GN changes needed to build
> an executable using LLVM in the Dart tree as well as a basic
> testing framework based on llvm-lit.
>
> Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Change-Id: I73cd24455c373bcc4d0f5675af6a3b1e0f947f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
These comments were copy/pasted from other tests and weren't properly
updated.
Change-Id: Ib1a0279184bb8dbaeb3601676d24301728a812a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This should make it easier to expand the graph propagation algorithm
in follow-up CLs.
Change-Id: I5540d37716d5d617d768ea62d9ab1f0fcdca47c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This changes the default fixes applied by dartfix so that it no longer
converts doubles to ints by default. The fix can still be applied
by specifying '--fix double-to-int' on the command line.
Change-Id: I751a42a9c6ae6589259e0b7ac5c769fd4efc4313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>