We already do this for "use-bare-instructions" and "dwarf-stack-traces". This
CL does the same for "causal-async-stacks" and "lazy-async-stacks".
Issue https://github.com/dart-lang/sdk/issues/39525
Change-Id: I44136299858b3b72e8a3a176234f5051d6b61c1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130364
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Change-Id: I72fe74e1052c9c82eaf12e8c510501b037aa00a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130361
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Other than the changes to the code generators and the analysis options
files, the changes were all generated by dartfix.
Change-Id: I80055e3992452c5b40eed41ac79807cf5c932976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Also move return_of_invalid_type tests to their own file.
Change-Id: Ie02acee903dde7cc498d3ecbb1d9f5b0c1691298
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130006
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Other than the changes to the code generators and analysis options files,
all of these changes were produced using dartfix.
Change-Id: I24f47b9f6b929b0b5d5e08da7ef2016f4bdc4108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
The code to convert to a list or map literal is essentially unchanged,
but I had to make several changes to extract `ConvertToSetLiteral` and
make it work as a fix, primarily in the conversion of invocations of
`toSet`.
Change-Id: I365f5fc84f4a037b31ec69d78b05d7d5574666ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130220
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Also move tests for illegal_async_return_type
Change-Id: Icd76c1ece456470ce734df2ac6628d5aedcd6e8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This change:
* adds the `--use-old-rti` flag to revert to the old behavior
* enables the new behavior by default
* changes the -rti- builders to run the old rti instead of the new rti
* documents the change in CHANGELOG.md
I've kept around the logic as `useNewRti` to avoid swapping all the conditions
in the compiler.
Change-Id: I773ac33b658cb60f72e0b6beef83375abec31bad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127492
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
So, it is not separated into ElementResolver and StatisTypeAnalyzer.
Change-Id: I413a71b703ab93304760e1f912c3d55585411397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130132
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
When inserting Unbox instructions in SelectRepresentations pass, their
speculative mode depends on the instruction which uses corresponding
value. Phi instructions were using default kGuardInputs mode, which may
cause insertion of speculative Unbox instructions in AOT mode.
Such Unbox instructions may need deoptimization if type of an argument
changes during optimizations. Generating code for such Unbox
instructions causes assertion failure (in debug mode), or crash in
release mode.
The fix is to change speculative mode of Phi instructions in AOT, so
they won't cause speculative Unbox instructions.
Fixes https://github.com/dart-lang/sdk/issues/39747
Change-Id: Ic9c9957875fd775fe1c02f3666829f26dad64937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130063
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
If OSR happens while calculating an argument of string interpolation,
array of arguments may be Phi and not CreateArray instruction.
In this case, canonicalization of StringInterpolate should gracefully
return instead of crashing. Such OSR may happen due to control flow
collections.
Fixes https://github.com/dart-lang/sdk/issues/39905
Change-Id: Ibf35a0f0ebb20d5a44102f7ddfd4e91925d7c6ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129900
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
I want to extract invocation inference into a separate helper, and
perform MethodInvocation resolution as a single step inside
MethodInvocationResolver. So, I want to set `Expression.staticType`
in several places. Using special subclass of StaticTypeAnalyzer does
not fit this intention.
I think `is` check is JIT optimizable well, and during analysis
we will have just one type of ElementTypeProvider.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: Ie718db35ac9426b35b538b92a2e2177828ae7ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
- Migrated test now expects `null is Object` to be false.
- Added expectations for `is! Object`.
Change-Id: I99c5dc76d2ccfa5a9fd853b7745b58edfff07085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129309
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
The pc-relative calls were recorded with pc-offsets pointing to the start of the
call instruction, where as code-based calls were recorded with
pc-offsets pointing to the next instruction (i.e. return address).
This is inconsistent and caused us to hit an assert in
`Code::set_static_calls_target_table`. The assert was benign, but it is
good to maintain the uniqueness guarantee in the static calls table, so
we'll unify the encoding to use offsets to the instruction after the
call in both cases.
Closes https://github.com/dart-lang/sdk/issues/39811
Change-Id: Id0305befd78f09ed0b0e100f39641bca9e764442
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129717
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
I think we don't need it anymore.
Change-Id: I50b9cc4c0bd3693a7172a2e71cd24096708fd0db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Add support for generating annotations from actual data using
option -g
Change-Id: I88d9cdb62a38d579234b15097c9e9bb3d81ebe8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129708
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Entry points json files were replaced with pragma annotations a while
ago. This change removes these unused files.
Change-Id: Ib7d80b79f1afb63a05aca9a25e8ec6fc9ba72941
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130040
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
The resolution-world-builder and impact transformer were holding onto a
class-hierarchy-builder in dart2js, which uses a lot of space.
On a some artificial sample apps with thousands of classes this
reduces the overall memory capacity by 25%. On a large internal app
this reduced the overall memory capacity from 13G to 11G.
Change-Id: I5d0d40764649364f2cd2411ef1346812beb411c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129544
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>