This migrates old python2 dict.iteritems() to python3 dict.items().
iteritems was removed in python3 meaning these script will otherwise not
run.
Note that this remains backwards compatible since dict.items() also
existed in python2, though the implementation was more memory intensive
for large dicts (which these likely aren't).
This is similar to https://dart-review.googlesource.com/c/sdk/+/200184
Change-Id: I4fe5c90d21de97d0ecceb27fa6efa7d7deb14098
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200864
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
When constructing the command line for creating the kernel service
snapshot, the variable `abs_output` actually contains a relative
path, which means that copy/pasting the generated command line fails
if not within the root build directory. This CL fixes that.
Change-Id: I0d9fcafac489a6bd4771de1d6db1a2aa3623dcf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200861
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-05-11 sgrekhov@unipro.ru Fixes 1089. Fix flaky Process.kill tests
2021-05-06 sgrekhov@unipro.ru 1082. Generator for dynamic generated tests fixed
2021-05-06 sgrekhov@unipro.ru 1082. Update copyright and comments in Subtyping generated tests
2021-05-05 sgrekhov@unipro.ru 1082. Language version added to all co19_2 tests
2021-05-05 sgrekhov@unipro.ru 1082. Missing Copyrights added and documentation fixed to use single-line comments
2021-05-05 sgrekhov@unipro.ru 1082. Copyright and documentation changed to use single-line comments
Change-Id: I47b4af1cde69ea8f1aa9164c8df045f1120550f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200860
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This avoids the extra redirection through the closure function, which
does not need to be loaded otherwise during closure calls in this mode,
and thus removes another runtime dependency on the closure function in
bare instructions mode.
In non-bare mode, CODE_REG is populated with the code object for the
function, so caching wouldn't change the number of loads there.
This does not increase the size of closure objects, as there was
already a free word in them due to object alignment.
TEST=Existing tests.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64c-try
Change-Id: Ida6e0d277919259a8c0e8dcbfaa101379fd22ff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195920
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This change adds toString transformation to gen_kernel and
frontend_server tools in Dart SDK.
The implementation and tests are derived from
pkg/frontend_server/lib/src/to_string_transformer.dart and
https://github.com/flutter/engine/tree/master/flutter_frontend_server/test.
In addition to _KeepToString in dart:ui, toString transformation
now supports @pragma('flutter:keep-to-string') to exclude
certain toString methods from the transformation without depending
on dart:ui.
pkg/frontend_server/lib/src/to_string_transformer.dart is not
cleaned up in this change yet as it is still used by Flutter
engine. Cleanup will be done after Flutter engine is cleaned up,
after it is switched to the implementation of toString transformer
added in this change.
This is also a step towards a unified kernel compiler
(https://github.com/dart-lang/sdk/issues/39126).
TEST=pkg/vm/test/transformations/to_string_transformer_test.dart
Issue: https://github.com/dart-lang/sdk/issues/46022
Issue: https://github.com/dart-lang/sdk/issues/39126
Change-Id: Icbfd3fa193d54f1fc6b2d7fa0bace82b3704f91f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200525
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This is a temporary fix to give debug tools a recognizable string so
they can hide the type variables from the current scope.
The prefix is only applied when the type appears outside of the
top level type table.
This will require a change in dwds to filter variables with names that
begin with this string.
Change-Id: I2942f462280195d81a7de2b710e6b958770d152a
Issue: https://github.com/dart-lang/sdk/issues/45649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199581
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
If the `prefer_relative_imports` lint is enabled, then suggest relative
import URIs before absolute ones.
Also bring the relevant code in line with Effective Dart:
* DO capitalize acronyms and abbreviations longer than two letters like words. ("Uri" vs "URI")
* AVOID lines longer than 80 characters. (in doc comments)
* DO separate the first sentence of a doc comment into its own paragraph.
* PREFER starting function or method comments with third-person verbs.
Fixes https://github.com/dart-lang/sdk/issues/32916
Change-Id: I2e235cc84bd93e5593a96456eb9b0c615811e268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200660
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The old way was for the JavaScript string literals to be pre-escaped.
This was cumbersome since each place that creates a JavaScript string
literal needs to make a decision about whether escaping is needed and
the kind of escaping (UTF8 or ASCII).
This change moves the responsibility for escaping into the js_ast printer.
The escaped text exists only while printing, which reduces the heap in a
large modular compile link scenario by 220MB, since the unescaped string
is in memory anyway.
There were three kinds of escaping - ASCII, UTF8, and 'legacy', if not
specified. This has been reduced to ASCII (default) and UTF8, chosen by
a printer option.
Change-Id: Ic57d8fb70a213d3518244f1a152cd33e54103259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200400
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
This was disabled previously due to inconsistent cpu time reading reported by the ios.
It seems to be working correctly now.
TEST=verified flutter application cpu timeline numbers in observatory on physical ios device
Change-Id: Id97a550bbbc96a32b5c2ccf59ca9805ea8cb9ec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200703
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Previously, certain fields of Typedef kernel AST nodes
were omitted from visitChildren(), transformChildren() and
transformOrRemoveChildren() and were not properly visited.
Also, the following related problems are fixed in this CL:
* parents of VariableDeclaration nodes in Typedef were not properly set;
* verifier didn't account for VariableDeclaration nodes in Typedefs.
TEST=existing tests
Change-Id: I4f9cb694ad9cacc9c20fe66e8a49f73f547ca245
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96964
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
New invocation nodes have explicit functionType/resultType fields
which should be also visited by various visitors and transformers.
Without visiting those fields not all types are processed by
certain transformation (e.g. tree shaker) which causes crashes
during AOT compilation if new invocation nodes are enabled.
TEST=runtime/tests/vm/dart/regress_45966_test.dart (with new
invocation nodes).
Fixes https://github.com/dart-lang/sdk/issues/45966
Change-Id: I61d79650984a353d842b58da082a021ab37ab777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199365
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The current script stores some environment variable values as GN declarations.
It replaces `"` inside the value with `\"` because it creates a `"`-delimited
string, but it doesn't replace `\` with `\\` as it rightly should to preserve
the meaning of the original string.
That affects **Windows paths**. If your path ends in `\`, the created "string literal"
will end (or rather, not end) with `\"` and not be valid.
Similarly if it contains `\"` originally, it will become `\\"` and end the string
early.
It's easy to have a path ending in something like `C:\something\something\`,
and you can't compile Dart if you have that.
Change-Id: Iaa3cdf0c8113fe2f09e7eb3ac7435bf770d8b478
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200641
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Change-Id: I27b2ae9b091dbc3649ecf1a6dea8da19f4de5f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200431
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
These files are not tests nor are they used by any tests.
This change was split out from patch 198141 which had to be reverted.
Change-Id: I26ca5931bf9e300e694d69ac7558536c965349ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200562
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Static final fields don't get optimized well under jit lightweight isolate configuration: whether "a static final field was initialized"-check can not be optimized out with lightweight isolates.
Issue https://github.com/dart-lang/sdk/issues/36097
TEST=FfiStruct.FieldLoadStore performance benchmark
Change-Id: Ieb739dd9855ff7774877d7984a918644ec36e1e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200320
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Change-Id: Ic0b2fdb90b4e5fce54951905df37678b7b8c23dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200560
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
This reverts commit 1989b7f376.
Reason for revert: Bots are sad, red, and purple
Original change's description:
> Fix orphaned files in tests/language/ and tests/language_2/.
>
> Some of these should be tests but were missing "_test". Others seemed
> to simply be dead code. Some should have been referenced but there were
> mistakes in the imports in other files.
>
> Change-Id: If6f1d9e52a4babbf9883ddd437fc3091179f2ef2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198141
> Auto-Submit: Bob Nystrom <rnystrom@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
TBR=lrn@google.com,leafp@google.com,rnystrom@google.com
Change-Id: I8d63af684023e99849addf9d1c3f87d6bcfbe89d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200531
Reviewed-by: Ben Konyi <bkonyi@google.com>