Version 2.12.0-191.0.dev
Merge commit 'b27735d4043b616d9b9967266cad80b21880ae43' into 'dev'
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index 649b7df..896fd20 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -3819,6 +3819,8 @@
Message Function(String name)>(
messageTemplate:
r"""Field '#name' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution.""",
+ tipTemplate:
+ r"""Mark the field as external to avoid having to initialize it.""",
withArguments: _withArgumentsFfiFieldInitializer);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3834,6 +3836,7 @@
return new Message(codeFfiFieldInitializer,
message:
"""Field '${name}' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution.""",
+ tip: """Mark the field as external to avoid having to initialize it.""",
arguments: {'name': name});
}
diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
index cacf7bc..41fa904 100644
--- a/pkg/analyzer/lib/src/dart/error/ffi_code.dart
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
@@ -46,7 +46,8 @@
static const FfiCode FIELD_IN_STRUCT_WITH_INITIALIZER = FfiCode(
name: 'FIELD_IN_STRUCT_WITH_INITIALIZER',
message: "Fields in subclasses of 'Struct' can't have initializers.",
- correction: "Try removing the initializer.");
+ correction:
+ "Try removing the initializer and marking the field as external.");
/**
* No parameters.
@@ -55,7 +56,8 @@
name: 'FIELD_INITIALIZER_IN_STRUCT',
message: "Constructors in subclasses of 'Struct' can't have field "
"initializers.",
- correction: "Try removing the field initializer.");
+ correction: "Try removing the field initializer and marking the field as"
+ " external.");
/**
* Parameters:
diff --git a/pkg/analyzer/lib/src/workspace/gn.dart b/pkg/analyzer/lib/src/workspace/gn.dart
index fe78cc0..3ceaea6 100644
--- a/pkg/analyzer/lib/src/workspace/gn.dart
+++ b/pkg/analyzer/lib/src/workspace/gn.dart
@@ -143,10 +143,15 @@
/// For a source at `$root/foo/bar`, the packages files are generated in
/// `$root/out/<debug|release>-XYZ/dartlang/gen/foo/bar`.
///
- /// Note that in some cases multiple .packages files can be found at that
- /// location, for example if the package contains both a library and a binary
- /// target. For a complete view of the package, all of these files need to be
- /// taken into account.
+ /// Note that in some cases multiple package_config.json files can be found at
+ /// that location, for example if the package contains both a library and a
+ /// binary target. For a complete view of the package, all of these files need
+ /// to be taken into account.
+ ///
+ /// Additionally, often times the package_config file name is prepended by
+ /// extra words, which results in file names like
+ /// `tiler_component_package_config.json`. Because of this, we cannot simply
+ /// check for `pathContext.basename(file.path) == 'package_config.json'`.
static List<File> _findPackagesFile(
ResourceProvider provider,
String root,
@@ -166,7 +171,7 @@
return genDir
.getChildren()
.whereType<File>()
- .where((File file) => pathContext.extension(file.path) == '.packages')
+ .where((File file) => file.path.endsWith('package_config.json'))
.toList();
}
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
index 7872242..588e22f 100644
--- a/pkg/analyzer/test/src/context/builder_test.dart
+++ b/pkg/analyzer/test/src/context/builder_test.dart
@@ -436,7 +436,11 @@
void test_createWorkspace_noPackagesFile_hasGnMarkerFiles() {
newFolder('/workspace/.jiri_root');
newFile(
- '/workspace/out/debug-x87_128/dartlang/gen/project/lib/lib.packages');
+ '/workspace/out/debug-x87_128/dartlang/gen/project/lib/lib_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": []
+}''');
Workspace workspace = ContextBuilder.createWorkspace(resourceProvider,
convertPath('/workspace/project/lib/lib.dart'), builder);
expect(workspace, TypeMatcher<GnWorkspace>());
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
index a2d3d19..875eb66 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
@@ -398,14 +398,23 @@
}
void _writeWorkspacePackagesFile(Map<String, String> nameToLibPath) {
- var builder = StringBuffer();
- for (var entry in nameToLibPath.entries) {
- builder.writeln('${entry.key}:${toUriStr(entry.value)}');
- }
+ var packages = nameToLibPath.entries.map((entry) => '''{
+ "languageVersion": "2.2",
+ "name": "${entry.key}",
+ "packageUri": ".",
+ "rootUri": "${toUriStr(entry.value)}"
+ }''');
var buildDir = 'out/debug-x87_128';
var genPath = '$workspaceRootPath/$buildDir/dartlang/gen';
- newFile('$genPath/foo.packages', content: builder.toString());
+ newFile('$genPath/foo_package_config.json', content: '''{
+ "configVersion": 2,
+ "packages": [ ${packages.join(', ')} ]
+}''');
+ print('''{
+ "configVersion": 2,
+ "packages": [ ${packages.join(', ')} ]
+}''');
}
}
diff --git a/pkg/analyzer/test/src/workspace/gn_test.dart b/pkg/analyzer/test/src/workspace/gn_test.dart
index 92244fb..9c06fd4 100644
--- a/pkg/analyzer/test/src/workspace/gn_test.dart
+++ b/pkg/analyzer/test/src/workspace/gn_test.dart
@@ -106,10 +106,25 @@
newFolder('/ws/.jiri_root');
String buildDir = convertPath('out/debug-x87_128');
newFile('/ws/.fx-build-dir', content: '$buildDir\n');
- newFile('/ws/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
- content: '''
-p1:file:///some/path/lib/
-workspace:lib/''');
+ newFile(
+ '/ws/out/debug-x87_128/dartlang/gen/some/code/foo_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "p1",
+ "packageUri": "lib",
+ "rootUri": "some/path/"
+ },
+ {
+ "languageVersion": "2.2",
+ "name": "workspace",
+ "packageUri": "lib",
+ "rootUri": ""
+ }
+ ]
+}''');
newFolder('/ws/some/code');
var gnWorkspace =
GnWorkspace.find(resourceProvider, convertPath('/ws/some/code'));
@@ -147,7 +162,8 @@
newFile('/workspace/some/code/pubspec.yaml');
String buildDir = convertPath('out/debug-x87_128');
newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
- newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages');
+ newFile(
+ '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_package_config.json');
GnWorkspace workspace =
GnWorkspace.find(resourceProvider, convertPath('/workspace/some/code'));
expect(workspace, isNotNull);
@@ -162,14 +178,25 @@
newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
String packageLocation = convertPath('/workspace/this/is/the/package');
Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
- newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
- content: 'flutter:$packageUri');
+ newFile(
+ '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "flutter",
+ "packageUri": "lib",
+ "rootUri": "$packageUri"
+ }
+ ]
+}''');
GnWorkspace workspace =
GnWorkspace.find(resourceProvider, convertPath('/workspace/some/code'));
expect(workspace, isNotNull);
expect(workspace.root, convertPath('/workspace'));
expect(workspace.packageMap.length, 1);
- expect(workspace.packageMap['flutter'][0].path, packageLocation);
+ expect(workspace.packageMap['flutter'][0].path, "$packageLocation/lib");
}
void test_packages_absoluteBuildDir() {
@@ -180,14 +207,25 @@
newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
String packageLocation = convertPath('/workspace/this/is/the/package');
Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
- newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
- content: 'flutter:$packageUri');
+ newFile(
+ '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "flutter",
+ "packageUri": "lib",
+ "rootUri": "$packageUri"
+ }
+ ]
+}''');
GnWorkspace workspace =
GnWorkspace.find(resourceProvider, convertPath('/workspace/some/code'));
expect(workspace, isNotNull);
expect(workspace.root, convertPath('/workspace'));
expect(workspace.packageMap.length, 1);
- expect(workspace.packageMap['flutter'][0].path, packageLocation);
+ expect(workspace.packageMap['flutter'][0].path, "$packageLocation/lib");
}
void test_packages_fallbackBuildDir() {
@@ -196,14 +234,25 @@
newFile('/workspace/some/code/pubspec.yaml');
String packageLocation = convertPath('/workspace/this/is/the/package');
Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
- newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
- content: 'flutter:$packageUri');
+ newFile(
+ '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "flutter",
+ "packageUri": "lib",
+ "rootUri": "$packageUri"
+ }
+ ]
+}''');
GnWorkspace workspace =
GnWorkspace.find(resourceProvider, convertPath('/workspace/some/code'));
expect(workspace, isNotNull);
expect(workspace.root, convertPath('/workspace'));
expect(workspace.packageMap.length, 1);
- expect(workspace.packageMap['flutter'][0].path, packageLocation);
+ expect(workspace.packageMap['flutter'][0].path, "$packageLocation/lib");
}
void test_packages_fallbackBuildDirWithUselessConfig() {
@@ -213,14 +262,25 @@
newFile('/workspace/.fx-build-dir', content: '');
String packageLocation = convertPath('/workspace/this/is/the/package');
Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
- newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
- content: 'flutter:$packageUri');
+ newFile(
+ '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "flutter",
+ "packageUri": "lib",
+ "rootUri": "$packageUri"
+ }
+ ]
+}''');
GnWorkspace workspace =
GnWorkspace.find(resourceProvider, convertPath('/workspace/some/code'));
expect(workspace, isNotNull);
expect(workspace.root, convertPath('/workspace'));
expect(workspace.packageMap.length, 1);
- expect(workspace.packageMap['flutter'][0].path, packageLocation);
+ expect(workspace.packageMap['flutter'][0].path, "$packageLocation/lib");
}
void test_packages_multipleCandidates() {
@@ -231,20 +291,42 @@
newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
String packageLocation = convertPath('/workspace/this/is/the/package');
Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
- newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
- content: 'flutter:$packageUri');
+ newFile(
+ '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "flutter",
+ "packageUri": "lib1",
+ "rootUri": "$packageUri"
+ }
+ ]
+}''');
String otherPackageLocation = convertPath('/workspace/here/too');
Uri otherPackageUri =
resourceProvider.pathContext.toUri(otherPackageLocation);
newFile(
- '/workspace/out/release-y22_256/dartlang/gen/some/code/foo.packages',
- content: 'rettulf:$otherPackageUri');
+ '/workspace/out/release-y22_256/dartlang/gen/some/code/foo_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "rettulf",
+ "packageUri": "lib2",
+ "rootUri": "$otherPackageUri"
+ }
+ ]
+}''');
GnWorkspace workspace =
GnWorkspace.find(resourceProvider, convertPath('/workspace/some/code'));
expect(workspace, isNotNull);
expect(workspace.root, convertPath('/workspace'));
expect(workspace.packageMap.length, 1);
- expect(workspace.packageMap['rettulf'][0].path, otherPackageLocation);
+ expect(
+ workspace.packageMap['rettulf'][0].path, "$otherPackageLocation/lib2");
}
void test_packages_multipleFiles() {
@@ -255,20 +337,43 @@
newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
String packageOneLocation = convertPath('/workspace/this/is/the/package');
Uri packageOneUri = resourceProvider.pathContext.toUri(packageOneLocation);
- newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
- content: 'flutter:$packageOneUri');
+ newFile(
+ '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "flutter",
+ "packageUri": "one/lib",
+ "rootUri": "$packageOneUri"
+ }
+ ]
+}''');
String packageTwoLocation =
convertPath('/workspace/this/is/the/other/package');
Uri packageTwoUri = resourceProvider.pathContext.toUri(packageTwoLocation);
newFile(
- '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_test.packages',
- content: 'rettulf:$packageTwoUri');
+ '/workspace/out/debug-x87_128/dartlang/gen/some/code/foo_test_package_config.json',
+ content: '''{
+ "configVersion": 2,
+ "packages": [
+ {
+ "languageVersion": "2.2",
+ "name": "rettulf",
+ "packageUri": "two/lib",
+ "rootUri": "$packageTwoUri"
+ }
+ ]
+}''');
GnWorkspace workspace =
GnWorkspace.find(resourceProvider, convertPath('/workspace/some/code'));
expect(workspace, isNotNull);
expect(workspace.root, convertPath('/workspace'));
expect(workspace.packageMap.length, 2);
- expect(workspace.packageMap['flutter'][0].path, packageOneLocation);
- expect(workspace.packageMap['rettulf'][0].path, packageTwoLocation);
+ expect(
+ workspace.packageMap['flutter'][0].path, "$packageOneLocation/one/lib");
+ expect(
+ workspace.packageMap['rettulf'][0].path, "$packageTwoLocation/two/lib");
}
}
diff --git a/pkg/dartdev/lib/src/commands/test.dart b/pkg/dartdev/lib/src/commands/test.dart
index b5b7c6a..b010f54 100644
--- a/pkg/dartdev/lib/src/commands/test.dart
+++ b/pkg/dartdev/lib/src/commands/test.dart
@@ -29,18 +29,6 @@
@override
FutureOr<int> run() async {
- if (argResults.rest.contains('-h') || argResults.rest.contains('--help')) {
- printUsage();
- return 0;
- }
- if (!project.hasPubspecFile) {
- log.stdout('''
-No pubspec.yaml file found; please run this command from the root of your project.
-''');
-
- printUsage();
- return 65;
- }
try {
final testExecutable = await getExecutableForCommand('test:test');
log.trace('dart $testExecutable ${argResults.rest.join(' ')}');
@@ -49,9 +37,19 @@
join(current, '.dart_tool', 'package_config.json'));
return 0;
} on CommandResolutionFailedException catch (e) {
- print(e.message);
- print('You need to add a dependency on package:test.');
- print('Try running `dart pub add test`.');
+ if (project.hasPubspecFile) {
+ print(e.message);
+ print('You need to add a dev_dependency on package:test.');
+ print('Try running `dart pub add --dev test`.');
+ } else {
+ print(
+ 'No pubspec.yaml file found - run this command in your project folder.');
+ }
+ if (argResults.rest.contains('-h') ||
+ argResults.rest.contains('--help')) {
+ print('');
+ printUsage();
+ }
return 65;
}
}
diff --git a/pkg/dartdev/test/commands/help_test.dart b/pkg/dartdev/test/commands/help_test.dart
index afbaf09..09c3c41 100644
--- a/pkg/dartdev/test/commands/help_test.dart
+++ b/pkg/dartdev/test/commands/help_test.dart
@@ -20,6 +20,7 @@
/// Commands not tested by the following loop.
List<String> _commandsNotTested = <String>[
'help', // `dart help help` is redundant
+ 'test', // `dart help test` does not call `test:test --help`.
];
DartdevRunner(['--no-analytics'])
.commands
@@ -36,6 +37,16 @@
}
});
+ test('(help test ~= test --help) outside project', () {
+ p = project();
+ p.deleteFile('pubspec.yaml');
+ var result = p.runSync(['help', 'test']);
+ var testHelpResult = p.runSync(['test', '--help']);
+
+ expect(testHelpResult.stdout, contains(result.stdout));
+ expect(testHelpResult.stderr, contains(result.stderr));
+ });
+
test('(help pub == pub --help)', () {
p = project();
var result = p.runSync(['help', 'pub']);
diff --git a/pkg/dartdev/test/commands/test_test.dart b/pkg/dartdev/test/commands/test_test.dart
index 00be2bc..cc8b5d0 100644
--- a/pkg/dartdev/test/commands/test_test.dart
+++ b/pkg/dartdev/test/commands/test_test.dart
@@ -24,7 +24,11 @@
final result = p.runSync(['test', '--help']);
expect(result.exitCode, 0);
- expect(result.stdout, contains(' tests in this package'));
+ expect(result.stdout, startsWith('''
+Runs tests in this package.
+
+Usage: pub run test [files or directories...]
+'''));
expect(result.stderr, isEmpty);
});
@@ -46,8 +50,25 @@
var result = p.runSync(['test']);
expect(result.stderr, isEmpty);
- expect(result.stdout, contains('No pubspec.yaml file found'));
+ expect(result.stdout, '''
+No pubspec.yaml file found - run this command in your project folder.
+''');
expect(result.exitCode, 65);
+
+ var resultHelp = p.runSync(['test', '--help']);
+
+ expect(resultHelp.stderr, isEmpty);
+ expect(resultHelp.stdout, '''
+No pubspec.yaml file found - run this command in your project folder.
+
+Run tests in this package.
+
+Usage: dart test [arguments]
+
+
+Run "dart help" to see global options.
+''');
+ expect(resultHelp.exitCode, 65);
});
test('runs test', () {
@@ -90,7 +111,7 @@
expect(result.exitCode, 65);
expect(
result.stdout,
- contains('You need to add a dependency on package:test'),
+ contains('You need to add a dev_dependency on package:test'),
);
expect(result.stderr, isEmpty);
expect(result.exitCode, 65);
diff --git a/pkg/dartdev/test/utils.dart b/pkg/dartdev/test/utils.dart
index 48dcfd7..0ef90d3 100644
--- a/pkg/dartdev/test/utils.dart
+++ b/pkg/dartdev/test/utils.dart
@@ -68,6 +68,12 @@
file.writeAsStringSync(contents);
}
+ void deleteFile(String name) {
+ var file = File(path.join(dir.path, name));
+ assert(file.existsSync());
+ file.deleteSync();
+ }
+
void dispose() {
if (dir.existsSync()) {
dir.deleteSync(recursive: true);
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 9c849fb..83af639 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -4268,6 +4268,7 @@
FfiFieldInitializer:
# Used by dart:ffi
template: "Field '#name' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution."
+ tip: "Mark the field as external to avoid having to initialize it."
external: test/ffi_test.dart
FfiExtendsOrImplementsSealedClass:
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 2459797..543ad37 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -329,11 +329,14 @@
}
}
-static const InstructionSource kPrologueSource(TokenPosition::kDartCodePrologue,
- /*inlining_id=*/0);
+const InstructionSource& PrologueSource() {
+ static InstructionSource prologue_source(TokenPosition::kDartCodePrologue,
+ /*inlining_id=*/0);
+ return prologue_source;
+}
void FlowGraphCompiler::EmitPrologue() {
- BeginCodeSourceRange(kPrologueSource);
+ BeginCodeSourceRange(PrologueSource());
EmitFrameEntry();
ASSERT(assembler()->constant_pool_allowed());
@@ -360,7 +363,7 @@
}
}
- EndCodeSourceRange(kPrologueSource);
+ EndCodeSourceRange(PrologueSource());
}
// Input parameters:
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 2ccf7b4..88f8e0b 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -321,11 +321,14 @@
}
}
-static const InstructionSource kPrologueSource(TokenPosition::kDartCodePrologue,
- /*inlining_id=*/0);
+const InstructionSource& PrologueSource() {
+ static InstructionSource prologue_source(TokenPosition::kDartCodePrologue,
+ /*inlining_id=*/0);
+ return prologue_source;
+}
void FlowGraphCompiler::EmitPrologue() {
- BeginCodeSourceRange(kPrologueSource);
+ BeginCodeSourceRange(PrologueSource());
EmitFrameEntry();
ASSERT(assembler()->constant_pool_allowed());
@@ -352,7 +355,7 @@
}
}
- EndCodeSourceRange(kPrologueSource);
+ EndCodeSourceRange(PrologueSource());
}
// Input parameters:
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
index ecc4cae..1f9624b 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
@@ -475,11 +475,14 @@
}
}
-static const InstructionSource kPrologueSource(TokenPosition::kDartCodePrologue,
- /*inlining_id=*/0);
+const InstructionSource& PrologueSource() {
+ static InstructionSource prologue_source(TokenPosition::kDartCodePrologue,
+ /*inlining_id=*/0);
+ return prologue_source;
+}
void FlowGraphCompiler::EmitPrologue() {
- BeginCodeSourceRange(kPrologueSource);
+ BeginCodeSourceRange(PrologueSource());
EmitFrameEntry();
@@ -507,7 +510,7 @@
}
}
- EndCodeSourceRange(kPrologueSource);
+ EndCodeSourceRange(PrologueSource());
}
void FlowGraphCompiler::CompileGraph() {
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 2f8db78..5cd4559 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -330,11 +330,14 @@
}
}
-static const InstructionSource kPrologueSource(TokenPosition::kDartCodePrologue,
- /*inlining_id=*/0);
+const InstructionSource& PrologueSource() {
+ static InstructionSource prologue_source(TokenPosition::kDartCodePrologue,
+ /*inlining_id=*/0);
+ return prologue_source;
+}
void FlowGraphCompiler::EmitPrologue() {
- BeginCodeSourceRange(kPrologueSource);
+ BeginCodeSourceRange(PrologueSource());
EmitFrameEntry();
ASSERT(assembler()->constant_pool_allowed());
@@ -361,7 +364,7 @@
}
}
- EndCodeSourceRange(kPrologueSource);
+ EndCodeSourceRange(PrologueSource());
}
void FlowGraphCompiler::CompileGraph() {
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index c19ce36..ce5084a 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -172,7 +172,7 @@
* length 4.
* If the [type] is [InternetAddressType.IPv6], the [rawAddress] must have
* length 16.
- * If the [type] is [InternetAddressType.IPv4], the [rawAddress] must be a
+ * If the [type] is [InternetAddressType.unix], the [rawAddress] must be a
* valid UTF-8 encoded file path.
*
* If [type] is omitted, the [rawAddress] must have a length of either 4 or
@@ -433,7 +433,7 @@
/**
* The [SocketOption] is used as a parameter to [Socket.setOption] and
- * [RawSocket.setOption] to set customize the behaviour of the underlying
+ * [RawSocket.setOption] to customize the behaviour of the underlying
* socket.
*/
class SocketOption {
@@ -470,7 +470,7 @@
}
/// The [RawSocketOption] is used as a parameter to [Socket.setRawOption] and
-/// [RawSocket.setRawOption] to set customize the behaviour of the underlying
+/// [RawSocket.setRawOption] to customize the behaviour of the underlying
/// socket.
///
/// It allows for fine grained control of the socket options, and its values
diff --git a/tools/VERSION b/tools/VERSION
index 6ed6580..3971c49 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 190
+PRERELEASE 191
PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/spec_parser/Dart.g b/tools/spec_parser/Dart.g
index a200f70..e13e789 100644
--- a/tools/spec_parser/Dart.g
+++ b/tools/spec_parser/Dart.g
@@ -4,6 +4,37 @@
// CHANGES:
//
+// v0.12 (82403371ac00ddf004be60fa7b705474d2864509) Cf. language issue #1341:
+// correct `metadata`. Change `qualifiedName` such that it only includes the
+// cases with a '.'; the remaining case is added where `qualifiedName` is used.
+//
+// v0.11 (67c703063d5b68c9e132edbaf34dfe375851f5a6) Corrections, mainly:
+// `fieldFormalParameter` now allows `?` on the parameter type; cascade was
+// reorganized in the spec, it is now reorganized similarly here; `?` was
+// removed from argumentPart (null-aware invocation was never added).
+//
+// v0.10 (8ccdb9ae796d543e4ad8f339c847c02b09018d2d) Simplify grammar by making
+// `constructorInvocation` an alternative in `primary`.
+//
+// v0.9 (f4d7951a88e1b738e22b768c3bc72bf1a1062365) Introduce abstract and
+// external variables.
+//
+// v0.8 (a9ea9365ad8a3e3b59115bd889a55b6aa2c5a5fa) Change null-aware
+// invocations of `operator []` and `operator []=` to not have a period.
+//
+// v0.7 (6826faf583f6a543b1a0e2e85bd6a8042607ce00) Introduce extension and
+// mixin declarations. Revise rules about string literals and string
+// interpolation. Reorganize "keywords" (built-in identifiers, reserved words,
+// other words that are specified in the grammar and not parsed as IDENTIFIER)
+// into explicitly marked groups. Change the cascade syntax to be
+// compositional.
+//
+// v0.6 (a58052974ec2b4b334922c5227b043ed2b9c2cc5) Introduce syntax associated
+// with null safety.
+//
+// v0.5 (56793b3d4714d4818d855a72074d5295489aef3f) Stop treating `ASYNC` as a
+// conditional reserved word (only `AWAIT` and `YIELD` get this treatment).
+//
// v0.4 Added support for 'unified collections' (spreads and control flow
// in collection literals).
//