Also adds a '-nvh' short-hand for '--no-verify-sdk-hash'
Change-Id: If893953e592128a8fa0b2f2e5720748d4b9b76aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153770
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Two tricks let us compile this more efficiently:
e.children.addAll(cs);
Normally, get$children is inlined, returning a _ChildrenElementList
wrapper, generating:
new W._ChildrenElementList(e, e.children).addAll$1(0, cs);
The two tricks:
1. Split _ChildElementList.addAll into an 'unwrap' that then calls the
logic in '_addAll'
2. Add information about the properties of e.children that allow it to
be removed.
With these tricks, dart2js can optimize the code to this version that
avoids allocating a wrapper or accessing the 'children' property:
W._ChildrenElementList__addAll(e, cs);
Change-Id: Ifdf533ac4f9790f09f87302e67304b5696097266
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153904
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This uses the build feature added by:
https://dart-review.googlesource.com/c/sdk/+/139782
Bug:b/151697301
Cq-Include-Trybots: dart/try:dart-sdk-mac-try
Change-Id: Ia8e748c1b8f0bc8836d94b110e686c41d3b69094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153982
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This change tests that run_vm_tests runs correctly when provided with
the kernel service snapshot, which is needed to run benchmarks like
UseDartApi.
Test building the kernel-service.dart.snapshot.
Change-Id: I1cb750a16e32daba2eee46e245cc7d4e7d230165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151395
Reviewed-by: Alexander Aprelev <aam@google.com>
The result from 'gcloud auth print-access-token' contains a
new-line that cannot be used in the header. To make this use case
easier, remove new-lines, if found.
Change-Id: I44a9cc2bcfe4a8ef06e47a8495e69e116e9a6dfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153921
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
logRecords is expected to be of type dict, but the fallback value
was previously set to [] (type list).
This CL changes the fallback values to an empty dict.
It also uses the builtin dict.get() to handle to fallback instead
of manually doing so.
Note: This CL will not make the bot go green.
It will change it from purple (infra failure due to crash) to red
since there are tests that are legitimately failing.
Bug: https://github.com/dart-lang/sdk/issues/42625
Cq-Include-Trybots: dart/try:vm-dartkb-linux-release-x64-abi-try
Change-Id: I12ad7688719039566cd16e128997f0f8efc60a69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153600
Commit-Queue: Clement Skau <cskau@google.com>
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Note: This is a reland of https://dart-review.googlesource.com/c/sdk/+/150343
Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.
The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.
This new check can be disabled via:
tools/gn.py ... --no-verify-sdk-hash
This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.
This also bumps the min. and current ABI version.
Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I2f85945045a603eb9dcfd1f2c0d0d024bd84a956
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152802
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This CL adds tests in language/external_abstract_fields, testing the
support for abstract instance variables, and for external top-level,
class, and instance variables. It is tested that the syntax of
supported declarations is accepted, and a number of non-supported
forms are rejected, and abstract fields are tested at run time as well.
The implementation of external fields is provided by an implementation
specific mechanism, and no tests are added for any such mechanisms
(that is, with external fields we only test errors).
This CL also updates the spec grammar Dart.g to include grammar
rules for the new kinds of declarations, and it has been verified that
the new tests are passing, respectively cause syntax errors, as
indicated in the test files.
The tests are a further development of the ones in
https://dart-review.googlesource.com/c/sdk/+/145862.
Change-Id: I13be746a05d5acf0117d8cb22151bd9863a71a78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148324
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This reverts commits aff77e7e..e24f205d.
Due to a breakage in a Flutter roll, this CL stack needs to be
reverted. It should be reintroduced with changes to Flutter code to
compile with the changes in dart:html.
Breakage: https://github.com/flutter/engine/runs/828631927
Change-Id: I9c93c4eab823337d09d2e347015ad9ec402f2038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152910
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Getter types need to be a subtype of the setter type, so if getters
are nullable due to incompatibility, the setter needs to be as well.
This change makes those changes, updates documentation, and modifies
a template and test file.
Change-Id: I2130538bb4005b3553eb7951af022c1c2ed59c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152607
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Mostly null-assertions to make code compatible with compat
data changes.
Change-Id: I8f7c6c2421d6427851a44588978910deae8440bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152047
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Native getters in src/template files are modified to reflect the info
in the compatibility data.
Change-Id: I98f96737e21c7b4ce6bd17ea398e9806c61122b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152046
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Native getters that are incompatible were marked as nullable even
though they may override methods that aren't nullable. This fixes
those conflicts for various HTML methods.
Change-Id: I7c2456d5d223d825428cedb847d20139b7d271c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152045
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Bug: https://github.com/dart-lang/sdk/issues/41944
Note that the compatibility data on secure contexts is fairly
sparse and has missing information. There are only two APIs that
have secure context info on them and they're already marked as
incompatible.
Change-Id: Iaf9ecb7a916c8ac20b32e1ea92ed44981f675659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152044
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Bug: https://github.com/dart-lang/sdk/issues/41905
Uses MDN information in the generator script to get a better idea
of which attributes are compatible and are not. mdnreader.py is
introduced to parse the data present in third_party.
Change-Id: I330ccf918cb42deb4c09ab97db5f3d2f0c432d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149800
Reviewed-by: Stephen Adams <sra@google.com>
- Imports __future__.print_function to make printing consistent and
robust across Python versions.
- Removes do-nothing os.path.join()s.
- Replaces all " with ' for consistency.
- Further gathers all "consts" and helpers at the top.
- Replaces old-style modulo formatting operator with new-style .format().
- Removes redundant if-return-else-return patterns for readability.
- Parameterises several subprocess cwd instead of hardcoded values.
This should make it easier to use with other paths (g3 builds).
- Adds decode()'ing to process output to convert bytes to strs.
This stops json.dump crashing in Py3. As well as Golem crashing in gn.
- Style, formatting, etc., etc.
Change-Id: I2bd7136aa18b12c4b18d9260f1539f16630065a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152842
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This refactoring is being done to make it easier to integrate
this code into internal builds.
It has the added benefit of cleaning up some really wonderful code.
Change-Id: I30f22785cc1f3dec00e01fb809115344284375c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152840
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This reverts commit 7fc61e77e2.
Reason for revert: An internal build is now trying to use goma
when it shouldn't, and failing. There is no easy way to override
this setting in build.py, and there should be.
Original change's description:
> [build] Use Goma from depot_tools instead of $HOME/goma
>
> Goma will only be distributed with depot_tools in the future.
>
> Change-Id: Ia7a7faf76f2562bde97d4f88cfe5db02ba76b561
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152652
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>
TBR=karlklose@google.com,athom@google.com,whesse@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I754e4a9d93090e014a995e86c46422989cf536d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152800
Reviewed-by: William Hesse <whesse@google.com>
Goma will only be distributed with depot_tools in the future.
Change-Id: Ia7a7faf76f2562bde97d4f88cfe5db02ba76b561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152652
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This reverts commit edde575dcd.
Reason for revert: Breaks the Dart to Flutter roll and golem
Original change's description:
> [SDK] Adds an SDK hash to kernels and the VM.
>
> Adds a new SDK hash to kernels and the VM which is optionally checked
> to verify kernels are built for the same SDK as the VM.
> This helps catch incompatibilities that are currently causing
> subtle bugs and (not so subtle) crashes.
>
> The SDK hash is encoded in kernels as a new field in components.
> The hash is derived from the 10 byte git short hash.
>
> This new check can be disabled via:
> tools/gn.py ... --no-verify-sdk-hash
>
> This CL bumps the min. (and max.) supported kernel format version,
> making the VM backwards incompatible from this point back.
>
> Bug: https://github.com/dart-lang/sdk/issues/41802
> Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,jensj@google.com,cskau@google.com
Change-Id: I34cc7d378e2babdaaca4d932d19c19d0f35422fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/41802
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152703
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.
The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.
This new check can be disabled via:
tools/gn.py ... --no-verify-sdk-hash
This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.
Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This adds the option '-s' to select posting the results to the
staging system instead of the production system.
Change-Id: I990a39c7db3d0379935b69007ebc9477da5cc051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151528
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
It relies on flutter copy of clang distribution, same one that is used to build flutter/engine.
It addressed several deprecated warnings from clang compiler for functions like strdup, unlink, etc.
It allows few warnings still since they are triggered in third_party sources.
Change-Id: Ieb13792c011438d46dbbc0fa030e1b5e4ea14315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142704
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
To be used to enable the alternative invalidation strategy for
incremental compilation.
Change-Id: Ie4b140825d90f98aed8209eb3a5da8f2fa4dc192
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150341
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Since the sdk has been unforked, scripts should be updated to
generate files by always using NNBD. As such, nnbd_src has been
moved to src and the old src has been deleted. This does not address
the nnbd tokens e.g. $NULLABLE. That will be done in a future CL.
Change-Id: I00bead16a9d19569b07ad0601f581fc14400fdce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151864
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Feels a little weird to be improving a script that will hopefully be
gone in less than a week, but the current behavior is definitely wrong.
Change-Id: I43e8606b82b95f071d359ab348261e85bc4cbe7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152220
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This reverts commit 65e3c9d3b1.
Reason for revert: package:logging, package:stack_trace and package:usage need to be migrated first.
Original change's description:
> [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
>
> Port the service tests and Observatory to Dart 3.
>
> Changes from the original landing:
>
> - The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
> - The test harness is taught about 'service_2'
> - Observatory's package is added to front end's opt-in list
> - Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots
>
> The ported tests themselves are not changed.
>
> Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,rmacnak@google.com
Change-Id: I43b72f149d8d7e9fe06006cdd8593fed1726aa3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152004
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
Port the service tests and Observatory to Dart 3.
Changes from the original landing:
- The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
- The test harness is taught about 'service_2'
- Observatory's package is added to front end's opt-in list
- Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots
The ported tests themselves are not changed.
Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>