Skip to content

Commit

Permalink
Version 3.0.0-224.0.dev
Browse files Browse the repository at this point in the history
Merge e6e1040 into dev
  • Loading branch information
Dart CI committed Feb 10, 2023
2 parents 44ad6e5 + e6e1040 commit 0ea2a1a
Show file tree
Hide file tree
Showing 219 changed files with 4,780 additions and 1,659 deletions.
4 changes: 3 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ if (is_fuchsia) {
if (defined(invoker.data_deps)) {
data_deps += invoker.data_deps
}
manifest = "build/fuchsia/dart.cmx"
manifest = invoker.manifest

library_files = []
if (defined(invoker.library_files)) {
Expand Down Expand Up @@ -229,6 +229,7 @@ if (is_fuchsia) {
}

dart_fuchsia_test_component("fuchsia_test_component") {
manifest = "build/fuchsia/fuchsia_test_component.cmx"
resource_dirs = [
"tests/standalone_2",
"pkg/async_helper",
Expand Down Expand Up @@ -257,6 +258,7 @@ if (is_fuchsia) {
}

dart_fuchsia_test_component("fuchsia_ffi_test_component") {
manifest = "build/fuchsia/fuchsia_ffi_test_component.cmx"
data_deps = [
"runtime/bin:ffi_test_dynamic_library",
"runtime/bin:ffi_test_functions",
Expand Down
4 changes: 2 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ vars = {
"gn_version": "git_revision:0bcd37bd2b83f1a9ee17088037ebdfe6eab6d31a",

# Update from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/gn
"fuchsia_sdk_version": "git_revision:8658717573be7924d71b88c3d404ea2b4ca4984b",
"fuchsia_sdk_version": "git_revision:7b3b23b2c0da59b3aceab6c49fbe7d9ed34d7382",

# Ninja, runs the build based on files generated by GN.
"ninja_tag": "version:[email protected]",
Expand Down Expand Up @@ -123,7 +123,7 @@ vars = {
"collection_rev": "0d0e184a5f70ca4e23dab23df686127ec40bfb11",
"convert_rev": "83886e3fd895211a98e49b7595a92796fa216641",
"crypto_rev": "03eb2c9098069a7816bbace581dc2d6e196c63ca",
"csslib_rev": "f33d63211f77e2a895b90bcf22508ab7a0af4466", # b/268132431
"csslib_rev": "45264a876d090f441d2bdacc1bb30afa52a0b8ec",
# Note: Updates to dart_style have to be coordinated with the infrastructure
# team so that the internal formatter `tools/sdks/dart-sdk/bin/dart format`
# matches the version here. Please follow this process to make updates:
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions build/fuchsia/fuchsia_test_component.cmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"program": {
"binary": "exe.stripped/dart"
},
"sandbox": {
"features": [
"config-data",
"deprecated-ambient-replace-as-executable",
"isolated-cache-storage",
"isolated-persistent-storage",
"isolated-temp",
"root-ssl-certificates"
],
"services": [
"fuchsia.deprecatedtimezone.Timezone",
"fuchsia.device.NameProvider",
"fuchsia.feedback.CrashReporter",
"fuchsia.intl.PropertyProvider",
"fuchsia.logger.LogSink",
"fuchsia.net.name.Lookup",
"fuchsia.posix.socket.Provider",
"fuchsia.sysmem.Allocator",
"fuchsia.timezone.Timezone",
"fuchsia.tracing.provider.Registry"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,10 @@ mixin TypeAnalyzer<
///
/// See [dispatchPattern] for the meaning of [context].
///
/// Returns the static type of [expression].
///
/// Stack effect: pushes (Expression).
void analyzeConstantPattern(
Type analyzeConstantPattern(
MatchContext<Node, Expression, Pattern, Type, Variable> context,
Node node,
Expression expression) {
Expand All @@ -382,27 +384,28 @@ mixin TypeAnalyzer<
errors?.refutablePatternInIrrefutableContext(node, irrefutableContext);
}
Type matchedType = flow.getMatchedValueType();
Type staticType = analyzeExpression(expression, matchedType);
flow.constantPattern_end(expression, staticType,
Type expressionType = analyzeExpression(expression, matchedType);
flow.constantPattern_end(expression, expressionType,
patternsEnabled: options.patternsEnabled);
// Stack: (Expression)
if (errors != null && !options.patternsEnabled) {
Expression? switchScrutinee = context.getSwitchScrutinee(node);
if (switchScrutinee != null) {
bool nullSafetyEnabled = options.nullSafetyEnabled;
bool matches = nullSafetyEnabled
? operations.isSubtypeOf(staticType, matchedType)
: operations.isAssignableTo(staticType, matchedType);
? operations.isSubtypeOf(expressionType, matchedType)
: operations.isAssignableTo(expressionType, matchedType);
if (!matches) {
errors.caseExpressionTypeMismatch(
caseExpression: expression,
scrutinee: switchScrutinee,
caseExpressionType: staticType,
caseExpressionType: expressionType,
scrutineeType: matchedType,
nullSafetyEnabled: nullSafetyEnabled);
}
}
}
return expressionType;
}

/// Computes the type schema for a constant pattern.
Expand Down
4 changes: 2 additions & 2 deletions pkg/_js_interop_checks/lib/js_interop_checks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class JsInteropChecks extends RecursiveVisitor {
'_foreign_helper', // for foreign helpers
'_late_helper', // for dart2js late variable utilities
'_interceptors', // for ddc JS string
'_js_interop',
'_native_typed_data',
'_runtime', // for ddc types at runtime
'async',
Expand All @@ -74,6 +73,7 @@ class JsInteropChecks extends RecursiveVisitor {
'html_common',
'indexed_db',
'js',
'js_interop',
'js_util',
'svg',
'web_audio',
Expand All @@ -84,7 +84,7 @@ class JsInteropChecks extends RecursiveVisitor {
/// Libraries that need to use external extension members with static interop
/// types.
static final Iterable<String> _customStaticInteropImplementations = [
'_js_interop',
'js_interop',
];

/// Native tests to exclude from checks on external.
Expand Down
35 changes: 16 additions & 19 deletions pkg/analysis_server/benchmark/benchmarks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ abstract class Benchmark {

bool get needsSetup => false;

Future oneTimeCleanup() => Future.value();
Future<void> oneTimeCleanup() => Future.value();

Future oneTimeSetup() => Future.value();
Future<void> oneTimeSetup() => Future.value();

Future<BenchMarkResult> run({
required String dartSdkPath,
bool quick = false,
bool verbose = false,
});

Map toJson() =>
Map<String, Object?> toJson() =>
{'id': id, 'description': description, 'enabled': enabled, 'kind': kind};

@override
Expand All @@ -106,7 +106,7 @@ class BenchMarkResult {
return BenchMarkResult(kindName, math.min(value, other.value));
}

Map toJson() => {kindName: value};
Map<String, Object?> toJson() => {kindName: value};

@override
String toString() => '$kindName: $value';
Expand All @@ -124,35 +124,32 @@ class CompoundBenchMarkResult extends BenchMarkResult {
}

@override
BenchMarkResult combine(BenchMarkResult other) {
BenchMarkResult combine(covariant CompoundBenchMarkResult other) {
BenchMarkResult combine(BenchMarkResult? a, BenchMarkResult? b) {
if (a == null) return b!;
if (b == null) return a;
return a.combine(b);
}

var o = other as CompoundBenchMarkResult;

var combined = CompoundBenchMarkResult(name);
var keys = (<String>{}
..addAll(results.keys)
..addAll(o.results.keys))
.toList();
var keys = {
...results.keys,
...other.results.keys,
}.toList();

for (var key in keys) {
combined.add(key, combine(results[key], o.results[key]));
combined.add(key, combine(results[key], other.results[key]));
}

return combined;
}

@override
Map toJson() {
var m = <String, dynamic>{};
for (var entry in results.entries) {
m['$name-${entry.key}'] = entry.value.toJson();
}
return m;
Map<String, Object?> toJson() {
return {
for (var entry in results.entries)
'$name-${entry.key}': entry.value.toJson(),
};
}

@override
Expand Down Expand Up @@ -186,7 +183,7 @@ class ListCommand extends Command {
@override
void run() {
if (argResults!['machine'] as bool) {
var map = <String, dynamic>{
var map = <String, Object?>{
'benchmarks': benchmarks.map((b) => b.toJson()).toList()
};
print(JsonEncoder.withIndent(' ').convert(map));
Expand Down
Loading

0 comments on commit 0ea2a1a

Please sign in to comment.