Revert "Handle ir constants in field analysis and impact tests"
This reverts commit 0cd89e5bd14e7393251b305537171a892d23b98e.
Reason for revert: Conflicts with move of constant evaluator.
Original change's description:
> Handle ir constants in field analysis and impact tests
>
> Include initial handling of unevaluated constants from environment.
>
> Change-Id: Ibd330a14dfabad1dee95b64ce7015939412374d3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97112
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
TBR=johnniwinther@google.com,sigmund@google.com
Change-Id: Ie01c7dda6152abbf852cd40a00597f019db49e66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97116
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index 4888037..17c84a4 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -197,14 +197,12 @@
class _Environment implements Environment {
final Map<String, String> definitions;
- Map<String, String> _completeMap;
Set<String> supportedLibraries;
_Environment(this.definitions);
@override
String valueOf(String name) {
- if (_completeMap != null) return _completeMap[name];
var result = definitions[name];
if (result != null || definitions.containsKey(name)) return result;
if (!name.startsWith(_dartLibraryEnvironmentPrefix)) return null;
@@ -216,22 +214,6 @@
if (supportedLibraries.contains(libraryName)) return "true";
return null;
}
-
- @override
- Map<String, String> toMap() {
- if (_completeMap == null) {
- _completeMap = new Map<String, String>.from(definitions);
- for (String libraryName in supportedLibraries) {
- if (!libraryName.startsWith("_")) {
- String key = '${_dartLibraryEnvironmentPrefix}${libraryName}';
- if (!definitions.containsKey(key)) {
- _completeMap[key] = "true";
- }
- }
- }
- }
- return _completeMap;
- }
}
/// For every 'dart:' library, a corresponding environment variable is set
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 39c73a8..2eb6455 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -981,9 +981,6 @@
@override
String valueOf(String key) => null;
-
- @override
- Map<String, String> toMap() => const {};
}
/// Interface for showing progress during compilation.
diff --git a/pkg/compiler/lib/src/environment.dart b/pkg/compiler/lib/src/environment.dart
index 67db9ac..29c9861 100644
--- a/pkg/compiler/lib/src/environment.dart
+++ b/pkg/compiler/lib/src/environment.dart
@@ -13,7 +13,4 @@
/// Note that `bool.fromEnvironment` and `int.fromEnvironment` are also
/// implemented in terms of `String.fromEnvironment`.
String valueOf(String key);
-
- /// Returns the full environment as map.
- Map<String, String> toMap();
}
diff --git a/pkg/compiler/lib/src/ir/constants.dart b/pkg/compiler/lib/src/ir/constants.dart
deleted file mode 100644
index 5783f3a..0000000
--- a/pkg/compiler/lib/src/ir/constants.dart
+++ /dev/null
@@ -1,46 +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.
-
-import 'package:kernel/ast.dart' as ir;
-import 'package:kernel/type_environment.dart' as ir;
-import 'package:kernel/transformations/constants.dart' as ir;
-
-import '../kernel/dart2js_target.dart';
-
-class Dart2jsConstantEvaluator extends ir.ConstantEvaluator {
- Dart2jsConstantEvaluator(ir.TypeEnvironment typeEnvironment,
- {bool enableAsserts, Map<String, String> environment: const {}})
- : super(const Dart2jsConstantsBackend(), environment, typeEnvironment,
- enableAsserts, const DevNullErrorReporter());
-
- @override
- ir.Constant evaluate(ir.Expression node, {bool requireConstant: true}) {
- if (node is ir.ConstantExpression) {
- ir.Constant constant = node.constant;
- if (constant is ir.UnevaluatedConstant) {
- return node.constant = super.evaluate(constant.expression);
- }
- return constant;
- }
- if (requireConstant) {
- // TODO(johnniwinther): Handle reporting of compile-time constant
- // evaluation errors.
- return super.evaluate(node);
- } else {
- try {
- return super.evaluate(node);
- } catch (e) {
- return null;
- }
- }
- }
-}
-
-class DevNullErrorReporter extends ir.SimpleErrorReporter {
- const DevNullErrorReporter();
-
- @override
- String report(List<ir.TreeNode> context, String what, ir.TreeNode node) =>
- what;
-}
diff --git a/pkg/compiler/lib/src/ir/impact_data.dart b/pkg/compiler/lib/src/ir/impact_data.dart
index 49bba79..cf3ab20 100644
--- a/pkg/compiler/lib/src/ir/impact_data.dart
+++ b/pkg/compiler/lib/src/ir/impact_data.dart
@@ -968,11 +968,6 @@
data.node, data.kind, data.receiverType, data.argumentType);
}
}
- if (_constants != null) {
- for (ir.ConstantExpression data in _constants) {
- registry.registerConstant(data);
- }
- }
// TODO(johnniwinther): Remove these when CFE provides constants.
if (_constructorNodes != null) {
diff --git a/pkg/compiler/lib/src/js_backend/resolution_listener.dart b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
index 217ab9a..e084b4c 100644
--- a/pkg/compiler/lib/src/js_backend/resolution_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
@@ -219,13 +219,6 @@
_backendUsage.registerBackendFunctionUse(helper);
impactBuilder
.registerTypeUse(new TypeUse.instantiation(_commonElements.typeType));
- } else if (constant.isConstructedObject) {
- ConstructedConstantValue constructed = constant;
- impactBuilder
- .registerTypeUse(new TypeUse.instantiation(constructed.type));
- constructed.fields.forEach((FieldEntity field, _) {
- impactBuilder.registerStaticUse(new StaticUse.fieldInit(field));
- });
}
}
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart
index 0debe8b..cc810d1 100644
--- a/pkg/compiler/lib/src/kernel/dart2js_target.dart
+++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -10,8 +10,7 @@
import 'package:kernel/core_types.dart';
import 'package:kernel/class_hierarchy.dart';
import 'package:kernel/target/targets.dart';
-import 'package:kernel/transformations/constants.dart'
- show ConstantsBackend, NumberSemantics;
+import 'package:kernel/transformations/constants.dart' show ConstantsBackend;
import 'invocation_mirror_constants.dart';
const Iterable<String> _allowedDartSchemePaths = const <String>[
@@ -148,9 +147,10 @@
return new ir.InvalidExpression(null);
}
+ // TODO(askesc): Return specialized dart2js constants backend.
@override
ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
- const Dart2jsConstantsBackend();
+ const ConstantsBackend();
}
// TODO(sigmund): this "extraRequiredLibraries" needs to be removed...
@@ -195,10 +195,3 @@
'dart:mirrors',
]
};
-
-class Dart2jsConstantsBackend extends ConstantsBackend {
- const Dart2jsConstantsBackend();
-
- @override
- NumberSemantics get numberSemantics => NumberSemantics.js;
-}
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 8f4569d..6f2491d 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -11,7 +11,6 @@
import 'package:kernel/core_types.dart' as ir;
import 'package:kernel/type_algebra.dart' as ir;
import 'package:kernel/type_environment.dart' as ir;
-import 'package:kernel/transformations/constants.dart' as ir;
import '../common.dart';
import '../common/names.dart';
@@ -29,7 +28,6 @@
import '../environment.dart';
import '../frontend_strategy.dart';
import '../ir/annotations.dart';
-import '../ir/constants.dart';
import '../ir/debug.dart';
import '../ir/element_map.dart';
import '../ir/impact.dart';
@@ -69,7 +67,6 @@
final CompilerOptions options;
@override
final DiagnosticReporter reporter;
- final Environment _environment;
CommonElementsImpl _commonElements;
KernelElementEnvironment _elementEnvironment;
DartTypeConverter _typeConverter;
@@ -77,7 +74,6 @@
KernelDartTypes _types;
ir.TypeEnvironment _typeEnvironment;
ir.ClassHierarchy _classHierarchy;
- ir.ConstantEvaluator _constantEvaluator;
/// Library environment. Used for fast lookup.
KProgramEnv env = new KProgramEnv();
@@ -119,11 +115,11 @@
Map<KMember, Map<ir.Expression, TypeMap>> typeMapsForTesting;
- KernelToElementMapImpl(
- this.reporter, this._environment, this._frontendStrategy, this.options) {
+ KernelToElementMapImpl(this.reporter, Environment environment,
+ this._frontendStrategy, this.options) {
_elementEnvironment = new KernelElementEnvironment(this);
_commonElements = new CommonElementsImpl(_elementEnvironment);
- _constantEnvironment = new KernelConstantEnvironment(this, _environment);
+ _constantEnvironment = new KernelConstantEnvironment(this, environment);
_typeConverter = new DartTypeConverter(this);
_types = new KernelDartTypes(this);
}
@@ -746,19 +742,19 @@
@override
ir.TypeEnvironment get typeEnvironment {
- return _typeEnvironment ??= new ir.TypeEnvironment(
- new ir.CoreTypes(env.mainComponent), classHierarchy);
+ if (_typeEnvironment == null) {
+ _typeEnvironment ??= new ir.TypeEnvironment(
+ new ir.CoreTypes(env.mainComponent), classHierarchy);
+ }
+ return _typeEnvironment;
}
@override
ir.ClassHierarchy get classHierarchy {
- return _classHierarchy ??= new ir.ClassHierarchy(env.mainComponent);
- }
-
- Dart2jsConstantEvaluator get constantEvaluator {
- return _constantEvaluator ??= new Dart2jsConstantEvaluator(typeEnvironment,
- enableAsserts: options.enableUserAssertions,
- environment: _environment.toMap());
+ if (_classHierarchy == null) {
+ _classHierarchy ??= new ir.ClassHierarchy(env.mainComponent);
+ }
+ return _classHierarchy;
}
@override
@@ -1025,17 +1021,7 @@
bool implicitNull: false,
bool checkCasts: true}) {
if (node is ir.ConstantExpression) {
- ir.Constant constant =
- constantEvaluator.evaluate(node, requireConstant: requireConstant);
- if (constant == null) {
- if (requireConstant) {
- throw new UnsupportedError(
- 'No constant for ${DebugPrinter.prettyPrint(node)}');
- }
- return null;
- } else {
- return constant.accept(new ConstantValuefier(this));
- }
+ return node.constant.accept(new ConstantValuefier(this));
}
ConstantExpression constant;
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index 75f2163..ba5118a 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -129,12 +129,15 @@
.reportErrorMessage(spannable, MessageKind.GENERIC, {'text': message});
}
+/// Display name used for compilation using the new common frontend.
+const String kernelName = 'kernel';
+
/// Display name used for strong mode compilation using the new common frontend.
const String strongName = 'strong mode';
/// Display name used for strong mode compilation without implicit checks using
/// the new common frontend.
-const String omitName = 'strong mode without implicit checks';
+const String trustName = 'strong mode without implicit checks';
/// Compute actual data for all members defined in the program with the
/// [entryPoint] and [memorySourceFiles].
@@ -418,25 +421,21 @@
String expected = expectedValue?.toString() ?? '';
String actual = dataValidator.getText(actualValue);
int offset = getOffsetFromId(id, uri);
- if (offset != null) {
- String value1 = '${expected}';
- String value2 = IdValue.idToString(id, '${actual}');
- annotations
- .putIfAbsent(offset, () => [])
- .add(colorizeDiff(value1, ' | ', value2));
- }
+ String value1 = '${expected}';
+ String value2 = IdValue.idToString(id, '${actual}');
+ annotations
+ .putIfAbsent(offset, () => [])
+ .add(colorizeDiff(value1, ' | ', value2));
}
});
expectedMaps[uri].forEach((Id id, IdValue expected) {
if (!actualMaps[uri].containsKey(id)) {
int offset = getOffsetFromId(id, uri);
- if (offset != null) {
- String value1 = '${expected}';
- String value2 = '---';
- annotations
- .putIfAbsent(offset, () => [])
- .add(colorizeDiff(value1, ' | ', value2));
- }
+ String value1 = '${expected}';
+ String value2 = '---';
+ annotations
+ .putIfAbsent(offset, () => [])
+ .add(colorizeDiff(value1, ' | ', value2));
}
});
return withAnnotations(code[uri].sourceCode, annotations);
@@ -445,7 +444,7 @@
int getOffsetFromId(Id id, Uri uri) {
return compiler.reporter
.spanFromSpannable(computeSpannable(elementEnvironment, uri, id))
- ?.begin;
+ .begin;
}
}
@@ -531,7 +530,6 @@
int shards: 1,
int shardIndex: 0,
bool testOmit: true,
- bool testCFEConstants: false,
void onTest(Uri uri)}) async {
dataComputer.setup();
@@ -581,8 +579,6 @@
Map<String, MemberAnnotations<IdValue>> expectedMaps = {
strongMarker: new MemberAnnotations<IdValue>(),
omitMarker: new MemberAnnotations<IdValue>(),
- strongConstMarker: new MemberAnnotations<IdValue>(),
- omitConstMarker: new MemberAnnotations<IdValue>(),
};
computeExpectedMap(entryPoint, code[entryPoint], expectedMaps);
Map<String, String> memorySourceFiles = {
@@ -611,79 +607,51 @@
if (setUpFunction != null) setUpFunction();
- Future runTests({bool useCFEConstants: false}) async {
+ if (skipForStrong.contains(name)) {
+ print('--skipped for kernel (strong mode)----------------------------');
+ } else {
+ print('--from kernel (strong mode)-----------------------------------');
+ List<String> options = new List<String>.from(testOptions);
+ MemberAnnotations<IdValue> annotations = expectedMaps[strongMarker];
+ CompiledData<T> compiledData2 = await computeData(
+ entryPoint, memorySourceFiles, dataComputer,
+ options: options,
+ verbose: verbose,
+ printCode: printCode,
+ testFrontend: testFrontend,
+ forUserLibrariesOnly: forUserLibrariesOnly,
+ globalIds: annotations.globalData.keys);
+ if (await checkCode(strongName, entity.uri, code, annotations,
+ compiledData2, dataComputer.dataValidator,
+ filterActualData: filterActualData,
+ fatalErrors: !testAfterFailures)) {
+ hasFailures = true;
+ }
+ }
+ if (testOmit) {
if (skipForStrong.contains(name)) {
- print('--skipped for kernel (strong mode)----------------------------');
+ print('--skipped for kernel (strong mode, omit-implicit-checks)------');
} else {
- print('--from kernel (strong mode)-----------------------------------');
- List<String> options = new List<String>.from(testOptions);
- String marker = strongMarker;
- if (useCFEConstants) {
- marker = strongConstMarker;
- options
- .add('${Flags.enableLanguageExperiments}=constant-update-2018');
- } else {
- options.add(
- '${Flags.enableLanguageExperiments}=no-constant-update-2018');
- }
- MemberAnnotations<IdValue> annotations = expectedMaps[marker];
+ print('--from kernel (strong mode, omit-implicit-checks)-------------');
+ List<String> options = [
+ Flags.omitImplicitChecks,
+ Flags.laxRuntimeTypeToString
+ ]..addAll(testOptions);
+ MemberAnnotations<IdValue> annotations = expectedMaps[omitMarker];
CompiledData<T> compiledData2 = await computeData(
entryPoint, memorySourceFiles, dataComputer,
options: options,
verbose: verbose,
- printCode: printCode,
testFrontend: testFrontend,
forUserLibrariesOnly: forUserLibrariesOnly,
globalIds: annotations.globalData.keys);
- if (await checkCode(strongName, entity.uri, code, annotations,
+ if (await checkCode(trustName, entity.uri, code, annotations,
compiledData2, dataComputer.dataValidator,
filterActualData: filterActualData,
fatalErrors: !testAfterFailures)) {
hasFailures = true;
}
}
- if (testOmit) {
- if (skipForStrong.contains(name)) {
- print(
- '--skipped for kernel (strong mode, omit-implicit-checks)------');
- } else {
- print(
- '--from kernel (strong mode, omit-implicit-checks)-------------');
- List<String> options = [
- Flags.omitImplicitChecks,
- Flags.laxRuntimeTypeToString
- ]..addAll(testOptions);
- String marker = omitMarker;
- if (useCFEConstants) {
- marker = omitConstMarker;
- options
- .add('${Flags.enableLanguageExperiments}=constant-update-2018');
- } else {
- options.add(
- '${Flags.enableLanguageExperiments}=no-constant-update-2018');
- }
- MemberAnnotations<IdValue> annotations = expectedMaps[marker];
- CompiledData<T> compiledData2 = await computeData(
- entryPoint, memorySourceFiles, dataComputer,
- options: options,
- verbose: verbose,
- testFrontend: testFrontend,
- forUserLibrariesOnly: forUserLibrariesOnly,
- globalIds: annotations.globalData.keys);
- if (await checkCode(omitName, entity.uri, code, annotations,
- compiledData2, dataComputer.dataValidator,
- filterActualData: filterActualData,
- fatalErrors: !testAfterFailures)) {
- hasFailures = true;
- }
- }
- }
- }
-
- await runTests();
- if (testCFEConstants) {
- print('--use cfe constants---------------------------------------------');
- await runTests(useCFEConstants: true);
}
}
Expect.isFalse(hasFailures, 'Errors found.');
@@ -958,11 +926,10 @@
}
LibraryEntity library = elementEnvironment.lookupLibrary(mainUri);
if (id.className != null) {
- ClassEntity cls = elementEnvironment.lookupClass(library, id.className);
+ ClassEntity cls =
+ elementEnvironment.lookupClass(library, id.className, required: true);
if (cls == null) {
- // Constant expression in CFE might remove inlined parts of sources.
- print("No class '${id.className}' in $mainUri.");
- return NO_LOCATION_SPANNABLE;
+ throw new ArgumentError("No class '${id.className}' in $mainUri.");
}
MemberEntity member = elementEnvironment
.lookupClassMember(cls, memberName, setter: isSetter);
@@ -970,9 +937,7 @@
ConstructorEntity constructor =
elementEnvironment.lookupConstructor(cls, memberName);
if (constructor == null) {
- // Constant expression in CFE might remove inlined parts of sources.
- print("No class member '${memberName}' in $cls.");
- return NO_LOCATION_SPANNABLE;
+ throw new ArgumentError("No class member '${memberName}' in $cls.");
}
return constructor;
}
@@ -981,19 +946,16 @@
MemberEntity member = elementEnvironment
.lookupLibraryMember(library, memberName, setter: isSetter);
if (member == null) {
- // Constant expression in CFE might remove inlined parts of sources.
- print("No member '${memberName}' in $mainUri.");
- return NO_LOCATION_SPANNABLE;
+ throw new ArgumentError("No member '${memberName}' in $mainUri.");
}
return member;
}
} else if (id is ClassId) {
LibraryEntity library = elementEnvironment.lookupLibrary(mainUri);
- ClassEntity cls = elementEnvironment.lookupClass(library, id.className);
+ ClassEntity cls =
+ elementEnvironment.lookupClass(library, id.className, required: true);
if (cls == null) {
- // Constant expression in CFE might remove inlined parts of sources.
- print("No class '${id.className}' in $mainUri.");
- return NO_LOCATION_SPANNABLE;
+ throw new ArgumentError("No class '${id.className}' in $mainUri.");
}
return cls;
}
@@ -1002,8 +964,6 @@
const String strongMarker = 'strong.';
const String omitMarker = 'omit.';
-const String strongConstMarker = 'strongConst.';
-const String omitConstMarker = 'omitConst.';
/// Compute three [MemberAnnotations] objects from [code] specifying the
/// expected annotations we anticipate encountering; one corresponding to the
@@ -1020,7 +980,7 @@
/// annotations without prefixes.
void computeExpectedMap(Uri sourceUri, AnnotatedCode code,
Map<String, MemberAnnotations<IdValue>> maps) {
- List<String> mapKeys = maps.keys.toList();
+ List<String> mapKeys = [strongMarker, omitMarker];
Map<String, AnnotatedCode> split = splitByPrefixes(code, mapKeys);
split.forEach((String marker, AnnotatedCode code) {
diff --git a/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart b/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart
index 27a4a61..b2eb74d 100644
--- a/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart
+++ b/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart
@@ -3,13 +3,13 @@
// BSD-style license that can be found in the LICENSE file.
enum Enum {
- /*strong.element: Enum.a:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.a"),index=IntConstant(0)))*/
+ /*element: Enum.a:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.a"),index=IntConstant(0)))*/
a,
- /*strong.element: Enum.b:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.b"),index=IntConstant(1)))*/
+ /*element: Enum.b:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.b"),index=IntConstant(1)))*/
b,
- /*strong.element: Enum.c:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.c"),index=IntConstant(2)))*/
+ /*element: Enum.c:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.c"),index=IntConstant(2)))*/
c,
}
diff --git a/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart b/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart
index a04f242..f7fd886 100644
--- a/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart
+++ b/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart
@@ -113,7 +113,7 @@
use(c2.field13b);
}
-/*strong.element: const1:constant=BoolConstant(true)*/
+/*element: const1:constant=BoolConstant(true)*/
const bool const1 = true;
class Class1 {
diff --git a/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart b/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart
index deb273c..4e0c97f 100644
--- a/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart
+++ b/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart
@@ -134,7 +134,7 @@
/*element: field4b:constant=IntConstant(5)*/
var field4b = 2 + 3;
-/*strong.element: field4c:constant=IntConstant(5)*/
+/*element: field4c:constant=IntConstant(5)*/
const field4c = 2 + 3;
/*element: field5a:constant=FunctionConstant(method)*/
@@ -143,7 +143,7 @@
/*element: field5b:constant=FunctionConstant(method)*/
var field5b = method;
-/*strong.element: field5c:constant=FunctionConstant(method)*/
+/*element: field5c:constant=FunctionConstant(method)*/
const field5c = method;
/*element: field6a:constant=ConstructedConstant(Class())*/
diff --git a/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart b/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
index 79b4cb0..09870a6 100644
--- a/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
+++ b/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
@@ -18,7 +18,7 @@
asyncTest(() async {
Directory dataDir = new Directory.fromUri(Platform.script.resolve('jdata'));
await checkTests(dataDir, const JAllocatorAnalysisDataComputer(),
- args: args, testOmit: false, testCFEConstants: true);
+ args: args, testOmit: false);
});
}
diff --git a/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart b/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart
index f6bff5f..8bf8e47 100644
--- a/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart
+++ b/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart
@@ -7,7 +7,7 @@
new Class2();
}
-/*strong.element: const1:complexity=constant,initial=BoolConstant(true)*/
+/*element: const1:complexity=constant,initial=BoolConstant(true)*/
const bool const1 = true;
class Class1 {
diff --git a/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart b/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart
index 4096f9e..6f393ef 100644
--- a/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart
+++ b/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart
@@ -65,7 +65,7 @@
/*element: field1b:complexity=constant,initial=IntConstant(0)*/
var field1b = 0;
-/*strong.element: field1c:complexity=constant,initial=IntConstant(0)*/
+/*element: field1c:complexity=constant,initial=IntConstant(0)*/
const field1c = 0;
/*element: field2a:complexity=constant,initial=ListConstant([])*/
@@ -74,7 +74,7 @@
/*element: field2b:complexity=constant,initial=ListConstant([])*/
var field2b = const [];
-/*strong.element: field2c:complexity=constant,initial=ListConstant([])*/
+/*element: field2c:complexity=constant,initial=ListConstant([])*/
const field2c = const [];
/*element: field3a:complexity=eager*/
@@ -125,7 +125,7 @@
/*element: field4b:complexity=lazy,initial=IntConstant(5)*/
var field4b = 2 + 3;
-/*strong.element: field4c:complexity=lazy,initial=IntConstant(5)*/
+/*element: field4c:complexity=lazy,initial=IntConstant(5)*/
const field4c = 2 + 3;
/*element: field5a:complexity=constant,initial=FunctionConstant(method)*/
@@ -134,7 +134,7 @@
/*element: field5b:complexity=constant,initial=FunctionConstant(method)*/
var field5b = method;
-/*strong.element: field5c:complexity=constant,initial=FunctionConstant(method)*/
+/*element: field5c:complexity=constant,initial=FunctionConstant(method)*/
const field5c = method;
/*element: field6a:complexity=constant,initial=ConstructedConstant(Class())*/
diff --git a/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart b/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
index 559810d..dbcfcfd 100644
--- a/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
+++ b/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
@@ -18,10 +18,7 @@
asyncTest(() async {
Directory dataDir = new Directory.fromUri(Platform.script.resolve('kdata'));
await checkTests(dataDir, const KAllocatorAnalysisDataComputer(),
- args: args,
- testOmit: false,
- testFrontend: true,
- testCFEConstants: true);
+ args: args, testOmit: false, testFrontend: true);
});
}
diff --git a/tests/compiler/dart2js/impact/data/async.dart b/tests/compiler/dart2js/impact/data/async.dart
index 69792ef..b8cb04a 100644
--- a/tests/compiler/dart2js/impact/data/async.dart
+++ b/tests/compiler/dart2js/impact/data/async.dart
@@ -64,7 +64,7 @@
*/
testAsyncStar() async* {}
-/*element: testLocalSyncStar:
+/*strong.element: testLocalSyncStar:
static=[
_IterationMarker.endOfIteration(0),
_IterationMarker.uncaughtError(1),
@@ -88,7 +88,7 @@
return local;
}
-/*element: testLocalAsync:
+/*strong.element: testLocalAsync:
static=[
StreamIterator.(1),
_asyncAwait(2),
@@ -115,7 +115,7 @@
return local;
}
-/*element: testLocalAsyncStar:
+/*strong.element: testLocalAsyncStar:
static=[
StreamIterator.(1),
_IterationMarker.yieldSingle(1),
@@ -142,7 +142,7 @@
return local;
}
-/*element: testAnonymousSyncStar:
+/*strong.element: testAnonymousSyncStar:
static=[
_IterationMarker.endOfIteration(0),
_IterationMarker.uncaughtError(1),
@@ -165,7 +165,7 @@
return () sync* {};
}
-/*element: testAnonymousAsync:
+/*strong.element: testAnonymousAsync:
static=[
StreamIterator.(1),
_asyncAwait(2),
@@ -191,7 +191,7 @@
return () async {};
}
-/*element: testAnonymousAsyncStar:
+/*strong.element: testAnonymousAsyncStar:
static=[
StreamIterator.(1),
_IterationMarker.yieldSingle(1),
@@ -217,7 +217,7 @@
return () async* {};
}
-/*element: testAsyncForIn:
+/*strong.element: testAsyncForIn:
dynamic=[
cancel(0),
current,
@@ -241,7 +241,7 @@
await for (var e in o) {}
}
-/*element: testAsyncForInTyped:
+/*strong.element: testAsyncForInTyped:
dynamic=[
cancel(0),
current,
diff --git a/tests/compiler/dart2js/impact/data/classes.dart b/tests/compiler/dart2js/impact/data/classes.dart
index 05ee3e1..ca5fc71 100644
--- a/tests/compiler/dart2js/impact/data/classes.dart
+++ b/tests/compiler/dart2js/impact/data/classes.dart
@@ -137,7 +137,7 @@
testForwardingConstructor() => new ForwardingConstructorClass(null);
class ForwardingConstructorTypedSuperClass {
- /*element: ForwardingConstructorTypedSuperClass.:
+ /*strong.element: ForwardingConstructorTypedSuperClass.:
static=[Object.(0)],
type=[inst:JSBool,param:int]
*/
@@ -154,7 +154,7 @@
testForwardingConstructorTyped() => new ForwardingConstructorTypedClass(null);
class ForwardingConstructorGenericSuperClass<T> {
- /*element: ForwardingConstructorGenericSuperClass.:
+ /*strong.element: ForwardingConstructorGenericSuperClass.:
static=[
Object.(0),
checkSubtype(4),
@@ -206,11 +206,10 @@
A
}
-/*strong.element: testEnum:static=[Enum.A]*/
-/*strongConst.element: testEnum:constant=[Enum(_name="Enum.A",index=0)]*/
+/*element: testEnum:static=[Enum.A]*/
testEnum() => Enum.A;
-/*element: staticGenericMethod:
+/*strong.element: staticGenericMethod:
static=[
checkSubtype(4),
checkSubtypeOfRuntimeType(2),
@@ -232,7 +231,7 @@
*/
List<T> staticGenericMethod<T>(T arg) => [arg];
-/*element: testStaticGenericMethod:
+/*strong.element: testStaticGenericMethod:
static=[staticGenericMethod<bool>(1)],
type=[inst:JSBool]
*/
@@ -240,7 +239,7 @@
staticGenericMethod<bool>(true);
}
-/*element: testInstanceGenericMethod:
+/*strong.element: testInstanceGenericMethod:
dynamic=[exact:GenericClass.genericMethod<bool>(1)],
static=[
GenericClass.generative(0),
@@ -256,7 +255,7 @@
// ignore: UNUSED_FIELD
final _field;
- /*element: AbstractClass.:type=[inst:JSNull]*/
+ /*strong.element: AbstractClass.:type=[inst:JSNull]*/
factory AbstractClass() => null;
}
@@ -293,7 +292,7 @@
class GenericClass<X, Y> {
const GenericClass.generative();
- /*element: GenericClass.genericMethod:
+ /*strong.element: GenericClass.genericMethod:
static=[
checkSubtype(4),
checkSubtypeOfRuntimeType(2),
diff --git a/tests/compiler/dart2js/impact/data/constructors.dart b/tests/compiler/dart2js/impact/data/constructors.dart
index 78631c3..60fb2ae 100644
--- a/tests/compiler/dart2js/impact/data/constructors.dart
+++ b/tests/compiler/dart2js/impact/data/constructors.dart
@@ -104,26 +104,22 @@
new GenericClass<dynamic, dynamic>.redirect();
}
-/*strong.element: testConstRedirectingFactoryInvoke:static=[Class.generative(0)]*/
-/*strongConst.element: testConstRedirectingFactoryInvoke:constant=[Class()]*/
+/*element: testConstRedirectingFactoryInvoke:static=[Class.generative(0)]*/
testConstRedirectingFactoryInvoke() {
const Class.redirect();
}
-/*strong.element: testConstRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
-/*strongConst.element: testConstRedirectingFactoryInvokeGeneric:constant=[GenericClass<int, String>()]*/
+/*element: testConstRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
testConstRedirectingFactoryInvokeGeneric() {
const GenericClass<int, String>.redirect();
}
-/*strong.element: testConstRedirectingFactoryInvokeGenericRaw:static=[GenericClass.generative(0)]*/
-/*strongConst.element: testConstRedirectingFactoryInvokeGenericRaw:constant=[GenericClass()]*/
+/*element: testConstRedirectingFactoryInvokeGenericRaw:static=[GenericClass.generative(0)]*/
testConstRedirectingFactoryInvokeGenericRaw() {
const GenericClass.redirect();
}
-/*strong.element: testConstRedirectingFactoryInvokeGenericDynamic:static=[GenericClass.generative(0)]*/
-/*strongConst.element: testConstRedirectingFactoryInvokeGenericDynamic:constant=[GenericClass()]*/
+/*element: testConstRedirectingFactoryInvokeGenericDynamic:static=[GenericClass.generative(0)]*/
testConstRedirectingFactoryInvokeGenericDynamic() {
const GenericClass<dynamic, dynamic>.redirect();
}
@@ -135,7 +131,7 @@
testImplicitConstructor() => new ClassImplicitConstructor();
class ClassFactoryConstructor {
- /*element: ClassFactoryConstructor.:type=[inst:JSNull]*/
+ /*strong.element: ClassFactoryConstructor.:type=[inst:JSNull]*/
factory ClassFactoryConstructor() => null;
}
@@ -146,7 +142,7 @@
/*element: Class.generative:static=[Object.(0)]*/
const Class.generative();
- /*element: Class.fact:type=[inst:JSNull]*/
+ /*strong.element: Class.fact:type=[inst:JSNull]*/
factory Class.fact() => null;
const factory Class.redirect() = Class.generative;
@@ -156,7 +152,7 @@
/*element: GenericClass.generative:static=[Object.(0)]*/
const GenericClass.generative();
- /*element: GenericClass.fact:type=[inst:JSBool,inst:JSNull,param:Object]*/
+ /*strong.element: GenericClass.fact:type=[inst:JSBool,inst:JSNull,param:Object]*/
factory GenericClass.fact() => null;
const factory GenericClass.redirect() = GenericClass<X, Y>.generative;
diff --git a/tests/compiler/dart2js/impact/data/initializers.dart b/tests/compiler/dart2js/impact/data/initializers.dart
index b27ae7c..d8e2fd5 100644
--- a/tests/compiler/dart2js/impact/data/initializers.dart
+++ b/tests/compiler/dart2js/impact/data/initializers.dart
@@ -29,11 +29,9 @@
}
/*strong.element: testDefaultValuesPositional:type=[inst:JSBool,param:bool]*/
-/*strongConst.element: testDefaultValuesPositional:constant=[false],type=[inst:JSBool,param:bool]*/
testDefaultValuesPositional([bool value = false]) {}
/*strong.element: testDefaultValuesNamed:type=[inst:JSBool,param:bool]*/
-/*strongConst.element: testDefaultValuesNamed:constant=[false],type=[inst:JSBool,param:bool]*/
testDefaultValuesNamed({bool value: false}) {}
class ClassFieldInitializer1 {
@@ -86,7 +84,7 @@
/*element: ClassInstanceFieldWithInitializer.:static=[Object.(0)]*/
class ClassInstanceFieldWithInitializer {
- /*element: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool,param:bool]*/
+ /*strong.element: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool,param:bool]*/
var field = false;
}
@@ -95,7 +93,7 @@
/*element: ClassInstanceFieldTyped.:static=[Object.(0)]*/
class ClassInstanceFieldTyped {
- /*element: ClassInstanceFieldTyped.field:type=[inst:JSBool,inst:JSNull,param:int]*/
+ /*strong.element: ClassInstanceFieldTyped.field:type=[inst:JSBool,inst:JSNull,param:int]*/
int field;
}
@@ -122,7 +120,7 @@
testSuperInitializer() => new ClassSuperInitializer();
class ClassGeneric<T> {
- /*element: ClassGeneric.:
+ /*strong.element: ClassGeneric.:
static=[
Object.(0),
checkSubtype(4),
diff --git a/tests/compiler/dart2js/impact/data/injected_cast.dart b/tests/compiler/dart2js/impact/data/injected_cast.dart
index d1f6e23..526414c 100644
--- a/tests/compiler/dart2js/impact/data/injected_cast.dart
+++ b/tests/compiler/dart2js/impact/data/injected_cast.dart
@@ -54,8 +54,7 @@
/*element: Class3.:static=[Object.(0)]*/
class Class3 {
- /*strong.element: Class3.method3:type=[inst:JSBool,inst:JSNull,param:A,param:B,param:C]*/
- /*strongConst.element: Class3.method3:constant=[null],type=[inst:JSBool,param:A,param:B,param:C]*/
+ /*element: Class3.method3:type=[inst:JSBool,inst:JSNull,param:A,param:B,param:C]*/
method3(A a, [B b, C c]) {}
}
@@ -75,13 +74,9 @@
/*element: Class4.:static=[Object.(0)]*/
class Class4 {
- /*strong.element: Class4.method4:
+ /*element: Class4.method4:
type=[inst:JSBool,inst:JSNull,param:A,param:B,param:C]
*/
- /*strongConst.element: Class4.method4:
- constant=[null],
- type=[inst:JSBool,param:A,param:B,param:C]
- */
method4(A a, {B b, C c}) {}
}
@@ -101,19 +96,7 @@
/*element: Class5.:static=[Object.(0)]*/
class Class5<T1, T2> {
- /*strong.element: Class5.method5:
- static=*,
- type=[
- inst:*,
- param:C,
- param:Class5.T1,
- param:Class5.T2,
- param:Object,
- param:method5.S1,
- param:method5.S2]
- */
- /*strongConst.element: Class5.method5:
- constant=[null],
+ /*element: Class5.method5:
static=*,
type=[
inst:*,
@@ -146,19 +129,7 @@
/*element: Class6.:static=[Object.(0)]*/
class Class6<T1, T2> {
- /*strong.element: Class6.method6:
- static=*,
- type=[
- inst:*,
- param:C,
- param:Class6.T1,
- param:Class6.T2,
- param:Object,
- param:method6.S1,
- param:method6.S2]
- */
- /*strongConst.element: Class6.method6:
- constant=[null],
+ /*element: Class6.method6:
static=*,
type=[
inst:*,
diff --git a/tests/compiler/dart2js/impact/data/invokes.dart b/tests/compiler/dart2js/impact/data/invokes.dart
index 3a3d115..aa2b472 100644
--- a/tests/compiler/dart2js/impact/data/invokes.dart
+++ b/tests/compiler/dart2js/impact/data/invokes.dart
@@ -78,12 +78,10 @@
/*element: topLevelFunction1:*/
topLevelFunction1(a) {}
-/*strong.element: topLevelFunction2:type=[inst:JSNull]*/
-/*strongConst.element: topLevelFunction2:constant=[null]*/
+/*element: topLevelFunction2:type=[inst:JSNull]*/
topLevelFunction2(a, [b, c]) {}
-/*strong.element: topLevelFunction3:type=[inst:JSNull]*/
-/*strongConst.element: topLevelFunction3:constant=[null]*/
+/*element: topLevelFunction3:type=[inst:JSNull]*/
topLevelFunction3(a, {b, c}) {}
/*element: testTopLevelInvoke:
@@ -117,7 +115,7 @@
topLevelFunction3(15, c: 16, b: 17);
}
-/*element: topLevelFunction1Typed:type=[inst:JSBool,param:int]*/
+/*strong.element: topLevelFunction1Typed:type=[inst:JSBool,param:int]*/
void topLevelFunction1Typed(int a) {}
/*strong.element: topLevelFunction2Typed:
@@ -128,15 +126,6 @@
param:double,
param:num]
*/
-/*strongConst.element: topLevelFunction2Typed:
- constant=[null],
- type=[
- inst:JSBool,
- inst:JSNull,
- param:String,
- param:double,
- param:num]
-*/
int topLevelFunction2Typed(String a, [num b, double c]) => null;
/*strong.element: topLevelFunction3Typed:
@@ -159,32 +148,11 @@
param:Map<String,bool>,
param:bool]
*/
-/*strongConst.element: topLevelFunction3Typed:
- constant=[null],
- static=[
- checkSubtype(4),
- getRuntimeTypeArgument(3),
- getRuntimeTypeArgumentIntercepted(4),
- getRuntimeTypeInfo(1),
- getTypeArgumentByIndex(2),
- setRuntimeTypeInfo(2)],
- type=[
- inst:JSArray<dynamic>,
- inst:JSBool,
- inst:JSExtendableArray<dynamic>,
- inst:JSFixedArray<dynamic>,
- inst:JSMutableArray<dynamic>,
- inst:JSNull,
- inst:JSUnmodifiableArray<dynamic>,
- param:List<int>,
- param:Map<String,bool>,
- param:bool]
-*/
double topLevelFunction3Typed(bool a, {List<int> b, Map<String, bool> c}) {
return null;
}
-/*element: testTopLevelInvokeTyped:
+/*strong.element: testTopLevelInvokeTyped:
static=[
topLevelFunction1Typed(1),
topLevelFunction2Typed(1),
@@ -220,7 +188,7 @@
topLevelFunction3Typed(false, c: {'16': false}, b: [17]);
}
-/*element: topLevelFunctionTyped1:
+/*strong.element: topLevelFunctionTyped1:
static=[
checkSubtype(4),
getRuntimeTypeArgument(3),
@@ -239,7 +207,7 @@
*/
topLevelFunctionTyped1(void a(num b)) {}
-/*element: topLevelFunctionTyped2:
+/*strong.element: topLevelFunctionTyped2:
static=[
checkSubtype(4),
getRuntimeTypeArgument(3),
@@ -258,7 +226,7 @@
*/
topLevelFunctionTyped2(void a(num b, [String c])) {}
-/*element: topLevelFunctionTyped3:
+/*strong.element: topLevelFunctionTyped3:
static=[
checkSubtype(4),
getRuntimeTypeArgument(3),
@@ -277,7 +245,7 @@
*/
topLevelFunctionTyped3(void a(num b, {String c, int d})) {}
-/*element: topLevelFunctionTyped4:
+/*strong.element: topLevelFunctionTyped4:
static=[
checkSubtype(4),
getRuntimeTypeArgument(3),
@@ -311,8 +279,7 @@
topLevelFunctionTyped4(null);
}
-/*strong.element: testTopLevelFunctionGet:static=[topLevelFunction1]*/
-/*strongConst.element: testTopLevelFunctionGet:constant=[topLevelFunction1]*/
+/*element: testTopLevelFunctionGet:static=[topLevelFunction1]*/
testTopLevelFunctionGet() => topLevelFunction1;
/*element: topLevelGetter:type=[inst:JSNull]*/
@@ -321,7 +288,7 @@
/*element: testTopLevelGetterGet:static=[topLevelGetter]*/
testTopLevelGetterGet() => topLevelGetter;
-/*element: topLevelGetterTyped:type=[inst:JSNull]*/
+/*strong.element: topLevelGetterTyped:type=[inst:JSNull]*/
int get topLevelGetterTyped => null;
/*element: testTopLevelGetterGetTyped:static=[topLevelGetterTyped]*/
@@ -333,7 +300,7 @@
/*element: testTopLevelSetterSet:static=[set:topLevelSetter],type=[inst:JSNull]*/
testTopLevelSetterSet() => topLevelSetter = null;
-/*element: topLevelSetterTyped=:type=[inst:JSBool,param:int]*/
+/*strong.element: topLevelSetterTyped=:type=[inst:JSBool,param:int]*/
void set topLevelSetterTyped(int value) {}
/*element: testTopLevelSetterSetTyped:static=[set:topLevelSetterTyped],type=[inst:JSNull]*/
@@ -351,11 +318,10 @@
/*element: testTopLevelFieldLazy:static=[topLevelFieldLazy]*/
testTopLevelFieldLazy() => topLevelFieldLazy;
-/*strong.element: topLevelFieldConst:type=[inst:JSNull]*/
+/*element: topLevelFieldConst:type=[inst:JSNull]*/
const topLevelFieldConst = null;
-/*strong.element: testTopLevelFieldConst:static=[topLevelFieldConst]*/
-/*strongConst.element: testTopLevelFieldConst:constant=[null]*/
+/*element: testTopLevelFieldConst:static=[topLevelFieldConst]*/
testTopLevelFieldConst() => topLevelFieldConst;
/*element: topLevelFieldFinal:static=[throwCyclicInit(1),topLevelFunction1(1)],type=[inst:JSNull]*/
@@ -364,25 +330,25 @@
/*element: testTopLevelFieldFinal:static=[topLevelFieldFinal]*/
testTopLevelFieldFinal() => topLevelFieldFinal;
-/*element: topLevelFieldTyped:type=[inst:JSBool,inst:JSNull,param:int]*/
+/*strong.element: topLevelFieldTyped:type=[inst:JSBool,inst:JSNull,param:int]*/
int topLevelFieldTyped;
/*element: testTopLevelFieldTyped:static=[topLevelFieldTyped]*/
testTopLevelFieldTyped() => topLevelFieldTyped;
-/*element: topLevelFieldGeneric1:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
+/*strong.element: topLevelFieldGeneric1:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
GenericClass topLevelFieldGeneric1;
/*element: testTopLevelFieldGeneric1:static=[topLevelFieldGeneric1]*/
testTopLevelFieldGeneric1() => topLevelFieldGeneric1;
-/*element: topLevelFieldGeneric2:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
+/*strong.element: topLevelFieldGeneric2:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
GenericClass<dynamic, dynamic> topLevelFieldGeneric2;
/*element: testTopLevelFieldGeneric2:static=[topLevelFieldGeneric2]*/
testTopLevelFieldGeneric2() => topLevelFieldGeneric2;
-/*element: topLevelFieldGeneric3:
+/*strong.element: topLevelFieldGeneric3:
static=[
checkSubtype(4),
getRuntimeTypeArgument(3),
@@ -413,8 +379,7 @@
static foo() {}
}
-/*strong.element: testStaticFunctionGet:static=[StaticFunctionGetClass.foo]*/
-/*strongConst.element: testStaticFunctionGet:constant=[StaticFunctionGetClass.foo]*/
+/*element: testStaticFunctionGet:static=[StaticFunctionGetClass.foo]*/
testStaticFunctionGet() => StaticFunctionGetClass.foo;
/*element: testDynamicInvoke:
@@ -491,7 +456,7 @@
var l = 42;
}
-/*element: testLocalWithInitializerTyped:
+/*strong.element: testLocalWithInitializerTyped:
type=[
inst:JSDouble,
inst:JSInt,
@@ -505,7 +470,7 @@
int l = 42;
}
-/*element: testLocalFunction:
+/*strong.element: testLocalFunction:
static=[
computeSignature(3),
def:localFunction,
@@ -525,7 +490,7 @@
localFunction() {}
}
-/*element: testLocalFunctionTyped:
+/*strong.element: testLocalFunctionTyped:
static=[
computeSignature(3),
def:localFunction,
@@ -546,7 +511,7 @@
int localFunction(String a) => null;
}
-/*element: testLocalFunctionInvoke:
+/*strong.element: testLocalFunctionInvoke:
dynamic=[call(0)],
static=[computeSignature(3),
def:localFunction,
@@ -565,7 +530,7 @@
localFunction();
}
-/*element: testLocalFunctionGet:static=[computeSignature(3),
+/*strong.element: testLocalFunctionGet:static=[computeSignature(3),
def:localFunction,
getRuntimeTypeArguments(3),
getRuntimeTypeInfo(1),
@@ -581,7 +546,7 @@
localFunction;
}
-/*element: testClosure:static=[computeSignature(3),
+/*strong.element: testClosure:static=[computeSignature(3),
def:<anonymous>,
getRuntimeTypeArguments(3),
getRuntimeTypeInfo(1),
@@ -596,7 +561,7 @@
() {};
}
-/*element: testClosureInvoke:
+/*strong.element: testClosureInvoke:
dynamic=[call(0)],
static=[computeSignature(3),
def:<anonymous>,
@@ -637,14 +602,10 @@
*/
testInvokeIndexSet(o) => o[42] = null;
-/*strong.element: testDynamicPrivateMethodInvoke:
+/*element: testDynamicPrivateMethodInvoke:
dynamic=[_privateMethod(0),call(0)],
type=[inst:JSNull]
*/
-/*strongConst.element: testDynamicPrivateMethodInvoke:
- constant=[null],
- dynamic=[_privateMethod(0),call(0)]
-*/
testDynamicPrivateMethodInvoke([o]) => o._privateMethod();
class GenericClass<X, Y> {}
diff --git a/tests/compiler/dart2js/impact/data/jsinterop.dart b/tests/compiler/dart2js/impact/data/jsinterop.dart
index e6e9adf..8e77d6ac 100644
--- a/tests/compiler/dart2js/impact/data/jsinterop.dart
+++ b/tests/compiler/dart2js/impact/data/jsinterop.dart
@@ -7,19 +7,14 @@
import 'package:js/js.dart';
-/*element: main:
- static=[
- testJsInteropClass(0),
- testJsInteropMethod(0),
- testOptionalGenericFunctionTypeArgument(0)]
-*/
+/*element: main:static=[testJsInteropClass(0),testJsInteropMethod(0),testOptionalGenericFunctionTypeArgument(0)]*/
main() {
testOptionalGenericFunctionTypeArgument();
testJsInteropMethod();
testJsInteropClass();
}
-/*element: testJsInteropMethod:*/
+/*strong.element: testJsInteropMethod:*/
@JS()
external int testJsInteropMethod();
@@ -28,7 +23,7 @@
/*element: JsInteropClass.:static=[JavaScriptObject.(0)]*/
external JsInteropClass();
- /*element: JsInteropClass.method:
+ /*strong.element: JsInteropClass.method:
type=[
native:ApplicationCacheErrorEvent,
native:DomError,
@@ -48,7 +43,7 @@
external double method();
}
-/*element: testJsInteropClass:
+/*strong.element: testJsInteropClass:
dynamic=[JavaScriptObject.method(0)],
static=[JsInteropClass.(0)]
*/
@@ -77,28 +72,10 @@
inst:JSUnmodifiableArray<dynamic>,
param:void Function(GenericClass.T)]
*/
- /*strongConst.element: GenericClass.method:
- constant=[null],
- static=[
- checkSubtype(4),
- getRuntimeTypeArgument(3),
- getRuntimeTypeArgumentIntercepted(4),
- getRuntimeTypeInfo(1),
- getTypeArgumentByIndex(2),
- setRuntimeTypeInfo(2)],
- type=[
- inst:JSArray<dynamic>,
- inst:JSBool,
- inst:JSExtendableArray<dynamic>,
- inst:JSFixedArray<dynamic>,
- inst:JSMutableArray<dynamic>,
- inst:JSUnmodifiableArray<dynamic>,
- param:void Function(GenericClass.T)]
- */
external GenericClass method([Callback<T> callback]);
}
-/*element: testOptionalGenericFunctionTypeArgument:
+/*strong.element: testOptionalGenericFunctionTypeArgument:
dynamic=[JavaScriptObject.method(0)],
static=[GenericClass.(0)]
*/
diff --git a/tests/compiler/dart2js/impact/data/literals.dart b/tests/compiler/dart2js/impact/data/literals.dart
index 0c1710d..925896a0 100644
--- a/tests/compiler/dart2js/impact/data/literals.dart
+++ b/tests/compiler/dart2js/impact/data/literals.dart
@@ -86,11 +86,10 @@
*/
testStringInterpolation() => '${true}';
-/*strong.element: testStringInterpolationConst:
+/*element: testStringInterpolationConst:
dynamic=[toString(0)],
static=[S(1)],type=[inst:JSBool,inst:JSString]
*/
-/*strongConst.element: testStringInterpolationConst:constant=["true"]*/
testStringInterpolationConst() {
const b = '${true}';
return b;
@@ -103,15 +102,13 @@
*/
testStringJuxtaposition() => 'a' 'b';
-/*strong.element: testSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
-/*strongConst.element: testSymbol:constant=[Symbol(_name="main")]*/
+/*element: testSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
testSymbol() => #main;
-/*strong.element: testConstSymbol:
+/*element: testConstSymbol:
static=[Symbol.(1),Symbol.(1),Symbol.validated(1)],
type=[inst:JSString,inst:Symbol]
*/
-/*strongConst.element: testConstSymbol:constant=[Symbol(_name="main")]*/
testConstSymbol() => const Symbol('main');
/*strong.element: complexSymbolField1:
@@ -193,15 +190,13 @@
static=[Symbol.(1),Symbol.(1),Symbol.validated(1),complexSymbolField],
type=[impl:String,inst:JSBool,inst:Symbol]
*/
-/*strongConst.element: testComplexConstSymbol:constant=[Symbol(_name="truefalsetruenull")]*/
testComplexConstSymbol() => const Symbol(complexSymbolField);
-/*strong.element: testIfNullConstSymbol:
+/*element: testIfNullConstSymbol:
dynamic=[Null.==],
static=[Symbol.(1),Symbol.(1),Symbol.validated(1)],
type=[inst:JSNull,inst:JSString,inst:Symbol]
*/
-/*strongConst.element: testIfNullConstSymbol:constant=[Symbol(_name="foo")]*/
testIfNullConstSymbol() => const Symbol(null ?? 'foo');
/*element: testTypeLiteral:
@@ -210,8 +205,7 @@
*/
testTypeLiteral() => Object;
-/*strong.element: testBoolFromEnvironment:static=[bool.fromEnvironment(1)],type=[inst:JSString]*/
-/*strongConst.element: testBoolFromEnvironment:constant=[false]*/
+/*element: testBoolFromEnvironment:static=[bool.fromEnvironment(1)],type=[inst:JSString]*/
testBoolFromEnvironment() => const bool.fromEnvironment('FOO');
/*element: testEmptyListLiteral:type=[inst:List<dynamic>]*/
@@ -220,14 +214,13 @@
/*element: testEmptyListLiteralDynamic:type=[inst:List<dynamic>]*/
testEmptyListLiteralDynamic() => <dynamic>[];
-/*element: testEmptyListLiteralTyped:type=[inst:List<String>]*/
+/*strong.element: testEmptyListLiteralTyped:type=[inst:List<String>]*/
testEmptyListLiteralTyped() => <String>[];
-/*strong.element: testEmptyListLiteralConstant:type=[inst:List<dynamic>]*/
-/*strongConst.element: testEmptyListLiteralConstant:constant=[[]]*/
+/*element: testEmptyListLiteralConstant:type=[inst:List<dynamic>]*/
testEmptyListLiteralConstant() => const [];
-/*element: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
+/*strong.element: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
testNonEmptyListLiteral() => [true];
/*element: testEmptyMapLiteral:type=[inst:Map<dynamic,dynamic>]*/
@@ -236,22 +229,21 @@
/*element: testEmptyMapLiteralDynamic:type=[inst:Map<dynamic,dynamic>]*/
testEmptyMapLiteralDynamic() => <dynamic, dynamic>{};
-/*element: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
+/*strong.element: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
testEmptyMapLiteralTyped() => <String, int>{};
-/*strong.element: testEmptyMapLiteralConstant:
+/*element: testEmptyMapLiteralConstant:
type=[
inst:ConstantMap<dynamic,dynamic>,
inst:ConstantProtoMap<dynamic,dynamic>,
inst:ConstantStringMap<dynamic,dynamic>,
inst:GeneralConstantMap<dynamic,dynamic>]*/
-/*strongConst.element: testEmptyMapLiteralConstant:constant=[{}]*/
testEmptyMapLiteralConstant() => const {};
-/*element: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
+/*strong.element: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
testNonEmptyMapLiteral() => {null: true};
class GenericClass<X, Y> {
- /*strong.element: GenericClass.generative:static=[Object.(0)]*/
+ /*element: GenericClass.generative:static=[Object.(0)]*/
const GenericClass.generative();
}
diff --git a/tests/compiler/dart2js/impact/data/native.dart b/tests/compiler/dart2js/impact/data/native.dart
index 2e67bb6..b314794 100644
--- a/tests/compiler/dart2js/impact/data/native.dart
+++ b/tests/compiler/dart2js/impact/data/native.dart
@@ -22,7 +22,7 @@
testNativeMethodReturns();
}
-/*element: testJSCall:
+/*strong.element: testJSCall:
static=[JS<dynamic>(3)],
type=[inst:JSNull,inst:JSString,native:bool,native:int]
*/
@@ -68,10 +68,6 @@
native:int,
param:Object]
*/
- // TODO(johnniwinther): The metadata is defined in dart:html_common and
- // therefore derived from platform.dill which doesn't currently include IR
- // constants.
- /*strongConst.element: NativeClass.field:type=[inst:JSBool,inst:JSNull,param:Object]*/
@annotation_Creates_SerializedScriptValue
final Object field;
@@ -80,7 +76,7 @@
}
}
-/*element: testNativeField:
+/*strong.element: testNativeField:
dynamic=[NativeClass.field],
static=[defineProperty(3)],
type=[inst:JSBool,param:NativeClass]
diff --git a/tests/compiler/dart2js/impact/data/statements.dart b/tests/compiler/dart2js/impact/data/statements.dart
index 5385f1c..4603006 100644
--- a/tests/compiler/dart2js/impact/data/statements.dart
+++ b/tests/compiler/dart2js/impact/data/statements.dart
@@ -65,7 +65,7 @@
return 1;
}
-/*element: testForIn:
+/*strong.element: testForIn:
dynamic=[
current,
iterator,
@@ -82,7 +82,7 @@
for (var e in o) {}
}
-/*element: testForInTyped:
+/*strong.element: testForInTyped:
dynamic=[
current,
iterator,
@@ -142,21 +142,7 @@
try {} finally {}
}
-/*strong.element: testSwitchWithoutFallthrough:
- static=[
- throwExpression(1),
- wrapException(1)],
- type=[
- inst:JSDouble,
- inst:JSInt,
- inst:JSNumber,
- inst:JSPositiveInt,
- inst:JSString,
- inst:JSUInt31,
- inst:JSUInt32]
-*/
-/*strongConst.element: testSwitchWithoutFallthrough:
- constant=[0,1,2,3,4],
+/*element: testSwitchWithoutFallthrough:
static=[
throwExpression(1),
wrapException(1)],
diff --git a/tests/compiler/dart2js/impact/impact_test.dart b/tests/compiler/dart2js/impact/impact_test.dart
index 54694cd..1237e4c 100644
--- a/tests/compiler/dart2js/impact/impact_test.dart
+++ b/tests/compiler/dart2js/impact/impact_test.dart
@@ -30,10 +30,7 @@
print('==================================================================');
useImpactDataForTesting = true;
await checkTests(dataDir, const ImpactDataComputer(),
- args: args,
- testOmit: false,
- testFrontend: true,
- testCFEConstants: true);
+ args: args, testOmit: false, testFrontend: true);
});
}