Version 2.16.0-46.0.dev
Merge commit 'a860e69f57a2c29b6dd04b347adcaad3742eebdd' into 'dev'
diff --git a/pkg/dartdev/test/load_from_dill_test.dart b/pkg/dartdev/test/load_from_dill_test.dart
index e73d35e..633e7af 100644
--- a/pkg/dartdev/test/load_from_dill_test.dart
+++ b/pkg/dartdev/test/load_from_dill_test.dart
@@ -16,11 +16,11 @@
test("Fallback to dartdev.dill from dartdev.dart.snapshot for 'Hello World'",
() async {
p = project(mainSrc: "void main() { print('Hello World'); }");
- // The DartDev snapshot includes the --use-bare-instructions flag. If
- // --no-use-bare-instructions is passed, the VM will fail to load the
+ // The DartDev snapshot includes the --use_field_guards flag. If
+ // --no-use-field-guards is passed, the VM will fail to load the
// snapshot and should fall back to using the DartDev dill file.
ProcessResult result =
- await p.run(['--no-use-bare-instructions', 'run', p.relativeFilePath]);
+ await p.run(['--no-use-field-guards', 'run', p.relativeFilePath]);
expect(result.stdout, contains('Hello World'));
expect(result.stderr, isEmpty);
diff --git a/pkg/front_end/test/fasta/types/dart2js_benchmark.dart b/pkg/front_end/test/fasta/types/dart2js_benchmark.dart
index b302938..c55dc33 100644
--- a/pkg/front_end/test/fasta/types/dart2js_benchmark.dart
+++ b/pkg/front_end/test/fasta/types/dart2js_benchmark.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "dart:io" show Platform;
import "subtypes_benchmark.dart" show run;
diff --git a/pkg/front_end/test/fasta/types/dart2js_benchmark_test.dart b/pkg/front_end/test/fasta/types/dart2js_benchmark_test.dart
index 590937d..340ae12 100644
--- a/pkg/front_end/test/fasta/types/dart2js_benchmark_test.dart
+++ b/pkg/front_end/test/fasta/types/dart2js_benchmark_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "dart2js_benchmark.dart" as bench show main;
void main() => bench.main();
diff --git a/pkg/front_end/test/fasta/types/dill_hierachy_test.dart b/pkg/front_end/test/fasta/types/dill_hierachy_test.dart
index e37a8c3..cf2e491 100644
--- a/pkg/front_end/test/fasta/types/dill_hierachy_test.dart
+++ b/pkg/front_end/test/fasta/types/dill_hierachy_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "package:async_helper/async_helper.dart" show asyncTest;
import "package:expect/expect.dart" show Expect;
@@ -123,9 +121,9 @@
new NoneTarget(new TargetFlags()));
final DillLoader loader = target.loader;
loader.appendLibraries(component);
- await target.buildOutlines();
- ClassBuilder objectClass =
- loader.coreLibrary.lookupLocalMember("Object", required: true);
+ target.buildOutlines();
+ ClassBuilder objectClass = loader.coreLibrary
+ .lookupLocalMember("Object", required: true) as ClassBuilder;
ClassHierarchyBuilder hierarchy = new ClassHierarchyBuilder(
objectClass, loader, new CoreTypes(component));
Library library = component.libraries.last;
diff --git a/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
index 33af5ac..cc4493a 100644
--- a/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
+++ b/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
@@ -2,9 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
-import "package:kernel/ast.dart" show DartType, Library;
+import "package:kernel/ast.dart" show DartType, InterfaceType, Library;
import "package:kernel/target/targets.dart" show NoneTarget, TargetFlags;
@@ -33,7 +31,7 @@
final Ticker ticker;
final CompilerContext context;
- ClassHierarchyBuilder hierarchy;
+ late ClassHierarchyBuilder hierarchy;
FastaLegacyUpperBoundTest(this.ticker, this.context);
@@ -50,16 +48,17 @@
new NoneTarget(new TargetFlags()));
final DillLoader loader = target.loader;
loader.appendLibraries(env.component);
- await target.buildOutlines();
- ClassBuilder objectClass =
- loader.coreLibrary.lookupLocalMember("Object", required: true);
+ target.buildOutlines();
+ ClassBuilder objectClass = loader.coreLibrary
+ .lookupLocalMember("Object", required: true) as ClassBuilder;
hierarchy = new ClassHierarchyBuilder(objectClass, loader, env.coreTypes);
}
@override
DartType getLegacyLeastUpperBound(
DartType a, DartType b, Library clientLibrary) {
- return hierarchy.getLegacyLeastUpperBound(a, b, clientLibrary);
+ return hierarchy.getLegacyLeastUpperBound(
+ a as InterfaceType, b as InterfaceType, clientLibrary);
}
}
diff --git a/pkg/front_end/test/fasta/types/fasta_types_test.dart b/pkg/front_end/test/fasta/types/fasta_types_test.dart
index 83135453..ecff945 100644
--- a/pkg/front_end/test/fasta/types/fasta_types_test.dart
+++ b/pkg/front_end/test/fasta/types/fasta_types_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "package:async_helper/async_helper.dart" show asyncTest;
import "package:kernel/ast.dart" show Component, DartType;
@@ -55,9 +53,9 @@
new NoneTarget(new TargetFlags()));
final DillLoader loader = target.loader;
loader.appendLibraries(sdk);
- await target.buildOutlines();
- ClassBuilder objectClass =
- loader.coreLibrary.lookupLocalMember("Object", required: true);
+ target.buildOutlines();
+ ClassBuilder objectClass = loader.coreLibrary
+ .lookupLocalMember("Object", required: true) as ClassBuilder;
ClassHierarchyBuilder hierarchy =
new ClassHierarchyBuilder(objectClass, loader, new CoreTypes(sdk));
new FastaTypesTest(hierarchy, environment).run();
@@ -85,7 +83,7 @@
}
@override
- TypeParserEnvironment extend(String typeParameters) {
+ TypeParserEnvironment extend(String? typeParameters) {
return environment.extendWithTypeParameters(typeParameters);
}
}
diff --git a/pkg/front_end/test/fasta/types/hashcode_test.dart b/pkg/front_end/test/fasta/types/hashcode_test.dart
index 0c1fbfe..a7542c1 100644
--- a/pkg/front_end/test/fasta/types/hashcode_test.dart
+++ b/pkg/front_end/test/fasta/types/hashcode_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.md file.
-// @dart = 2.9
-
import 'package:expect/expect.dart';
import 'package:kernel/kernel.dart';
diff --git a/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
index aeffa98..9ce7b25 100644
--- a/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
+++ b/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
@@ -2,31 +2,29 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "legacy_upper_bound_helper.dart" show LegacyUpperBoundTest;
-import "package:kernel/ast.dart" show DartType, Library;
+import "package:kernel/ast.dart" show DartType, InterfaceType, Library;
import "package:kernel/class_hierarchy.dart" show ClassHierarchy;
class KernelLegacyUpperBoundTest extends LegacyUpperBoundTest {
- ClassHierarchy hierarchy;
+ late ClassHierarchy hierarchy;
@override
bool get isNonNullableByDefault => true;
@override
- Future<void> parseComponent(String source) {
- super.parseComponent(source);
+ Future<void> parseComponent(String source) async {
+ await super.parseComponent(source);
hierarchy = new ClassHierarchy(env.component, env.coreTypes);
- return null;
}
@override
DartType getLegacyLeastUpperBound(
DartType a, DartType b, Library clientLibrary) {
- return hierarchy.getLegacyLeastUpperBound(a, b, clientLibrary);
+ return hierarchy.getLegacyLeastUpperBound(
+ a as InterfaceType, b as InterfaceType, clientLibrary);
}
}
diff --git a/pkg/front_end/test/fasta/types/kernel_type_parser_test.dart b/pkg/front_end/test/fasta/types/kernel_type_parser_test.dart
index edae38a..f6c6728 100644
--- a/pkg/front_end/test/fasta/types/kernel_type_parser_test.dart
+++ b/pkg/front_end/test/fasta/types/kernel_type_parser_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "package:expect/expect.dart" show Expect;
import "package:kernel/ast.dart" show Component, DartType, Library;
@@ -147,7 +145,7 @@
}
@override
- TypeParserEnvironment extend(String typeParameters) {
+ TypeParserEnvironment extend(String? typeParameters) {
return environment.extendWithTypeParameters(typeParameters);
}
}
diff --git a/pkg/front_end/test/fasta/types/large_app_benchmark.dart b/pkg/front_end/test/fasta/types/large_app_benchmark.dart
index 28c653f..2403d67 100644
--- a/pkg/front_end/test/fasta/types/large_app_benchmark.dart
+++ b/pkg/front_end/test/fasta/types/large_app_benchmark.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "dart:io" show Platform;
import "subtypes_benchmark.dart" show run;
diff --git a/pkg/front_end/test/fasta/types/large_app_benchmark_test.dart b/pkg/front_end/test/fasta/types/large_app_benchmark_test.dart
index 3037003..24cefc6 100644
--- a/pkg/front_end/test/fasta/types/large_app_benchmark_test.dart
+++ b/pkg/front_end/test/fasta/types/large_app_benchmark_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "large_app_benchmark.dart" as bench show main;
void main() => bench.main();
diff --git a/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart b/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
index 3d4c7d6..a47c4ee 100644
--- a/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
+++ b/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "package:async_helper/async_helper.dart" show asyncTest;
import "package:expect/expect.dart" show Expect;
@@ -15,13 +13,13 @@
final Uri libraryUri = Uri.parse("org-dartlang-test:///library.dart");
abstract class LegacyUpperBoundTest {
- parser.Env env;
- Library coreLibrary;
- Library testLibrary;
+ late parser.Env env;
+ late Library coreLibrary;
+ late Library testLibrary;
bool get isNonNullableByDefault;
- void parseComponent(String source) {
+ Future<void> parseComponent(String source) {
env =
new parser.Env(source, isNonNullableByDefault: isNonNullableByDefault);
assert(
@@ -42,6 +40,7 @@
coreLibrary = secondLibrary;
testLibrary = firstLibrary;
}
+ return new Future<void>.value();
}
DartType getLegacyLeastUpperBound(
diff --git a/pkg/front_end/test/fasta/types/shared_type_tests.dart b/pkg/front_end/test/fasta/types/shared_type_tests.dart
index f219fb6..224378f 100644
--- a/pkg/front_end/test/fasta/types/shared_type_tests.dart
+++ b/pkg/front_end/test/fasta/types/shared_type_tests.dart
@@ -2,15 +2,13 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "package:expect/expect.dart" show Expect;
import "package:kernel/type_environment.dart";
abstract class SubtypeTest<T, E> {
void isSubtype(String subtypeString, String supertypeString,
- {String typeParameters}) {
+ {String? typeParameters}) {
E environment = extend(typeParameters);
T subtype = toType(subtypeString, environment);
T supertype = toType(supertypeString, environment);
@@ -21,7 +19,7 @@
}
void isNotSubtype(String subtypeString, String supertypeString,
- {String typeParameters}) {
+ {String? typeParameters}) {
E environment = extend(typeParameters);
T subtype = toType(subtypeString, environment);
T supertype = toType(supertypeString, environment);
@@ -33,7 +31,7 @@
/// Checks if a type is a subtype of the other ignoring nullability modifiers.
void isObliviousSubtype(String subtypeString, String supertypeString,
- {String typeParameters}) {
+ {String? typeParameters}) {
E environment = extend(typeParameters);
T subtype = toType(subtypeString, environment);
T supertype = toType(supertypeString, environment);
@@ -54,7 +52,7 @@
IsSubtypeOf isSubtypeImpl(T subtype, T supertype);
- E extend(String typeParameters);
+ E extend(String? typeParameters);
void run() {
// Tests for subtypes and supertypes of num.
diff --git a/pkg/front_end/test/fasta/types/subtypes_benchmark.dart b/pkg/front_end/test/fasta/types/subtypes_benchmark.dart
index 6ab0236..d3c0a09 100644
--- a/pkg/front_end/test/fasta/types/subtypes_benchmark.dart
+++ b/pkg/front_end/test/fasta/types/subtypes_benchmark.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import "dart:convert" show json, utf8;
import "dart:io" show File, gzip;
@@ -66,17 +64,17 @@
}
SubtypesBenchmark parseBenchMark(String source) {
- Map<Object, Object> data = json.decode(source);
- List<Object> classes = data["classes"];
+ Map<dynamic, dynamic> data = json.decode(source);
+ List<dynamic> classes = data["classes"];
Uri uri = Uri.parse("dart:core");
TypeParserEnvironment environment = new TypeParserEnvironment(uri, uri);
Library library =
parseLibrary(uri, classes.join("\n"), environment: environment);
- List<Object> checks = data["checks"];
+ List<dynamic> checks = data["checks"];
List<SubtypeCheck> subtypeChecks = <SubtypeCheck>[];
- for (Map<Object, Object> check in checks) {
+ for (Map<dynamic, dynamic> check in checks) {
String kind = check["kind"];
- List<Object> arguments = check["arguments"];
+ List<dynamic> arguments = check["arguments"];
String sSource = arguments[0];
String tSource = arguments[1];
if (sSource.contains("?")) continue;
@@ -85,7 +83,7 @@
if (tSource.contains("⊥")) continue;
TypeParserEnvironment localEnvironment = environment;
if (arguments.length > 2) {
- List<Object> typeParametersSource = arguments[2];
+ List<dynamic> typeParametersSource = arguments[2];
localEnvironment = environment
.extendWithTypeParameters("${typeParametersSource.join(', ')}");
}
@@ -124,7 +122,7 @@
final Ticker ticker = new Ticker(isVerbose: false);
Stopwatch kernelWatch = new Stopwatch();
Stopwatch fastaWatch = new Stopwatch();
- List<int> bytes = await new File.fromUri(benchmarkInput).readAsBytes();
+ List<int>? bytes = await new File.fromUri(benchmarkInput).readAsBytes();
if (bytes.length > 3) {
if (bytes[0] == 0x1f && bytes[1] == 0x8b && bytes[2] == 0x08) {
bytes = gzip.decode(bytes);
@@ -148,9 +146,9 @@
new NoneTarget(new TargetFlags()));
final DillLoader loader = target.loader;
loader.appendLibraries(c);
- await target.buildOutlines();
- ClassBuilder objectClass =
- loader.coreLibrary.lookupLocalMember("Object", required: true);
+ target.buildOutlines();
+ ClassBuilder objectClass = loader.coreLibrary
+ .lookupLocalMember("Object", required: true) as ClassBuilder;
ClassHierarchyBuilder hierarchy =
new ClassHierarchyBuilder(objectClass, loader, coreTypes);
diff --git a/pkg/front_end/test/fasta/util/direct_parser_ast_test.dart b/pkg/front_end/test/fasta/util/direct_parser_ast_test.dart
index 4e4a34d..08f036e 100644
--- a/pkg/front_end/test/fasta/util/direct_parser_ast_test.dart
+++ b/pkg/front_end/test/fasta/util/direct_parser_ast_test.dart
@@ -2,15 +2,13 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.md file.
-// @dart = 2.9
-
import 'dart:convert';
import 'dart:io';
import 'package:front_end/src/fasta/util/direct_parser_ast.dart';
import 'package:front_end/src/fasta/util/direct_parser_ast_helper.dart';
-Uri base;
+late Uri base;
void main(List<String> args) {
File script = new File.fromUri(Platform.script);
@@ -41,7 +39,7 @@
enableExtensionMethods: true,
enableNonNullable: false);
splitIntoChunks(ast, data);
- for (DirectParserASTContent child in ast.children) {
+ for (DirectParserASTContent child in ast.children!) {
if (child.isClass()) {
splitIntoChunks(
child.asClass().getClassOrMixinOrExtensionBody(), data);
@@ -163,7 +161,7 @@
DirectParserASTContentClassOrMixinImplementsHandle implementsDecl =
cls.getClassImplements();
expect("implements", implementsDecl.implementsKeyword?.lexeme);
- DirectParserASTContentClassWithClauseHandle withClauseDecl =
+ DirectParserASTContentClassWithClauseHandle? withClauseDecl =
cls.getClassWithClause();
expect(null, withClauseDecl);
List<DirectParserASTContentMemberEnd> members =
@@ -191,19 +189,19 @@
expect("int field1, field2 = 42;", chunks[4]);
chunks = processItem(
- members[0].getClassConstructor().getBlockFunctionBody(), data);
+ members[0].getClassConstructor().getBlockFunctionBody()!, data);
expect(1, chunks.length);
expect("""{
// Constructor
}""", chunks[0]);
chunks =
- processItem(members[2].getClassMethod().getBlockFunctionBody(), data);
+ processItem(members[2].getClassMethod().getBlockFunctionBody()!, data);
expect(1, chunks.length);
expect("""{
// instance method.
}""", chunks[0]);
chunks =
- processItem(members[3].getClassMethod().getBlockFunctionBody(), data);
+ processItem(members[3].getClassMethod().getBlockFunctionBody()!, data);
expect(1, chunks.length);
expect("""{
// static method.
@@ -227,7 +225,7 @@
implementsDecl = cls.getClassImplements();
expect(null, implementsDecl.implementsKeyword?.lexeme);
withClauseDecl = cls.getClassWithClause();
- expect("with", withClauseDecl.withKeyword.lexeme);
+ expect("with", withClauseDecl!.withKeyword.lexeme);
members = cls.getClassOrMixinOrExtensionBody().getMembers();
expect(0, members.length);
}
@@ -278,7 +276,7 @@
List<String> splitIntoChunks(DirectParserASTContent ast, List<int> data) {
List<String> foundChunks = [];
- for (DirectParserASTContent child in ast.children) {
+ for (DirectParserASTContent child in ast.children!) {
foundChunks.addAll(processItem(child, data));
}
return foundChunks;
@@ -308,7 +306,7 @@
DirectParserASTContentImportEnd import = item.asImport();
return [
getCutContent(data, import.importKeyword.offset,
- import.semicolon.offset + import.semicolon.length)
+ import.semicolon!.offset + import.semicolon!.length)
];
} else if (item.isExport()) {
DirectParserASTContentExportEnd export = item.asExport();
@@ -352,8 +350,8 @@
getCutContent(
data,
declaration.enumKeyword.offset,
- declaration.leftBrace.endGroup.offset +
- declaration.leftBrace.endGroup.length)
+ declaration.leftBrace.endGroup!.offset +
+ declaration.leftBrace.endGroup!.length)
];
} else if (item.isMixinDeclaration()) {
DirectParserASTContentMixinDeclarationEnd mixinDecl =
@@ -472,8 +470,8 @@
}
}
-List<int> _contentCache;
-String _contentCacheString;
+List<int>? _contentCache;
+String? _contentCacheString;
String getCutContent(List<int> content, int from, int to) {
if (identical(content, _contentCache)) {
// cache up to date.
@@ -481,5 +479,5 @@
_contentCache = content;
_contentCacheString = utf8.decode(content);
}
- return _contentCacheString.substring(from, to);
+ return _contentCacheString!.substring(from, to);
}
diff --git a/pkg/front_end/test/id_testing/id_testing_test.dart b/pkg/front_end/test/id_testing/id_testing_test.dart
index 873dc8e..e8f9f5f 100644
--- a/pkg/front_end/test/id_testing/id_testing_test.dart
+++ b/pkg/front_end/test/id_testing/id_testing_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
show DataInterpreter, StringDataInterpreter, runTests;
@@ -47,7 +45,7 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
member.accept(new IdTestingDataExtractor(compilerResult, actualMap));
}
@@ -57,7 +55,7 @@
InternalCompilerResult compilerResult,
Class cls,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new IdTestingDataExtractor(compilerResult, actualMap).computeForClass(cls);
}
@@ -67,7 +65,7 @@
InternalCompilerResult compilerResult,
Library library,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new IdTestingDataExtractor(compilerResult, actualMap)
.computeForLibrary(library);
}
@@ -106,7 +104,7 @@
String computeMemberName(Member member) {
if (member.enclosingClass != null) {
- return '${computeClassName(member.enclosingClass)}.'
+ return '${computeClassName(member.enclosingClass!)}.'
'${getMemberName(member)}';
}
return getMemberName(member);
@@ -118,7 +116,7 @@
}
@override
- String computeNodeValue(Id id, TreeNode node) {
+ String? computeNodeValue(Id id, TreeNode node) {
if (node is FunctionDeclaration) {
return '${computeMemberName(getEnclosingMember(node))}.'
'${node.variable.name}';
diff --git a/pkg/front_end/test/id_tests/assigned_variables_test.dart b/pkg/front_end/test/id_tests/assigned_variables_test.dart
index 1b325de..0f833c1 100644
--- a/pkg/front_end/test/id_tests/assigned_variables_test.dart
+++ b/pkg/front_end/test/id_tests/assigned_variables_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/flow_analysis/flow_analysis.dart';
@@ -46,12 +44,12 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<_Data>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
MemberBuilderImpl memberBuilder =
- lookupMemberBuilder(compilerResult, member);
- AssignedVariablesForTesting<TreeNode, VariableDeclaration>
+ lookupMemberBuilder(compilerResult, member) as MemberBuilderImpl;
+ AssignedVariablesForTesting<TreeNode, VariableDeclaration>?
assignedVariables = memberBuilder
- .dataForTesting.inferenceData.flowAnalysisResult.assignedVariables;
+ .dataForTesting!.inferenceData.flowAnalysisResult.assignedVariables;
if (assignedVariables == null) return;
member.accept(new AssignedVariablesDataExtractor(
compilerResult, actualMap, assignedVariables));
@@ -66,7 +64,7 @@
AssignedVariablesDataExtractor(InternalCompilerResult compilerResult,
Map<Id, ActualData<_Data>> actualMap, this._assignedVariables)
: _sourceLoaderDataForTesting =
- compilerResult.kernelTargetForTesting.loader.dataForTesting,
+ compilerResult.kernelTargetForTesting!.loader.dataForTesting!,
super(compilerResult, actualMap);
@override
@@ -80,10 +78,10 @@
}
Set<String> _convertVars(Iterable<VariableDeclaration> x) =>
- x.map((e) => e.name).toSet();
+ x.map((e) => e.name!).toSet();
@override
- _Data computeNodeValue(Id id, TreeNode node) {
+ _Data? computeNodeValue(Id id, TreeNode node) {
switch (id.kind) {
case IdKind.iterator:
case IdKind.current:
@@ -106,7 +104,7 @@
const _AssignedVariablesDataInterpreter();
@override
- String getText(_Data actualData, [String indentation]) {
+ String getText(_Data actualData, [String? indentation]) {
var parts = <String>[];
if (actualData.declared.isNotEmpty) {
parts.add('declared=${_setToString(actualData.declared)}');
@@ -128,7 +126,7 @@
}
@override
- String isAsExpected(_Data actualData, String expectedData) {
+ String? isAsExpected(_Data actualData, String? expectedData) {
var actualDataText = getText(actualData);
if (actualDataText == expectedData) {
return null;
diff --git a/pkg/front_end/test/id_tests/constant_test.dart b/pkg/front_end/test/id_tests/constant_test.dart
index 54eccdb..bcee3af 100644
--- a/pkg/front_end/test/id_tests/constant_test.dart
+++ b/pkg/front_end/test/id_tests/constant_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
@@ -41,7 +39,7 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
member.accept(new ConstantsDataExtractor(compilerResult, actualMap));
}
@@ -51,7 +49,7 @@
InternalCompilerResult compilerResult,
Class cls,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new ConstantsDataExtractor(compilerResult, actualMap).computeForClass(cls);
}
@@ -75,7 +73,7 @@
: super(compilerResult, actualMap);
@override
- String computeNodeValue(Id id, TreeNode node) {
+ String? computeNodeValue(Id id, TreeNode node) {
if (node is ConstantExpression) {
return constantToText(node.constant);
}
diff --git a/pkg/front_end/test/id_tests/definite_assignment_test.dart b/pkg/front_end/test/id_tests/definite_assignment_test.dart
index 74afe1e..536f1e1 100644
--- a/pkg/front_end/test/id_tests/definite_assignment_test.dart
+++ b/pkg/front_end/test/id_tests/definite_assignment_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
@@ -41,11 +39,11 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
MemberBuilderImpl memberBuilder =
- lookupMemberBuilder(compilerResult, member);
+ lookupMemberBuilder(compilerResult, member) as MemberBuilderImpl;
member.accept(new DefiniteAssignmentDataExtractor(compilerResult, actualMap,
- memberBuilder.dataForTesting.inferenceData.flowAnalysisResult));
+ memberBuilder.dataForTesting!.inferenceData.flowAnalysisResult));
}
/// Errors are supported for testing erroneous code. The reported errors are
@@ -61,11 +59,11 @@
DefiniteAssignmentDataExtractor(InternalCompilerResult compilerResult,
Map<Id, ActualData<String>> actualMap, this._flowResult)
: _sourceLoaderDataForTesting =
- compilerResult.kernelTargetForTesting.loader.dataForTesting,
+ compilerResult.kernelTargetForTesting!.loader.dataForTesting!,
super(compilerResult, actualMap);
@override
- String computeNodeValue(Id id, TreeNode node) {
+ String? computeNodeValue(Id id, TreeNode node) {
if (node is VariableGet) {
TreeNode alias = _sourceLoaderDataForTesting.toOriginal(node);
if (_flowResult.potentiallyUnassignedNodes.contains(alias)) {
diff --git a/pkg/front_end/test/id_tests/definite_unassignment_test.dart b/pkg/front_end/test/id_tests/definite_unassignment_test.dart
index 30d0fb5..67ce244 100644
--- a/pkg/front_end/test/id_tests/definite_unassignment_test.dart
+++ b/pkg/front_end/test/id_tests/definite_unassignment_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
@@ -41,13 +39,13 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
MemberBuilderImpl memberBuilder =
- lookupMemberBuilder(compilerResult, member);
+ lookupMemberBuilder(compilerResult, member) as MemberBuilderImpl;
member.accept(new DefiniteUnassignmentDataExtractor(
compilerResult,
actualMap,
- memberBuilder.dataForTesting.inferenceData.flowAnalysisResult));
+ memberBuilder.dataForTesting!.inferenceData.flowAnalysisResult));
}
/// Errors are supported for testing erroneous code. The reported errors are
@@ -63,11 +61,11 @@
DefiniteUnassignmentDataExtractor(InternalCompilerResult compilerResult,
Map<Id, ActualData<String>> actualMap, this._flowResult)
: _sourceLoaderDataForTesting =
- compilerResult.kernelTargetForTesting.loader.dataForTesting,
+ compilerResult.kernelTargetForTesting!.loader.dataForTesting!,
super(compilerResult, actualMap);
@override
- String computeNodeValue(Id id, TreeNode node) {
+ String? computeNodeValue(Id id, TreeNode node) {
if (node is VariableGet) {
TreeNode alias = _sourceLoaderDataForTesting.toOriginal(node);
if (_flowResult.definitelyUnassignedNodes.contains(alias)) {
diff --git a/pkg/front_end/test/id_tests/inferred_type_arguments_test.dart b/pkg/front_end/test/id_tests/inferred_type_arguments_test.dart
index 6c5aedc..b4d3787 100644
--- a/pkg/front_end/test/id_tests/inferred_type_arguments_test.dart
+++ b/pkg/front_end/test/id_tests/inferred_type_arguments_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
@@ -45,12 +43,12 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<List<DartType>>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
MemberBuilderImpl memberBuilder =
- lookupMemberBuilder(compilerResult, member);
+ lookupMemberBuilder(compilerResult, member) as MemberBuilderImpl;
member.accept(new InferredTypeArgumentDataExtractor(
compilerResult,
- memberBuilder.dataForTesting.inferenceData.typeInferenceResult,
+ memberBuilder.dataForTesting!.inferenceData.typeInferenceResult,
actualMap));
}
}
@@ -64,7 +62,7 @@
: super(compilerResult, actualMap);
@override
- List<DartType> computeNodeValue(Id id, TreeNode node) {
+ List<DartType>? computeNodeValue(Id id, TreeNode node) {
if (node is Arguments ||
node is ListLiteral ||
node is SetLiteral ||
@@ -80,7 +78,7 @@
const _InferredTypeArgumentsDataInterpreter();
@override
- String getText(List<DartType> actualData, [String indentation]) {
+ String getText(List<DartType> actualData, [String? indentation]) {
StringBuffer sb = new StringBuffer();
if (actualData.isNotEmpty) {
sb.write('<');
@@ -97,7 +95,7 @@
}
@override
- String isAsExpected(List<DartType> actualData, String expectedData) {
+ String? isAsExpected(List<DartType> actualData, String? expectedData) {
if (getText(actualData) == expectedData) {
return null;
} else {
@@ -106,6 +104,6 @@
}
@override
- bool isEmpty(List<DartType> actualData) =>
+ bool isEmpty(List<DartType>? actualData) =>
actualData == null || actualData.isEmpty;
}
diff --git a/pkg/front_end/test/id_tests/inferred_variable_types_test.dart b/pkg/front_end/test/id_tests/inferred_variable_types_test.dart
index 91c4800..7205920 100644
--- a/pkg/front_end/test/id_tests/inferred_variable_types_test.dart
+++ b/pkg/front_end/test/id_tests/inferred_variable_types_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
@@ -45,12 +43,12 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<DartType>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
MemberBuilderImpl memberBuilder =
- lookupMemberBuilder(compilerResult, member);
+ lookupMemberBuilder(compilerResult, member) as MemberBuilderImpl;
member.accept(new InferredTypeArgumentDataExtractor(
compilerResult,
- memberBuilder.dataForTesting.inferenceData.typeInferenceResult,
+ memberBuilder.dataForTesting!.inferenceData.typeInferenceResult,
actualMap));
}
}
@@ -63,7 +61,7 @@
: super(compilerResult, actualMap);
@override
- DartType computeNodeValue(Id id, TreeNode node) {
+ DartType? computeNodeValue(Id id, TreeNode node) {
if (node is VariableDeclaration || node is LocalFunction) {
return typeInferenceResult.inferredVariableTypes[node];
}
@@ -76,13 +74,13 @@
const _InferredVariableTypesDataInterpreter();
@override
- String getText(DartType actualData, [String indentation]) {
+ String getText(DartType actualData, [String? indentation]) {
return typeToText(
actualData, TypeRepresentation.analyzerNonNullableByDefault);
}
@override
- String isAsExpected(DartType actualData, String expectedData) {
+ String? isAsExpected(DartType actualData, String? expectedData) {
if (getText(actualData) == expectedData) {
return null;
} else {
@@ -91,5 +89,5 @@
}
@override
- bool isEmpty(DartType actualData) => actualData == null;
+ bool isEmpty(DartType? actualData) => actualData == null;
}
diff --git a/pkg/front_end/test/id_tests/inheritance_test.dart b/pkg/front_end/test/id_tests/inheritance_test.dart
index 3d6aba4..11dc8bc 100644
--- a/pkg/front_end/test/id_tests/inheritance_test.dart
+++ b/pkg/front_end/test/id_tests/inheritance_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart';
@@ -55,7 +53,7 @@
InternalCompilerResult compilerResult,
Library library,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new InheritanceDataExtractor(config, compilerResult, actualMap)
.computeForLibrary(library);
}
@@ -66,7 +64,7 @@
InternalCompilerResult compilerResult,
Class cls,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new InheritanceDataExtractor(config, compilerResult, actualMap)
.computeForClass(cls);
}
@@ -92,12 +90,12 @@
this._config, this._compilerResult, Map<Id, ActualData<String>> actualMap)
: super(_compilerResult, actualMap);
- ClassHierarchy get _hierarchy => _compilerResult.classHierarchy;
+ ClassHierarchy get _hierarchy => _compilerResult.classHierarchy!;
- CoreTypes get _coreTypes => _compilerResult.coreTypes;
+ CoreTypes get _coreTypes => _compilerResult.coreTypes!;
ClassHierarchyBuilder get _classHierarchyBuilder =>
- _compilerResult.kernelTargetForTesting.loader.builderHierarchy;
+ _compilerResult.kernelTargetForTesting!.loader.builderHierarchy;
@override
String computeLibraryValue(Id id, Library node) {
@@ -121,18 +119,18 @@
.map((Member member) => member.name)
.toSet();
- void addMember(Name name, {bool isSetter}) {
+ void addMember(Name name, {required bool isSetter}) {
Member member =
- _hierarchy.getInterfaceMember(node, name, setter: isSetter);
+ _hierarchy.getInterfaceMember(node, name, setter: isSetter)!;
if (member.enclosingClass == _coreTypes.objectClass) {
return;
}
InterfaceType supertype = _hierarchy.getTypeAsInstanceOf(
_coreTypes.thisInterfaceType(node, node.enclosingLibrary.nonNullable),
- member.enclosingClass,
- node.enclosingLibrary);
+ member.enclosingClass!,
+ node.enclosingLibrary)!;
Substitution substitution = Substitution.fromInterfaceType(supertype);
- DartType type;
+ DartType? type;
if (member is Procedure) {
if (member.kind == ProcedureKind.Getter) {
type = substitution.substituteType(member.function.returnType);
@@ -167,14 +165,14 @@
TreeNode nodeWithOffset;
if (member.enclosingClass == node) {
- nodeWithOffset = computeTreeNodeWithOffset(member);
+ nodeWithOffset = computeTreeNodeWithOffset(member)!;
} else {
- nodeWithOffset = computeTreeNodeWithOffset(node);
+ nodeWithOffset = computeTreeNodeWithOffset(node)!;
}
registerValue(
- nodeWithOffset?.location?.file,
- nodeWithOffset?.fileOffset,
+ nodeWithOffset.location!.file,
+ nodeWithOffset.fileOffset,
id,
typeToText(type, TypeRepresentation.analyzerNonNullableByDefault),
member);
@@ -190,15 +188,14 @@
}
@override
- String computeClassValue(Id id, Class node) {
+ String? computeClassValue(Id id, Class node) {
if (node.isAnonymousMixin) return null;
if (_config.marker == cfeMarker) {
List<String> supertypes = <String>[];
for (Class superclass in computeAllSuperclasses(node)) {
- Supertype supertype = _hierarchy.getClassAsInstanceOf(node, superclass);
+ Supertype supertype =
+ _hierarchy.getClassAsInstanceOf(node, superclass)!;
if (supertype.classNode.isAnonymousMixin) continue;
- assert(
- supertype != null, "No instance of $superclass found for $node.");
supertypes.add(supertypeToText(
supertype, TypeRepresentation.analyzerNonNullableByDefault));
}
diff --git a/pkg/front_end/test/id_tests/nullability_test.dart b/pkg/front_end/test/id_tests/nullability_test.dart
index d77f169..0ffa7f2 100644
--- a/pkg/front_end/test/id_tests/nullability_test.dart
+++ b/pkg/front_end/test/id_tests/nullability_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
@@ -36,7 +34,7 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
member.accept(new NullabilityDataExtractor(compilerResult, actualMap));
}
}
@@ -47,10 +45,10 @@
: super(compilerResult, actualMap);
@override
- String computeNodeValue(Id id, TreeNode node) {
+ String? computeNodeValue(Id id, TreeNode node) {
if (node is VariableGet && node.promotedType != null) {
if (node.variable.type.nullability != Nullability.nonNullable &&
- node.promotedType.nullability == Nullability.nonNullable) {
+ node.promotedType!.nullability == Nullability.nonNullable) {
return 'nonNullable';
}
}
diff --git a/pkg/front_end/test/id_tests/reachability_test.dart b/pkg/front_end/test/id_tests/reachability_test.dart
index d486fde..1362a08 100644
--- a/pkg/front_end/test/id_tests/reachability_test.dart
+++ b/pkg/front_end/test/id_tests/reachability_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
@@ -43,11 +41,11 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<Set<_ReachabilityAssertion>>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
MemberBuilderImpl memberBuilder =
- lookupMemberBuilder(compilerResult, member);
+ lookupMemberBuilder(compilerResult, member) as MemberBuilderImpl;
member.accept(new ReachabilityDataExtractor(compilerResult, actualMap,
- memberBuilder.dataForTesting.inferenceData.flowAnalysisResult));
+ memberBuilder.dataForTesting!.inferenceData.flowAnalysisResult));
}
/// Errors are supported for testing erroneous code. The reported errors are
@@ -66,15 +64,15 @@
Map<Id, ActualData<Set<_ReachabilityAssertion>>> actualMap,
this._flowResult)
: _sourceLoaderDataForTesting =
- compilerResult.kernelTargetForTesting.loader.dataForTesting,
+ compilerResult.kernelTargetForTesting!.loader.dataForTesting!,
super(compilerResult, actualMap);
@override
- Set<_ReachabilityAssertion> computeMemberValue(Id id, Member member) {
+ Set<_ReachabilityAssertion>? computeMemberValue(Id id, Member member) {
Set<_ReachabilityAssertion> result = {};
if (member.function != null) {
TreeNode alias =
- _sourceLoaderDataForTesting.toOriginal(member.function.body);
+ _sourceLoaderDataForTesting.toOriginal(member.function!.body!);
if (_flowResult.functionBodiesThatDontComplete.contains(alias)) {
result.add(_ReachabilityAssertion.doesNotComplete);
}
@@ -83,7 +81,7 @@
}
@override
- Set<_ReachabilityAssertion> computeNodeValue(Id id, TreeNode node) {
+ Set<_ReachabilityAssertion>? computeNodeValue(Id id, TreeNode node) {
Set<_ReachabilityAssertion> result = {};
TreeNode alias = _sourceLoaderDataForTesting.toOriginal(node);
if (node is Expression && node.parent is ExpressionStatement) {
@@ -93,12 +91,12 @@
// amount of redundancy in the test files.
assert(_flowResult.unreachableNodes.contains(alias) ==
_flowResult.unreachableNodes
- .contains(_sourceLoaderDataForTesting.toOriginal(node.parent)));
+ .contains(_sourceLoaderDataForTesting.toOriginal(node.parent!)));
} else if (_flowResult.unreachableNodes.contains(alias)) {
result.add(_ReachabilityAssertion.unreachable);
}
if (node is FunctionDeclaration) {
- Statement body = node.function.body;
+ Statement? body = node.function.body;
if (body != null &&
_flowResult.functionBodiesThatDontComplete
.contains(_sourceLoaderDataForTesting.toOriginal(body))) {
@@ -120,12 +118,12 @@
@override
String getText(Set<_ReachabilityAssertion> actualData,
- [String indentation]) =>
+ [String? indentation]) =>
_sortedRepresentation(_toStrings(actualData));
@override
- String isAsExpected(
- Set<_ReachabilityAssertion> actualData, String expectedData) {
+ String? isAsExpected(
+ Set<_ReachabilityAssertion> actualData, String? expectedData) {
var actualStrings = _toStrings(actualData);
var actualSorted = _sortedRepresentation(actualStrings);
var expectedSorted = _sortedRepresentation(expectedData?.split(','));
@@ -139,7 +137,7 @@
@override
bool isEmpty(Set<_ReachabilityAssertion> actualData) => actualData.isEmpty;
- String _sortedRepresentation(Iterable<String> values) {
+ String _sortedRepresentation(Iterable<String>? values) {
var list = values == null || values.isEmpty ? ['none'] : values.toList();
list.sort();
return list.join(',');
diff --git a/pkg/front_end/test/id_tests/type_promotion_test.dart b/pkg/front_end/test/id_tests/type_promotion_test.dart
index fed4245..6aae1e8 100644
--- a/pkg/front_end/test/id_tests/type_promotion_test.dart
+++ b/pkg/front_end/test/id_tests/type_promotion_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
@@ -40,7 +38,7 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<DartType>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
member.accept(new TypePromotionDataExtractor(compilerResult, actualMap));
}
}
@@ -51,7 +49,7 @@
: super(compilerResult, actualMap);
@override
- DartType computeNodeValue(Id id, TreeNode node) {
+ DartType? computeNodeValue(Id id, TreeNode node) {
if (node is VariableGet) {
return node.promotedType;
}
@@ -63,11 +61,11 @@
const _TypePromotionDataInterpreter();
@override
- String getText(DartType actualData, [String indentation]) =>
+ String getText(DartType actualData, [String? indentation]) =>
typeToText(actualData, TypeRepresentation.analyzerNonNullableByDefault);
@override
- String isAsExpected(DartType actualData, String expectedData) {
+ String? isAsExpected(DartType actualData, String? expectedData) {
if (getText(actualData) == expectedData) {
return null;
} else {
@@ -76,5 +74,5 @@
}
@override
- bool isEmpty(DartType actualData) => actualData == null;
+ bool isEmpty(DartType? actualData) => actualData == null;
}
diff --git a/pkg/front_end/test/id_tests/why_not_promoted_test.dart b/pkg/front_end/test/id_tests/why_not_promoted_test.dart
index ed82ac1..ca26b01 100644
--- a/pkg/front_end/test/id_tests/why_not_promoted_test.dart
+++ b/pkg/front_end/test/id_tests/why_not_promoted_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
@@ -48,11 +46,11 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
MemberBuilderImpl memberBuilder =
- lookupMemberBuilder(compilerResult, member);
+ lookupMemberBuilder(compilerResult, member) as MemberBuilderImpl;
member.accept(new WhyNotPromotedDataExtractor(compilerResult, actualMap,
- memberBuilder.dataForTesting.inferenceData.flowAnalysisResult));
+ memberBuilder.dataForTesting!.inferenceData.flowAnalysisResult));
}
}
@@ -64,8 +62,8 @@
: super(compilerResult, actualMap);
@override
- String computeNodeValue(Id id, TreeNode node) {
- String nonPromotionReason = _flowResult.nonPromotionReasons[node];
+ String? computeNodeValue(Id id, TreeNode node) {
+ String? nonPromotionReason = _flowResult.nonPromotionReasons[node];
if (nonPromotionReason != null) {
return 'notPromoted($nonPromotionReason)';
}
@@ -77,10 +75,10 @@
const _WhyNotPromotedDataInterpreter();
@override
- String getText(String actualData, [String indentation]) => actualData;
+ String getText(String actualData, [String? indentation]) => actualData;
@override
- String isAsExpected(String actualData, String expectedData) {
+ String? isAsExpected(String actualData, String? expectedData) {
if (actualData == expectedData) {
return null;
} else {
@@ -89,5 +87,5 @@
}
@override
- bool isEmpty(String actualData) => actualData == null;
+ bool isEmpty(String? actualData) => actualData == null;
}
diff --git a/pkg/front_end/test/language_versioning/language_versioning_test.dart b/pkg/front_end/test/language_versioning/language_versioning_test.dart
index 359c265..221ce79 100644
--- a/pkg/front_end/test/language_versioning/language_versioning_test.dart
+++ b/pkg/front_end/test/language_versioning/language_versioning_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, File, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
import 'package:_fe_analyzer_shared/src/testing/features.dart';
@@ -45,7 +43,7 @@
}
// Ugly hack.
-CompilerOptions stashedOptions;
+late CompilerOptions stashedOptions;
class TestConfigWithLanguageVersion extends TestConfig {
TestConfigWithLanguageVersion(String marker, String name)
@@ -110,7 +108,7 @@
InternalCompilerResult compilerResult,
Library library,
Map<Id, ActualData<Features>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new LanguageVersioningDataExtractor(compilerResult, actualMap)
.computeForLibrary(library);
}
@@ -141,7 +139,7 @@
Features features = new Features();
features[Tags.languageVersion] =
"${library.languageVersion.major}.${library.languageVersion.minor}";
- LibraryBuilder libraryBuilder =
+ LibraryBuilder? libraryBuilder =
lookupLibraryBuilder(compilerResult, library);
if (libraryBuilder is SourceLibraryBuilder &&
libraryBuilder.packageUriForTesting != null) {
diff --git a/pkg/front_end/test/language_versioning/language_versioning_up_to_date_git_test.dart b/pkg/front_end/test/language_versioning/language_versioning_up_to_date_git_test.dart
index 89c3833..88e84ac 100644
--- a/pkg/front_end/test/language_versioning/language_versioning_up_to_date_git_test.dart
+++ b/pkg/front_end/test/language_versioning/language_versioning_up_to_date_git_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Platform, Process, ProcessResult;
import 'package:front_end/src/api_prototype/compiler_options.dart';
@@ -35,8 +33,8 @@
// E.g. "2.6.0-edge" (without the quotes).
String versionString = stdout.split("\n")[0];
List<String> dotSeparatedParts = versionString.split(".");
- int major = int.tryParse(dotSeparatedParts[0]);
- int minor = int.tryParse(dotSeparatedParts[1]);
+ int major = int.parse(dotSeparatedParts[0]);
+ int minor = int.parse(dotSeparatedParts[1]);
kernel.Version version = new kernel.Version(major, minor);
if (kernel.defaultLanguageVersion != version) {
@@ -51,8 +49,8 @@
List<String> dotSeparatedPartsFromOptions =
compilerOptions.currentSdkVersion.split(".");
- int majorFromOptions = int.tryParse(dotSeparatedPartsFromOptions[0]);
- int minorFromOptions = int.tryParse(dotSeparatedPartsFromOptions[1]);
+ int majorFromOptions = int.parse(dotSeparatedPartsFromOptions[0]);
+ int minorFromOptions = int.parse(dotSeparatedPartsFromOptions[1]);
if (majorFromOptions != major || minorFromOptions != minor) {
throw "CompilerOptions defaults "
"${majorFromOptions}.${minorFromOptions}"
diff --git a/pkg/front_end/test/patching/patching_test.dart b/pkg/front_end/test/patching/patching_test.dart
index 9b7d6d9..1cd2220 100644
--- a/pkg/front_end/test/patching/patching_test.dart
+++ b/pkg/front_end/test/patching/patching_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
@@ -49,9 +47,9 @@
class TestConfigWithLanguageVersion extends TestConfig {
TestConfigWithLanguageVersion(String marker, String name,
- {Uri librariesSpecificationUri,
+ {Uri? librariesSpecificationUri,
Map<ExperimentalFlag, bool> experimentalFlags = const {},
- AllowedExperimentalFlags allowedExperimentalFlags})
+ AllowedExperimentalFlags? allowedExperimentalFlags})
: super(marker, name,
librariesSpecificationUri: librariesSpecificationUri,
explicitExperimentalFlags: experimentalFlags,
@@ -72,7 +70,7 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<Features>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
member.accept(new PatchingDataExtractor(compilerResult, actualMap));
}
@@ -82,7 +80,7 @@
InternalCompilerResult compilerResult,
Class cls,
Map<Id, ActualData<Features>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new PatchingDataExtractor(compilerResult, actualMap).computeForClass(cls);
}
@@ -92,7 +90,7 @@
InternalCompilerResult compilerResult,
Library library,
Map<Id, ActualData<Features>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new PatchingDataExtractor(compilerResult, actualMap)
.computeForLibrary(library);
}
@@ -136,7 +134,7 @@
@override
Features computeClassValue(Id id, Class cls) {
- ClassBuilder clsBuilder = lookupClassBuilder(compilerResult, cls);
+ ClassBuilder clsBuilder = lookupClassBuilder(compilerResult, cls)!;
Features features = new Features();
clsBuilder.scope.forEach((String name, Builder builder) {
@@ -172,9 +170,10 @@
features.addElement(Tags.initializers, desc);
}
}
- MemberBuilderImpl memberBuilder =
- lookupMemberBuilder(compilerResult, member, required: false);
- MemberBuilder patchMember = memberBuilder?.dataForTesting?.patchForTesting;
+ MemberBuilderImpl? memberBuilder =
+ lookupMemberBuilder(compilerResult, member, required: false)
+ as MemberBuilderImpl?;
+ MemberBuilder? patchMember = memberBuilder?.dataForTesting?.patchForTesting;
if (patchMember != null) {
features.add(Tags.patch);
}
diff --git a/pkg/front_end/test/predicates/predicate_test.dart b/pkg/front_end/test/predicates/predicate_test.dart
index ec7b50d..55622fa 100644
--- a/pkg/front_end/test/predicates/predicate_test.dart
+++ b/pkg/front_end/test/predicates/predicate_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart';
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
@@ -77,7 +75,7 @@
InternalCompilerResult compilerResult,
Library library,
Map<Id, ActualData<Features>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new PredicateDataExtractor(compilerResult, actualMap)
.computeForLibrary(library);
}
@@ -88,7 +86,7 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<Features>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
member.accept(new PredicateDataExtractor(compilerResult, actualMap));
}
@@ -106,12 +104,12 @@
: super(compilerResult, actualMap);
@override
- Features computeLibraryValue(Id id, Library node) {
+ Features? computeLibraryValue(Id id, Library node) {
return null;
}
@override
- Features computeMemberValue(Id id, Member node) {
+ Features? computeMemberValue(Id id, Member node) {
if (node is Field) {
Features features = new Features();
if (isLateLoweredField(node)) {
@@ -124,11 +122,11 @@
features[Tags.lateFieldName] =
extractFieldNameFromLateLoweredIsSetField(node).text;
}
- Field target = getLateFieldTarget(node);
+ Field? target = getLateFieldTarget(node);
if (target != null) {
features[Tags.lateFieldTarget] = getQualifiedMemberName(target);
}
- Expression initializer = getLateFieldInitializer(node);
+ Expression? initializer = getLateFieldInitializer(node);
if (initializer != null) {
features[Tags.lateFieldInitializer] =
initializer.toText(astTextStrategyForTesting);
@@ -146,11 +144,11 @@
features[Tags.lateFieldName] =
extractFieldNameFromLateLoweredFieldSetter(node).text;
}
- Field target = getLateFieldTarget(node);
+ Field? target = getLateFieldTarget(node);
if (target != null) {
features[Tags.lateFieldTarget] = getQualifiedMemberName(target);
}
- Expression initializer = getLateFieldInitializer(node);
+ Expression? initializer = getLateFieldInitializer(node);
if (initializer != null) {
features[Tags.lateFieldInitializer] =
initializer.toText(astTextStrategyForTesting);
@@ -164,11 +162,11 @@
void visitProcedure(Procedure node) {
super.visitProcedure(node);
nodeIdMap.forEach((String name, NodeId id) {
- Features features = featureMap[name];
+ Features? features = featureMap[name];
if (features != null) {
- TreeNode nodeWithOffset = computeTreeNodeWithOffset(node);
+ TreeNode nodeWithOffset = computeTreeNodeWithOffset(node)!;
registerValue(
- nodeWithOffset.location.file, id.value, id, features, name);
+ nodeWithOffset.location!.file, id.value, id, features, name);
}
});
nodeIdMap.clear();
@@ -177,22 +175,22 @@
@override
void visitVariableDeclaration(VariableDeclaration node) {
- String name;
- String tag;
+ String? name;
+ String? tag;
if (isLateLoweredLocal(node)) {
- name = extractLocalNameFromLateLoweredLocal(node.name);
+ name = extractLocalNameFromLateLoweredLocal(node.name!);
tag = Tags.lateLocal;
} else if (isLateLoweredIsSetLocal(node)) {
- name = extractLocalNameFromLateLoweredIsSet(node.name);
+ name = extractLocalNameFromLateLoweredIsSet(node.name!);
tag = Tags.lateIsSetLocal;
} else if (isLateLoweredLocalGetter(node)) {
- name = extractLocalNameFromLateLoweredGetter(node.name);
+ name = extractLocalNameFromLateLoweredGetter(node.name!);
tag = Tags.lateLocalGetter;
} else if (isLateLoweredLocalSetter(node)) {
- name = extractLocalNameFromLateLoweredSetter(node.name);
+ name = extractLocalNameFromLateLoweredSetter(node.name!);
tag = Tags.lateLocalSetter;
} else if (isExtensionThis(node)) {
- name = extractLocalNameForExtensionThis(node.name);
+ name = extractLocalNameForExtensionThis(node.name!);
tag = Tags.extensionThis;
} else if (node.name != null) {
name = node.name;
@@ -210,7 +208,7 @@
}
@override
- ActualData<Features> mergeData(
+ ActualData<Features>? mergeData(
ActualData<Features> value1, ActualData<Features> value2) {
if ('${value1.value}' == '${value2.value}') {
// The extension this parameter is seen twice in the extension method
diff --git a/pkg/front_end/test/src/base/processed_options_test.dart b/pkg/front_end/test/src/base/processed_options_test.dart
index 00c3a75..a0282ba 100644
--- a/pkg/front_end/test/src/base/processed_options_test.dart
+++ b/pkg/front_end/test/src/base/processed_options_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:front_end/src/api_prototype/compiler_options.dart';
import 'package:front_end/src/api_prototype/memory_file_system.dart';
import 'package:front_end/src/base/processed_options.dart';
@@ -36,7 +34,7 @@
MemoryFileSystem fileSystem =
new MemoryFileSystem(Uri.parse('org-dartlang-test:///'));
- Component _mockOutline;
+ Component? _mockOutline;
Component get mockSummary => _mockOutline ??= new Component(libraries: [
new Library(Uri.parse('org-dartlang-test:///a/b.dart'),
@@ -87,7 +85,7 @@
..sdkSummary = uri;
var processed = new ProcessedOptions(options: raw);
- var bytes = await processed.loadSdkSummaryBytes();
+ var bytes = (await processed.loadSdkSummaryBytes())!;
expect(bytes, isNotEmpty);
var sdkSummary = loadComponentFromBytes(bytes);
@@ -111,7 +109,8 @@
Future<Null> checkMockSummary(CompilerOptions raw) async {
var processed = new ProcessedOptions(options: raw);
- var sdkSummary = await processed.loadSdkSummary(new CanonicalName.root());
+ var sdkSummary =
+ (await processed.loadSdkSummary(new CanonicalName.root()))!;
expect(sdkSummary.libraries.single.importUri,
mockSummary.libraries.single.importUri);
}
@@ -130,7 +129,7 @@
Uri.parse('org-dartlang-test:///libraries.json');
var processed = new ProcessedOptions(options: raw);
var uriTranslator = await processed.getUriTranslator();
- expect(uriTranslator.dartLibraries.libraryInfoFor('foo').uri.path,
+ expect(uriTranslator.dartLibraries.libraryInfoFor('foo')!.uri.path,
'/bar.dart');
}
@@ -149,7 +148,7 @@
..sdkRoot = Uri.parse('org-dartlang-test:///mysdk/');
var processed = new ProcessedOptions(options: raw);
var uriTranslator = await processed.getUriTranslator();
- expect(uriTranslator.dartLibraries.libraryInfoFor('foo').uri.path,
+ expect(uriTranslator.dartLibraries.libraryInfoFor('foo')!.uri.path,
'/mysdk/lib/bar.dart');
}
diff --git a/pkg/front_end/test/static_types/analysis_helper.dart b/pkg/front_end/test/static_types/analysis_helper.dart
index 2e57c0e..6564bd1 100644
--- a/pkg/front_end/test/static_types/analysis_helper.dart
+++ b/pkg/front_end/test/static_types/analysis_helper.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:convert' as json;
import 'dart:io';
@@ -25,7 +23,7 @@
Future<void> run(Uri entryPoint, String allowedListPath,
{bool verbose = false,
bool generate = false,
- bool analyzedUrisFilter(Uri uri)}) async {
+ bool Function(Uri uri)? analyzedUrisFilter}) async {
CompilerOptions options = new CompilerOptions();
options.sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
@@ -33,10 +31,10 @@
printDiagnosticMessage(message, print);
};
InternalCompilerResult compilerResult = await kernelForProgramInternal(
- entryPoint, options,
- retainDataForTesting: true, requireMain: false);
+ entryPoint, options, retainDataForTesting: true, requireMain: false)
+ as InternalCompilerResult;
- new DynamicVisitor(options.onDiagnostic, compilerResult.component,
+ new DynamicVisitor(options.onDiagnostic!, compilerResult.component!,
allowedListPath, analyzedUrisFilter)
.run(verbose: verbose, generate: generate);
}
@@ -44,7 +42,7 @@
class StaticTypeVisitorBase extends RecursiveVisitor {
final TypeEnvironment typeEnvironment;
- StaticTypeContext staticTypeContext;
+ StaticTypeContext? staticTypeContext;
StaticTypeVisitorBase(Component component, ClassHierarchy classHierarchy)
: typeEnvironment =
@@ -86,8 +84,8 @@
final DiagnosticMessageHandler onDiagnostic;
final Component component;
- final String _allowedListPath;
- final bool Function(Uri uri) analyzedUrisFilter;
+ final String? _allowedListPath;
+ final bool Function(Uri uri)? analyzedUrisFilter;
Map _expectedJson = {};
Map<String, Map<String, List<FormattedMessage>>> _actualMessages = {};
@@ -99,7 +97,7 @@
void run({bool verbose = false, bool generate = false}) {
if (!generate && _allowedListPath != null) {
- File file = new File(_allowedListPath);
+ File file = new File(_allowedListPath!);
if (file.existsSync()) {
try {
_expectedJson = json.jsonDecode(file.readAsStringSync());
@@ -121,14 +119,14 @@
actualJson[uri] = map;
});
- new File(_allowedListPath).writeAsStringSync(
+ new File(_allowedListPath!).writeAsStringSync(
new json.JsonEncoder.withIndent(' ').convert(actualJson));
return;
}
int errorCount = 0;
_expectedJson.forEach((uri, expectedMessages) {
- Map<String, List<FormattedMessage>> actualMessagesMap =
+ Map<String, List<FormattedMessage>>? actualMessagesMap =
_actualMessages[uri];
if (actualMessagesMap == null) {
print("Error: Allowed-listing of uri '$uri' isn't used. "
@@ -136,7 +134,7 @@
errorCount++;
} else {
expectedMessages.forEach((expectedMessage, expectedCount) {
- List<FormattedMessage> actualMessages =
+ List<FormattedMessage>? actualMessages =
actualMessagesMap[expectedMessage];
if (actualMessages == null) {
print("Error: Allowed-listing of message '$expectedMessage' "
@@ -223,8 +221,8 @@
locatedMessage.messageObject.correctionMessage,
arguments: locatedMessage.messageObject.arguments)),
Severity.warning,
- location:
- new Location(message.uri, message.line, message.column),
+ location: new Location(
+ message.uri!, message.line, message.column),
uriToSource: component.uriToSource),
message.line,
message.column,
@@ -256,7 +254,7 @@
@override
void visitLibrary(Library node) {
if (analyzedUrisFilter != null) {
- if (analyzedUrisFilter(node.importUri)) {
+ if (analyzedUrisFilter!(node.importUri)) {
super.visitLibrary(node);
}
} else {
@@ -309,9 +307,9 @@
}
void registerError(TreeNode node, String message) {
- Location location = node.location;
+ Location location = node.location!;
Uri uri = location.file;
- String uriString = relativizeUri(uri);
+ String uriString = relativizeUri(uri)!;
Map<String, List<FormattedMessage>> actualMap = _actualMessages.putIfAbsent(
uriString, () => <String, List<FormattedMessage>>{});
if (uri.scheme == 'org-dartlang-sdk') {
diff --git a/pkg/front_end/test/static_types/cfe_dynamic_test.dart b/pkg/front_end/test/static_types/cfe_dynamic_test.dart
index ff5e01c..06d08c1 100644
--- a/pkg/front_end/test/static_types/cfe_dynamic_test.dart
+++ b/pkg/front_end/test/static_types/cfe_dynamic_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'analysis_helper.dart';
/// Filter function used to only analysis cfe source code.
diff --git a/pkg/front_end/test/static_types/static_type_test.dart b/pkg/front_end/test/static_types/static_type_test.dart
index 0f168be..cf4d5c3 100644
--- a/pkg/front_end/test/static_types/static_type_test.dart
+++ b/pkg/front_end/test/static_types/static_type_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart';
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
@@ -46,7 +44,7 @@
InternalCompilerResult compilerResult,
Library library,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new StaticTypeDataExtractor(compilerResult, actualMap)
.computeForLibrary(library);
}
@@ -57,7 +55,7 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
member.accept(new StaticTypeDataExtractor(compilerResult, actualMap));
}
@@ -67,12 +65,12 @@
class StaticTypeDataExtractor extends CfeDataExtractor<String> {
final TypeEnvironment _environment;
- StaticTypeContext _staticTypeContext;
+ StaticTypeContext? _staticTypeContext;
StaticTypeDataExtractor(InternalCompilerResult compilerResult,
Map<Id, ActualData<String>> actualMap)
: _environment = new TypeEnvironment(
- compilerResult.coreTypes, compilerResult.classHierarchy),
+ compilerResult.coreTypes!, compilerResult.classHierarchy!),
super(compilerResult, actualMap);
@override
@@ -102,23 +100,23 @@
}
@override
- String computeMemberValue(Id id, Member node) {
+ String? computeMemberValue(Id id, Member node) {
if (node is Procedure && node.function.futureValueType != null) {
- return 'futureValueType=${typeToText(node.function.futureValueType)}';
+ return 'futureValueType=${typeToText(node.function.futureValueType!)}';
}
return null;
}
@override
- String computeNodeValue(Id id, TreeNode node) {
+ String? computeNodeValue(Id id, TreeNode node) {
if (isSkippedExpression(node)) {
return null;
}
if (node is Expression) {
- DartType type = node.getStaticType(_staticTypeContext);
+ DartType type = node.getStaticType(_staticTypeContext!);
if (node is FunctionExpression && node.function.futureValueType != null) {
return '${typeToText(type)},'
- 'futureValueType=${typeToText(node.function.futureValueType)}';
+ 'futureValueType=${typeToText(node.function.futureValueType!)}';
}
return typeToText(type);
} else if (node is Arguments) {
@@ -127,13 +125,13 @@
}
} else if (node is ForInStatement) {
if (id.kind == IdKind.current) {
- DartType type = _staticTypeContext.typeEnvironment.forInElementType(
- node, node.iterable.getStaticType(_staticTypeContext));
+ DartType type = _staticTypeContext!.typeEnvironment.forInElementType(
+ node, node.iterable.getStaticType(_staticTypeContext!));
return typeToText(type);
}
} else if (node is FunctionDeclaration) {
if (node.function.futureValueType != null) {
- return 'futureValueType=${typeToText(node.function.futureValueType)}';
+ return 'futureValueType=${typeToText(node.function.futureValueType!)}';
}
}
return null;
@@ -151,7 +149,7 @@
bool isNewReachabilityErrorArgument(object) {
return object is StringLiteral &&
- isNewReachabilityError(object.parent.parent);
+ isNewReachabilityError(object.parent!.parent);
}
bool isThrowReachabilityError(object) {
diff --git a/pkg/front_end/test/text_representation/empty_reference_test.dart b/pkg/front_end/test/text_representation/empty_reference_test.dart
index bd30c00..dd15aff 100644
--- a/pkg/front_end/test/text_representation/empty_reference_test.dart
+++ b/pkg/front_end/test/text_representation/empty_reference_test.dart
@@ -2,14 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:expect/expect.dart';
import 'package:kernel/ast.dart';
import 'text_representation_test.dart';
void testExpression(Expression node, String normal,
- {String verbose, String limited}) {
+ {String? verbose, String? limited}) {
Expect.stringEquals(normal, node.toText(normalStrategy),
"Unexpected normal strategy text for ${node.runtimeType}");
Expect.stringEquals(verbose ?? normal, node.toText(verboseStrategy),
@@ -18,7 +16,8 @@
"Unexpected limited strategy text for ${node.runtimeType}");
}
-void testType(DartType node, String normal, {String verbose, String limited}) {
+void testType(DartType node, String normal,
+ {String? verbose, String? limited}) {
Expect.stringEquals(normal, node.toText(normalStrategy),
"Unexpected normal strategy text for ${node.runtimeType}");
Expect.stringEquals(verbose ?? normal, node.toText(verboseStrategy),
@@ -33,11 +32,6 @@
}
void testTypes() {
- testType(new InterfaceType.byReference(null, Nullability.nonNullable, []),
- '<missing-class-reference>');
- testType(new TypedefType.byReference(null, Nullability.nonNullable, []),
- '<missing-typedef-reference>');
-
Reference unlinkedClassName = new Reference();
testType(
new InterfaceType.byReference(
@@ -83,9 +77,6 @@
}
void testMembers() {
- testExpression(new StaticGet.byReference(null), '''
-<missing-member-reference>''');
-
Reference unlinkedMemberName = new Reference();
testExpression(
new InstanceGet.byReference(
diff --git a/pkg/front_end/test/text_representation/internal_ast_text_representation_test.dart b/pkg/front_end/test/text_representation/internal_ast_text_representation_test.dart
index 3355ebf..4fd6fa1 100644
--- a/pkg/front_end/test/text_representation/internal_ast_text_representation_test.dart
+++ b/pkg/front_end/test/text_representation/internal_ast_text_representation_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:expect/expect.dart';
import 'package:front_end/src/fasta/kernel/collections.dart';
import 'package:front_end/src/fasta/kernel/forest.dart';
@@ -12,7 +10,7 @@
import 'text_representation_test.dart';
void testStatement(Statement node, String normal,
- {String verbose, String limited}) {
+ {String? verbose, String? limited}) {
Expect.stringEquals(normal, node.toText(normalStrategy),
"Unexpected normal strategy text for ${node.runtimeType}");
Expect.stringEquals(verbose ?? normal, node.toText(verboseStrategy),
@@ -22,7 +20,7 @@
}
void testExpression(Expression node, String normal,
- {String verbose, String limited}) {
+ {String? verbose, String? limited}) {
Expect.stringEquals(normal, node.toText(normalStrategy),
"Unexpected normal strategy text for ${node.runtimeType}");
Expect.stringEquals(verbose ?? normal, node.toText(verboseStrategy),
@@ -592,10 +590,6 @@
Library library = new Library(dummyUri, fileUri: dummyUri);
LibraryDependency dependency =
LibraryDependency.deferredImport(library, 'pre');
-
- testExpression(new LoadLibraryTearOff(dependency, null), '''
-pre.loadLibrary''');
-
Procedure procedure = new Procedure(new Name('get#loadLibrary'),
ProcedureKind.Getter, new FunctionNode(new Block([])),
fileUri: dummyUri);
diff --git a/pkg/front_end/test/text_representation/text_representation_test.dart b/pkg/front_end/test/text_representation/text_representation_test.dart
index 883ac09..b29f7ac 100644
--- a/pkg/front_end/test/text_representation/text_representation_test.dart
+++ b/pkg/front_end/test/text_representation/text_representation_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'dart:io' show Directory, Platform;
import 'package:_fe_analyzer_shared/src/testing/id.dart';
import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
@@ -103,7 +101,7 @@
InternalCompilerResult compilerResult,
Library library,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
new TextRepresentationDataExtractor(
compilerResult, actualMap, getStrategy(config.marker))
.computeForLibrary(library);
@@ -115,7 +113,7 @@
InternalCompilerResult compilerResult,
Member member,
Map<Id, ActualData<String>> actualMap,
- {bool verbose}) {
+ {bool? verbose}) {
member.accept(new TextRepresentationDataExtractor(
compilerResult, actualMap, getStrategy(config.marker)));
}
@@ -155,22 +153,22 @@
}
@override
- String computeMemberValue(Id id, Member node) {
+ String? computeMemberValue(Id id, Member node) {
if (node.name.text == 'stmtVariableDeclarationMulti') {
print(node);
}
if (node.name.text.startsWith(expressionMarker)) {
if (node is Procedure) {
- Statement body = node.function.body;
+ Statement? body = node.function.body;
if (body is ReturnStatement) {
- return body.expression.toText(strategy);
+ return body.expression!.toText(strategy);
}
} else if (node is Field && node.initializer != null) {
- return node.initializer.toText(strategy);
+ return node.initializer!.toText(strategy);
}
} else if (node.name.text.startsWith(statementMarker)) {
if (node is Procedure) {
- Statement body = node.function.body;
+ Statement? body = node.function.body;
if (body is Block && body.statements.length == 1) {
// Prefix with newline to make multiline text representations more
// readable.
@@ -182,13 +180,13 @@
}
@override
- String computeNodeValue(Id id, TreeNode node) {
+ String? computeNodeValue(Id id, TreeNode node) {
if (node is ConstantExpression) {
return node.constant.toText(strategy);
} else if (node is VariableDeclaration) {
DartType type = node.type;
if (type is FunctionType && type.typedefType != null) {
- return type.typedefType.toText(strategy);
+ return type.typedefType!.toText(strategy);
} else {
return type.toText(strategy);
}
diff --git a/runtime/tests/vm/dart/bare_instructions_trampolines_test.dart b/runtime/tests/vm/dart/bare_instructions_trampolines_test.dart
index b7d734d..12201d2 100644
--- a/runtime/tests/vm/dart/bare_instructions_trampolines_test.dart
+++ b/runtime/tests/vm/dart/bare_instructions_trampolines_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--always-generate-trampolines-for-testing --use-bare-instructions
+// VMOptions=--always-generate-trampolines-for-testing
// We use a reasonable sized test and run it with the above options.
import 'hello_fuchsia_test.dart' as test;
diff --git a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart b/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart
index 5f18af8..d131340 100644
--- a/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart
+++ b/runtime/tests/vm/dart/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
-// VMOptions=--dwarf-stack-traces --save-debugging-info=async_lazy_debug.so --lazy-async-stacks --no-use-bare-instructions
+// VMOptions=--dwarf-stack-traces --save-debugging-info=async_lazy_debug.so --lazy-async-stacks
import 'dart:async';
import 'dart:io';
diff --git a/runtime/tests/vm/dart/deferred_loading_call_modes_test.dart b/runtime/tests/vm/dart/deferred_loading_call_modes_test.dart
index 8fa1e45..954a3d9 100644
--- a/runtime/tests/vm/dart/deferred_loading_call_modes_test.dart
+++ b/runtime/tests/vm/dart/deferred_loading_call_modes_test.dart
@@ -2,9 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--use_bare_instructions=false
-// VMOptions=--use_bare_instructions=true --use_table_dispatch=false
-// VMOptions=--use_bare_instructions=true --use_table_dispatch=true
+// VMOptions=--use_table_dispatch=false
+// VMOptions=--use_table_dispatch=true
import "splay_test.dart" deferred as splay; // Some non-trivial code.
diff --git a/runtime/tests/vm/dart/split_literals_test.dart b/runtime/tests/vm/dart/split_literals_test.dart
index 076e27a..a5391b1 100644
--- a/runtime/tests/vm/dart/split_literals_test.dart
+++ b/runtime/tests/vm/dart/split_literals_test.dart
@@ -65,8 +65,6 @@
// Compile kernel to ELF.
await run(genSnapshot, <String>[
- "--use_bare_instructions=false", //# object: ok
- "--use_bare_instructions=true", //# bare: ok
"--snapshot-kind=app-aot-elf",
"--elf=$snapshot",
"--loading-unit-manifest=$manifest",
diff --git a/runtime/tests/vm/dart/use_bare_instructions_flag_test.dart b/runtime/tests/vm/dart/use_bare_instructions_flag_test.dart
deleted file mode 100644
index eead3b6..0000000
--- a/runtime/tests/vm/dart/use_bare_instructions_flag_test.dart
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// This test is ensuring that the flag for --use-bare-instructions given at
-// AOT compile-time will be used at runtime (irrespective if other values were
-// passed to the runtime).
-
-import "dart:async";
-import "dart:io";
-
-import 'package:expect/expect.dart';
-import 'package:path/path.dart' as path;
-
-import 'use_flag_test_helper.dart';
-
-main(List<String> args) async {
- if (!isAOTRuntime) {
- return; // Running in JIT: AOT binaries not available.
- }
-
- if (Platform.isAndroid) {
- return; // SDK tree and dart_bootstrap not available on the test device.
- }
-
- await withTempDir('bare-flag-test', (String tempDir) async {
- final script = path.join(sdkDir, 'pkg/kernel/bin/dump.dart');
- final scriptDill = path.join(tempDir, 'kernel_dump.dill');
-
- // Compile script to Kernel IR.
- await run(genKernel, <String>[
- '--aot',
- '--platform=$platformDill',
- '-o',
- scriptDill,
- script,
- ]);
-
- // Run the AOT compiler with/without bare instructions.
- final scriptBareSnapshot = path.join(tempDir, 'bare.snapshot');
- final scriptNonBareSnapshot = path.join(tempDir, 'non_bare.snapshot');
- await Future.wait(<Future>[
- run(genSnapshot, <String>[
- '--use-bare-instructions',
- '--snapshot-kind=app-aot-elf',
- '--elf=$scriptBareSnapshot',
- scriptDill,
- ]),
- run(genSnapshot, <String>[
- '--no-use-bare-instructions',
- '--snapshot-kind=app-aot-elf',
- '--elf=$scriptNonBareSnapshot',
- scriptDill,
- ]),
- ]);
-
- // Run the resulting bare-AOT compiled script.
- final bareOut1 = path.join(tempDir, 'bare-out1.txt');
- final bareOut2 = path.join(tempDir, 'bare-out2.txt');
- await Future.wait(<Future>[
- run(aotRuntime, <String>[
- '--use-bare-instructions',
- scriptBareSnapshot,
- scriptDill,
- bareOut1,
- ]),
- run(aotRuntime, <String>[
- '--no-use-bare-instructions',
- scriptBareSnapshot,
- scriptDill,
- bareOut2,
- ]),
- ]);
-
- // Run the resulting non-bare-AOT compiled script.
- final nonBareOut1 = path.join(tempDir, 'non-bare-out1.txt');
- final nonBareOut2 = path.join(tempDir, 'non-bare-out2.txt');
- await Future.wait(<Future>[
- run(aotRuntime, <String>[
- '--use-bare-instructions',
- scriptNonBareSnapshot,
- scriptDill,
- nonBareOut1,
- ]),
- run(aotRuntime, <String>[
- '--no-use-bare-instructions',
- scriptNonBareSnapshot,
- scriptDill,
- nonBareOut2,
- ]),
- ]);
-
- // Ensure we got 4 times the same result.
- final output = await readFile(bareOut1);
- Expect.equals(output, await readFile(bareOut2));
- Expect.equals(output, await readFile(nonBareOut1));
- Expect.equals(output, await readFile(nonBareOut2));
- });
-}
-
-Future<String> readFile(String file) {
- return new File(file).readAsString();
-}
diff --git a/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart b/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
index 526c449..26cc7c7 100644
--- a/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
+++ b/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
@@ -107,7 +107,6 @@
Future<void> testAOT(String dillPath,
{bool useAsm = false,
- bool useBare = true,
bool forceDrops = false,
bool useDispatch = true,
bool stripUtil = false, // Note: forced true if useAsm.
@@ -127,9 +126,6 @@
}
final descriptionBuilder = StringBuffer()..write(useAsm ? 'assembly' : 'elf');
- if (!useBare) {
- descriptionBuilder.write('-nonbare');
- }
if (forceDrops) {
descriptionBuilder.write('-dropped');
}
@@ -156,7 +152,6 @@
final snapshotPath = path.join(tempDir, 'test.snap');
final commonSnapshotArgs = [
if (stripFlag) '--strip', // gen_snapshot specific and not a VM flag.
- useBare ? '--use-bare-instructions' : '--no-use-bare-instructions',
"--write-v8-snapshot-profile-to=$profilePath",
if (forceDrops) ...[
'--dwarf-stack-traces',
@@ -438,24 +433,11 @@
// Test unstripped ELF generation directly.
await testAOT(aotDillPath);
- await testAOT(aotDillPath, useBare: false);
await testAOT(aotDillPath, forceDrops: true);
- await testAOT(aotDillPath, forceDrops: true, useBare: false);
await testAOT(aotDillPath, forceDrops: true, useDispatch: false);
- await testAOT(aotDillPath,
- forceDrops: true, useDispatch: false, useBare: false);
// Test flag-stripped ELF generation.
await testAOT(aotDillPath, stripFlag: true);
- await testAOT(aotDillPath, useBare: false, stripFlag: true);
-
- // Since we can't force disassembler support after the fact when running
- // in PRODUCT mode, skip any --disassemble tests. Do these tests last as
- // they have lots of output and so the log will be truncated.
- if (!const bool.fromEnvironment('dart.vm.product')) {
- // Regression test for dartbug.com/41149.
- await testAOT(aotDillPath, useBare: false, disassemble: true);
- }
// We neither generate assembly nor have a stripping utility on Windows.
if (Platform.isWindows) {
@@ -469,7 +451,6 @@
} else {
// Test unstripped ELF generation that is then externally stripped.
await testAOT(aotDillPath, stripUtil: true);
- await testAOT(aotDillPath, stripUtil: true, useBare: false);
}
// TODO(sstrickl): Currently we can't assemble for SIMARM64 on MacOSX.
@@ -482,9 +463,7 @@
}
// Test unstripped assembly generation that is then externally stripped.
await testAOT(aotDillPath, useAsm: true);
- await testAOT(aotDillPath, useAsm: true, useBare: false);
// Test stripped assembly generation that is then externally stripped.
await testAOT(aotDillPath, useAsm: true, stripFlag: true);
- await testAOT(aotDillPath, useAsm: true, stripFlag: true, useBare: false);
});
}
diff --git a/runtime/tests/vm/dart_2/bare_instructions_trampolines_test.dart b/runtime/tests/vm/dart_2/bare_instructions_trampolines_test.dart
index fee9478..9c70a11 100644
--- a/runtime/tests/vm/dart_2/bare_instructions_trampolines_test.dart
+++ b/runtime/tests/vm/dart_2/bare_instructions_trampolines_test.dart
@@ -4,7 +4,7 @@
// @dart = 2.9
-// VMOptions=--always-generate-trampolines-for-testing --use-bare-instructions
+// VMOptions=--always-generate-trampolines-for-testing
// We use a reasonable sized test and run it with the above options.
import 'hello_fuchsia_test.dart' as test;
diff --git a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart b/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart
index 228e1b5..d4d9e46 100644
--- a/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart
+++ b/runtime/tests/vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
-// VMOptions=--dwarf-stack-traces --save-debugging-info=async_lazy_debug.so --lazy-async-stacks --no-use-bare-instructions
+// VMOptions=--dwarf-stack-traces --save-debugging-info=async_lazy_debug.so --lazy-async-stacks
// @dart = 2.9
diff --git a/runtime/tests/vm/dart_2/deferred_loading_call_modes_test.dart b/runtime/tests/vm/dart_2/deferred_loading_call_modes_test.dart
index e513770..5efc2bd 100644
--- a/runtime/tests/vm/dart_2/deferred_loading_call_modes_test.dart
+++ b/runtime/tests/vm/dart_2/deferred_loading_call_modes_test.dart
@@ -4,9 +4,8 @@
// @dart = 2.9
-// VMOptions=--use_bare_instructions=false
-// VMOptions=--use_bare_instructions=true --use_table_dispatch=false
-// VMOptions=--use_bare_instructions=true --use_table_dispatch=true
+// VMOptions=--use_table_dispatch=false
+// VMOptions=--use_table_dispatch=true
import "splay_test.dart" deferred as splay; // Some non-trivial code.
diff --git a/runtime/tests/vm/dart_2/split_literals_test.dart b/runtime/tests/vm/dart_2/split_literals_test.dart
index 05fcff2..4fa9c1a 100644
--- a/runtime/tests/vm/dart_2/split_literals_test.dart
+++ b/runtime/tests/vm/dart_2/split_literals_test.dart
@@ -67,8 +67,6 @@
// Compile kernel to ELF.
await run(genSnapshot, <String>[
- "--use_bare_instructions=false", //# object: ok
- "--use_bare_instructions=true", //# bare: ok
"--snapshot-kind=app-aot-elf",
"--elf=$snapshot",
"--loading-unit-manifest=$manifest",
diff --git a/runtime/tests/vm/dart_2/use_bare_instructions_flag_test.dart b/runtime/tests/vm/dart_2/use_bare_instructions_flag_test.dart
deleted file mode 100644
index 52b958f..0000000
--- a/runtime/tests/vm/dart_2/use_bare_instructions_flag_test.dart
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// @dart = 2.9
-
-// This test is ensuring that the flag for --use-bare-instructions given at
-// AOT compile-time will be used at runtime (irrespective if other values were
-// passed to the runtime).
-
-import "dart:async";
-import "dart:io";
-
-import 'package:expect/expect.dart';
-import 'package:path/path.dart' as path;
-
-import 'use_flag_test_helper.dart';
-
-main(List<String> args) async {
- if (!isAOTRuntime) {
- return; // Running in JIT: AOT binaries not available.
- }
-
- if (Platform.isAndroid) {
- return; // SDK tree and dart_bootstrap not available on the test device.
- }
-
- await withTempDir('bare-flag-test', (String tempDir) async {
- final script = path.join(sdkDir, 'pkg/kernel/bin/dump.dart');
- final scriptDill = path.join(tempDir, 'kernel_dump.dill');
-
- // Compile script to Kernel IR.
- await run(genKernel, <String>[
- '--aot',
- '--platform=$platformDill',
- '-o',
- scriptDill,
- script,
- ]);
-
- // Run the AOT compiler with/without bare instructions.
- final scriptBareSnapshot = path.join(tempDir, 'bare.snapshot');
- final scriptNonBareSnapshot = path.join(tempDir, 'non_bare.snapshot');
- await Future.wait(<Future>[
- run(genSnapshot, <String>[
- '--use-bare-instructions',
- '--snapshot-kind=app-aot-elf',
- '--elf=$scriptBareSnapshot',
- scriptDill,
- ]),
- run(genSnapshot, <String>[
- '--no-use-bare-instructions',
- '--snapshot-kind=app-aot-elf',
- '--elf=$scriptNonBareSnapshot',
- scriptDill,
- ]),
- ]);
-
- // Run the resulting bare-AOT compiled script.
- final bareOut1 = path.join(tempDir, 'bare-out1.txt');
- final bareOut2 = path.join(tempDir, 'bare-out2.txt');
- await Future.wait(<Future>[
- run(aotRuntime, <String>[
- '--use-bare-instructions',
- scriptBareSnapshot,
- scriptDill,
- bareOut1,
- ]),
- run(aotRuntime, <String>[
- '--no-use-bare-instructions',
- scriptBareSnapshot,
- scriptDill,
- bareOut2,
- ]),
- ]);
-
- // Run the resulting non-bare-AOT compiled script.
- final nonBareOut1 = path.join(tempDir, 'non-bare-out1.txt');
- final nonBareOut2 = path.join(tempDir, 'non-bare-out2.txt');
- await Future.wait(<Future>[
- run(aotRuntime, <String>[
- '--use-bare-instructions',
- scriptNonBareSnapshot,
- scriptDill,
- nonBareOut1,
- ]),
- run(aotRuntime, <String>[
- '--no-use-bare-instructions',
- scriptNonBareSnapshot,
- scriptDill,
- nonBareOut2,
- ]),
- ]);
-
- // Ensure we got 4 times the same result.
- final output = await readFile(bareOut1);
- Expect.equals(output, await readFile(bareOut2));
- Expect.equals(output, await readFile(nonBareOut1));
- Expect.equals(output, await readFile(nonBareOut2));
- });
-}
-
-Future<String> readFile(String file) {
- return new File(file).readAsString();
-}
diff --git a/runtime/tests/vm/dart_2/v8_snapshot_profile_writer_test.dart b/runtime/tests/vm/dart_2/v8_snapshot_profile_writer_test.dart
index a4d23af..cf3e581 100644
--- a/runtime/tests/vm/dart_2/v8_snapshot_profile_writer_test.dart
+++ b/runtime/tests/vm/dart_2/v8_snapshot_profile_writer_test.dart
@@ -109,7 +109,6 @@
Future<void> testAOT(String dillPath,
{bool useAsm = false,
- bool useBare = true,
bool forceDrops = false,
bool useDispatch = true,
bool stripUtil = false, // Note: forced true if useAsm.
@@ -129,9 +128,6 @@
}
final descriptionBuilder = StringBuffer()..write(useAsm ? 'assembly' : 'elf');
- if (!useBare) {
- descriptionBuilder.write('-nonbare');
- }
if (forceDrops) {
descriptionBuilder.write('-dropped');
}
@@ -158,7 +154,6 @@
final snapshotPath = path.join(tempDir, 'test.snap');
final commonSnapshotArgs = [
if (stripFlag) '--strip', // gen_snapshot specific and not a VM flag.
- useBare ? '--use-bare-instructions' : '--no-use-bare-instructions',
"--write-v8-snapshot-profile-to=$profilePath",
if (forceDrops) ...[
'--dwarf-stack-traces',
@@ -432,24 +427,11 @@
// Test unstripped ELF generation directly.
await testAOT(aotDillPath);
- await testAOT(aotDillPath, useBare: false);
await testAOT(aotDillPath, forceDrops: true);
- await testAOT(aotDillPath, forceDrops: true, useBare: false);
await testAOT(aotDillPath, forceDrops: true, useDispatch: false);
- await testAOT(aotDillPath,
- forceDrops: true, useDispatch: false, useBare: false);
// Test flag-stripped ELF generation.
await testAOT(aotDillPath, stripFlag: true);
- await testAOT(aotDillPath, useBare: false, stripFlag: true);
-
- // Since we can't force disassembler support after the fact when running
- // in PRODUCT mode, skip any --disassemble tests. Do these tests last as
- // they have lots of output and so the log will be truncated.
- if (!const bool.fromEnvironment('dart.vm.product')) {
- // Regression test for dartbug.com/41149.
- await testAOT(aotDillPath, useBare: false, disassemble: true);
- }
// We neither generate assembly nor have a stripping utility on Windows.
if (Platform.isWindows) {
@@ -463,7 +445,6 @@
} else {
// Test unstripped ELF generation that is then externally stripped.
await testAOT(aotDillPath, stripUtil: true);
- await testAOT(aotDillPath, stripUtil: true, useBare: false);
}
// TODO(sstrickl): Currently we can't assemble for SIMARM64 on MacOSX.
@@ -476,9 +457,7 @@
}
// Test unstripped assembly generation that is then externally stripped.
await testAOT(aotDillPath, useAsm: true);
- await testAOT(aotDillPath, useAsm: true, useBare: false);
// Test stripped assembly generation that is then externally stripped.
await testAOT(aotDillPath, useAsm: true, stripFlag: true);
- await testAOT(aotDillPath, useAsm: true, stripFlag: true, useBare: false);
});
}
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 9f7c51c..f4bc06c 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -23,7 +23,6 @@
dart/slow_path_shared_stub_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
dart/snapshot_version_test: Skip # This test is a Dart1 test (script snapshot)
dart/stack_overflow_shared_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
-dart/use_bare_instructions_flag_test: Pass, Slow # Spawns several subprocesses
dart_2/boxmint_test: Pass, Slow # Uses slow path
dart_2/byte_array_optimized_test: Pass, Slow
dart_2/data_uri_import_test/none: SkipByDesign
@@ -36,7 +35,6 @@
dart_2/slow_path_shared_stub_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
dart_2/snapshot_version_test: Skip # This test is a Dart1 test (script snapshot)
dart_2/stack_overflow_shared_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
-dart_2/use_bare_instructions_flag_test: Pass, Slow # Spawns several subprocesses
[ $arch == ia32 ]
dart/disassemble_aot_test: SkipByDesign # IA32 does not support AOT.
@@ -403,11 +401,9 @@
dart/emit_aot_size_info_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
dart/split_aot_kernel_generation2_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
dart/split_aot_kernel_generation_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
-dart/use_bare_instructions_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
dart_2/emit_aot_size_info_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
dart_2/split_aot_kernel_generation2_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
dart_2/split_aot_kernel_generation_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
-dart_2/use_bare_instructions_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
[ $mode != debug || $runtime != dart_precompiled ]
in_memory_elf_test: Skip # Tests a debug-mode flag to dart_precompiled_runtime.
@@ -427,10 +423,6 @@
dart_2/isolates/send_object_to_spawn_uri_isolate_test: SkipByDesign # uses spawnUri
dart_2/issue32950_test: SkipByDesign # uses spawnUri.
-[ $runtime != dart_precompiled || $system == android ]
-dart/bare_instructions_trampolines_test: SkipByDesign # This test is for VM AOT only (android fails due to listing interfaces).
-dart_2/bare_instructions_trampolines_test: SkipByDesign # This test is for VM AOT only (android fails due to listing interfaces).
-
[ $hot_reload || $hot_reload_rollback ]
dart/appjit*: SkipByDesign # Cannot reload with URI pointing to app snapshot.
dart/disassemble_determinism_test: SkipSlow # Runs expensive fibonacci(32) computation in 2 subprocesses
diff --git a/runtime/vm/app_snapshot.cc b/runtime/vm/app_snapshot.cc
index 7049265..7a94ef8 100644
--- a/runtime/vm/app_snapshot.cc
+++ b/runtime/vm/app_snapshot.cc
@@ -1775,7 +1775,7 @@
// the pool for references to other code objects (which might reside
// in the current loading unit).
ObjectPoolPtr pool = code->untag()->object_pool_;
- if (s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
+ if (s->kind() == Snapshot::kFullAOT) {
TracePool(s, pool, /*only_code=*/is_deferred);
} else {
if (s->InCurrentLoadingUnitOrRoot(pool)) {
@@ -1824,8 +1824,8 @@
}
if (Code::IsDiscarded(code)) {
- ASSERT(s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
- FLAG_dwarf_stack_traces_mode && !FLAG_retain_code_objects);
+ ASSERT(s->kind() == Snapshot::kFullAOT && FLAG_dwarf_stack_traces_mode &&
+ !FLAG_retain_code_objects);
// Only object pool and static call table entries and the compressed
// stack maps should be pushed.
return;
@@ -2003,7 +2003,7 @@
if (FLAG_write_v8_snapshot_profile_to != nullptr) {
// If we are writing V8 snapshot profile then attribute references going
// through the object pool and static calls to the code object itself.
- if (kind == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
+ if (kind == Snapshot::kFullAOT &&
code->untag()->object_pool_ != ObjectPool::null()) {
ObjectPoolPtr pool = code->untag()->object_pool_;
// Non-empty per-code object pools should not be reachable in this mode.
@@ -2026,8 +2026,8 @@
if (Code::IsDiscarded(code)) {
// Only write instructions, compressed stackmaps and state bits
// for the discarded Code objects.
- ASSERT(kind == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
- FLAG_dwarf_stack_traces_mode && !FLAG_retain_code_objects);
+ ASSERT(kind == Snapshot::kFullAOT && FLAG_dwarf_stack_traces_mode &&
+ !FLAG_retain_code_objects);
#if defined(DART_PRECOMPILER)
if (FLAG_write_v8_snapshot_profile_to != nullptr) {
// Keep the owner as a (possibly artificial) node for snapshot analysis.
@@ -2042,7 +2042,7 @@
// No need to write object pool out if we are producing full AOT
// snapshot with bare instructions.
- if (!(kind == Snapshot::kFullAOT && FLAG_use_bare_instructions)) {
+ if (kind != Snapshot::kFullAOT) {
if (s->InCurrentLoadingUnitOrRoot(code->untag()->object_pool_)) {
WriteField(code, object_pool_);
} else {
@@ -2167,7 +2167,7 @@
// There would be a single global pool if this is a full AOT snapshot
// with bare instructions.
- if (!(d->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions)) {
+ if (d->kind() != Snapshot::kFullAOT) {
code->untag()->object_pool_ = static_cast<ObjectPoolPtr>(d->ReadRef());
} else {
code->untag()->object_pool_ = ObjectPool::null();
@@ -2252,9 +2252,7 @@
ObjectPoolPtr pool = ObjectPool::RawCast(object);
objects_.Add(pool);
- if (s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
- // Treat pool as weak.
- } else {
+ if (s->kind() != Snapshot::kFullAOT) {
const intptr_t length = pool->untag()->length_;
uint8_t* entry_bits = pool->untag()->entry_bits();
for (intptr_t i = 0; i < length; i++) {
@@ -2280,7 +2278,7 @@
}
void WriteFill(Serializer* s) {
- bool weak = s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions;
+ bool weak = s->kind() == Snapshot::kFullAOT;
const intptr_t count = objects_.length();
for (intptr_t i = 0; i < count; i++) {
@@ -2387,12 +2385,10 @@
ObjectPool::Patchability::kPatchable);
uword switchable_call_miss_entry_point = 0;
uword megamorphic_call_entry_point = 0;
- if (FLAG_use_bare_instructions) {
- switchable_call_miss_entry_point =
- StubCode::SwitchableCallMiss().MonomorphicEntryPoint();
- megamorphic_call_entry_point =
- StubCode::MegamorphicCall().MonomorphicEntryPoint();
- }
+ switchable_call_miss_entry_point =
+ StubCode::SwitchableCallMiss().MonomorphicEntryPoint();
+ megamorphic_call_entry_point =
+ StubCode::MegamorphicCall().MonomorphicEntryPoint();
#endif // defined(DART_PRECOMPILED_RUNTIME)
for (intptr_t id = start_index_; id < stop_index_; id++) {
@@ -2420,13 +2416,11 @@
}
#if defined(DART_PRECOMPILED_RUNTIME)
case ObjectPool::EntryType::kSwitchableCallMissEntryPoint:
- ASSERT(FLAG_use_bare_instructions);
pool->untag()->entry_bits()[j] = immediate_bits;
entry.raw_value_ =
static_cast<intptr_t>(switchable_call_miss_entry_point);
break;
case ObjectPool::EntryType::kMegamorphicCallEntryPoint:
- ASSERT(FLAG_use_bare_instructions);
pool->untag()->entry_bits()[j] = immediate_bits;
entry.raw_value_ =
static_cast<intptr_t>(megamorphic_call_entry_point);
@@ -4377,7 +4371,7 @@
void PostLoad(Deserializer* d, const Array& refs, bool primary) {
// We only cache the entry point in bare instructions mode (as we need
// to load the function anyway otherwise).
- if (d->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
+ if (d->kind() == Snapshot::kFullAOT) {
auto& closure = Closure::Handle(d->zone());
auto& func = Function::Handle(d->zone());
for (intptr_t i = start_index_; i < stop_index_; i++) {
@@ -5863,20 +5857,16 @@
const Object* deferred_object = (*unit_->deferred_objects())[i];
ASSERT(deferred_object->IsCode());
CodePtr code = static_cast<CodePtr>(deferred_object->ptr());
- if (FLAG_use_bare_instructions) {
- ObjectPoolPtr pool = code->untag()->object_pool_;
- if (pool != ObjectPool::null()) {
- const intptr_t length = pool->untag()->length_;
- uint8_t* entry_bits = pool->untag()->entry_bits();
- for (intptr_t i = 0; i < length; i++) {
- auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
- if (entry_type == ObjectPool::EntryType::kTaggedObject) {
- s->Push(pool->untag()->data()[i].raw_obj_);
- }
+ ObjectPoolPtr pool = code->untag()->object_pool_;
+ if (pool != ObjectPool::null()) {
+ const intptr_t length = pool->untag()->length_;
+ uint8_t* entry_bits = pool->untag()->entry_bits();
+ for (intptr_t i = 0; i < length; i++) {
+ auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
+ if (entry_type == ObjectPool::EntryType::kTaggedObject) {
+ s->Push(pool->untag()->data()[i].raw_obj_);
}
}
- } else {
- s->Push(code->untag()->object_pool_);
}
s->Push(code->untag()->compressed_stackmaps_);
s->Push(code->untag()->code_source_map_);
@@ -5901,33 +5891,28 @@
ASSERT(!Code::IsDiscarded(code));
s->WriteInstructions(code->untag()->instructions_,
code->untag()->unchecked_offset_, code, false);
- if (!FLAG_use_bare_instructions) {
- s->WriteRootRef(code->untag()->object_pool_, "deferred-code");
- }
s->WriteRootRef(code->untag()->compressed_stackmaps_, "deferred-code");
s->WriteRootRef(code->untag()->code_source_map_, "deferred-code");
}
- if (FLAG_use_bare_instructions) {
- ObjectPoolPtr pool =
- s->isolate_group()->object_store()->global_object_pool();
- const intptr_t length = pool->untag()->length_;
- uint8_t* entry_bits = pool->untag()->entry_bits();
- intptr_t last_write = 0;
- for (intptr_t i = 0; i < length; i++) {
- auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
- if (entry_type == ObjectPool::EntryType::kTaggedObject) {
- if (s->IsWritten(pool->untag()->data()[i].raw_obj_)) {
- intptr_t skip = i - last_write;
- s->WriteUnsigned(skip);
- s->WriteRootRef(pool->untag()->data()[i].raw_obj_,
- "deferred-literal");
- last_write = i;
- }
+ ObjectPoolPtr pool =
+ s->isolate_group()->object_store()->global_object_pool();
+ const intptr_t length = pool->untag()->length_;
+ uint8_t* entry_bits = pool->untag()->entry_bits();
+ intptr_t last_write = 0;
+ for (intptr_t i = 0; i < length; i++) {
+ auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
+ if (entry_type == ObjectPool::EntryType::kTaggedObject) {
+ if (s->IsWritten(pool->untag()->data()[i].raw_obj_)) {
+ intptr_t skip = i - last_write;
+ s->WriteUnsigned(skip);
+ s->WriteRootRef(pool->untag()->data()[i].raw_obj_,
+ "deferred-literal");
+ last_write = i;
}
}
- s->WriteUnsigned(length - last_write);
}
+ s->WriteUnsigned(length - last_write);
#endif
}
@@ -5966,8 +5951,7 @@
ASSERT(unchecked_entry_point != 0);
func->untag()->unchecked_entry_point_ = unchecked_entry_point;
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_use_bare_instructions &&
- func->untag()->data()->IsHeapObject() &&
+ if (func->untag()->data()->IsHeapObject() &&
func->untag()->data()->IsClosureData()) {
// For closure functions in bare instructions mode, also update the
// cache inside the static implicit closure object, if any.
@@ -5980,27 +5964,22 @@
}
#endif
}
- if (!FLAG_use_bare_instructions) {
- code->untag()->object_pool_ = static_cast<ObjectPoolPtr>(d->ReadRef());
- }
code->untag()->compressed_stackmaps_ =
static_cast<CompressedStackMapsPtr>(d->ReadRef());
code->untag()->code_source_map_ =
static_cast<CodeSourceMapPtr>(d->ReadRef());
}
- if (FLAG_use_bare_instructions) {
- ObjectPoolPtr pool =
- d->isolate_group()->object_store()->global_object_pool();
- const intptr_t length = pool->untag()->length_;
- uint8_t* entry_bits = pool->untag()->entry_bits();
- for (intptr_t i = d->ReadUnsigned(); i < length; i += d->ReadUnsigned()) {
- auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
- ASSERT(entry_type == ObjectPool::EntryType::kTaggedObject);
- // The existing entry will usually be null, but it might also be an
- // equivalent object that was duplicated in another loading unit.
- pool->untag()->data()[i].raw_obj_ = d->ReadRef();
- }
+ ObjectPoolPtr pool =
+ d->isolate_group()->object_store()->global_object_pool();
+ const intptr_t length = pool->untag()->length_;
+ uint8_t* entry_bits = pool->untag()->entry_bits();
+ for (intptr_t i = d->ReadUnsigned(); i < length; i += d->ReadUnsigned()) {
+ auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
+ ASSERT(entry_type == ObjectPool::EntryType::kTaggedObject);
+ // The existing entry will usually be null, but it might also be an
+ // equivalent object that was duplicated in another loading unit.
+ pool->untag()->data()[i].raw_obj_ = d->ReadRef();
}
// Reinitialize the dispatch table by rereading the table's serialization
@@ -6636,7 +6615,7 @@
}
#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
- if ((kind() == Snapshot::kFullAOT) && FLAG_use_bare_instructions) {
+ if (kind() == Snapshot::kFullAOT) {
// Group the code objects whose instructions are not being deferred in this
// snapshot unit in the order they will be written: first the code objects
// encountered for this first time in this unit being written by the
@@ -6690,7 +6669,7 @@
{offset_space, offset});
}
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
ASSERT(offset != 0);
RELEASE_ASSERT(offset >= previous_text_offset_);
const uint32_t delta = offset - previous_text_offset_;
@@ -7006,8 +6985,7 @@
} else {
WriteUnsigned(0);
}
- ASSERT((instructions_table_len_ == 0) ||
- (FLAG_precompiled_mode && FLAG_use_bare_instructions));
+ ASSERT((instructions_table_len_ == 0) || FLAG_precompiled_mode);
WriteUnsigned(instructions_table_len_);
for (SerializationCluster* cluster : clusters) {
@@ -7710,75 +7688,56 @@
if (deferred) {
ASSERT(!discarded);
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_use_bare_instructions) {
- uword entry_point = StubCode::NotLoaded().EntryPoint();
- code->untag()->entry_point_ = entry_point;
- code->untag()->unchecked_entry_point_ = entry_point;
- code->untag()->monomorphic_entry_point_ = entry_point;
- code->untag()->monomorphic_unchecked_entry_point_ = entry_point;
- code->untag()->instructions_length_ = 0;
- return;
- }
-#endif
- InstructionsPtr instr = StubCode::NotLoaded().instructions();
- uint32_t unchecked_offset = 0;
- code->untag()->instructions_ = instr;
-#if defined(DART_PRECOMPILED_RUNTIME)
- code->untag()->instructions_length_ = Instructions::Size(instr);
+ uword entry_point = StubCode::NotLoaded().EntryPoint();
+ code->untag()->entry_point_ = entry_point;
+ code->untag()->unchecked_entry_point_ = entry_point;
+ code->untag()->monomorphic_entry_point_ = entry_point;
+ code->untag()->monomorphic_unchecked_entry_point_ = entry_point;
+ code->untag()->instructions_length_ = 0;
+ return;
#else
- code->untag()->unchecked_offset_ = unchecked_offset;
+ UNREACHABLE();
#endif
- Code::InitializeCachedEntryPointsFrom(code, instr, unchecked_offset);
- return;
}
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_use_bare_instructions) {
- previous_text_offset_ += ReadUnsigned();
- const uword payload_start =
- image_reader_->GetBareInstructionsAt(previous_text_offset_);
- const uint32_t payload_info = ReadUnsigned();
- const uint32_t unchecked_offset = payload_info >> 1;
- const bool has_monomorphic_entrypoint = (payload_info & 0x1) == 0x1;
+ previous_text_offset_ += ReadUnsigned();
+ const uword payload_start =
+ image_reader_->GetBareInstructionsAt(previous_text_offset_);
+ const uint32_t payload_info = ReadUnsigned();
+ const uint32_t unchecked_offset = payload_info >> 1;
+ const bool has_monomorphic_entrypoint = (payload_info & 0x1) == 0x1;
- const uword entry_offset = has_monomorphic_entrypoint
- ? Instructions::kPolymorphicEntryOffsetAOT
- : 0;
- const uword monomorphic_entry_offset =
- has_monomorphic_entrypoint ? Instructions::kMonomorphicEntryOffsetAOT
- : 0;
+ const uword entry_offset =
+ has_monomorphic_entrypoint ? Instructions::kPolymorphicEntryOffsetAOT : 0;
+ const uword monomorphic_entry_offset =
+ has_monomorphic_entrypoint ? Instructions::kMonomorphicEntryOffsetAOT : 0;
- const uword entry_point = payload_start + entry_offset;
- const uword monomorphic_entry_point =
- payload_start + monomorphic_entry_offset;
+ const uword entry_point = payload_start + entry_offset;
+ const uword monomorphic_entry_point =
+ payload_start + monomorphic_entry_offset;
- ObjectPtr code_descriptor = code;
- if (discarded) {
- code_descriptor = static_cast<CompressedStackMapsPtr>(ReadRef());
- }
-
- instructions_table_.SetEntryAt(instructions_index_++, payload_start,
- has_monomorphic_entrypoint, code_descriptor);
-
- if (!discarded) {
- // There are no serialized RawInstructions objects in this mode.
- code->untag()->instructions_ = Instructions::null();
- code->untag()->entry_point_ = entry_point;
- code->untag()->unchecked_entry_point_ = entry_point + unchecked_offset;
- code->untag()->monomorphic_entry_point_ = monomorphic_entry_point;
- code->untag()->monomorphic_unchecked_entry_point_ =
- monomorphic_entry_point + unchecked_offset;
- }
- return;
+ ObjectPtr code_descriptor = code;
+ if (discarded) {
+ code_descriptor = static_cast<CompressedStackMapsPtr>(ReadRef());
}
-#endif
+ instructions_table_.SetEntryAt(instructions_index_++, payload_start,
+ has_monomorphic_entrypoint, code_descriptor);
+
+ if (!discarded) {
+ // There are no serialized RawInstructions objects in this mode.
+ code->untag()->instructions_ = Instructions::null();
+ code->untag()->entry_point_ = entry_point;
+ code->untag()->unchecked_entry_point_ = entry_point + unchecked_offset;
+ code->untag()->monomorphic_entry_point_ = monomorphic_entry_point;
+ code->untag()->monomorphic_unchecked_entry_point_ =
+ monomorphic_entry_point + unchecked_offset;
+ }
+#else
InstructionsPtr instr = image_reader_->GetInstructionsAt(Read<uint32_t>());
uint32_t unchecked_offset = ReadUnsigned();
code->untag()->instructions_ = instr;
-#if defined(DART_PRECOMPILED_RUNTIME)
- code->untag()->instructions_length_ = Instructions::Size(instr);
-#else
code->untag()->unchecked_offset_ = unchecked_offset;
if (kind() == Snapshot::kFullJIT) {
const uint32_t active_offset = Read<uint32_t>();
@@ -7786,36 +7745,34 @@
unchecked_offset = ReadUnsigned();
}
code->untag()->active_instructions_ = instr;
-#endif
Code::InitializeCachedEntryPointsFrom(code, instr, unchecked_offset);
+#endif // defined(DART_PRECOMPILED_RUNTIME)
}
void Deserializer::EndInstructions() {
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_use_bare_instructions) {
- uword previous_end = image_reader_->GetBareInstructionsEnd();
- for (intptr_t i = instructions_index_ - 1; i >= 0; --i) {
- ObjectPtr descriptor = instructions_table_.DescriptorAt(i);
- uword start = instructions_table_.PayloadStartAt(i);
- ASSERT(start <= previous_end);
- if (descriptor->IsCode()) {
- CodePtr code = static_cast<CodePtr>(descriptor);
- code->untag()->instructions_length_ = previous_end - start;
- }
- previous_end = start;
+ uword previous_end = image_reader_->GetBareInstructionsEnd();
+ for (intptr_t i = instructions_index_ - 1; i >= 0; --i) {
+ ObjectPtr descriptor = instructions_table_.DescriptorAt(i);
+ uword start = instructions_table_.PayloadStartAt(i);
+ ASSERT(start <= previous_end);
+ if (descriptor->IsCode()) {
+ CodePtr code = static_cast<CodePtr>(descriptor);
+ code->untag()->instructions_length_ = previous_end - start;
}
+ previous_end = start;
+ }
- ObjectStore* object_store = IsolateGroup::Current()->object_store();
- GrowableObjectArray& tables =
- GrowableObjectArray::Handle(zone_, object_store->instructions_tables());
- if (tables.IsNull()) {
- tables = GrowableObjectArray::New(Heap::kOld);
- object_store->set_instructions_tables(tables);
- }
- if ((tables.Length() == 0) ||
- (tables.At(tables.Length() - 1) != instructions_table_.ptr())) {
- tables.Add(instructions_table_, Heap::kOld);
- }
+ ObjectStore* object_store = IsolateGroup::Current()->object_store();
+ GrowableObjectArray& tables =
+ GrowableObjectArray::Handle(zone_, object_store->instructions_tables());
+ if (tables.IsNull()) {
+ tables = GrowableObjectArray::New(Heap::kOld);
+ object_store->set_instructions_tables(tables);
+ }
+ if ((tables.Length() == 0) ||
+ (tables.At(tables.Length() - 1) != instructions_table_.ptr())) {
+ tables.Add(instructions_table_, Heap::kOld);
}
#endif
}
@@ -7858,7 +7815,7 @@
#if defined(DART_PRECOMPILED_RUNTIME)
if (instructions_table_len > 0) {
- ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
+ ASSERT(FLAG_precompiled_mode);
const uword start_pc = image_reader_->GetBareInstructionsAt(0);
const uword end_pc = image_reader_->GetBareInstructionsEnd();
instructions_table_ =
diff --git a/runtime/vm/code_patcher_arm.cc b/runtime/vm/code_patcher_arm.cc
index 2fc5361..11d15ea 100644
--- a/runtime/vm/code_patcher_arm.cc
+++ b/runtime/vm/code_patcher_arm.cc
@@ -96,7 +96,7 @@
const Code& caller_code,
const Object& data,
const Code& target) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCallPattern call(return_address);
call.SetData(data);
call.SetTarget(target);
@@ -109,7 +109,7 @@
uword CodePatcher::GetSwitchableCallTargetEntryAt(uword return_address,
const Code& caller_code) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCallPattern call(return_address);
return call.target_entry();
} else {
@@ -120,7 +120,7 @@
ObjectPtr CodePatcher::GetSwitchableCallDataAt(uword return_address,
const Code& caller_code) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCallPattern call(return_address);
return call.data();
} else {
diff --git a/runtime/vm/code_patcher_arm64.cc b/runtime/vm/code_patcher_arm64.cc
index c399fd1..e8217b6 100644
--- a/runtime/vm/code_patcher_arm64.cc
+++ b/runtime/vm/code_patcher_arm64.cc
@@ -132,7 +132,7 @@
const Code& caller_code,
const Object& data,
const Code& target) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCallPattern call(return_address);
call.SetData(data);
call.SetTarget(target);
@@ -145,7 +145,7 @@
uword CodePatcher::GetSwitchableCallTargetEntryAt(uword return_address,
const Code& caller_code) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCallPattern call(return_address);
return call.target_entry();
} else {
@@ -156,7 +156,7 @@
ObjectPtr CodePatcher::GetSwitchableCallDataAt(uword return_address,
const Code& caller_code) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCallPattern call(return_address);
return call.data();
} else {
diff --git a/runtime/vm/code_patcher_x64.cc b/runtime/vm/code_patcher_x64.cc
index ce1d9f2..7a846f4 100644
--- a/runtime/vm/code_patcher_x64.cc
+++ b/runtime/vm/code_patcher_x64.cc
@@ -486,7 +486,7 @@
const Code& caller_code,
const Object& data,
const Code& target) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCall call(return_address);
call.SetData(data);
call.SetTarget(target);
@@ -499,7 +499,7 @@
uword CodePatcher::GetSwitchableCallTargetEntryAt(uword return_address,
const Code& caller_code) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCall call(return_address);
return call.target_entry();
} else {
@@ -510,7 +510,7 @@
ObjectPtr CodePatcher::GetSwitchableCallDataAt(uword return_address,
const Code& caller_code) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
BareSwitchableCall call(return_address);
return call.data();
} else {
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index 9fefdca..3726ba2 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -455,12 +455,10 @@
retained_reasons_writer_ = &reasons_writer;
}
- if (FLAG_use_bare_instructions) {
- // Since we keep the object pool until the end of AOT compilation, it
- // will hang on to its entries until the very end. Therefore we have
- // to use handles which survive that long, so we use [zone_] here.
- global_object_pool_builder_.InitializeWithZone(zone_);
- }
+ // Since we keep the object pool until the end of AOT compilation, it
+ // will hang on to its entries until the very end. Therefore we have
+ // to use handles which survive that long, so we use [zone_] here.
+ global_object_pool_builder_.InitializeWithZone(zone_);
{
HANDLESCOPE(T);
@@ -481,7 +479,7 @@
// as well as other type checks.
HierarchyInfo hierarchy_info(T);
- if (FLAG_use_bare_instructions && FLAG_use_table_dispatch) {
+ if (FLAG_use_table_dispatch) {
dispatch_table_generator_ = new compiler::DispatchTableGenerator(Z);
dispatch_table_generator_->Initialize(IG->class_table());
}
@@ -489,7 +487,7 @@
// Precompile constructors to compute information such as
// optimized instruction count (used in inlining heuristics).
ClassFinalizer::ClearAllCode(
- /*including_nonchanging_cids=*/FLAG_use_bare_instructions);
+ /*including_nonchanging_cids=*/true);
{
CompilerState state(thread_, /*is_aot=*/true, /*is_optimizing=*/true);
@@ -497,14 +495,14 @@
}
ClassFinalizer::ClearAllCode(
- /*including_nonchanging_cids=*/FLAG_use_bare_instructions);
+ /*including_nonchanging_cids=*/true);
tracer_ = PrecompilerTracer::StartTracingIfRequested(this);
// All stubs have already been generated, all of them share the same pool.
// We use that pool to initialize our global object pool, to guarantee
// stubs as well as code compiled from here on will have the same pool.
- if (FLAG_use_bare_instructions) {
+ {
// We use any stub here to get it's object pool (all stubs share the
// same object pool in bare instructions mode).
const Code& code = StubCode::LazyCompile();
@@ -571,7 +569,7 @@
// [Type]-specialized stubs.
AttachOptimizedTypeTestingStub();
- if (FLAG_use_bare_instructions) {
+ {
// Now we generate the actual object pool instance and attach it to the
// object store. The AOT runtime will use it from there in the enter
// dart code stub.
@@ -853,9 +851,7 @@
void Precompiler::ProcessFunction(const Function& function) {
HANDLESCOPE(T);
- const intptr_t gop_offset =
- FLAG_use_bare_instructions ? global_object_pool_builder()->CurrentLength()
- : 0;
+ const intptr_t gop_offset = global_object_pool_builder()->CurrentLength();
RELEASE_ASSERT(!function.HasCode());
// Ffi trampoline functions have no signature.
ASSERT(function.kind() == UntaggedFunction::kFfiTrampoline ||
@@ -949,7 +945,7 @@
// rather than scanning global object pool - because we want to include
// *all* outgoing references into the trace. Scanning GOP would exclude
// references that have been deduplicated.
- if (FLAG_use_bare_instructions && !is_tracing()) {
+ if (!is_tracing()) {
for (intptr_t i = gop_offset;
i < global_object_pool_builder()->CurrentLength(); i++) {
const auto& wrapper_entry = global_object_pool_builder()->EntryAt(i);
@@ -1442,7 +1438,7 @@
}
void Precompiler::AddTableSelector(const compiler::TableSelector* selector) {
- ASSERT(FLAG_use_bare_instructions && FLAG_use_table_dispatch);
+ ASSERT(FLAG_use_table_dispatch);
if (is_tracing()) {
tracer_->WriteTableSelectorRef(selector->id);
@@ -1455,7 +1451,7 @@
}
bool Precompiler::IsHitByTableSelector(const Function& function) {
- if (!(FLAG_use_bare_instructions && FLAG_use_table_dispatch)) {
+ if (!FLAG_use_table_dispatch) {
return false;
}
@@ -2007,7 +2003,7 @@
void Precompiler::FinalizeDispatchTable() {
PRECOMPILER_TIMER_SCOPE(this, FinalizeDispatchTable);
- if (!FLAG_use_bare_instructions || !FLAG_use_table_dispatch) return;
+ if (!FLAG_use_table_dispatch) return;
HANDLESCOPE(T);
// Build the entries used to serialize the dispatch table before
// dropping functions, as we may clear references to Code objects.
@@ -2066,11 +2062,8 @@
// the old references to the CallStaticFunction stub, but it is sufficient
// for the local pool to include the actual call target.
compiler::ObjectPoolBuilder builder;
- bool append_to_pool = FLAG_use_bare_instructions;
- if (append_to_pool) {
- pool_ = code.object_pool();
- pool_.CopyInto(&builder);
- }
+ pool_ = code.object_pool();
+ pool_.CopyInto(&builder);
for (auto& view : static_calls) {
kind_and_offset_ = view.Get<Code::kSCallTableKindAndOffset>();
@@ -2093,9 +2086,7 @@
Code::OffsetField::decode(kind_and_offset_.Value());
const uword pc = pc_offset + code.PayloadStart();
CodePatcher::PatchStaticCallAt(pc, code, target_code_);
- if (append_to_pool) {
- builder.AddObject(Object::ZoneHandle(target_code_.ptr()));
- }
+ builder.AddObject(Object::ZoneHandle(target_code_.ptr()));
}
if (FLAG_trace_precompiler) {
THR_Print("Updated static call entry to %s in \"%s\"\n",
@@ -2104,9 +2095,7 @@
}
}
- if (append_to_pool) {
- code.set_object_pool(ObjectPool::NewFromBuilder(builder));
- }
+ code.set_object_pool(ObjectPool::NewFromBuilder(builder));
}
private:
@@ -2902,11 +2891,9 @@
intptr_t discarded_codes_ = 0;
};
- // Code objects are stored in stack frames if not use_bare_instructions.
// Code objects are used by stack traces if not dwarf_stack_traces.
// Code objects are used by profiler in non-PRODUCT mode.
- if (!FLAG_use_bare_instructions || !FLAG_dwarf_stack_traces_mode ||
- FLAG_retain_code_objects) {
+ if (!FLAG_dwarf_stack_traces_mode || FLAG_retain_code_objects) {
return;
}
@@ -3065,9 +3052,7 @@
Array::Handle(zone, graph_compiler->CreateDeoptInfo(assembler));
// Allocates instruction object. Since this occurs only at safepoint,
// there can be no concurrent access to the instruction page.
- const auto pool_attachment = FLAG_use_bare_instructions
- ? Code::PoolAttachment::kNotAttachPool
- : Code::PoolAttachment::kAttachPool;
+ const auto pool_attachment = Code::PoolAttachment::kNotAttachPool;
SafepointWriteRwLocker ml(T, T->isolate_group()->program_lock());
const Code& code = Code::Handle(
@@ -3193,19 +3178,17 @@
ASSERT(pass_state.inline_id_to_function.length() ==
pass_state.caller_inline_id.length());
- ASSERT(!FLAG_use_bare_instructions || precompiler_ != nullptr);
+ ASSERT(precompiler_ != nullptr);
- if (FLAG_use_bare_instructions) {
- // When generating code in bare instruction mode all code objects
- // share the same global object pool. To reduce interleaving of
- // unrelated object pool entries from different code objects
- // we attempt to pregenerate stubs referenced by the code
- // we are going to generate.
- //
- // Reducing interleaving means reducing recompilations triggered by
- // failure to commit object pool into the global object pool.
- GenerateNecessaryAllocationStubs(flow_graph);
- }
+ // When generating code in bare instruction mode all code objects
+ // share the same global object pool. To reduce interleaving of
+ // unrelated object pool entries from different code objects
+ // we attempt to pregenerate stubs referenced by the code
+ // we are going to generate.
+ //
+ // Reducing interleaving means reducing recompilations triggered by
+ // failure to commit object pool into the global object pool.
+ GenerateNecessaryAllocationStubs(flow_graph);
// Even in bare instructions mode we don't directly add objects into
// the global object pool because code generation can bail out
@@ -3220,9 +3203,7 @@
// some stubs). If this indeed happens we retry the compilation.
// (See TryCommitToParent invocation below).
compiler::ObjectPoolBuilder object_pool_builder(
- FLAG_use_bare_instructions
- ? precompiler_->global_object_pool_builder()
- : nullptr);
+ precompiler_->global_object_pool_builder());
compiler::Assembler assembler(&object_pool_builder, use_far_branches);
CodeStatistics* function_stats = NULL;
@@ -3283,8 +3264,7 @@
// method will lead to the same IR due to instability of inlining
// heuristics (under some conditions we might end up inlining
// more aggressively on the second attempt).
- if (FLAG_use_bare_instructions &&
- !object_pool_builder.TryCommitToParent()) {
+ if (!object_pool_builder.TryCommitToParent()) {
done = false;
continue;
}
diff --git a/runtime/vm/compiler/aot/precompiler.h b/runtime/vm/compiler/aot/precompiler.h
index 303fbc4..678905c 100644
--- a/runtime/vm/compiler/aot/precompiler.h
+++ b/runtime/vm/compiler/aot/precompiler.h
@@ -243,12 +243,11 @@
}
compiler::ObjectPoolBuilder* global_object_pool_builder() {
- ASSERT(FLAG_use_bare_instructions);
return &global_object_pool_builder_;
}
compiler::SelectorMap* selector_map() {
- ASSERT(FLAG_use_bare_instructions && FLAG_use_table_dispatch);
+ ASSERT(FLAG_use_table_dispatch);
return dispatch_table_generator_->selector_map();
}
diff --git a/runtime/vm/compiler/aot/precompiler_tracer.cc b/runtime/vm/compiler/aot/precompiler_tracer.cc
index 72fcfdd..d0a2e5f 100644
--- a/runtime/vm/compiler/aot/precompiler_tracer.cc
+++ b/runtime/vm/compiler/aot/precompiler_tracer.cc
@@ -90,7 +90,7 @@
const auto& fun = Function::Cast(obj);
cls_ = fun.Owner();
const intptr_t selector_id =
- FLAG_use_bare_instructions && FLAG_use_table_dispatch
+ FLAG_use_table_dispatch
? precompiler_->selector_map()->SelectorId(fun)
: -1;
Write("\"%c\",%" Pd ",%" Pd ",%" Pd "",
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index c17b697..79de554 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -1620,7 +1620,7 @@
}
void Assembler::SetupGlobalPoolAndDispatchTable() {
- ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
+ ASSERT(FLAG_precompiled_mode);
ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
if (FLAG_use_table_dispatch) {
ldr(DISPATCH_TABLE_REG,
@@ -3361,7 +3361,7 @@
COMPILE_ASSERT(CODE_REG < FP);
COMPILE_ASSERT(FP < LINK_REGISTER.code);
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
SPILLS_LR_TO_FRAME(
EnterFrame((1 << PP) | (1 << CODE_REG) | (1 << FP) | (1 << LR), 0));
@@ -3391,7 +3391,7 @@
}
void Assembler::LeaveDartFrame() {
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
ldr(PP, Address(FP, target::frame_layout.saved_caller_pp_from_fp *
target::kWordSize));
}
@@ -3403,7 +3403,7 @@
}
void Assembler::LeaveDartFrameAndReturn() {
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
ldr(PP, Address(FP, target::frame_layout.saved_caller_pp_from_fp *
target::kWordSize));
}
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index 8aed5c6..b844404 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -1565,7 +1565,7 @@
}
void Assembler::SetupGlobalPoolAndDispatchTable() {
- ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
+ ASSERT(FLAG_precompiled_mode);
ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
sub(PP, PP, Operand(kHeapObjectTag)); // Pool in PP is untagged!
if (FLAG_use_table_dispatch) {
@@ -1648,7 +1648,7 @@
// Setup the frame.
EnterFrame(0);
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
TagAndPushPPAndPcMarker(); // Save PP and PC marker.
// Load the pool pointer.
@@ -1683,7 +1683,7 @@
}
void Assembler::LeaveDartFrame(RestorePP restore_pp) {
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
if (restore_pp == kRestoreCallerPP) {
// Restore and untag PP.
LoadFromOffset(
@@ -1820,7 +1820,7 @@
void Assembler::EnterCallRuntimeFrame(intptr_t frame_size, bool is_leaf) {
Comment("EnterCallRuntimeFrame");
EnterFrame(0);
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
TagAndPushPPAndPcMarker(); // Save PP and PC marker.
}
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index d2dc30c..0c396e7 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -1845,7 +1845,7 @@
void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
Comment("EnterCallRuntimeFrame");
EnterFrame(0);
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
pushq(CODE_REG);
pushq(PP);
}
@@ -1939,7 +1939,7 @@
void Assembler::EnterDartFrame(intptr_t frame_size, Register new_pp) {
ASSERT(!constant_pool_allowed());
EnterFrame(0);
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
pushq(CODE_REG);
pushq(PP);
if (new_pp == kNoRegister) {
@@ -1956,7 +1956,7 @@
void Assembler::LeaveDartFrame(RestorePP restore_pp) {
// Restore caller's PP register that was pushed in EnterDartFrame.
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
if (restore_pp == kRestoreCallerPP) {
movq(PP, Address(RBP, (target::frame_layout.saved_caller_pp_from_fp *
target::kWordSize)));
diff --git a/runtime/vm/compiler/assembler/disassembler.cc b/runtime/vm/compiler/assembler/disassembler.cc
index e950867..e9b082f 100644
--- a/runtime/vm/compiler/assembler/disassembler.cc
+++ b/runtime/vm/compiler/assembler/disassembler.cc
@@ -245,7 +245,7 @@
ASSERT(code.pointer_offsets_length() == 0);
#endif
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
THR_Print("(No object pool for bare instructions.)\n");
} else {
const ObjectPool& object_pool =
@@ -480,7 +480,7 @@
code.Disassemble(&formatter);
THR_Print("}\n");
const ObjectPool& object_pool = ObjectPool::Handle(code.object_pool());
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
THR_Print("(No object pool for bare instructions.)\n");
} else if (!object_pool.IsNull()) {
object_pool.DebugPrint();
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index ca16d66..47bcbbbef 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -3687,19 +3687,17 @@
}
bool FlowGraphCompiler::CanPcRelativeCall(const Function& target) const {
- return FLAG_precompiled_mode && FLAG_use_bare_instructions &&
+ return FLAG_precompiled_mode &&
(LoadingUnitOf(zone_, function()) == LoadingUnitOf(zone_, target));
}
bool FlowGraphCompiler::CanPcRelativeCall(const Code& target) const {
- return FLAG_precompiled_mode && FLAG_use_bare_instructions &&
- !target.InVMIsolateHeap() &&
+ return FLAG_precompiled_mode && !target.InVMIsolateHeap() &&
(LoadingUnitOf(zone_, function()) == LoadingUnitOf(zone_, target));
}
bool FlowGraphCompiler::CanPcRelativeCall(const AbstractType& target) const {
- return FLAG_precompiled_mode && FLAG_use_bare_instructions &&
- !target.InVMIsolateHeap() &&
+ return FLAG_precompiled_mode && !target.InVMIsolateHeap() &&
(LoadingUnitOf(zone_, function()) == LoadingUnit::kRootId);
}
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index ac4e0f8..3402cb2 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -29,7 +29,7 @@
DECLARE_FLAG(bool, enable_simd_inline);
void FlowGraphCompiler::ArchSpecificInitialization() {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
auto object_store = isolate_group()->object_store();
const auto& stub =
@@ -286,7 +286,7 @@
// R1 = extracted function
// R4 = offset of type argument vector (or 0 if class is not generic)
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
kPoolReg = PP;
} else {
__ LoadFieldFromOffset(kPoolReg, CODE_REG,
@@ -340,7 +340,7 @@
ASSERT(StackSize() >= 0);
__ EnterDartFrame(StackSize() * compiler::target::kWordSize);
}
- } else if (FLAG_use_bare_instructions) {
+ } else if (FLAG_precompiled_mode) {
assembler()->set_constant_pool_allowed(true);
}
}
@@ -548,20 +548,11 @@
(args_desc.Count() - 1) * compiler::target::kWordSize);
// Use same code pattern as instance call so it can be parsed by code patcher.
if (FLAG_precompiled_mode) {
- if (FLAG_use_bare_instructions) {
- // The AOT runtime will replace the slot in the object pool with the
- // entrypoint address - see app_snapshot.cc.
- CLOBBERS_LR(__ LoadUniqueObject(LR, StubCode::MegamorphicCall()));
- } else {
- __ LoadUniqueObject(CODE_REG, StubCode::MegamorphicCall());
- CLOBBERS_LR(
- __ ldr(LR, compiler::FieldAddress(
- CODE_REG, compiler::target::Code::entry_point_offset(
- Code::EntryKind::kMonomorphic))));
- }
+ // The AOT runtime will replace the slot in the object pool with the
+ // entrypoint address - see app_snapshot.cc.
+ CLOBBERS_LR(__ LoadUniqueObject(LR, StubCode::MegamorphicCall()));
__ LoadUniqueObject(R9, cache);
CLOBBERS_LR(__ blx(LR));
-
} else {
__ LoadUniqueObject(R9, cache);
__ LoadUniqueObject(CODE_REG, StubCode::MegamorphicCall());
@@ -609,7 +600,7 @@
__ LoadFromOffset(
R0, SP,
(ic_data.SizeWithoutTypeArgs() - 1) * compiler::target::kWordSize);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see app_snapshot.cc.
CLOBBERS_LR(__ LoadUniqueObject(LR, initial_stub));
@@ -661,7 +652,7 @@
if (function.HasOptionalParameters() || function.IsGeneric()) {
__ LoadObject(R4, arguments_descriptor);
} else {
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
__ LoadImmediate(R4, 0); // GC safe smi zero because of stub.
}
}
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 233821a..d7e4d14 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -28,7 +28,7 @@
DECLARE_FLAG(bool, enable_simd_inline);
void FlowGraphCompiler::ArchSpecificInitialization() {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
auto object_store = isolate_group()->object_store();
const auto& stub =
@@ -278,7 +278,7 @@
// R1 = extracted function
// R4 = offset of type argument vector (or 0 if class is not generic)
intptr_t pp_offset = 0;
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
// PP is not tagged on arm64.
kPoolReg = PP;
pp_offset = kHeapObjectTag;
@@ -332,7 +332,7 @@
ASSERT(StackSize() >= 0);
__ EnterDartFrame(StackSize() * kWordSize);
}
- } else if (FLAG_use_bare_instructions) {
+ } else if (FLAG_precompiled_mode) {
assembler()->set_constant_pool_allowed(true);
}
}
@@ -542,7 +542,7 @@
const intptr_t stub_index = op.AddObject(
StubCode::MegamorphicCall(), ObjectPool::Patchability::kPatchable);
ASSERT((data_index + 1) == stub_index);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see app_snapshot.cc.
CLOBBERS_LR(__ LoadDoubleWordFromPoolIndex(R5, LR, data_index));
@@ -602,7 +602,7 @@
op.AddObject(initial_stub, ObjectPool::Patchability::kPatchable);
ASSERT((data_index + 1) == initial_stub_index);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see app_snapshot.cc.
CLOBBERS_LR(__ LoadDoubleWordFromPoolIndex(R5, LR, data_index));
@@ -653,7 +653,7 @@
if (function.HasOptionalParameters() || function.IsGeneric()) {
__ LoadObject(R4, arguments_descriptor);
} else {
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
__ LoadImmediate(R4, 0); // GC safe smi zero because of stub.
}
}
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 3abdf84..03922aa 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -28,7 +28,7 @@
DECLARE_FLAG(bool, enable_simd_inline);
void FlowGraphCompiler::ArchSpecificInitialization() {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
auto object_store = isolate_group()->object_store();
const auto& stub =
@@ -282,7 +282,7 @@
// RBX = extracted function
// RDX = offset of type argument vector (or 0 if class is not generic)
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
kPoolReg = PP;
} else {
__ movq(kPoolReg,
@@ -301,7 +301,7 @@
// needs to be updated to match.
void FlowGraphCompiler::EmitFrameEntry() {
if (!flow_graph().graph_entry()->NeedsFrame()) {
- if (FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
assembler()->set_constant_pool_allowed(true);
}
return;
@@ -552,16 +552,9 @@
// Use same code pattern as instance call so it can be parsed by code patcher.
if (FLAG_precompiled_mode) {
- if (FLAG_use_bare_instructions) {
- // The AOT runtime will replace the slot in the object pool with the
- // entrypoint address - see app_snapshot.cc.
- __ LoadUniqueObject(RCX, StubCode::MegamorphicCall());
- } else {
- __ LoadUniqueObject(CODE_REG, StubCode::MegamorphicCall());
- __ movq(RCX, compiler::FieldAddress(CODE_REG,
- Code::entry_point_offset(
- Code::EntryKind::kMonomorphic)));
- }
+ // The AOT runtime will replace the slot in the object pool with the
+ // entrypoint address - see app_snapshot.cc.
+ __ LoadUniqueObject(RCX, StubCode::MegamorphicCall());
__ LoadUniqueObject(RBX, cache);
__ call(RCX);
} else {
@@ -610,7 +603,7 @@
__ Comment("InstanceCallAOT (%s)", switchable_call_mode);
__ movq(RDX, compiler::Address(
RSP, (ic_data.SizeWithoutTypeArgs() - 1) * kWordSize));
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see app_snapshot.cc.
__ LoadUniqueObject(RCX, initial_stub);
@@ -643,7 +636,7 @@
if (function.HasOptionalParameters() || function.IsGeneric()) {
__ LoadObject(R10, arguments_descriptor);
} else {
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
__ xorl(R10, R10); // GC safe smi zero because of stub.
}
}
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index bc22d90..5262ad3 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -599,7 +599,7 @@
__ LoadObject(R4, arguments_descriptor);
ASSERT(locs()->in(0).reg() == R0);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
// R0: Closure with a cached entry point.
__ ldr(R2, compiler::FieldAddress(
R0, compiler::target::Closure::entry_point_offset()));
@@ -1493,7 +1493,7 @@
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
}
}
@@ -1660,7 +1660,7 @@
// Put the code object in the reserved slot.
__ StoreToOffset(CODE_REG, FPREG,
kPcMarkerSlotFromFp * compiler::target::kWordSize);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
} else {
__ LoadImmediate(PP, 0); // GC safe value into PP.
@@ -4768,7 +4768,7 @@
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = ValueFitsSmi() ? 0 : 1;
// Shared slow path is used in BoxInt64Instr::EmitNativeCode in
- // FLAG_use_bare_instructions mode and only after VM isolate stubs where
+ // precompiled mode and only after VM isolate stubs where
// replaced with isolate-specific stubs.
auto object_store = IsolateGroup::Current()->object_store();
const bool stubs_in_vm_isolate =
@@ -4779,7 +4779,6 @@
->untag()
->InVMIsolateHeap();
const bool shared_slow_path_call = SlowPathSharingSupported(opt) &&
- FLAG_use_bare_instructions &&
!stubs_in_vm_isolate;
LocationSummary* summary = new (zone) LocationSummary(
zone, kNumInputs, kNumTemps,
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index ab73a58..c0a5d1a 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -523,7 +523,7 @@
__ LoadObject(R4, arguments_descriptor);
ASSERT(locs()->in(0).reg() == R0);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
// R0: Closure with a cached entry point.
__ LoadFieldFromOffset(R2, R0,
compiler::target::Closure::entry_point_offset());
@@ -1343,7 +1343,7 @@
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
}
@@ -1506,7 +1506,7 @@
// Put the code object in the reserved slot.
__ StoreToOffset(CODE_REG, FPREG,
kPcMarkerSlotFromFp * compiler::target::kWordSize);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
} else {
// We now load the pool pointer (PP) with a GC safe value as we are about to
@@ -3994,7 +3994,7 @@
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = ValueFitsSmi() ? 0 : 1;
// Shared slow path is used in BoxInt64Instr::EmitNativeCode in
- // FLAG_use_bare_instructions mode and only after VM isolate stubs where
+ // precompiled mode and only after VM isolate stubs where
// replaced with isolate-specific stubs.
auto object_store = IsolateGroup::Current()->object_store();
const bool stubs_in_vm_isolate =
@@ -4005,7 +4005,6 @@
->untag()
->InVMIsolateHeap();
const bool shared_slow_path_call = SlowPathSharingSupported(opt) &&
- FLAG_use_bare_instructions &&
!stubs_in_vm_isolate;
LocationSummary* summary = new (zone) LocationSummary(
zone, kNumInputs, kNumTemps,
diff --git a/runtime/vm/compiler/backend/il_printer.cc b/runtime/vm/compiler/backend/il_printer.cc
index f7b0d45..cc6770b 100644
--- a/runtime/vm/compiler/backend/il_printer.cc
+++ b/runtime/vm/compiler/backend/il_printer.cc
@@ -656,7 +656,7 @@
}
void ClosureCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
f->AddString(" closure=");
} else {
f->AddString(" function=");
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index 2d0a285..105d49c 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -1292,7 +1292,7 @@
__ LeaveDartFrame(compiler::kRestoreCallerPP);
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ movq(PP, compiler::Address(THR, Thread::global_object_pool_offset()));
}
__ set_constant_pool_allowed(true);
@@ -1401,7 +1401,7 @@
kPcMarkerSlotFromFp * compiler::target::kWordSize),
CODE_REG);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ movq(PP,
compiler::Address(
THR, compiler::target::Thread::global_object_pool_offset()));
@@ -4396,7 +4396,7 @@
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = ValueFitsSmi() ? 0 : 1;
// Shared slow path is used in BoxInt64Instr::EmitNativeCode in
- // FLAG_use_bare_instructions mode and only after VM isolate stubs where
+ // precompiled mode and only after VM isolate stubs where
// replaced with isolate-specific stubs.
auto object_store = IsolateGroup::Current()->object_store();
const bool stubs_in_vm_isolate =
@@ -4407,7 +4407,6 @@
->untag()
->InVMIsolateHeap();
const bool shared_slow_path_call = SlowPathSharingSupported(opt) &&
- FLAG_use_bare_instructions &&
!stubs_in_vm_isolate;
LocationSummary* summary = new (zone) LocationSummary(
zone, kNumInputs, kNumTemps,
@@ -6918,7 +6917,7 @@
__ LoadObject(R10, arguments_descriptor);
ASSERT(locs()->in(0).reg() == RAX);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
// RAX: Closure with cached entry point.
__ movq(RCX, compiler::FieldAddress(
RAX, compiler::target::Closure::entry_point_offset()));
diff --git a/runtime/vm/compiler/backend/linearscan.cc b/runtime/vm/compiler/backend/linearscan.cc
index d923216..c6767a5 100644
--- a/runtime/vm/compiler/backend/linearscan.cc
+++ b/runtime/vm/compiler/backend/linearscan.cc
@@ -3053,7 +3053,7 @@
// frameless functions. Outside of bare instructions mode we need to preserve
// caller PP - so all functions need a frame if they have their own pool which
// is hard to determine at this stage.
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
return;
}
diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc
index 8e34d21..0f9e5ea 100644
--- a/runtime/vm/compiler/compiler_pass.cc
+++ b/runtime/vm/compiler/compiler_pass.cc
@@ -470,7 +470,7 @@
});
COMPILER_PASS(UseTableDispatch, {
- if (FLAG_use_bare_instructions && FLAG_use_table_dispatch) {
+ if (FLAG_use_table_dispatch) {
state->call_specializer->ReplaceInstanceCallsWithDispatchTableCalls();
}
});
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
index 2f8ac3b..b37c682 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
@@ -1133,7 +1133,7 @@
call_hook += Constant(closure);
call_hook += Constant(function_name);
call_hook += LoadLocal(entry_point_num);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
call_hook += Constant(closure);
} else {
call_hook += Constant(Function::ZoneHandle(Z, closure.function()));
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index c1daced..ccdc992 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -3110,7 +3110,7 @@
// Lookup the function in the closure.
instructions += LoadLocal(variable);
- if (!FLAG_precompiled_mode || !FLAG_use_bare_instructions) {
+ if (!FLAG_precompiled_mode) {
instructions += LoadNativeField(Slot::Closure_function());
}
if (parsed_function()->function().is_debuggable()) {
@@ -3173,7 +3173,7 @@
/*clear_temp=*/false);
// Lookup the function in the closure.
instructions += LoadLocal(receiver_temp);
- if (!FLAG_precompiled_mode || !FLAG_use_bare_instructions) {
+ if (!FLAG_precompiled_mode) {
instructions += LoadNativeField(Slot::Closure_function());
}
if (parsed_function()->function().is_debuggable()) {
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index c993d10..37df7be 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -3087,7 +3087,7 @@
if (is_closure_call) {
body += LoadLocal(closure);
- if (!FLAG_precompiled_mode || !FLAG_use_bare_instructions) {
+ if (!FLAG_precompiled_mode) {
// Lookup the function in the closure.
body += LoadNativeField(Slot::Closure_function());
}
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index 378ea73..86b49ff 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -3639,7 +3639,7 @@
// TODO(dartbug.com/32292): accept unboxed parameters and return value
// when FLAG_use_table_dispatch == false.
if (FLAG_precompiled_mode && unboxing_info != nullptr &&
- FLAG_use_table_dispatch && FLAG_use_bare_instructions) {
+ FLAG_use_table_dispatch) {
for (intptr_t i = 0; i < unboxing_info->unboxed_args_info.length(); i++) {
SetupUnboxingInfoOfParameter(function, i, unboxing_info);
}
@@ -3658,7 +3658,7 @@
// TODO(dartbug.com/32292): accept unboxed parameters and return value
// when FLAG_use_table_dispatch == false.
if (FLAG_precompiled_mode && unboxing_info != nullptr &&
- FLAG_use_table_dispatch && FLAG_use_bare_instructions) {
+ FLAG_use_table_dispatch) {
if (field_accessor.IsImplicitSetterFunction()) {
for (intptr_t i = 0; i < unboxing_info->unboxed_args_info.length(); i++) {
SetupUnboxingInfoOfParameter(field_accessor, i, unboxing_info);
diff --git a/runtime/vm/compiler/relocation.cc b/runtime/vm/compiler/relocation.cc
index 428a84f..08641a0 100644
--- a/runtime/vm/compiler/relocation.cc
+++ b/runtime/vm/compiler/relocation.cc
@@ -549,7 +549,7 @@
}
intptr_t CodeRelocator::AdjustPayloadOffset(intptr_t payload_offset) {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
return payload_offset;
}
return compiler::target::Instructions::HeaderSize() + payload_offset;
diff --git a/runtime/vm/compiler/relocation_test.cc b/runtime/vm/compiler/relocation_test.cc
index b698830..f361bd8 100644
--- a/runtime/vm/compiler/relocation_test.cc
+++ b/runtime/vm/compiler/relocation_test.cc
@@ -43,13 +43,11 @@
safepoint_and_growth_scope(thread, SafepointLevel::kGC) {
// So the relocator uses the correct instruction size layout.
FLAG_precompiled_mode = true;
- FLAG_use_bare_instructions = true;
FLAG_lower_pc_relative_call_distance = -128;
FLAG_upper_pc_relative_call_distance = 128;
}
~RelocatorTestHelper() {
- FLAG_use_bare_instructions = false;
FLAG_precompiled_mode = false;
}
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index 3210c35..b1943f6 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -793,7 +793,7 @@
// Used for InstructionsSection and Instructions methods, since we don't
// serialize Instructions objects in bare instructions mode, just payloads.
DART_FORCE_INLINE static bool BareInstructionsPayloads() {
- return FLAG_precompiled_mode && FLAG_use_bare_instructions;
+ return FLAG_precompiled_mode;
}
word InstructionsSection::HeaderSize() {
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 494a811..4ade729 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -467,11 +467,9 @@
UnhandledException_stacktrace_offset = 8;
static constexpr dart::compiler::target::word UserTag_tag_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 8;
+ MonomorphicSmiableCall_expected_cid_offset = 4;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 12;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 4;
+ MonomorphicSmiableCall_entrypoint_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 4;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 8;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -528,7 +526,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 16;
+ MonomorphicSmiableCall_InstanceSize = 12;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 20;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 16;
static constexpr dart::compiler::target::word Number_InstanceSize = 4;
@@ -1025,11 +1023,9 @@
UnhandledException_stacktrace_offset = 16;
static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 16;
+ MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 8;
+ MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 16;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -1087,7 +1083,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 32;
+ MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 40;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
static constexpr dart::compiler::target::word Number_InstanceSize = 8;
@@ -1576,11 +1572,9 @@
UnhandledException_stacktrace_offset = 8;
static constexpr dart::compiler::target::word UserTag_tag_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 8;
+ MonomorphicSmiableCall_expected_cid_offset = 4;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 12;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 4;
+ MonomorphicSmiableCall_entrypoint_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 4;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 8;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -1634,7 +1628,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 16;
+ MonomorphicSmiableCall_InstanceSize = 12;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 20;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 16;
static constexpr dart::compiler::target::word Number_InstanceSize = 4;
@@ -2131,11 +2125,9 @@
UnhandledException_stacktrace_offset = 16;
static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 16;
+ MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 8;
+ MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 16;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -2194,7 +2186,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 32;
+ MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 40;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
static constexpr dart::compiler::target::word Number_InstanceSize = 8;
@@ -2689,11 +2681,9 @@
UnhandledException_stacktrace_offset = 12;
static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 16;
+ MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 8;
+ MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 12;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -2751,7 +2741,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 32;
+ MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 24;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
static constexpr dart::compiler::target::word Number_InstanceSize = 8;
@@ -3246,11 +3236,9 @@
UnhandledException_stacktrace_offset = 12;
static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 16;
+ MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 8;
+ MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 12;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -3309,7 +3297,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 32;
+ MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 24;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
static constexpr dart::compiler::target::word Number_InstanceSize = 8;
@@ -3794,11 +3782,9 @@
UnhandledException_stacktrace_offset = 8;
static constexpr dart::compiler::target::word UserTag_tag_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 8;
+ MonomorphicSmiableCall_expected_cid_offset = 4;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 12;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 4;
+ MonomorphicSmiableCall_entrypoint_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 4;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 8;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -3855,7 +3841,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 16;
+ MonomorphicSmiableCall_InstanceSize = 12;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 20;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 16;
static constexpr dart::compiler::target::word Number_InstanceSize = 4;
@@ -4346,11 +4332,9 @@
UnhandledException_stacktrace_offset = 16;
static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 16;
+ MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 8;
+ MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 16;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -4408,7 +4392,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 32;
+ MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 40;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
static constexpr dart::compiler::target::word Number_InstanceSize = 8;
@@ -4891,11 +4875,9 @@
UnhandledException_stacktrace_offset = 8;
static constexpr dart::compiler::target::word UserTag_tag_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 8;
+ MonomorphicSmiableCall_expected_cid_offset = 4;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 12;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 4;
+ MonomorphicSmiableCall_entrypoint_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 4;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 8;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -4949,7 +4931,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 16;
+ MonomorphicSmiableCall_InstanceSize = 12;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 20;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 16;
static constexpr dart::compiler::target::word Number_InstanceSize = 4;
@@ -5440,11 +5422,9 @@
UnhandledException_stacktrace_offset = 16;
static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 16;
+ MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 8;
+ MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 16;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -5503,7 +5483,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 32;
+ MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 40;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
static constexpr dart::compiler::target::word Number_InstanceSize = 8;
@@ -5992,11 +5972,9 @@
UnhandledException_stacktrace_offset = 12;
static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 16;
+ MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 8;
+ MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 12;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -6054,7 +6032,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 32;
+ MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 24;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
static constexpr dart::compiler::target::word Number_InstanceSize = 8;
@@ -6543,11 +6521,9 @@
UnhandledException_stacktrace_offset = 12;
static constexpr dart::compiler::target::word UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_expected_cid_offset = 16;
+ MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_target_offset = 8;
+ MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word WeakProperty_value_offset = 12;
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
@@ -6606,7 +6582,7 @@
static constexpr dart::compiler::target::word Mint_InstanceSize = 16;
static constexpr dart::compiler::target::word MirrorReference_InstanceSize = 16;
static constexpr dart::compiler::target::word
- MonomorphicSmiableCall_InstanceSize = 32;
+ MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word Namespace_InstanceSize = 24;
static constexpr dart::compiler::target::word NativeArguments_StructSize = 32;
static constexpr dart::compiler::target::word Number_InstanceSize = 8;
@@ -7151,11 +7127,9 @@
AOT_UnhandledException_stacktrace_offset = 8;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 4;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 12;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 4;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 4;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 8;
static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {
@@ -7219,7 +7193,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 16;
+ AOT_MonomorphicSmiableCall_InstanceSize = 12;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 20;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
16;
@@ -7769,11 +7743,9 @@
AOT_UnhandledException_stacktrace_offset = 16;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 16;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 8;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset =
16;
@@ -7839,7 +7811,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 32;
+ AOT_MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 40;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
32;
@@ -8392,11 +8364,9 @@
AOT_UnhandledException_stacktrace_offset = 16;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 16;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 8;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset =
16;
@@ -8463,7 +8433,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 32;
+ AOT_MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 40;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
32;
@@ -9012,11 +8982,9 @@
AOT_UnhandledException_stacktrace_offset = 12;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 16;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 8;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset =
12;
@@ -9082,7 +9050,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 32;
+ AOT_MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
32;
@@ -9631,11 +9599,9 @@
AOT_UnhandledException_stacktrace_offset = 12;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 16;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 8;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset =
12;
@@ -9702,7 +9668,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 32;
+ AOT_MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
32;
@@ -10245,11 +10211,9 @@
AOT_UnhandledException_stacktrace_offset = 8;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 4;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 12;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 4;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 4;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 8;
static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {
@@ -10313,7 +10277,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 16;
+ AOT_MonomorphicSmiableCall_InstanceSize = 12;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 20;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
16;
@@ -10856,11 +10820,9 @@
AOT_UnhandledException_stacktrace_offset = 16;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 16;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 8;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset =
16;
@@ -10926,7 +10888,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 32;
+ AOT_MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 40;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
32;
@@ -11472,11 +11434,9 @@
AOT_UnhandledException_stacktrace_offset = 16;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 16;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 8;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset =
16;
@@ -11543,7 +11503,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 32;
+ AOT_MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 40;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
32;
@@ -12085,11 +12045,9 @@
AOT_UnhandledException_stacktrace_offset = 12;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 16;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 8;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset =
12;
@@ -12155,7 +12113,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 32;
+ AOT_MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
32;
@@ -12697,11 +12655,9 @@
AOT_UnhandledException_stacktrace_offset = 12;
static constexpr dart::compiler::target::word AOT_UserTag_tag_offset = 16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_expected_cid_offset = 16;
+ AOT_MonomorphicSmiableCall_expected_cid_offset = 8;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_entrypoint_offset = 24;
-static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_target_offset = 8;
+ AOT_MonomorphicSmiableCall_entrypoint_offset = 16;
static constexpr dart::compiler::target::word AOT_WeakProperty_key_offset = 8;
static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset =
12;
@@ -12768,7 +12724,7 @@
static constexpr dart::compiler::target::word AOT_MirrorReference_InstanceSize =
16;
static constexpr dart::compiler::target::word
- AOT_MonomorphicSmiableCall_InstanceSize = 32;
+ AOT_MonomorphicSmiableCall_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Namespace_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_NativeArguments_StructSize =
32;
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index 88ab5b2..0d22eca 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -323,7 +323,6 @@
FIELD(UserTag, tag_offset) \
FIELD(MonomorphicSmiableCall, expected_cid_offset) \
FIELD(MonomorphicSmiableCall, entrypoint_offset) \
- FIELD(MonomorphicSmiableCall, target_offset) \
FIELD(WeakProperty, key_offset) \
FIELD(WeakProperty, value_offset) \
RANGE(Code, entry_point_offset, CodeEntryKind, CodeEntryKind::kNormal, \
diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc
index 210001c..672ee76 100644
--- a/runtime/vm/compiler/stub_code_compiler.cc
+++ b/runtime/vm/compiler/stub_code_compiler.cc
@@ -82,7 +82,7 @@
__ LoadCompressedFieldFromOffset(
kFunctionReg, InitInstanceFieldABI::kFieldReg,
target::Field::initializer_function_offset());
- if (!FLAG_precompiled_mode || !FLAG_use_bare_instructions) {
+ if (!FLAG_precompiled_mode) {
__ LoadCompressedFieldFromOffset(CODE_REG, kFunctionReg,
target::Function::code_offset());
// Load a GC-safe value for the arguments descriptor (unused but tagged).
@@ -675,7 +675,7 @@
void StubCodeCompiler::GenerateSlowTypeTestStub(Assembler* assembler) {
Label done, call_runtime;
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
__ LoadFromOffset(CODE_REG, THR,
target::Thread::slow_type_test_stub_offset());
}
@@ -807,13 +807,9 @@
// entry point in bare instructions mode or to 0 otherwise (to catch
// misuse). This overwrites the scratch register, but there are no more
// boxed fields.
- if (FLAG_use_bare_instructions) {
- __ LoadFromSlot(AllocateClosureABI::kScratchReg,
- AllocateClosureABI::kFunctionReg,
- Slot::Function_entry_point());
- } else {
- __ LoadImmediate(AllocateClosureABI::kScratchReg, 0);
- }
+ __ LoadFromSlot(AllocateClosureABI::kScratchReg,
+ AllocateClosureABI::kFunctionReg,
+ Slot::Function_entry_point());
__ StoreToSlotNoBarrier(AllocateClosureABI::kScratchReg,
AllocateClosureABI::kResultReg,
Slot::Closure_entry_point());
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index eefb057..859643a 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -140,7 +140,7 @@
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
}
@@ -604,7 +604,7 @@
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
}
@@ -1278,7 +1278,7 @@
__ Bind(&done_push_arguments);
// Call the Dart code entrypoint.
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
__ LoadImmediate(CODE_REG, 0); // GC safe value into CODE_REG.
} else {
@@ -1845,7 +1845,7 @@
const Register kClsReg = R1;
const Register kTagsReg = R2;
- if (!FLAG_use_bare_instructions) {
+ if (!FLAG_precompiled_mode) {
__ ldr(CODE_REG,
Address(THR, target::Thread::call_to_runtime_stub_offset()));
}
@@ -2659,8 +2659,7 @@
// the corresponding slot in the current cache entry.
// NOTFP must be preserved for bare payloads, otherwise CODE_REG.
- const bool use_bare_payloads =
- FLAG_precompiled_mode && FLAG_use_bare_instructions;
+ const bool use_bare_payloads = FLAG_precompiled_mode;
// For this, we choose the register that need not be preserved of the pair.
const Register kNullReg = use_bare_payloads ? CODE_REG : NOTFP;
__ LoadObject(kNullReg, NullObject());
@@ -2926,7 +2925,7 @@
__ StoreToOffset(R2, THR, target::Thread::top_exit_frame_info_offset());
// Restore the pool pointer.
__ RestoreCodePointer();
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
__ set_constant_pool_allowed(true);
} else {
@@ -3150,7 +3149,7 @@
// illegal class id was found, the target is a cache miss handler that can
// be invoked as a normal Dart function.
__ ldr(R0, FieldAddress(IP, base + target::kWordSize));
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
__ ldr(CODE_REG, FieldAddress(R0, target::Function::code_offset()));
}
__ ldr(ARGS_DESC_REG,
@@ -3196,7 +3195,7 @@
__ b(&loop);
__ Bind(&found);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
const intptr_t entry_offset =
target::ICData::EntryPointIndexFor(1) * target::kWordSize;
__ LoadCompressed(R0, Address(R8, entry_offset));
@@ -3225,34 +3224,20 @@
Assembler* assembler) {
__ LoadClassIdMayBeSmi(IP, R0);
- // expected_cid_ should come right after target_
- ASSERT(target::MonomorphicSmiableCall::expected_cid_offset() ==
- target::MonomorphicSmiableCall::target_offset() + target::kWordSize);
// entrypoint_ should come right after expected_cid_
ASSERT(target::MonomorphicSmiableCall::entrypoint_offset() ==
target::MonomorphicSmiableCall::expected_cid_offset() +
target::kWordSize);
- if (FLAG_use_bare_instructions) {
- // Simultaneously load the expected cid into R2 and the entrypoint into R3.
- __ ldrd(
- R2, R3, R9,
- target::MonomorphicSmiableCall::expected_cid_offset() - kHeapObjectTag);
- __ cmp(R2, Operand(IP));
- __ Branch(Address(THR, target::Thread::switchable_call_miss_entry_offset()),
- NE);
- __ bx(R3);
- } else {
- // Simultaneously load the target into R2 and the expected cid into R3.
- __ ldrd(R2, R3, R9,
- target::MonomorphicSmiableCall::target_offset() - kHeapObjectTag);
- __ mov(CODE_REG, Operand(R2));
- __ cmp(R3, Operand(IP));
- __ Branch(Address(THR, target::Thread::switchable_call_miss_entry_offset()),
- NE);
- __ LoadField(IP, FieldAddress(R2, target::Code::entry_point_offset()));
- __ bx(IP);
- }
+ // Note: this stub is only used in AOT mode, hence the direct (bare) call.
+ // Simultaneously load the expected cid into R2 and the entrypoint into R3.
+ __ ldrd(
+ R2, R3, R9,
+ target::MonomorphicSmiableCall::expected_cid_offset() - kHeapObjectTag);
+ __ cmp(R2, Operand(IP));
+ __ Branch(Address(THR, target::Thread::switchable_call_miss_entry_offset()),
+ NE);
+ __ bx(R3);
}
static void CallSwitchableCallMissRuntimeEntry(Assembler* assembler,
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index 1ea25d2..af8d3c5 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -157,7 +157,7 @@
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
}
@@ -728,7 +728,7 @@
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
}
@@ -1437,7 +1437,7 @@
__ b(&push_arguments, LT);
__ Bind(&done_push_arguments);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
__ mov(CODE_REG, ZR); // GC-safe value into CODE_REG.
} else {
@@ -2003,7 +2003,7 @@
void StubCodeCompiler::GenerateAllocateObjectSlowStub(Assembler* assembler) {
const Register kTagsToClsIdReg = R2;
- if (!FLAG_use_bare_instructions) {
+ if (!FLAG_precompiled_mode) {
__ ldr(CODE_REG,
Address(THR, target::Thread::call_to_runtime_stub_offset()));
}
@@ -3110,7 +3110,7 @@
__ StoreToOffset(ZR, THR, target::Thread::top_exit_frame_info_offset());
// Restore the pool pointer.
__ RestoreCodePointer();
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ SetupGlobalPoolAndDispatchTable();
} else {
__ LoadPoolPointer();
@@ -3221,8 +3221,8 @@
__ Bind(&reference_compare);
__ CompareObjectRegisters(left, right);
- // None of the branches above go directly here to avoid generating a conditional
- // branch to a ret instruction.
+ // None of the branches above go directly here to avoid generating a
+ // conditional branch to a ret instruction.
// This is an attempt to work-around a possible CPU on Exynos 2100 SoC.
// See https://github.com/flutter/flutter/issues/88261
__ ret();
@@ -3332,7 +3332,7 @@
__ ldr(R1, FieldAddress(R0, target::Function::entry_point_offset()));
__ ldr(ARGS_DESC_REG,
FieldAddress(R5, target::CallSiteData::arguments_descriptor_offset()));
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
__ LoadCompressed(CODE_REG,
FieldAddress(R0, target::Function::code_offset()));
}
@@ -3385,7 +3385,7 @@
__ b(&loop);
__ Bind(&found);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
const intptr_t entry_offset =
target::ICData::EntryPointIndexFor(1) * target::kCompressedWordSize;
__ LoadCompressed(R1,
@@ -3419,30 +3419,16 @@
Label miss;
__ LoadClassIdMayBeSmi(IP0, R0);
- if (FLAG_use_bare_instructions) {
- __ LoadField(
- IP1, FieldAddress(
- R5, target::MonomorphicSmiableCall::expected_cid_offset()));
- __ LoadField(
- R1,
- FieldAddress(R5, target::MonomorphicSmiableCall::entrypoint_offset()));
- __ cmp(IP0, Operand(IP1));
- __ b(&miss, NE);
- __ br(R1);
- } else {
- __ LoadField(
- IP1, FieldAddress(
- R5, target::MonomorphicSmiableCall::expected_cid_offset()));
- __ LoadField(
- CODE_REG,
- FieldAddress(R5, target::MonomorphicSmiableCall::target_offset()));
- __ LoadField(
- R1,
- FieldAddress(R5, target::MonomorphicSmiableCall::entrypoint_offset()));
- __ cmp(IP0, Operand(IP1));
- __ b(&miss, NE);
- __ br(R1);
- }
+ // Note: this stub is only used in AOT mode, hence the direct (bare) call.
+ __ LoadField(
+ IP1,
+ FieldAddress(R5, target::MonomorphicSmiableCall::expected_cid_offset()));
+ __ LoadField(
+ R1,
+ FieldAddress(R5, target::MonomorphicSmiableCall::entrypoint_offset()));
+ __ cmp(IP0, Operand(IP1));
+ __ b(&miss, NE);
+ __ br(R1);
__ Bind(&miss);
__ ldr(IP0,
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index 12079e9..07f9c00 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -141,7 +141,7 @@
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ movq(PP, Address(THR, target::Thread::global_object_pool_offset()));
}
@@ -645,7 +645,7 @@
// Restore the global object pool after returning from runtime (old space is
// moving, so the GOP could have been relocated).
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ movq(PP, Address(THR, target::Thread::global_object_pool_offset()));
}
@@ -1366,7 +1366,7 @@
__ Bind(&done_push_arguments);
// Call the Dart code entrypoint.
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ movq(PP, Address(THR, target::Thread::global_object_pool_offset()));
__ xorq(CODE_REG, CODE_REG); // GC-safe value into CODE_REG.
} else {
@@ -1935,7 +1935,7 @@
void StubCodeCompiler::GenerateAllocateObjectSlowStub(Assembler* assembler) {
const Register kTagsToClsIdReg = R8;
- if (!FLAG_use_bare_instructions) {
+ if (!FLAG_precompiled_mode) {
__ movq(CODE_REG,
Address(THR, target::Thread::call_to_runtime_stub_offset()));
}
@@ -3052,7 +3052,7 @@
Immediate(0));
// Restore the pool pointer.
__ RestoreCodePointer();
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
__ movq(PP, Address(THR, target::Thread::global_object_pool_offset()));
} else {
__ LoadPoolPointer(PP);
@@ -3274,7 +3274,7 @@
__ movq(R10, FieldAddress(
RBX, target::CallSiteData::arguments_descriptor_offset()));
__ movq(RCX, FieldAddress(RAX, target::Function::entry_point_offset()));
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
__ LoadCompressed(CODE_REG,
FieldAddress(RAX, target::Function::code_offset()));
}
@@ -3329,7 +3329,7 @@
__ jmp(&loop);
__ Bind(&found);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
const intptr_t entry_offset =
target::ICData::EntryPointIndexFor(1) * target::kCompressedWordSize;
__ LoadCompressed(RCX, Address(R13, entry_offset));
@@ -3362,14 +3362,9 @@
__ Bind(&have_cid);
__ cmpq(RAX, RCX);
__ j(NOT_EQUAL, &miss, Assembler::kNearJump);
- if (FLAG_use_bare_instructions) {
- __ jmp(
- FieldAddress(RBX, target::MonomorphicSmiableCall::entrypoint_offset()));
- } else {
- __ movq(CODE_REG,
- FieldAddress(RBX, target::MonomorphicSmiableCall::target_offset()));
- __ jmp(FieldAddress(CODE_REG, target::Code::entry_point_offset()));
- }
+ // Note: this stub is only used in AOT mode, hence the direct (bare) call.
+ __ jmp(
+ FieldAddress(RBX, target::MonomorphicSmiableCall::entrypoint_offset()));
__ Bind(&miss);
__ jmp(Address(THR, target::Thread::switchable_call_miss_entry_offset()));
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 650cbd2..7041084 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -107,16 +107,14 @@
#if !defined(DART_PRECOMPILED_RUNTIME)
UNREACHABLE();
#else
- if (FLAG_use_bare_instructions) {
- Thread* thread = Thread::Current();
- thread->set_global_object_pool(
- thread->isolate_group()->object_store()->global_object_pool());
- const DispatchTable* dispatch_table = thread->isolate()->dispatch_table();
- if (dispatch_table != nullptr) {
- thread->set_dispatch_table_array(dispatch_table->ArrayOrigin());
- }
- ASSERT(thread->global_object_pool() != Object::null());
+ Thread* thread = Thread::Current();
+ thread->set_global_object_pool(
+ thread->isolate_group()->object_store()->global_object_pool());
+ const DispatchTable* dispatch_table = thread->isolate()->dispatch_table();
+ if (dispatch_table != nullptr) {
+ thread->set_dispatch_table_array(dispatch_table->ArrayOrigin());
}
+ ASSERT(thread->global_object_pool() != Object::null());
#endif // !defined(DART_PRECOMPILED_RUNTIME)
}
@@ -179,14 +177,13 @@
#if defined(USING_SIMULATOR)
return bit_copy<ObjectPtr, int64_t>(Simulator::Current()->Call(
static_cast<intptr_t>(stub),
- ((FLAG_precompiled_mode && FLAG_use_bare_instructions)
- ? static_cast<intptr_t>(entry_point)
- : reinterpret_cast<intptr_t>(&code)),
+ FLAG_precompiled_mode ? static_cast<intptr_t>(entry_point)
+ : reinterpret_cast<intptr_t>(&code),
reinterpret_cast<intptr_t>(&arguments_descriptor),
reinterpret_cast<intptr_t>(&arguments),
reinterpret_cast<intptr_t>(thread)));
#else
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
return static_cast<ObjectPtr>(
(reinterpret_cast<invokestub_bare_instructions>(stub))(
entry_point, arguments_descriptor, arguments, thread));
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index eccc2ac..679bf26 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -66,7 +66,6 @@
"Use --[no-]dwarf-stack-traces instead.") \
P(lazy_async_stacks, bool, true, "Reconstruct async stacks from listeners") \
P(lazy_dispatchers, bool, true, "Generate dispatchers lazily") \
- P(use_bare_instructions, bool, true, "Enable bare instructions mode.") \
R(dedup_instructions, true, bool, false, \
"Canonicalize instructions when precompiling.")
diff --git a/runtime/vm/image_snapshot.cc b/runtime/vm/image_snapshot.cc
index 3d97c84..f77d389 100644
--- a/runtime/vm/image_snapshot.cc
+++ b/runtime/vm/image_snapshot.cc
@@ -56,7 +56,6 @@
// (unless splitting into multiple outputs and there are no Code objects
// in this particular output), but is guaranteed empty otherwise (the
// instructions follow the InstructionsSection object instead).
- ASSERT(FLAG_use_bare_instructions || layout->payload_length_ == 0);
ASSERT(raw_value <=
size - InstructionsSection::InstanceSize(layout->payload_length_));
return layout;
@@ -599,8 +598,7 @@
}
void ImageWriter::WriteText(bool vm) {
- const bool bare_instruction_payloads =
- FLAG_precompiled_mode && FLAG_use_bare_instructions;
+ const bool bare_instruction_payloads = FLAG_precompiled_mode;
// Start snapshot at page boundary.
if (!EnterSection(ProgramSection::Text, vm, ImageWriter::kTextAlignment)) {
@@ -1568,20 +1566,18 @@
#if defined(DART_PRECOMPILED_RUNTIME)
uword ImageReader::GetBareInstructionsAt(uint32_t offset) const {
- ASSERT(FLAG_use_bare_instructions);
ASSERT(Utils::IsAligned(offset, Instructions::kBarePayloadAlignment));
return reinterpret_cast<uword>(instructions_image_) + offset;
}
uword ImageReader::GetBareInstructionsEnd() const {
- ASSERT(FLAG_use_bare_instructions);
Image image(instructions_image_);
return reinterpret_cast<uword>(image.object_start()) + image.object_size();
}
#endif
InstructionsPtr ImageReader::GetInstructionsAt(uint32_t offset) const {
- ASSERT(!FLAG_precompiled_mode || !FLAG_use_bare_instructions);
+ ASSERT(!FLAG_precompiled_mode);
ASSERT(Utils::IsAligned(offset, kObjectAlignment));
ObjectPtr result = UntaggedObject::FromAddr(
diff --git a/runtime/vm/image_snapshot.h b/runtime/vm/image_snapshot.h
index fc2bbdd..7100d3b 100644
--- a/runtime/vm/image_snapshot.h
+++ b/runtime/vm/image_snapshot.h
@@ -251,13 +251,8 @@
if (FLAG_precompiled_mode) {
// We reserve space for the initial InstructionsSection object. It is
// manually serialized since it includes offsets to other snapshot parts.
- // In bare instructions mode, it contains all the payloads and so we
- // start after the header, whereas in non-bare mode, it contains no
- // payload and Instructions start after it.
- next_text_offset_ +=
- FLAG_use_bare_instructions
- ? compiler::target::InstructionsSection::HeaderSize()
- : compiler::target::InstructionsSection::InstanceSize(0);
+ // It contains all the payloads which start directly after the header.
+ next_text_offset_ += compiler::target::InstructionsSection::HeaderSize();
}
#endif
objects_.Clear();
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 7150576..2513eb4 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -10148,8 +10148,7 @@
}
// If table dispatch is disabled, all instance calls use switchable calls.
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions &&
- FLAG_use_table_dispatch)) {
+ if (!(FLAG_precompiled_mode && FLAG_use_table_dispatch)) {
return true;
}
@@ -15531,7 +15530,6 @@
result ^= Object::Allocate(
MonomorphicSmiableCall::kClassId, MonomorphicSmiableCall::InstanceSize(),
Heap::kOld, MonomorphicSmiableCall::ContainsCompressedPointers());
- result.untag()->set_target(target.ptr());
result.StoreNonPointer(&result.untag()->expected_cid_, expected_cid);
result.StoreNonPointer(&result.untag()->entrypoint_, target.EntryPoint());
return result.ptr();
@@ -16906,7 +16904,7 @@
ObjectPoolPtr Code::GetObjectPool() const {
#if defined(DART_PRECOMPILER) || defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
return IsolateGroup::Current()->object_store()->global_object_pool();
}
#endif
@@ -25514,8 +25512,7 @@
result.untag()->set_function(function.ptr());
result.untag()->set_context(context.ptr());
#if defined(DART_PRECOMPILED_RUNTIME)
- result.set_entry_point(FLAG_use_bare_instructions ? function.entry_point()
- : 0);
+ result.set_entry_point(function.entry_point());
#endif
}
return result.ptr();
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 503be80..181a9e9 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2014,7 +2014,6 @@
class MonomorphicSmiableCall : public Object {
public:
- CodePtr target() const { return untag()->target(); }
classid_t expected_cid() const { return untag()->expected_cid_; }
static intptr_t InstanceSize() {
@@ -2028,10 +2027,6 @@
return OFFSET_OF(UntaggedMonomorphicSmiableCall, expected_cid_);
}
- static intptr_t target_offset() {
- return OFFSET_OF(UntaggedMonomorphicSmiableCall, target_);
- }
-
static intptr_t entrypoint_offset() {
return OFFSET_OF(UntaggedMonomorphicSmiableCall, entrypoint_);
}
@@ -5450,7 +5445,8 @@
// _not_ at the start of the payload.
static const intptr_t kBarePayloadAlignment = 4;
- // In non-bare mode, we align the payloads on word boundaries.
+ // When instructions reside in the heap we align the payloads on word
+ // boundaries.
static const intptr_t kNonBarePayloadAlignment = kWordSize;
// In the precompiled runtime when running in bare instructions mode,
@@ -5459,9 +5455,7 @@
static intptr_t HeaderSize() {
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_use_bare_instructions) {
- UNREACHABLE();
- }
+ UNREACHABLE();
#endif
return Utils::RoundUp(sizeof(UntaggedInstructions),
kNonBarePayloadAlignment);
@@ -5475,18 +5469,14 @@
static intptr_t InstanceSize(intptr_t size) {
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_use_bare_instructions) {
- UNREACHABLE();
- }
+ UNREACHABLE();
#endif
return RoundedAllocationSize(HeaderSize() + size);
}
static InstructionsPtr FromPayloadStart(uword payload_start) {
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_use_bare_instructions) {
- UNREACHABLE();
- }
+ UNREACHABLE();
#endif
return static_cast<InstructionsPtr>(payload_start - HeaderSize() +
kHeapObjectTag);
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 42ab457..d24df33 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -837,7 +837,6 @@
if (ref) {
return;
}
- jsobj.AddProperty("_target", Code::Handle(target()));
}
void CallSiteData::PrintJSONImpl(JSONStream* stream, bool ref) const {
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc
index 02a5657..918f7d7 100644
--- a/runtime/vm/program_visitor.cc
+++ b/runtime/vm/program_visitor.cc
@@ -897,7 +897,7 @@
pool_(ObjectPool::Handle(zone)) {
auto& gop = ObjectPool::Handle(
zone, isolate_group->object_store()->global_object_pool());
- ASSERT_EQUAL(!gop.IsNull(), FLAG_use_bare_instructions);
+ ASSERT(!gop.IsNull());
DedupPool(gop);
}
@@ -935,8 +935,7 @@
// objects and other objects in the snapshots (these references are otherwise
// implicit and go through global object pool). This information is needed
// to produce more informative snapshot profile.
- if (!FLAG_use_bare_instructions ||
- FLAG_write_v8_snapshot_profile_to != nullptr ||
+ if (FLAG_write_v8_snapshot_profile_to != nullptr ||
FLAG_trace_precompiler_to != nullptr) {
WalkProgram(thread->zone(), thread->isolate_group(), &visitor);
}
@@ -1160,14 +1159,11 @@
// The instruction deduplication naturally causes us to have a one-to-many
// relationship between Instructions and Code objects.
//
-// In AOT bare instructions mode frames only have PCs. However, the runtime
-// needs e.g. stack maps from the [Code] to scan such a frame. So we ensure that
-// instructions of code objects are only deduplicated if the metadata in the
-// code is the same. The runtime can then pick any code object corresponding to
-// the PC in the frame and use the metadata.
-//
-// In AOT non-bare instructions mode frames are expanded, like in JIT, and
-// contain the unique code object.
+// In AOT frames only have PCs. However, the runtime needs e.g. stack maps from
+// the [Code] to scan such a frame. So we ensure that instructions of code
+// objects are only deduplicated if the metadata in the code is the same.
+// The runtime can then pick any code object corresponding to the PC in the
+// frame and use the metadata.
#if defined(DART_PRECOMPILER)
class CodeKeyValueTrait {
public:
@@ -1300,7 +1296,7 @@
Instructions& instructions_;
};
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
StackZone stack_zone(thread);
DedupInstructionsWithSameMetadataVisitor visitor(thread->zone());
WalkProgram(thread->zone(), thread->isolate_group(), &visitor);
@@ -1329,25 +1325,6 @@
// Reduces binary size but obfuscates profiler results.
if (FLAG_dedup_instructions) {
- // In non-bare mode (unused atm) dedupping instructions would cause us to
- // loose the ability to uniquely map a PC to a given UnlinkedCall object,
- // since two code objects might point to the same deduped instructions
- // object but might have two different UnlinkedCall objects in their pool.
- //
- // In bare mode this cannot happen because different UnlinkedCall objects
- // would get different indices into the (global) object pool, therefore
- // making the instructions different.
- //
- // (When transitioning the switchable call site we loose track of the args
- // descriptor. Since we need it for further transitions we currently save it
- // via a PC -> UnlinkedCall mapping).
- //
- // We therfore disable the instruction deduplication in product-non-bare
- // mode (which is unused atm).
-#if defined(PRODUCT)
- if (FLAG_precompiled_mode && !FLAG_use_bare_instructions) return;
-#endif
-
DedupInstructions(thread);
}
}
@@ -1389,10 +1366,6 @@
MergeAssignment(obj_, id);
obj_ = code.compressed_stackmaps();
MergeAssignment(obj_, id);
- if (!FLAG_use_bare_instructions) {
- obj_ = code.object_pool();
- MergeAssignment(obj_, id);
- }
}
void MergeAssignment(const Object& obj, intptr_t id) {
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 2deada7..de93e86 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -540,7 +540,7 @@
COMPRESSED_VISITOR(LibraryPrefix)
REGULAR_VISITOR(SingleTargetCache)
REGULAR_VISITOR(UnlinkedCall)
-REGULAR_VISITOR(MonomorphicSmiableCall)
+NULL_VISITOR(MonomorphicSmiableCall)
REGULAR_VISITOR(ICData)
REGULAR_VISITOR(MegamorphicCache)
COMPRESSED_VISITOR(ApiError)
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 986cb2d..6a182bb 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -2273,13 +2273,10 @@
class UntaggedMonomorphicSmiableCall : public UntaggedObject {
RAW_HEAP_OBJECT_IMPLEMENTATION(MonomorphicSmiableCall);
- POINTER_FIELD(CodePtr,
- target); // Entrypoint PC in bare mode, Code in non-bare mode.
- VISIT_FROM(target)
- VISIT_TO(target)
+ VISIT_NOTHING();
+
uword expected_cid_;
uword entrypoint_;
- ObjectPtr* to_snapshot(Snapshot::Kind kind) { return to(); }
};
// Abstract base class for RawICData/RawMegamorphicCache
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index 186f510..1099528 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -97,7 +97,7 @@
F(UnlinkedCall, target_name_) \
F(UnlinkedCall, args_descriptor_) \
F(MonomorphicSmiableCall, expected_cid_) \
- F(MonomorphicSmiableCall, target_) \
+ F(MonomorphicSmiableCall, entrypoint_) \
F(CallSiteData, target_name_) \
F(CallSiteData, args_descriptor_) \
F(ICData, target_name_) \
diff --git a/runtime/vm/reverse_pc_lookup_cache.cc b/runtime/vm/reverse_pc_lookup_cache.cc
index dc7390a..97bf223 100644
--- a/runtime/vm/reverse_pc_lookup_cache.cc
+++ b/runtime/vm/reverse_pc_lookup_cache.cc
@@ -47,7 +47,7 @@
uword pc,
bool is_return_address,
uword* code_start) {
- ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
+ ASSERT(FLAG_precompiled_mode);
NoSafepointScope no_safepoint;
ObjectPtr code_descriptor =
@@ -62,7 +62,7 @@
CodePtr ReversePc::Lookup(IsolateGroup* group,
uword pc,
bool is_return_address) {
- ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
+ ASSERT(FLAG_precompiled_mode);
NoSafepointScope no_safepoint;
uword code_start;
@@ -85,7 +85,7 @@
uword pc,
bool is_return_address,
uword* code_start) {
- ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
+ ASSERT(FLAG_precompiled_mode);
NoSafepointScope no_safepoint;
ObjectPtr code_descriptor =
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
index d17cb92..6b52eae 100644
--- a/runtime/vm/simulator_arm.cc
+++ b/runtime/vm/simulator_arm.cc
@@ -3696,14 +3696,14 @@
// Restore pool pointer.
int32_t code =
*reinterpret_cast<int32_t*>(fp + kPcMarkerSlotFromFp * kWordSize);
- int32_t pp = (FLAG_precompiled_mode && FLAG_use_bare_instructions)
+ int32_t pp = FLAG_precompiled_mode
? static_cast<int32_t>(thread->global_object_pool())
: *reinterpret_cast<int32_t*>(
(code + Code::object_pool_offset() - kHeapObjectTag));
set_register(CODE_REG, code);
set_register(PP, pp);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
set_register(DISPATCH_TABLE_REG,
reinterpret_cast<int32_t>(thread->dispatch_table_array()));
}
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index b3c53a8..056678d 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -3741,7 +3741,7 @@
// Restore pool pointer.
int64_t code =
*reinterpret_cast<int64_t*>(fp + kPcMarkerSlotFromFp * kWordSize);
- int64_t pp = (FLAG_precompiled_mode && FLAG_use_bare_instructions)
+ int64_t pp = FLAG_precompiled_mode
? static_cast<int64_t>(thread->global_object_pool())
: *reinterpret_cast<int64_t*>(
code + Code::object_pool_offset() - kHeapObjectTag);
@@ -3752,7 +3752,7 @@
NULL, HEAP_BITS,
(thread->write_barrier_mask() << 32) | (thread->heap_base() >> 32));
set_register(NULL, NULL_REG, static_cast<int64_t>(Object::null()));
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
set_register(NULL, DISPATCH_TABLE_REG,
reinterpret_cast<int64_t>(thread->dispatch_table_array()));
}
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 2e35cce..e1fe0b4 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -93,11 +93,11 @@
compiler::target::frame_layout = default_frame_layout;
runtime_frame_layout = default_frame_layout;
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
compiler::target::frame_layout = bare_instructions_frame_layout;
}
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
compiler::target::frame_layout = invalid_frame_layout;
runtime_frame_layout = bare_instructions_frame_layout;
}
@@ -105,7 +105,7 @@
}
bool StackFrame::IsBareInstructionsDartFrame() const {
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
return false;
}
NoSafepointScope no_safepoint;
@@ -123,7 +123,7 @@
}
bool StackFrame::IsBareInstructionsStubFrame() const {
- if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+ if (!FLAG_precompiled_mode) {
return false;
}
NoSafepointScope no_safepoint;
@@ -141,7 +141,7 @@
}
bool StackFrame::IsStubFrame() const {
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
return IsBareInstructionsStubFrame();
}
@@ -208,7 +208,7 @@
CompressedStackMaps maps;
uword code_start;
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
maps = ReversePc::FindCompressedStackMaps(isolate_group(), pc(),
/*is_return_address=*/true,
&code_start);
@@ -290,7 +290,7 @@
// to an osr function. In each of these cases, all stack slots contain
// tagged pointers, so fall through.
#if defined(DEBUG)
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
ASSERT(IsStubFrame());
} else {
ASSERT(!code.is_optimized() ||
@@ -337,7 +337,7 @@
CodePtr StackFrame::GetCodeObject() const {
#if defined(DART_PRECOMPILED_RUNTIME)
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
NoSafepointScope no_safepoint;
CodePtr code = ReversePc::Lookup(isolate_group(), pc(),
/*is_return_address=*/true);
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 1cb2a07..6303447 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -195,20 +195,18 @@
Precompiler* precompiler = Precompiler::Instance();
compiler::ObjectPoolBuilder* wrapper =
- FLAG_use_bare_instructions && precompiler != NULL
- ? precompiler->global_object_pool_builder()
- : &object_pool_builder;
+ precompiler != NULL ? precompiler->global_object_pool_builder()
+ : &object_pool_builder;
- const auto pool_attachment =
- FLAG_precompiled_mode && FLAG_use_bare_instructions
- ? Code::PoolAttachment::kNotAttachPool
- : Code::PoolAttachment::kAttachPool;
+ const auto pool_attachment = FLAG_precompiled_mode
+ ? Code::PoolAttachment::kNotAttachPool
+ : Code::PoolAttachment::kAttachPool;
auto zone = thread->zone();
auto object_store = thread->isolate_group()->object_store();
auto& allocate_object_stub = Code::ZoneHandle(zone);
auto& allocate_object_parametrized_stub = Code::ZoneHandle(zone);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
allocate_object_stub = object_store->allocate_object_stub();
allocate_object_parametrized_stub =
object_store->allocate_object_parametrized_stub();
diff --git a/runtime/vm/type_testing_stubs.cc b/runtime/vm/type_testing_stubs.cc
index 6b1780f..785e536 100644
--- a/runtime/vm/type_testing_stubs.cc
+++ b/runtime/vm/type_testing_stubs.cc
@@ -255,7 +255,7 @@
ASSERT(!type_class.IsNull());
auto& slow_tts_stub = Code::ZoneHandle(zone);
- if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+ if (FLAG_precompiled_mode) {
slow_tts_stub = thread->isolate_group()->object_store()->slow_tts_stub();
}
@@ -273,9 +273,8 @@
const char* name = namer_.StubNameForType(type);
const auto pool_attachment =
- FLAG_use_bare_instructions
- ? Code::PoolAttachment::kNotAttachPool
- : Code::PoolAttachment::kAttachPool;
+ FLAG_precompiled_mode ? Code::PoolAttachment::kNotAttachPool
+ : Code::PoolAttachment::kAttachPool;
Code& code = Code::Handle(thread->zone());
auto install_code_fun = [&]() {
diff --git a/tests/ffi/function_callbacks_test.dart b/tests/ffi/function_callbacks_test.dart
index a2caaeb..27b4d44 100644
--- a/tests/ffi/function_callbacks_test.dart
+++ b/tests/ffi/function_callbacks_test.dart
@@ -11,7 +11,6 @@
// VMOptions=--use-slow-path --stacktrace-every=100
// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code
// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code --stacktrace-every=100
-// VMOptions=--use-bare-instructions=false
// VMOptions=--dwarf_stack_traces --no-retain_function_objects --no-retain_code_objects
// SharedObjects=ffi_test_functions
diff --git a/tests/ffi_2/function_callbacks_test.dart b/tests/ffi_2/function_callbacks_test.dart
index cb1b055..cd1d793 100644
--- a/tests/ffi_2/function_callbacks_test.dart
+++ b/tests/ffi_2/function_callbacks_test.dart
@@ -13,7 +13,6 @@
// VMOptions=--use-slow-path --stacktrace-every=100
// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code
// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code --stacktrace-every=100
-// VMOptions=--use-bare-instructions=false
// VMOptions=--dwarf_stack_traces --no-retain_function_objects --no-retain_code_objects
// SharedObjects=ffi_test_functions
diff --git a/tests/language/deferred/split_constants_canonicalization_test.dart b/tests/language/deferred/split_constants_canonicalization_test.dart
index 02d5c6e..8617f03 100644
--- a/tests/language/deferred/split_constants_canonicalization_test.dart
+++ b/tests/language/deferred/split_constants_canonicalization_test.dart
@@ -2,9 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--use_bare_instructions=false
-// VMOptions=--use_bare_instructions=true
-
import "package:expect/expect.dart";
import "split_constants_canonicalization_a.dart" deferred as a;
import "split_constants_canonicalization_b.dart" deferred as b;
diff --git a/tests/language_2/deferred/split_constants_canonicalization_test.dart b/tests/language_2/deferred/split_constants_canonicalization_test.dart
index d3df883..a13d2ff 100644
--- a/tests/language_2/deferred/split_constants_canonicalization_test.dart
+++ b/tests/language_2/deferred/split_constants_canonicalization_test.dart
@@ -4,9 +4,6 @@
// @dart = 2.9
-// VMOptions=--use_bare_instructions=false
-// VMOptions=--use_bare_instructions=true
-
import "package:expect/expect.dart";
import "split_constants_canonicalization_a.dart" deferred as a;
import "split_constants_canonicalization_b.dart" deferred as b;
diff --git a/tools/VERSION b/tools/VERSION
index cd2b3ae..6be6313 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 16
PATCH 0
-PRERELEASE 45
+PRERELEASE 46
PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index a960fa8..2396b82 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -826,21 +826,6 @@
"vm-options": []
}
},
- "dartkp-no-bare-(linux|mac|win)-(debug|product|release)-(x64|x64c)": {
- "options": {
- "vm-options": [
- "--no-use-bare-instructions"
- ]
- }
- },
- "dartkp-no-bare-(linux|mac|win)-(debug|product|release)-(simarm|simarm64|simarm64c)": {
- "options": {
- "vm-options": [
- "--no-use-bare-instructions"
- ],
- "use-elf": true
- }
- },
"dartk-(linux|mac|win)-(debug|product|release)-(ia32|x64|x64c)": {},
"dartk-fuchsia-(debug|product|release)-(x64|x64c)": {},
"dartk-linux-debug-(ia32|x64)-canary": {
@@ -1548,36 +1533,6 @@
},
{
"builders": [
- "vm-kernel-precomp-bare-linux-release-x64",
- "vm-kernel-precomp-bare-linux-release-x64c",
- "vm-kernel-precomp-bare-linux-release-simarm",
- "vm-kernel-precomp-bare-linux-release-simarm64",
- "vm-kernel-precomp-bare-linux-release-simarm64c"
- ],
- "meta": {
- "description": "This configuration is used by the vm kernel precomp builders using bare instructions."
- },
- "steps": [
- {
- "name": "build dart",
- "script": "tools/build.py",
- "arguments": [
- "runtime",
- "dart_precompiled_runtime"
- ]
- },
- {
- "name": "vm tests",
- "arguments": [
- "-ndartkp-no-bare-${system}-${mode}-${arch}"
- ],
- "fileset": "vm-kernel",
- "shards": 10
- }
- ]
- },
- {
- "builders": [
"vm-kernel-precomp-obfuscate-linux-release-x64",
"vm-kernel-precomp-obfuscate-linux-release-x64c"
],
diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn
index da80743..5d93e80 100644
--- a/utils/dartdevc/BUILD.gn
+++ b/utils/dartdevc/BUILD.gn
@@ -49,11 +49,16 @@
abs_output = rebase_path(out)
prebuilt_dart_action(target_name) {
- deps = invoker.deps + [ "../compiler:compile_dart2js_platform" ]
+ deps = invoker.deps + [
+ "../compiler:compile_dart2js_platform",
+ "../compiler:compile_dart2js_platform_unsound",
+ ]
inputs = [
"$root_out_dir/dart2js_platform.dill",
+ "$root_out_dir/dart2js_platform_unsound.dill",
"$root_out_dir/dart2js_outline.dill",
+ "$root_out_dir/dart2js_outline_unsound.dill",
]
outputs = [ out ]