**This change cannot easily be reverted**: After reverting this change,
dart-ci-internal-release-bucket-breakglass must be broken by a member of
Dart EngProd and gs://dart-archive/channels/main/raw/latest must be
purged as well as gs://dartlang-api-docs/channels/main/latest.txt. This
operation would risk our release security and it is strongly preferred
if any problems can be fixed forward instead.
This change will upload the main channel builds to the main directory in
the dart-archive bucket instead of the be directory. The existing builds
remain where they are and the last version on the be channel remains
permanently frozen.
The downstream uses already have forward compatibility for the new
channel name. The Dart recipes respect the input channel name and output
to the release location by that name. The api.dart.dev service will
notice when the main channel pops into existence and switch
api.dart.dev/be to become api.dart.dev/main. The setup-dart github
action will likewise notice when the main channel starts existing.
The main channel is not an officially supported product since the builds
are not signed and tested and we don't advertise the existence of these
builds to our users. Ideally nobody would be broken by this change since
they shouldn't be using the main channel builds, but if they are, they
will have to rename the channel in their download links.
This change ensures that all the release branches and release channels
have the same matching names, which simplifies our infrastructure and
makes our releases easier to understand.
Fixes: b/270022416
Change-Id: Ib47ae7d2ded5fe0d405b3f19c34981c38082a090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327940
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This adds a clarifying note the reproduction command emitted
when id-tests fail, that the used dart executable must be from
the out/ReleaseX64/dart-sdk/bin folder.
Change-Id: Iabbe68063f097544bb1ad1ca43d73ca27ccaa183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335462
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
There is much code in pkg/analyzer/lib/src/lint which is only used by
_tests_ and _tools_ in the linter package. This CL attempts to tidy up
the separation of linter lib code and non-lib code by moving some
files, and moving some source elements, which are only used in tests,
or in tools.
I originally dug into this because I saw `LinterOptions` has a public late field
(dangerous):
`late file_system.ResourceProvider resourceProvider;`
It turns out this field is only initialized in tests and tools, and
then it's read by multiple methods, and it just so happens those
methods are only called during tests or in tools.
Summary of changes:
* Mark LintDriver and DartLinter classes as only used for linter tools
and tests.
* Remove CamelCaseString class.
* Mark `DartLinter.lintPubspecSource` as `@visibleForTesting`.
* LinterOptions: mark `enabledLints` and `analysisOptions` final, and remove
`resourceProvider`.
* Remove SourceLinter; it was only used in a few `engine_test.dart` tests in
linter, but all uses could be replaced with DartLinter.
* Remove linter's `bin/linter.dart`; it is not meant to be used as any sort of
user entrypoint. The main method is moved to `cli.dart`.
* Move linter's `lib/src/cli.dart` to `tool/cli.dart`.
* analyzer's top-level function `lintFiles`, classes ErrorWatchingSink
and FileGlobFilter are moved to linter's tool/ directory.
* Delete the engine_test.dart tests which only validate basics of
linter's old entrypoint.
This reverts commit d1bc88de8f.
Change-Id: I1063aa72c640ad8ab62f76bf89f665cb8b9952dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334645
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
The test was relying on the runtime type representation to verify
that the library object returned from `getLibrary` was correct. Now
it uses the static `print()` method instead to avoid issues in the new
type system.
Change-Id: Iaa26427e46afd0e7f4ae0a84cb4c123755484647
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335023
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
All transformations to the dill are now performed with the CFE linker phase (phase0b). This means we no longer need to emit a dill as part of the closed world computation. This saves both time and memory resources associated with the cost of serialization during that phase.
Change-Id: I28dde8a1eecd71e823880027505f62fc804fcca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332821
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Constants are current evaluated in a few places during closed world generation, primarily as part of the ScopeModelBuilder. The scope visitor was modifying the AST which meant we had to emit a new dill with these evaluated constants along with the closed world results.
This change instead evaluates the constants directly after linking the Kernel as part of the global transformations. This means we can update the ScopeModelBuilder to not mutate the AST at all as all constants are already simplified.
A potential follow up here is to simplify the ScopeModelBuilder since all nodes should already be simplified if they can be, we should be able to avoid visiting some children.
After this change we only directly create a single ConstantEvaluator, the one in `load_kernel`. The const simplifier also creates one and a follow up CL moves this to to run right after this new transformation.
Note: Alternate versions of this CL tried to make the global transformation simpler by either:
1) Running the const evaluator indiscriminately on all expressions. This didn't work because it lead to exponential computation on constants set up as a DAG (see tests/language/const/constant_dag_test).
2) Only evaluating ConstantExpression nodes to update UnevaluatedConstants. This does not cover all the cases where the ScopeModelBuilder is modifying the tree and lead to a different compiler output.
Change-Id: I746d889b37feddc9ab6c386c6252016dec745e6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332601
Reviewed-by: Mayank Patke <fishythefish@google.com>
- Add mixins to the implementation classes rather than the base classes.
This makes `this.member` calls in the mixed-in members direct calls
and allows inlining.
- Make immutable classes subclasses of mutable classes. This makes sure
we have one `[]` implementation per typed list type and allows
inlining `[]`.
- Implement specialized iterators for each typed list. This allows
unboxed and unchecked iteration of array elements.
# Final class hierarchy:
- `final class JSARrayBufferImpl implements ByteBuffer`:
The JS `ArrayBuffer` class.
- `final class JSDataViewImpl implements ByteData`:
The JS `DataView` class.
- `abstract class JSArrayBase implements TypedData`:
Base class for all typed array classes. Implements common operations
on the the `DataView` `externref`.
## Array classes
- `_IntListMixin`:
Implements `List<int>` operations. Declares unchecked getters and
setters and uses them when possible for performance.
- `_UnmodifiableIntListMixin`:
Overrides only `get buffer`, `[]=`, and `setRange` to convert a
`List<int>` implemented with `_IntListMixin` to unmodifiable.
- `JSUint8ArrayImpl extends JSArrayBase with _IntListMixin implements Uint8List`:
The `Uint8Array` class.
- One class as above for `Int8Array`, `Uint16Array` etc.
- `UnmodifiableJSUint8Array extends JSUint8ArrayImpl with _UnmodifiableIntListMixin implements UnmodifiableUint8ListView`:
Same as `JSUint8ArrayImpl`, but made immutable with
`_UnmodifiableIntListMixin`.
- One class as above for the rest of the int arrays.
- `double` classes have the same structure as the `int` classes.
## Iterator classes
To allow fast iteration with `get iterator`, each array class has its
own iterator class. Compared to a generic iterator shared by all
classes, these classes (1) do direct (instead of virtual) and unchecked
(instead of bound checked) calls to read the elements (2) avoid boxing
the `current` elements by having a field with the right non-nullable
type, `int` or `double`.
# Benchmarks
In a benchmark that decodes a 1.3M large protobuf:
- Before: 35.9 seconds.
- After: 3.2 seconds.
(Remaining performance issues in this benchmark are in the
`dart:convert` implementation for JSCM, which I will be optimizing
separately)
Change-Id: I5f29882600c1ca95972e2a62af22b181787cb73a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334465
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
stringref target won't be used any time soon (probably ever). To help
with build times and avoid keeping it updated remove it for now.
Change-Id: I0df33b7ab2e19bae5090e8ea32ea6a3dc3751652
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334881
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
The test creates DateTime objects reusing the data from another
DateTime object, but on one case it didn't include the seconds and
milliseconds value.
When using the minimum date value, this omission made the copy to be
out of range, and as a result returned an InvalidDate.
Change-Id: I83f1d8a755e8d3a78ef0fd0468ee80e162c10545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335400
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
All tests skipped here are flaking or timing out. Most of them fail for
a common reason tracked in
https://github.com/dart-lang/sdk/issues/53985: Chrome inactive tabs do
not run behave the same as active tabs. This means that interactions like
css transitions, requestAnimationFrame, and video play don't work as
expected.
This CL skips the tests only on Chrome, but continues to run them in
other browsers where the expectation is met. If we can in the future
ensure tests are run on an active tab, we can consider reneabling these
tests. That said, the value of this tests was higher when we mantained
Dartium, but these days we may consider deleting them instead.
Change-Id: I9c0ea230fecca16fa008b64c2cf316ccdd0f53e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335030
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>