Pass CallStructure on dynamic and static use in ResolutionWorldBuilder
This is a preparation for using the collected call structures to inline
optional parameters that are never passed a call sites.
Change-Id: I9603f931967cbab53e9593dc19b29ad3ce717fa3
Reviewed-on: https://dart-review.googlesource.com/c/89549
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
diff --git a/pkg/compiler/lib/src/js_backend/codegen_listener.dart b/pkg/compiler/lib/src/js_backend/codegen_listener.dart
index d276f51..57e2fc0 100644
--- a/pkg/compiler/lib/src/js_backend/codegen_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen_listener.dart
@@ -173,19 +173,17 @@
if (type is InterfaceType) {
impactBuilder.registerTypeUse(new TypeUse.instantiation(type));
if (_rtiNeed.classNeedsTypeArguments(type.element)) {
+ FunctionEntity helper = _commonElements.setRuntimeTypeInfo;
impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
- // TODO(johnniwinther): Find the right [CallStructure].
- _commonElements.setRuntimeTypeInfo,
- null));
+ helper, helper.parameterStructure.callStructure));
}
if (type.element == _commonElements.typeLiteralClass) {
// If we use a type literal in a constant, the compile time
// constant emitter will generate a call to the createRuntimeType
// helper so we register a use of that.
+ FunctionEntity helper = _commonElements.createRuntimeType;
impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
- // TODO(johnniwinther): Find the right [CallStructure].
- _commonElements.createRuntimeType,
- null));
+ helper, helper.parameterStructure.callStructure));
}
}
}
diff --git a/pkg/compiler/lib/src/js_backend/resolution_listener.dart b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
index 8f18ffb..9c2fc09 100644
--- a/pkg/compiler/lib/src/js_backend/resolution_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
@@ -215,9 +215,7 @@
} else if (constant.isType) {
FunctionEntity helper = _commonElements.createRuntimeType;
impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
- // TODO(johnniwinther): Find the right [CallStructure].
- helper,
- null));
+ helper, helper.parameterStructure.callStructure));
_backendUsage.registerBackendFunctionUse(helper);
impactBuilder
.registerTypeUse(new TypeUse.instantiation(_commonElements.typeType));
@@ -232,10 +230,9 @@
// If we use a type literal in a constant, the compile time
// constant emitter will generate a call to the createRuntimeType
// helper so we register a use of that.
+ FunctionEntity helper = _commonElements.createRuntimeType;
impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
- // TODO(johnniwinther): Find the right [CallStructure].
- _commonElements.createRuntimeType,
- null));
+ helper, helper.parameterStructure.callStructure));
}
}
}
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index 2c9980d..5f44099 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -302,7 +302,9 @@
registerDynamicInvocation(
dynamicUse.selector, dynamicUse.typeArguments);
if (_registerNewSelector(dynamicUse, _invokedNames)) {
- _process(_instanceMembersByName, (m) => m.invoke());
+ // We don't track parameters in the codegen world builder, so we
+ // pass `null` instead of the concrete call structure.
+ _process(_instanceMembersByName, (m) => m.invoke(null));
return true;
}
break;
@@ -405,7 +407,6 @@
case StaticUseKind.GET:
case StaticUseKind.SET:
case StaticUseKind.INIT:
- case StaticUseKind.REFLECT:
break;
}
}
@@ -447,7 +448,6 @@
case StaticUseKind.GET:
case StaticUseKind.SET:
case StaticUseKind.INIT:
- case StaticUseKind.REFLECT:
useSet.addAll(usage.normalUse());
break;
case StaticUseKind.CONSTRUCTOR_INVOKE:
@@ -458,7 +458,9 @@
case StaticUseKind.DIRECT_INVOKE:
MemberEntity member = staticUse.element;
MemberUsage instanceUsage = _getMemberUsage(member, memberUsed);
- memberUsed(instanceUsage.entity, instanceUsage.invoke());
+ // We don't track parameters in the codegen world builder, so we
+ // pass `null` instead of the concrete call structure.
+ memberUsed(instanceUsage.entity, instanceUsage.invoke(null));
_instanceMembersByName[instanceUsage.entity.name]
?.remove(instanceUsage);
useSet.addAll(usage.normalUse());
@@ -514,7 +516,9 @@
useSet.addAll(usage.write());
}
if (!usage.hasInvoke && hasInvocation(member)) {
- useSet.addAll(usage.invoke());
+ // We don't track parameters in the codegen world builder, so we
+ // pass `null` instead of the concrete call structures.
+ useSet.addAll(usage.invoke(null));
}
if (usage.pendingUse.contains(MemberUse.CLOSURIZE_INSTANCE)) {
diff --git a/pkg/compiler/lib/src/universe/member_usage.dart b/pkg/compiler/lib/src/universe/member_usage.dart
index 6b166f8..91dbc6f 100644
--- a/pkg/compiler/lib/src/universe/member_usage.dart
+++ b/pkg/compiler/lib/src/universe/member_usage.dart
@@ -6,6 +6,7 @@
import '../elements/entities.dart';
import '../js_model/elements.dart' show JSignatureMethod;
import '../util/enumset.dart';
+import 'call_structure.dart';
abstract class AbstractUsage<T> {
final EnumSet<T> _pendingUse = new EnumSet<T>();
@@ -96,7 +97,7 @@
///
/// For a function this is a normal invocation, for a field this is a read
/// access followed by an invocation of the function-like value.
- EnumSet<MemberUse> invoke() => MemberUses.NONE;
+ EnumSet<MemberUse> invoke(CallStructure callStructure) => MemberUses.NONE;
/// Registers all possible uses of [entity] and returns the new [MemberUse]s
/// that it caused.
@@ -155,7 +156,7 @@
}
@override
- EnumSet<MemberUse> invoke() => read();
+ EnumSet<MemberUse> invoke(CallStructure callStructure) => read();
@override
EnumSet<MemberUse> fullyUse() {
@@ -196,7 +197,7 @@
}
@override
- EnumSet<MemberUse> invoke() => read();
+ EnumSet<MemberUse> invoke(CallStructure callStructure) => read();
@override
EnumSet<MemberUse> fullyUse() => read();
@@ -211,7 +212,7 @@
// We mark signature methods as "always used" to prevent them from being
// optimized away.
// TODO(johnniwinther): Make this a part of the regular enqueueing.
- invoke();
+ invoke(function.parameterStructure.callStructure);
}
}
@@ -222,7 +223,7 @@
EnumSet<MemberUse> read() => fullyUse();
@override
- EnumSet<MemberUse> invoke() {
+ EnumSet<MemberUse> invoke(CallStructure callStructure) {
if (hasInvoke) {
return MemberUses.NONE;
}
@@ -274,7 +275,7 @@
}
@override
- EnumSet<MemberUse> invoke() => read();
+ EnumSet<MemberUse> invoke(CallStructure callStructure) => read();
@override
EnumSet<MemberUse> fullyUse() => read();
@@ -306,10 +307,12 @@
ConstructorUsage(ConstructorEntity constructor) : super.internal(constructor);
+ ConstructorEntity get entity => super.entity;
+
EnumSet<MemberUse> get _originalUse => MemberUses.NORMAL_ONLY;
@override
- EnumSet<MemberUse> invoke() {
+ EnumSet<MemberUse> invoke(CallStructure callStructure) {
if (hasInvoke) {
return MemberUses.NONE;
}
@@ -319,7 +322,8 @@
}
@override
- EnumSet<MemberUse> fullyUse() => invoke();
+ EnumSet<MemberUse> fullyUse() =>
+ invoke(entity.parameterStructure.callStructure);
@override
bool get fullyUsed => hasInvoke;
@@ -418,7 +422,7 @@
EnumSet<MemberUse> write() => normalUse();
- EnumSet<MemberUse> invoke() => normalUse();
+ EnumSet<MemberUse> invoke(CallStructure callStructure) => normalUse();
EnumSet<MemberUse> fullyUse() => normalUse();
diff --git a/pkg/compiler/lib/src/universe/resolution_world_builder.dart b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
index fee6d25..77a8db9 100644
--- a/pkg/compiler/lib/src/universe/resolution_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
@@ -636,7 +636,8 @@
registerDynamicInvocation(
dynamicUse.selector, dynamicUse.typeArguments);
if (_registerNewSelector(dynamicUse, _invokedNames)) {
- _process(_instanceMembersByName, (m) => m.invoke());
+ _process(_instanceMembersByName,
+ (m) => m.invoke(dynamicUse.selector.callStructure));
}
break;
case DynamicUseKind.GET:
@@ -742,20 +743,17 @@
case StaticUseKind.SET:
useSet.addAll(usage.write());
break;
- case StaticUseKind.REFLECT:
- useSet.addAll(usage.fullyUse());
- break;
case StaticUseKind.INIT:
useSet.addAll(usage.init());
break;
case StaticUseKind.INVOKE:
registerStaticInvocation(staticUse);
- useSet.addAll(usage.invoke());
+ useSet.addAll(usage.invoke(staticUse.callStructure));
break;
case StaticUseKind.CONSTRUCTOR_INVOKE:
case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
case StaticUseKind.REDIRECTION:
- useSet.addAll(usage.invoke());
+ useSet.addAll(usage.invoke(staticUse.callStructure));
break;
case StaticUseKind.DIRECT_INVOKE:
failedAt(element, 'Direct static use is not supported for resolution.');
@@ -860,7 +858,7 @@
useSet.addAll(usage.read());
}
if (!usage.hasInvoke && _hasInvocation(member)) {
- useSet.addAll(usage.invoke());
+ useSet.addAll(usage.invoke(null));
}
if (!usage.hasWrite && hasInvokedSetter(member)) {
useSet.addAll(usage.write());
@@ -889,7 +887,7 @@
useSet.addAll(usage.read());
}
if (!usage.hasInvoke && _hasInvocation(member)) {
- useSet.addAll(usage.invoke());
+ useSet.addAll(usage.invoke(null));
}
if (!usage.hasWrite && hasInvokedSetter(member)) {
useSet.addAll(usage.write());
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index 9ba793f..ab8e69c 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -161,7 +161,6 @@
GET,
SET,
INIT,
- REFLECT,
}
/// Statically known use of an [Entity].
@@ -249,6 +248,11 @@
element,
"Static invoke element $element must be a top-level "
"or static method."));
+ assert(
+ callStructure != null,
+ failedAt(element,
+ "Not CallStructure for static invocation of element $element."));
+
return new GenericStaticUse(element, StaticUseKind.INVOKE, callStructure,
typeArguments, deferredImport);
}
@@ -322,6 +326,10 @@
element.isInstanceMember,
failedAt(element,
"Super invoke element $element must be an instance method."));
+ assert(
+ callStructure != null,
+ failedAt(element,
+ "Not CallStructure for super invocation of element $element."));
return new GenericStaticUse(
element, StaticUseKind.INVOKE, callStructure, typeArguments);
}
@@ -380,6 +388,12 @@
element,
"Constructor invoke element $element must be a "
"generative constructor."));
+ assert(
+ callStructure != null,
+ failedAt(
+ element,
+ "Not CallStructure for super constructor invocation of element "
+ "$element."));
return new StaticUse.internal(element, StaticUseKind.INVOKE,
callStructure: callStructure);
}
@@ -388,6 +402,12 @@
/// constructor call with the given [callStructure].
factory StaticUse.constructorBodyInvoke(
ConstructorBodyEntity element, CallStructure callStructure) {
+ assert(
+ callStructure != null,
+ failedAt(
+ element,
+ "Not CallStructure for constructor body invocation of element "
+ "$element."));
return new StaticUse.internal(element, StaticUseKind.INVOKE,
callStructure: callStructure);
}
@@ -395,7 +415,8 @@
/// Direct invocation of a generator (body) [element], as a static call or
/// through a this or super constructor call.
factory StaticUse.generatorBodyInvoke(FunctionEntity element) {
- return new StaticUse.internal(element, StaticUseKind.INVOKE);
+ return new StaticUse.internal(element, StaticUseKind.INVOKE,
+ callStructure: CallStructure.NO_ARGS);
}
/// Direct invocation of a method [element] with the given [callStructure].
@@ -442,6 +463,12 @@
element.isConstructor,
failedAt(element,
"Constructor invocation element $element must be a constructor."));
+ assert(
+ callStructure != null,
+ failedAt(
+ element,
+ "Not CallStructure for constructor invocation of element "
+ "$element."));
return new StaticUse.internal(element, StaticUseKind.INVOKE,
callStructure: callStructure);
}
@@ -547,15 +574,11 @@
return new StaticUse.internal(method, StaticUseKind.CALL_METHOD);
}
- /// Use of [element] through reflection.
- factory StaticUse.mirrorUse(MemberEntity element) {
- return new StaticUse.internal(element, StaticUseKind.REFLECT);
- }
-
/// Implicit method/constructor invocation of [element] created by the
/// backend.
factory StaticUse.implicitInvoke(FunctionEntity element) {
- return new StaticUse.internal(element, StaticUseKind.INVOKE);
+ return new StaticUse.internal(element, StaticUseKind.INVOKE,
+ callStructure: element.parameterStructure.callStructure);
}
/// Inlining of [element].
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index e7becbd..84bad06 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -409,12 +409,11 @@
String unexpectedMessage =
dataValidator.isAsExpected(actualValue, expectedValue?.value);
if (unexpectedMessage != null) {
- /*if (data.value != expectedValue || expectedValue == null && data.value.value != '') {*/
String expected = expectedValue?.toString() ?? '';
String actual = dataValidator.getText(actualValue);
int offset = getOffsetFromId(id, uri);
String value1 = '${expected}';
- String value2 = '${actual}';
+ String value2 = IdValue.idToString(id, '${actual}');
annotations
.putIfAbsent(offset, () => [])
.add(colorizeDiff(value1, ' | ', value2));
@@ -754,7 +753,7 @@
"Mismatch for $key: expected '$expectedValue', found '${actualValue}");
}
});
- return errorsFound.isNotEmpty ? errorsFound.join(', ') : null;
+ return errorsFound.isNotEmpty ? errorsFound.join('\n ') : null;
}
}
diff --git a/tests/compiler/dart2js/impact/data/async.dart b/tests/compiler/dart2js/impact/data/async.dart
index 24ab850..b8cb04a 100644
--- a/tests/compiler/dart2js/impact/data/async.dart
+++ b/tests/compiler/dart2js/impact/data/async.dart
@@ -33,45 +33,48 @@
/*element: testSyncStar:
static=[
- _IterationMarker.endOfIteration,
- _IterationMarker.uncaughtError,
- _IterationMarker.yieldStar,
+ _IterationMarker.endOfIteration(0),
+ _IterationMarker.uncaughtError(1),
+ _IterationMarker.yieldStar(1),
_makeSyncStarIterable<dynamic>(1)]
*/
testSyncStar() sync* {}
/*element: testAsync:
static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
+ StreamIterator.(1),
+ _asyncAwait(2),
+ _asyncRethrow(2),
+ _asyncReturn(2),
+ _asyncStartSync(2),
_makeAsyncAwaitCompleter<dynamic>(0),
- _wrapJsFunctionForAsync]
+ _wrapJsFunctionForAsync(1)]
*/
testAsync() async {}
-/*element: testAsyncStar:static=[StreamIterator.,
- _IterationMarker.yieldSingle,
- _IterationMarker.yieldStar,
- _asyncStarHelper,
+/*element: testAsyncStar:
+ static=[
+ StreamIterator.(1),
+ _IterationMarker.yieldSingle(1),
+ _IterationMarker.yieldStar(1),
+ _asyncStarHelper(3),
_makeAsyncStarStreamController<dynamic>(1),
- _streamOfController,
- _wrapJsFunctionForAsync]*/
+ _streamOfController(1),
+ _wrapJsFunctionForAsync(1)]
+*/
testAsyncStar() async* {}
/*strong.element: testLocalSyncStar:
static=[
- _IterationMarker.endOfIteration,
- _IterationMarker.uncaughtError,
- _IterationMarker.yieldStar,
+ _IterationMarker.endOfIteration(0),
+ _IterationMarker.uncaughtError(1),
+ _IterationMarker.yieldStar(1),
_makeSyncStarIterable<Null>(1),
- computeSignature,
+ computeSignature(3),
def:local,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[
inst:Function,
inst:JSArray<dynamic>,
@@ -87,18 +90,18 @@
/*strong.element: testLocalAsync:
static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
+ StreamIterator.(1),
+ _asyncAwait(2),
+ _asyncRethrow(2),
+ _asyncReturn(2),
+ _asyncStartSync(2),
_makeAsyncAwaitCompleter<Null>(0),
- _wrapJsFunctionForAsync,
- computeSignature,
+ _wrapJsFunctionForAsync(1),
+ computeSignature(3),
def:local,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[
inst:Function,
inst:JSArray<dynamic>,
@@ -114,18 +117,18 @@
/*strong.element: testLocalAsyncStar:
static=[
- StreamIterator.,
- _IterationMarker.yieldSingle,
- _IterationMarker.yieldStar,
- _asyncStarHelper,
+ StreamIterator.(1),
+ _IterationMarker.yieldSingle(1),
+ _IterationMarker.yieldStar(1),
+ _asyncStarHelper(3),
_makeAsyncStarStreamController<Null>(1),
- _streamOfController,
- _wrapJsFunctionForAsync,
- computeSignature,
+ _streamOfController(1),
+ _wrapJsFunctionForAsync(1),
+ computeSignature(3),
def:local,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[
inst:Function,
inst:JSArray<dynamic>,
@@ -141,15 +144,15 @@
/*strong.element: testAnonymousSyncStar:
static=[
- _IterationMarker.endOfIteration,
- _IterationMarker.uncaughtError,
- _IterationMarker.yieldStar,
+ _IterationMarker.endOfIteration(0),
+ _IterationMarker.uncaughtError(1),
+ _IterationMarker.yieldStar(1),
_makeSyncStarIterable<Null>(1),
- computeSignature,
+ computeSignature(3),
def:<anonymous>,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[
inst:Function,
inst:JSArray<dynamic>,
@@ -164,18 +167,18 @@
/*strong.element: testAnonymousAsync:
static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
+ StreamIterator.(1),
+ _asyncAwait(2),
+ _asyncRethrow(2),
+ _asyncReturn(2),
+ _asyncStartSync(2),
_makeAsyncAwaitCompleter<Null>(0),
- _wrapJsFunctionForAsync,
- computeSignature,
+ _wrapJsFunctionForAsync(1),
+ computeSignature(3),
def:<anonymous>,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[
inst:Function,
inst:JSArray<dynamic>,
@@ -190,18 +193,18 @@
/*strong.element: testAnonymousAsyncStar:
static=[
- StreamIterator.,
- _IterationMarker.yieldSingle,
- _IterationMarker.yieldStar,
- _asyncStarHelper,
+ StreamIterator.(1),
+ _IterationMarker.yieldSingle(1),
+ _IterationMarker.yieldStar(1),
+ _asyncStarHelper(3),
_makeAsyncStarStreamController<Null>(1),
- _streamOfController,
- _wrapJsFunctionForAsync,
- computeSignature,
+ _streamOfController(1),
+ _wrapJsFunctionForAsync(1),
+ computeSignature(3),
def:<anonymous>,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[
inst:Function,
inst:JSArray<dynamic>,
@@ -220,13 +223,13 @@
current,
moveNext(0)],
static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
+ StreamIterator.(1),
+ _asyncAwait(2),
+ _asyncRethrow(2),
+ _asyncReturn(2),
+ _asyncStartSync(2),
_makeAsyncAwaitCompleter<dynamic>(0),
- _wrapJsFunctionForAsync],
+ _wrapJsFunctionForAsync(1)],
type=[
impl:Stream<dynamic>,
inst:JSBool,
@@ -244,13 +247,13 @@
current,
moveNext(0)],
static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
+ StreamIterator.(1),
+ _asyncAwait(2),
+ _asyncRethrow(2),
+ _asyncReturn(2),
+ _asyncStartSync(2),
_makeAsyncAwaitCompleter<dynamic>(0),
- _wrapJsFunctionForAsync],
+ _wrapJsFunctionForAsync(1)],
type=[
impl:Stream<dynamic>,
impl:int,
diff --git a/tests/compiler/dart2js/impact/data/classes.dart b/tests/compiler/dart2js/impact/data/classes.dart
index bacab72..ca5fc71 100644
--- a/tests/compiler/dart2js/impact/data/classes.dart
+++ b/tests/compiler/dart2js/impact/data/classes.dart
@@ -157,13 +157,13 @@
/*strong.element: ForwardingConstructorGenericSuperClass.:
static=[
Object.(0),
- checkSubtype,
- checkSubtypeOfRuntimeType,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ checkSubtypeOfRuntimeType(2),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -182,8 +182,8 @@
/*element: testForwardingConstructorGeneric:
static=[
ForwardingConstructorGenericClass.(1),
- assertIsSubtype,
- throwTypeError],
+ assertIsSubtype(5),
+ throwTypeError(1)],
type=[inst:JSNull]
*/
testForwardingConstructorGeneric() {
@@ -211,13 +211,13 @@
/*strong.element: staticGenericMethod:
static=[
- checkSubtype,
- checkSubtypeOfRuntimeType,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ checkSubtypeOfRuntimeType(2),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -243,8 +243,8 @@
dynamic=[exact:GenericClass.genericMethod<bool>(1)],
static=[
GenericClass.generative(0),
- assertIsSubtype,
- throwTypeError],
+ assertIsSubtype(5),
+ throwTypeError(1)],
type=[inst:JSBool]
*/
testInstanceGenericMethod() {
@@ -271,16 +271,16 @@
/*element: testGenericMixinInstantiation:
static=[
GenericSub.(0),
- assertIsSubtype,
- throwTypeError]
+ assertIsSubtype(5),
+ throwTypeError(1)]
*/
testGenericMixinInstantiation() => new GenericSub<int, String>();
/*element: testGenericNamedMixinInstantiation:
static=[
GenericNamedMixin.(0),
- assertIsSubtype,
- throwTypeError]
+ assertIsSubtype(5),
+ throwTypeError(1)]
*/
testGenericNamedMixinInstantiation() => new GenericNamedMixin<int, String>();
@@ -294,13 +294,13 @@
/*strong.element: GenericClass.genericMethod:
static=[
- checkSubtype,
- checkSubtypeOfRuntimeType,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ checkSubtypeOfRuntimeType(2),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
diff --git a/tests/compiler/dart2js/impact/data/constructors.dart b/tests/compiler/dart2js/impact/data/constructors.dart
index ab690a7..60fb2ae 100644
--- a/tests/compiler/dart2js/impact/data/constructors.dart
+++ b/tests/compiler/dart2js/impact/data/constructors.dart
@@ -49,7 +49,7 @@
new Class.generative();
}
-/*element: testConstructorInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype,throwTypeError]*/
+/*element: testConstructorInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
testConstructorInvokeGeneric() {
new GenericClass<int, String>.generative();
}
@@ -69,7 +69,7 @@
new Class.fact();
}
-/*element: testFactoryInvokeGeneric:static=[GenericClass.fact(0),assertIsSubtype,throwTypeError]*/
+/*element: testFactoryInvokeGeneric:static=[GenericClass.fact(0),assertIsSubtype(5),throwTypeError(1)]*/
testFactoryInvokeGeneric() {
new GenericClass<int, String>.fact();
}
@@ -89,7 +89,7 @@
new Class.redirect();
}
-/*element: testRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype,throwTypeError]*/
+/*element: testRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
testRedirectingFactoryInvokeGeneric() {
new GenericClass<int, String>.redirect();
}
@@ -109,7 +109,7 @@
const Class.redirect();
}
-/*element: testConstRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype,throwTypeError]*/
+/*element: testConstRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
testConstRedirectingFactoryInvokeGeneric() {
const GenericClass<int, String>.redirect();
}
diff --git a/tests/compiler/dart2js/impact/data/expressions.dart b/tests/compiler/dart2js/impact/data/expressions.dart
index c1570bf..ca8a80d 100644
--- a/tests/compiler/dart2js/impact/data/expressions.dart
+++ b/tests/compiler/dart2js/impact/data/expressions.dart
@@ -110,12 +110,12 @@
/*element: testIsGeneric:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -143,12 +143,12 @@
/*element: testIsNotGeneric:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -173,12 +173,12 @@
/*element: testIsTypedef:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -193,12 +193,12 @@
/*element: testIsTypedefGeneric:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -212,12 +212,12 @@
/*element: testIsTypedefGenericRaw:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -231,12 +231,12 @@
/*element: testIsTypedefGenericDynamic:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -250,12 +250,12 @@
/*element: testIsTypedefDeep:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -268,19 +268,19 @@
testIsTypedefDeep() => null is List<GenericTypedef<int, GenericTypedef>>;
/*element: testAs:
- static=[throwRuntimeError],
+ static=[throwRuntimeError(1)],
type=[as:Class,inst:JSBool]
*/
// ignore: UNNECESSARY_CAST
testAs(dynamic o) => o as Class;
-/*element: testAsGeneric:static=[checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo,
- throwRuntimeError],
+/*element: testAsGeneric:static=[checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2),
+ throwRuntimeError(1)],
type=[as:GenericClass<int,
String>,
inst:JSArray<dynamic>,
@@ -293,21 +293,21 @@
testAsGeneric(dynamic o) => o as GenericClass<int, String>;
/*element: testAsGenericRaw:
- static=[throwRuntimeError],
+ static=[throwRuntimeError(1)],
type=[as:GenericClass<dynamic,dynamic>,inst:JSBool]
*/
// ignore: UNNECESSARY_CAST
testAsGenericRaw(dynamic o) => o as GenericClass;
/*element: testAsGenericDynamic:
- static=[throwRuntimeError],
+ static=[throwRuntimeError(1)],
type=[as:GenericClass<dynamic,dynamic>,inst:JSBool]
*/
// ignore: UNNECESSARY_CAST
testAsGenericDynamic(dynamic o) => o as GenericClass<dynamic, dynamic>;
/*element: testThrow:
- static=[throwExpression,wrapException],
+ static=[throwExpression(1),wrapException(1)],
type=[inst:JSString]*/
testThrow() => throw '';
diff --git a/tests/compiler/dart2js/impact/data/extract_type_arguments.dart b/tests/compiler/dart2js/impact/data/extract_type_arguments.dart
index defa672..0f7f42a 100644
--- a/tests/compiler/dart2js/impact/data/extract_type_arguments.dart
+++ b/tests/compiler/dart2js/impact/data/extract_type_arguments.dart
@@ -15,13 +15,13 @@
/*element: testA:
dynamic=[call<A.T>(0)],
static=[
- checkSubtype,
+ checkSubtype(4),
extractTypeArguments<A<dynamic>>(2),
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
impl:A<dynamic>,
impl:Function,
@@ -37,13 +37,13 @@
/*element: testB:
dynamic=[call<B.S,B.U>(0)],
static=[
- checkSubtype,
+ checkSubtype(4),
extractTypeArguments<B<dynamic,dynamic>>(2),
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
impl:B<dynamic,dynamic>,
impl:Function,
diff --git a/tests/compiler/dart2js/impact/data/future_or.dart b/tests/compiler/dart2js/impact/data/future_or.dart
index c119fbe..21f6b17 100644
--- a/tests/compiler/dart2js/impact/data/future_or.dart
+++ b/tests/compiler/dart2js/impact/data/future_or.dart
@@ -7,7 +7,7 @@
/*element: main:
dynamic=[runtimeType],
runtimeType=[unknown:FutureOr<int>],
- static=[Future.value(1),assertIsSubtype,print(1),throwTypeError],
+ static=[Future.value(1),assertIsSubtype(5),print(1),throwTypeError(1)],
type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]
*/
@pragma('dart2js:disableFinal')
diff --git a/tests/compiler/dart2js/impact/data/initializers.dart b/tests/compiler/dart2js/impact/data/initializers.dart
index 0155408..d8e2fd5 100644
--- a/tests/compiler/dart2js/impact/data/initializers.dart
+++ b/tests/compiler/dart2js/impact/data/initializers.dart
@@ -123,13 +123,13 @@
/*strong.element: ClassGeneric.:
static=[
Object.(0),
- checkSubtype,
- checkSubtypeOfRuntimeType,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ checkSubtypeOfRuntimeType(2),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -142,5 +142,5 @@
ClassGeneric(T arg);
}
-/*element: testGenericClass:static=[ClassGeneric.(1),assertIsSubtype,throwTypeError],type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+/*element: testGenericClass:static=[ClassGeneric.(1),assertIsSubtype(5),throwTypeError(1)],type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
testGenericClass() => new ClassGeneric<int>(0);
diff --git a/tests/compiler/dart2js/impact/data/invokes.dart b/tests/compiler/dart2js/impact/data/invokes.dart
index ae0262a..aa2b472 100644
--- a/tests/compiler/dart2js/impact/data/invokes.dart
+++ b/tests/compiler/dart2js/impact/data/invokes.dart
@@ -130,12 +130,12 @@
/*strong.element: topLevelFunction3Typed:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -190,12 +190,12 @@
/*strong.element: topLevelFunctionTyped1:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -209,12 +209,12 @@
/*strong.element: topLevelFunctionTyped2:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -228,12 +228,12 @@
/*strong.element: topLevelFunctionTyped3:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -247,12 +247,12 @@
/*strong.element: topLevelFunctionTyped4:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -312,7 +312,7 @@
/*element: testTopLevelField:static=[topLevelField]*/
testTopLevelField() => topLevelField;
-/*element: topLevelFieldLazy:static=[throwCyclicInit,topLevelFunction1(1)],type=[inst:JSNull]*/
+/*element: topLevelFieldLazy:static=[throwCyclicInit(1),topLevelFunction1(1)],type=[inst:JSNull]*/
var topLevelFieldLazy = topLevelFunction1(null);
/*element: testTopLevelFieldLazy:static=[topLevelFieldLazy]*/
@@ -324,7 +324,7 @@
/*element: testTopLevelFieldConst:static=[topLevelFieldConst]*/
testTopLevelFieldConst() => topLevelFieldConst;
-/*element: topLevelFieldFinal:static=[throwCyclicInit,topLevelFunction1(1)],type=[inst:JSNull]*/
+/*element: topLevelFieldFinal:static=[throwCyclicInit(1),topLevelFunction1(1)],type=[inst:JSNull]*/
final topLevelFieldFinal = topLevelFunction1(null);
/*element: testTopLevelFieldFinal:static=[topLevelFieldFinal]*/
@@ -350,12 +350,12 @@
/*strong.element: topLevelFieldGeneric3:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -472,11 +472,11 @@
/*strong.element: testLocalFunction:
static=[
- computeSignature,
+ computeSignature(3),
def:localFunction,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[
inst:Function,
inst:JSArray<dynamic>,
@@ -492,11 +492,11 @@
/*strong.element: testLocalFunctionTyped:
static=[
- computeSignature,
+ computeSignature(3),
def:localFunction,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[inst:Function,
inst:JSArray<dynamic>,
inst:JSBool,
@@ -513,12 +513,12 @@
/*strong.element: testLocalFunctionInvoke:
dynamic=[call(0)],
- static=[computeSignature,
+ static=[computeSignature(3),
def:localFunction,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
localFunction(0),
- setRuntimeTypeInfo],
+ setRuntimeTypeInfo(2)],
type=[inst:Function,
inst:JSArray<dynamic>,
inst:JSExtendableArray<dynamic>,
@@ -530,11 +530,11 @@
localFunction();
}
-/*strong.element: testLocalFunctionGet:static=[computeSignature,
+/*strong.element: testLocalFunctionGet:static=[computeSignature(3),
def:localFunction,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[inst:Function,
inst:JSArray<dynamic>,
inst:JSExtendableArray<dynamic>,
@@ -546,11 +546,11 @@
localFunction;
}
-/*strong.element: testClosure:static=[computeSignature,
+/*strong.element: testClosure:static=[computeSignature(3),
def:<anonymous>,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[inst:Function,
inst:JSArray<dynamic>,
inst:JSExtendableArray<dynamic>,
@@ -563,11 +563,11 @@
/*strong.element: testClosureInvoke:
dynamic=[call(0)],
- static=[computeSignature,
+ static=[computeSignature(3),
def:<anonymous>,
- getRuntimeTypeArguments,
- getRuntimeTypeInfo,
- setRuntimeTypeInfo],
+ getRuntimeTypeArguments(3),
+ getRuntimeTypeInfo(1),
+ setRuntimeTypeInfo(2)],
type=[inst:Function,
inst:JSArray<dynamic>,
inst:JSExtendableArray<dynamic>,
diff --git a/tests/compiler/dart2js/impact/data/jsinterop.dart b/tests/compiler/dart2js/impact/data/jsinterop.dart
index b36d583..8e77d6ac 100644
--- a/tests/compiler/dart2js/impact/data/jsinterop.dart
+++ b/tests/compiler/dart2js/impact/data/jsinterop.dart
@@ -56,12 +56,12 @@
class GenericClass<T> {
/*strong.element: GenericClass.method:
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
diff --git a/tests/compiler/dart2js/impact/data/literals.dart b/tests/compiler/dart2js/impact/data/literals.dart
index 1239e44..925896a0 100644
--- a/tests/compiler/dart2js/impact/data/literals.dart
+++ b/tests/compiler/dart2js/impact/data/literals.dart
@@ -80,22 +80,35 @@
/*element: testString:type=[inst:JSString]*/
testString() => 'foo';
-/*element: testStringInterpolation:dynamic=[toString(0)],static=[S],type=[inst:JSBool,inst:JSString]*/
+/*element: testStringInterpolation:
+ dynamic=[toString(0)],
+ static=[S(1)],type=[inst:JSBool,inst:JSString]
+*/
testStringInterpolation() => '${true}';
-/*element: testStringInterpolationConst:dynamic=[toString(0)],static=[S],type=[inst:JSBool,inst:JSString]*/
+/*element: testStringInterpolationConst:
+ dynamic=[toString(0)],
+ static=[S(1)],type=[inst:JSBool,inst:JSString]
+*/
testStringInterpolationConst() {
const b = '${true}';
return b;
}
-/*element: testStringJuxtaposition:dynamic=[toString(0)],static=[S],type=[inst:JSString]*/
+/*element: testStringJuxtaposition:
+ dynamic=[toString(0)],
+ static=[S(1)],
+ type=[inst:JSString]
+*/
testStringJuxtaposition() => 'a' 'b';
-/*element: testSymbol:static=[Symbol.],type=[inst:Symbol]*/
+/*element: testSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
testSymbol() => #main;
-/*element: testConstSymbol:static=[Symbol.,Symbol.(1),Symbol.validated],type=[inst:JSString,inst:Symbol]*/
+/*element: testConstSymbol:
+ static=[Symbol.(1),Symbol.(1),Symbol.validated(1)],
+ type=[inst:JSString,inst:Symbol]
+*/
testConstSymbol() => const Symbol('main');
/*strong.element: complexSymbolField1:
@@ -104,7 +117,11 @@
*/
const complexSymbolField1 = "true".length == 4;
-/*strong.element: complexSymbolField2:dynamic=[toString(0)],static=[S],type=[inst:JSBool,inst:JSNull,inst:JSString,param:String]*/
+/*strong.element: complexSymbolField2:
+ dynamic=[toString(0)],
+ static=[S(1)],
+ type=[inst:JSBool,inst:JSNull,inst:JSString,param:String]
+*/
const complexSymbolField2 = "true" "false" "${true}${null}";
/*strong.element: complexSymbolField3:
@@ -112,20 +129,20 @@
static=[
GenericClass.generative(0),
String.fromEnvironment(1),
- Symbol.,
- assertIsSubtype,
+ Symbol.(1),
+ assertIsSubtype(5),
bool.fromEnvironment(1,defaultValue),
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
identical(2),
int.fromEnvironment(1,defaultValue),
override,
- setRuntimeTypeInfo,
+ setRuntimeTypeInfo(2),
testComplexConstSymbol,
- throwTypeError],
+ throwTypeError(1)],
type=[
inst:ConstantMap<dynamic,dynamic>,
inst:ConstantProtoMap<dynamic,dynamic>,
@@ -159,17 +176,33 @@
override: const GenericClass<int, String>.generative(),
};
-/*strong.element: complexSymbolField:static=[complexSymbolField1,complexSymbolField2,complexSymbolField3],type=[inst:JSBool,param:Object]*/
+/*strong.element: complexSymbolField:
+ static=[
+ complexSymbolField1,
+ complexSymbolField2,
+ complexSymbolField3],
+ type=[inst:JSBool,param:Object]
+*/
const complexSymbolField =
complexSymbolField1 ? complexSymbolField2 : complexSymbolField3;
-/*strong.element: testComplexConstSymbol:static=[Symbol.,Symbol.(1),Symbol.validated,complexSymbolField],type=[impl:String,inst:JSBool,inst:Symbol]*/
+/*strong.element: testComplexConstSymbol:
+ static=[Symbol.(1),Symbol.(1),Symbol.validated(1),complexSymbolField],
+ type=[impl:String,inst:JSBool,inst:Symbol]
+*/
testComplexConstSymbol() => const Symbol(complexSymbolField);
-/*element: testIfNullConstSymbol:dynamic=[Null.==],static=[Symbol.,Symbol.(1),Symbol.validated],type=[inst:JSNull,inst:JSString,inst:Symbol]*/
+/*element: testIfNullConstSymbol:
+ dynamic=[Null.==],
+ static=[Symbol.(1),Symbol.(1),Symbol.validated(1)],
+ type=[inst:JSNull,inst:JSString,inst:Symbol]
+*/
testIfNullConstSymbol() => const Symbol(null ?? 'foo');
-/*element: testTypeLiteral:static=[createRuntimeType],type=[inst:Type,inst:TypeImpl,lit:Object]*/
+/*element: testTypeLiteral:
+ static=[createRuntimeType(1)],
+ type=[inst:Type,inst:TypeImpl,lit:Object]
+*/
testTypeLiteral() => Object;
/*element: testBoolFromEnvironment:static=[bool.fromEnvironment(1)],type=[inst:JSString]*/
diff --git a/tests/compiler/dart2js/impact/data/native.dart b/tests/compiler/dart2js/impact/data/native.dart
index 47d2ce2..b314794 100644
--- a/tests/compiler/dart2js/impact/data/native.dart
+++ b/tests/compiler/dart2js/impact/data/native.dart
@@ -78,7 +78,7 @@
/*strong.element: testNativeField:
dynamic=[NativeClass.field],
- static=[defineProperty],
+ static=[defineProperty(3)],
type=[inst:JSBool,param:NativeClass]
*/
testNativeField(NativeClass c) => c.field;
diff --git a/tests/compiler/dart2js/impact/data/runtime_type.dart b/tests/compiler/dart2js/impact/data/runtime_type.dart
index 96fac37..d5d911b 100644
--- a/tests/compiler/dart2js/impact/data/runtime_type.dart
+++ b/tests/compiler/dart2js/impact/data/runtime_type.dart
@@ -64,13 +64,13 @@
dynamic=[Class2.runtimeType,toString(0)],
runtimeType=[string:Class2<int>],
static=[
- S,
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ S(1),
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -87,13 +87,13 @@
dynamic=[Class2.==,Class2.runtimeType,toString(0)],
runtimeType=[string:Class2<int>],
static=[
- S,
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ S(1),
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -111,12 +111,12 @@
dynamic=[Class2.runtimeType,Type.toString(0)],
runtimeType=[string:Class2<int>],
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -132,12 +132,12 @@
dynamic=[Class2.runtimeType,Type.==,Type.toString(0)],
runtimeType=[string:Class2<int>],
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -154,12 +154,12 @@
dynamic=[Class2.==,Class2.runtimeType,Type.==,Type.toString(0)],
runtimeType=[string:Class2<int>],
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -176,12 +176,12 @@
dynamic=[Class2.==,Class2.runtimeType,Type.toString(0)],
runtimeType=[string:Class2<int>],
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -198,12 +198,12 @@
dynamic=[Class2.runtimeType],
runtimeType=[unknown:Class2<int>],
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -219,12 +219,12 @@
dynamic=[Class1a.==,Class1a.runtimeType,Class1d.==,Class1d.runtimeType,Type.==],
runtimeType=[equals:Class1a<int>/Class1d<int>],
static=[
- checkSubtype,
- getRuntimeTypeArgument,
- getRuntimeTypeArgumentIntercepted,
- getRuntimeTypeInfo,
- getTypeArgumentByIndex,
- setRuntimeTypeInfo],
+ checkSubtype(4),
+ getRuntimeTypeArgument(3),
+ getRuntimeTypeArgumentIntercepted(4),
+ getRuntimeTypeInfo(1),
+ getTypeArgumentByIndex(2),
+ setRuntimeTypeInfo(2)],
type=[
inst:JSArray<dynamic>,
inst:JSBool,
@@ -404,14 +404,14 @@
almostToString2(1),
almostToString3(1),
almostToString4(1),
- assertIsSubtype,
+ assertIsSubtype(5),
equals1(2),
notEquals1(2),
notEquals2(2),
notEquals3(2),
notEquals4(2),
print(1),
- throwTypeError,
+ throwTypeError(1),
toString1(1),
toString2(1),
toString3(1),
diff --git a/tests/compiler/dart2js/impact/data/statements.dart b/tests/compiler/dart2js/impact/data/statements.dart
index d7b466f..4603006 100644
--- a/tests/compiler/dart2js/impact/data/statements.dart
+++ b/tests/compiler/dart2js/impact/data/statements.dart
@@ -70,7 +70,7 @@
current,
iterator,
moveNext(0)],
- static=[checkConcurrentModificationError],
+ static=[checkConcurrentModificationError(2)],
type=[
impl:Iterable<dynamic>,
inst:JSBool,
@@ -87,7 +87,7 @@
current,
iterator,
moveNext(0)],
- static=[checkConcurrentModificationError],
+ static=[checkConcurrentModificationError(2)],
type=[
impl:Iterable<dynamic>,
impl:int,
@@ -101,7 +101,7 @@
}
/*element: testTryCatch:
- static=[unwrapException],
+ static=[unwrapException(1)],
type=[
inst:PlainJavaScriptObject,
inst:UnknownJavaScriptObject]
@@ -111,7 +111,7 @@
}
/*element: testTryCatchOn:
- static=[unwrapException],
+ static=[unwrapException(1)],
type=[
catch:String,
inst:JSBool,
@@ -125,8 +125,8 @@
/*element: testTryCatchStackTrace:
static=[
- getTraceFromException,
- unwrapException],
+ getTraceFromException(1),
+ unwrapException(1)],
type=[
inst:PlainJavaScriptObject,
inst:UnknownJavaScriptObject,
@@ -144,8 +144,8 @@
/*element: testSwitchWithoutFallthrough:
static=[
- throwExpression,
- wrapException],
+ throwExpression(1),
+ wrapException(1)],
type=[
inst:JSDouble,
inst:JSInt,
@@ -171,12 +171,12 @@
}
}
-/*element: testAssert:static=[assertHelper],type=[inst:JSBool]*/
+/*element: testAssert:static=[assertHelper(1)],type=[inst:JSBool]*/
testAssert() {
assert(true);
}
-/*element: testAssertWithMessage:static=[assertTest,assertThrow],type=[inst:JSBool,inst:JSString]*/
+/*element: testAssertWithMessage:static=[assertTest(1),assertThrow(1)],type=[inst:JSBool,inst:JSString]*/
testAssertWithMessage() {
assert(true, 'ok');
}