diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ddf850faa..a32f373daa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,58 @@ The Linter was updated to `0.1.106`, which includes: dependencies by default. Instead they are precompiled on first `pub run`. Use `pub get --precompile` to get the previous behavior. +#### dart2js + +A new representation of runtime types was enabled by default. + +This change is part of a long term goal of making runtime checks cheaper and +more flexible for upcoming changes in the language. The new representation +disentangles how types and classes are represented and makes types first-class +to the compiler. This makes it possible to do certain kind of optimizations on +type checks that were not possible before and will enable us to model +non-nullable types in the near future. + +This change should not affect the semantics of your application, but it has some +relatively small visible effects that we want to highlight: + +* Types are now canonicalized, this fixes a long standing bug that Types could + not be used in switch cases (issue [17207][]). + +* Code-size changes may be visible, but the difference is small overall. It is + more visible on smaller apps because the new implementation includes more + helper methods. On large apps we have even seen an overall code-size + reduction. + +* Certain checks are a lot faster. This is less noticeable if you are compiling + apps with `-O3` where checks are omitted altogether. Even with `-O3`, the + performance of some `is` checks used by your app may improve. + +* When using `-O3` and `-O4` incorrect type annotations could surface as errors. + The old type representation was accidentally lenient on some invalid type + annotations. We have only encountered this issue on programs that were not + tested properly at the js-interop program boundary. + +* `Type.toString` has a small change that is rarely visible. For a long time + dart2js has had support to erase unused type variables. Today, when dart2js is + given `--lax-runtime-type-to-string` (currently included in `-O2`, `-O3`, and + `-O4`) and it decides to erase the type variable of a class `Foo`, then it + compiles expressions like `foo.runtimeType.toString()` to print `Foo`. With + the new representation, this will show `Foo` instead. This change may + be visible in error messages produced by type checks involving erased types. + +Because types and classes are represented separately, we will likely reevaluate +restrictions of deferred libraries in the near future. For example, we could +support referring to deferred types because types can be downloaded while +classes are not. + +In the unlikely case you run into any issues, please file a bug so we can +investigate. You can temporarily force the old type representation by passing +`--use-old-rti` to dart2js if necessary, but our goal is to delete the old type +representation soon. + + +[17207]: https://github.com/dart-lang/sdk/issues/17207 + ## 2.7.0 - 2019-12-11 **Extension methods** -- which we shipped in preview in 2.6.0 -- are no longer diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart index ebc61821a24..39bb7b74564 100644 --- a/pkg/compiler/lib/src/commandline_options.dart +++ b/pkg/compiler/lib/src/commandline_options.dart @@ -77,6 +77,7 @@ class Flags { static const String useContentSecurityPolicy = '--csp'; static const String useMultiSourceInfo = '--use-multi-source-info'; static const String useNewSourceInfo = '--use-new-source-info'; + static const String useOldRti = '--use-old-rti'; static const String verbose = '--verbose'; static const String progress = '--show-internal-progress'; static const String version = '--version'; diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart index 0fdf706c1b7..a07735de1bf 100644 --- a/pkg/compiler/lib/src/common_elements.dart +++ b/pkg/compiler/lib/src/common_elements.dart @@ -1497,10 +1497,9 @@ class CommonElementsImpl ClassEntity _typeLiteralClass; @override - ClassEntity get typeLiteralClass => - _typeLiteralClass ??= _options.experimentNewRti - ? _findRtiClass('_Type') - : _findHelperClass('TypeImpl'); + ClassEntity get typeLiteralClass => _typeLiteralClass ??= _options.useNewRti + ? _findRtiClass('_Type') + : _findHelperClass('TypeImpl'); ClassEntity _constMapLiteralClass; @override @@ -1787,7 +1786,7 @@ class CommonElementsImpl _findHelperFunction('throwNoSuchMethod'); @override - FunctionEntity get createRuntimeType => _options.experimentNewRti + FunctionEntity get createRuntimeType => _options.useNewRti ? _findRtiFunction('createRuntimeType') : _findHelperFunction('createRuntimeType'); diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart index dd132e57c2e..24bdf938486 100644 --- a/pkg/compiler/lib/src/dart2js.dart +++ b/pkg/compiler/lib/src/dart2js.dart @@ -468,6 +468,7 @@ Future compile(List argv, new OptionHandler(Flags.generateCodeWithCompileTimeErrors, ignoreOption), new OptionHandler(Flags.useMultiSourceInfo, passThrough), new OptionHandler(Flags.useNewSourceInfo, passThrough), + new OptionHandler(Flags.useOldRti, passThrough), new OptionHandler(Flags.testMode, passThrough), // Experimental features. @@ -482,7 +483,7 @@ Future compile(List argv, new OptionHandler(Flags.experimentStartupFunctions, passThrough), new OptionHandler(Flags.experimentToBoolean, passThrough), new OptionHandler(Flags.experimentCallInstrumentation, passThrough), - new OptionHandler(Flags.experimentNewRti, passThrough), + new OptionHandler(Flags.experimentNewRti, ignoreOption), // The following three options must come last. new OptionHandler('-D.+=.*', addInEnvironment), diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart index 399c1995dc4..05a38b0eb35 100644 --- a/pkg/compiler/lib/src/js_backend/backend_impact.dart +++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart @@ -168,7 +168,7 @@ class BackendImpacts { BackendImpact get typeVariableBoundCheck { return _typeVariableBoundCheck ??= new BackendImpact(staticUses: [ _commonElements.throwTypeError, - if (_options.experimentNewRti) + if (_options.useNewRti) _commonElements.checkTypeBound else _commonElements.assertIsSubtype, @@ -435,7 +435,7 @@ class BackendImpacts { _commonElements.typeLiteralClass ], staticUses: [ _commonElements.createRuntimeType, - if (_options.experimentNewRti) _commonElements.typeLiteralMaker, + if (_options.useNewRti) _commonElements.typeLiteralMaker, ]); } @@ -785,7 +785,7 @@ class BackendImpacts { _genericInstantiation[typeArgumentCount] ??= new BackendImpact(staticUses: [ _commonElements.getInstantiateFunction(typeArgumentCount), - ..._options.experimentNewRti + ..._options.useNewRti ? [ _commonElements.instantiatedGenericFunctionTypeNewRti, _commonElements.closureFunctionType @@ -802,7 +802,7 @@ class BackendImpacts { BackendImpact _newRtiImpact; // TODO(sra): Split into refined impacts. - BackendImpact get newRtiImpact => _newRtiImpact ??= _options.experimentNewRti + BackendImpact get newRtiImpact => _newRtiImpact ??= _options.useNewRti ? BackendImpact(staticUses: [ _commonElements.findType, _commonElements.instanceType, diff --git a/pkg/compiler/lib/src/js_backend/codegen_listener.dart b/pkg/compiler/lib/src/js_backend/codegen_listener.dart index bc3ac780954..00495010899 100644 --- a/pkg/compiler/lib/src/js_backend/codegen_listener.dart +++ b/pkg/compiler/lib/src/js_backend/codegen_listener.dart @@ -122,7 +122,7 @@ class CodegenEnqueuerListener extends EnqueuerListener { } // TODO(fishythefish): Avoid registering unnecessary impacts. - if (_options.experimentNewRti && !_isNewRtiUsed) { + if (_options.useNewRti && !_isNewRtiUsed) { WorldImpactBuilderImpl newRtiImpact = new WorldImpactBuilderImpl(); newRtiImpact.registerStaticUse(StaticUse.staticInvoke( _commonElements.rtiAddRulesMethod, CallStructure.TWO_ARGS)); @@ -189,7 +189,7 @@ class CodegenEnqueuerListener extends EnqueuerListener { _elementEnvironment.getThisType(_commonElements .getInstantiationClass(constant.typeArguments.length)))); - if (_options.experimentNewRti) { + if (_options.useNewRti) { impactBuilder.registerStaticUse(StaticUse.staticInvoke( _commonElements.instantiatedGenericFunctionTypeNewRti, CallStructure.TWO_ARGS)); diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart index e4b431f521c..2146a2c017f 100644 --- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart +++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart @@ -238,7 +238,7 @@ class ConstantEmitter extends ModularConstantEmitter { .toList(growable: false); jsAst.ArrayInitializer array = new jsAst.ArrayInitializer(elements); jsAst.Expression value = _makeConstantList(array); - if (_options.experimentNewRti) { + if (_options.useNewRti) { return maybeAddListTypeArgumentsNewRti(constant, constant.type, value); } else { return maybeAddTypeArguments(constant, constant.type, value); @@ -261,7 +261,7 @@ class ConstantEmitter extends ModularConstantEmitter { ]; if (_rtiNeed.classNeedsTypeArguments(classElement)) { - if (_options.experimentNewRti) { + if (_options.useNewRti) { arguments.add(_reifiedTypeNewRti(sourceType)); } else { arguments @@ -352,7 +352,7 @@ class ConstantEmitter extends ModularConstantEmitter { } if (_rtiNeed.classNeedsTypeArguments(classElement)) { - if (_options.experimentNewRti) { + if (_options.useNewRti) { arguments.add(_reifiedTypeNewRti(constant.type)); } else { arguments @@ -373,7 +373,7 @@ class ConstantEmitter extends ModularConstantEmitter { jsAst.Expression visitType(TypeConstantValue constant, [_]) { DartType type = constant.representedType.unaliased; - if (_options.experimentNewRti) { + if (_options.useNewRti) { assert(!type.containsTypeVariables); jsAst.Expression recipe = _rtiRecipeEncoder.encodeGroundRecipe( @@ -428,7 +428,7 @@ class ConstantEmitter extends ModularConstantEmitter { } }); if (_rtiNeed.classNeedsTypeArguments(constant.type.element)) { - if (_options.experimentNewRti) { + if (_options.useNewRti) { fields.add(_reifiedTypeNewRti(constant.type)); } else { fields @@ -446,7 +446,7 @@ class ConstantEmitter extends ModularConstantEmitter { List fields = [ _constantReferenceGenerator(constant.function) ]; - if (_options.experimentNewRti) { + if (_options.useNewRti) { fields .add(_reifiedTypeNewRti(InterfaceType(cls, constant.typeArguments))); } else { @@ -502,7 +502,7 @@ class ConstantEmitter extends ModularConstantEmitter { } jsAst.Expression _reifiedTypeNewRti(DartType type) { - assert(_options.experimentNewRti); + assert(_options.useNewRti); assert(!type.containsTypeVariables); return TypeReference(TypeExpressionRecipe(type))..forConstant = true; } diff --git a/pkg/compiler/lib/src/js_backend/resolution_listener.dart b/pkg/compiler/lib/src/js_backend/resolution_listener.dart index 9d16126033a..dc68980fd06 100644 --- a/pkg/compiler/lib/src/js_backend/resolution_listener.dart +++ b/pkg/compiler/lib/src/js_backend/resolution_listener.dart @@ -443,7 +443,7 @@ class ResolutionEnqueuerListener extends EnqueuerListener { _registerBackendImpact(impactBuilder, _impacts.traceHelper); } - if (_options.experimentNewRti) { + if (_options.useNewRti) { _registerBackendImpact(impactBuilder, _impacts.rtiAddRules); } diff --git a/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart index 4e5547f191b..bce1fbb9d9b 100644 --- a/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart +++ b/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart @@ -81,7 +81,7 @@ class InstantiationStubGenerator { parameters.add(new jsAst.Parameter(jsName)); } - if (_options.experimentNewRti) { + if (_options.useNewRti) { for (int i = 0; i < targetSelector.typeArgumentCount; i++) { arguments.add(js('this.#.#[#]', [ _namer.rtiFieldJsName, @@ -122,7 +122,7 @@ class InstantiationStubGenerator { jsAst.Name operatorSignature = _namer.asName(_namer.fixedNames.operatorSignature); - jsAst.Fun function = _options.experimentNewRti + jsAst.Fun function = _options.useNewRti ? _generateSignatureNewRti(functionField) : _generateSignatureLegacy(functionField); diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart index 571486ac337..4d142307fe7 100644 --- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart +++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart @@ -203,7 +203,7 @@ class MetadataCollector implements jsAst.TokenFinalizer { jsAst.Expression addTypeInOutputUnit(DartType type, OutputUnit outputUnit) { _typesMap[outputUnit] ??= new Map(); return _typesMap[outputUnit].putIfAbsent(type, () { - if (_options.experimentNewRti) { + if (_options.useNewRti) { return new _BoundMetadataEntry(_computeTypeRepresentationNewRti(type)); } else { return new _BoundMetadataEntry(_computeTypeRepresentation(type)); diff --git a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart index 482d49ee629..bbbc18d8326 100644 --- a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart +++ b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart @@ -36,7 +36,7 @@ class ParameterStubGenerator { final NativeEmitter _nativeEmitter; final Namer _namer; final RuntimeTypesEncoder _rtiEncoder; - final RecipeEncoder _rtiRecipeEncoder; // `null` if not experimentNewRti. + final RecipeEncoder _rtiRecipeEncoder; // `null` if not useNewRti. final NativeData _nativeData; final InterceptorData _interceptorData; final CodegenWorld _codegenWorld; diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart index aef7d4e8fca..3907da0e1c5 100644 --- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart +++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart @@ -246,7 +246,7 @@ class ProgramBuilder { _markEagerClasses(); - if (_options.experimentNewRti) { + if (_options.useNewRti) { associateNamedTypeVariablesNewRti(); } @@ -986,7 +986,7 @@ class ProgramBuilder { js.Expression _generateFunctionType(ClassEntity /*?*/ enclosingClass, FunctionType type, OutputUnit outputUnit) => - _options.experimentNewRti + _options.useNewRti ? _generateFunctionTypeNewRti(enclosingClass, type, outputUnit) : _generateFunctionTypeLegacy(enclosingClass, type, outputUnit); @@ -1036,7 +1036,7 @@ class ProgramBuilder { _task.nativeEmitter, _namer, _rtiEncoder, - _options.experimentNewRti ? _rtiRecipeEncoder : null, + _options.useNewRti ? _rtiRecipeEncoder : null, _nativeData, _interceptorData, _codegenWorld, diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart index 73654294fa0..7cfe426c3a3 100644 --- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart +++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart @@ -184,7 +184,7 @@ class RuntimeTypeGenerator { checkedClass, _namer.operatorIs(checkedClass), js('1')); } Substitution substitution = check.substitution; - if (substitution != null && !_options.experimentNewRti) { + if (substitution != null && !_options.useNewRti) { jsAst.Expression body = _getSubstitutionCode(emitterTask.emitter, substitution); result.addSubstitution( diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart index 8db04e0bcaf..ae6c4529e7b 100644 --- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart +++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart @@ -626,7 +626,7 @@ class FragmentEmitter { this._nativeEmitter, this._closedWorld, this._codegenWorld) { - if (_options.experimentNewRti) { + if (_options.useNewRti) { _recipeEncoder = RecipeEncoderImpl( _closedWorld, _options.disableRtiOptimization @@ -711,8 +711,7 @@ class FragmentEmitter { emitEmbeddedGlobalsPart2(program, deferredLoadingState), 'typeRules': emitTypeRules(fragment), 'variances': emitVariances(fragment), - 'sharedTypeRtis': - _options.experimentNewRti ? TypeReferenceResource() : [], + 'sharedTypeRtis': _options.useNewRti ? TypeReferenceResource() : [], 'nativeSupport': emitNativeSupport(fragment), 'jsInteropSupport': jsInteropAnalysis.buildJsInteropBootstrap( _codegenWorld, _closedWorld.nativeData, _namer) ?? @@ -843,8 +842,7 @@ class FragmentEmitter { 'types': deferredTypes, 'nativeSupport': nativeSupport, 'typesOffset': _namer.typesOffsetName, - 'sharedTypeRtis': - _options.experimentNewRti ? TypeReferenceResource() : [], + 'sharedTypeRtis': _options.useNewRti ? TypeReferenceResource() : [], }); if (_options.experimentStartupFunctions) { @@ -855,7 +853,7 @@ class FragmentEmitter { } void finalizeTypeReferences(js.Node code) { - if (!_options.experimentNewRti) return; + if (!_options.useNewRti) return; TypeReferenceFinalizer finalizer = TypeReferenceFinalizerImpl( _emitter, _commonElements, _recipeEncoder, _options.enableMinification); @@ -1931,7 +1929,7 @@ class FragmentEmitter { js.string(TYPE_TO_INTERCEPTOR_MAP), js.LiteralNull())); } - if (_options.experimentNewRti) { + if (_options.useNewRti) { globals.add(js.Property(js.string(RTI_UNIVERSE), createRtiUniverse())); } @@ -1972,7 +1970,7 @@ class FragmentEmitter { } js.Block emitTypeRules(Fragment fragment) { - if (!_options.experimentNewRti) return js.Block.empty(); + if (!_options.useNewRti) return js.Block.empty(); List statements = []; bool addJsObjectRedirections = false; @@ -2063,7 +2061,7 @@ class FragmentEmitter { } js.Statement emitVariances(Fragment fragment) { - if (!_options.enableVariance || !_options.experimentNewRti) { + if (!_options.enableVariance || !_options.useNewRti) { return js.EmptyStatement(); } diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart index 166fae9614b..9eab8f8036b 100644 --- a/pkg/compiler/lib/src/js_model/js_strategy.dart +++ b/pkg/compiler/lib/src/js_model/js_strategy.dart @@ -217,7 +217,7 @@ class JsBackendStrategy implements BackendStrategy { rtiSubstitutions = runtimeTypesImpl; } - RecipeEncoder rtiRecipeEncoder = _compiler.options.experimentNewRti + RecipeEncoder rtiRecipeEncoder = _compiler.options.useNewRti ? new RecipeEncoderImpl( closedWorld, rtiSubstitutions, diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart index a305b6fbf5f..c43954b04a4 100644 --- a/pkg/compiler/lib/src/options.dart +++ b/pkg/compiler/lib/src/options.dart @@ -328,8 +328,8 @@ class CompilerOptions implements DiagnosticOptions { /// called. bool experimentCallInstrumentation = false; - /// Experimental use of the new (Q2 2019) RTI system. - bool experimentNewRti = false; + /// Whether to use the new RTI representation (default). + bool useNewRti = true; /// The path to the file that contains the profiled allocations. /// @@ -410,7 +410,7 @@ class CompilerOptions implements DiagnosticOptions { ..experimentToBoolean = _hasOption(options, Flags.experimentToBoolean) ..experimentCallInstrumentation = _hasOption(options, Flags.experimentCallInstrumentation) - ..experimentNewRti = _hasOption(options, Flags.experimentNewRti) + ..useNewRti = !_hasOption(options, Flags.useOldRti) ..generateSourceMap = !_hasOption(options, Flags.noSourceMaps) ..outputUri = _extractUriOption(options, '--out=') ..platformBinaries = @@ -475,9 +475,10 @@ class CompilerOptions implements DiagnosticOptions { } if (benchmarkingExperiment) { - // TODO(sra): Set flags implied by '--benchmarking-x'. Initially this will - // be --experiment-new-rti, and later NNBD. - experimentNewRti = true; + // TODO(sra): Set flags implied by '--benchmarking-x'. At this time we + // use it to run the old-rti to continue comparing data with new-rti, but + // we should remove it once we start benchmarking NNBD. + useNewRti = false; } if (optimizationLevel != null) { diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart index 8f4fc842a2a..b1e8a498123 100644 --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart @@ -380,7 +380,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { case 'USE_CONTENT_SECURITY_POLICY': return options.useContentSecurityPolicy; case 'USE_NEW_RTI': - return options.experimentNewRti; + return options.useNewRti; case 'VARIANCE': return options.enableVariance; default: @@ -517,7 +517,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { "Unexpected function signature: " "$targetElement inside a non-closure: $target"); } - if (options.experimentNewRti) { + if (options.useNewRti) { _buildMethodSignatureNewRti(originalClosureNode); } else { _buildMethodSignature(originalClosureNode); @@ -805,7 +805,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { bool needsTypeArguments = closedWorld.rtiNeed.classNeedsTypeArguments(cls); if (needsTypeArguments) { - if (options.experimentNewRti) { + if (options.useNewRti) { InterfaceType thisType = _elementEnvironment.getThisType(cls); HInstruction typeArgument = _typeBuilder.analyzeTypeArgumentNewRti( thisType, sourceElement, @@ -1376,7 +1376,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { if (elementType.containsFreeTypeVariables) { // Type must be computed in the entry function, where the type variables // are in scope, and passed to the body function. - if (options.experimentNewRti) { + if (options.useNewRti) { inputs .add(_typeBuilder.analyzeTypeArgumentNewRti(elementType, function)); } else { @@ -1500,8 +1500,9 @@ class KernelSsaGraphBuilder extends ir.Visitor { bound is! VoidType && bound != _commonElements.objectType) { registry.registerTypeUse(TypeUse.typeVariableBoundCheck(bound)); - if (options.experimentNewRti) { - _checkTypeBound(newParameter, bound, local.name); + if (options.useNewRti) { + // TODO(sigmund): method name here is not minified, should it be? + _checkTypeBound(newParameter, bound, local.name, method.name); } else { _assertIsType( newParameter, @@ -3104,7 +3105,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { if (!_rtiNeed.classNeedsTypeArguments(type.element) || type.treatAsRaw) { return object; } - if (options.experimentNewRti) { + if (options.useNewRti) { // [type] could be `List`, so ensure it is `JSArray`. InterfaceType arrayType = InterfaceType(_commonElements.jsArrayClass, type.typeArguments); @@ -4046,7 +4047,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { List inputs = [closure]; List typeArguments = []; - if (options.experimentNewRti) { + if (options.useNewRti) { closedWorld.registerExtractTypeArguments(cls); HInstruction instanceType = HInstanceEnvironment(object, _abstractValueDomain.dynamicType); @@ -4695,7 +4696,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { void _handleForeignGetJSArrayInteropRti(ir.StaticInvocation invocation) { if (_unexpectedForeignArguments(invocation, minPositional: 0, maxPositional: 0) || - !options.experimentNewRti) { + !options.useNewRti) { // Result expected on stack. stack.add(graph.addConstantNull(closedWorld)); return; @@ -5334,18 +5335,21 @@ class KernelSsaGraphBuilder extends ir.Visitor { add(assertIsSubtype); } - void _checkTypeBound( - HInstruction typeInstruction, DartType bound, String variableName) { + void _checkTypeBound(HInstruction typeInstruction, DartType bound, + String variableName, String methodName) { HInstruction boundInstruction = _typeBuilder.analyzeTypeArgumentNewRti( localsHandler.substInContext(bound), sourceElement); HInstruction variableNameInstruction = graph.addConstantString(variableName, closedWorld); + HInstruction methodNameInstruction = + graph.addConstantString(methodName, closedWorld); FunctionEntity element = _commonElements.checkTypeBound; var inputs = [ typeInstruction, boundInstruction, - variableNameInstruction + variableNameInstruction, + methodNameInstruction, ]; HInstruction checkBound = new HInvokeStatic( element, inputs, typeInstruction.instructionType, const []); @@ -5430,7 +5434,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { return; } - if (options.experimentNewRti) { + if (options.useNewRti) { HInstruction rti = _typeBuilder.analyzeTypeArgumentNewRti(typeValue, sourceElement); AbstractValueWithPrecision checkedType = @@ -6055,7 +6059,7 @@ class KernelSsaGraphBuilder extends ir.Visitor { FunctionEntity function, TypeVariableType typeVariable) { DartType bound = _elementEnvironment.getTypeVariableDefaultType(typeVariable.element); - if (bound.containsTypeVariables && !options.experimentNewRti) { + if (bound.containsTypeVariables && !options.useNewRti) { // TODO(33422): Support type variables in default // types. Temporarily using the "any" type (encoded as -2) to // avoid failing on bounds checks. diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart index e63d98be6e3..2b66ad36271 100644 --- a/pkg/compiler/lib/src/ssa/optimize.dart +++ b/pkg/compiler/lib/src/ssa/optimize.dart @@ -689,7 +689,7 @@ class SsaInstructionSimplifier extends HBaseVisitor node.block.addBefore(node, splitInstruction); HInstruction typeInfo; - if (_options.experimentNewRti) { + if (_options.useNewRti) { typeInfo = HLoadType.type( _closedWorld.elementEnvironment.createInterfaceType( commonElements.jsArrayClass, [commonElements.stringType]), @@ -1409,7 +1409,7 @@ class SsaInstructionSimplifier extends HBaseVisitor DartType fieldType = _closedWorld.elementEnvironment.getFieldType(field); - if (_options.experimentNewRti) { + if (_options.useNewRti) { AbstractValueWithPrecision checkedType = _abstractValueDomain.createFromStaticType(fieldType, nullable: true); if (checkedType.isPrecise && diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart index 66a4f371b04..111510bab11 100644 --- a/pkg/compiler/lib/src/ssa/ssa.dart +++ b/pkg/compiler/lib/src/ssa/ssa.dart @@ -206,7 +206,7 @@ class SsaFunctionCompiler implements FunctionCompiler { FunctionEntity startFunction = commonElements.asyncHelperStartSync; FunctionEntity completerFactory = commonElements.asyncAwaitCompleterFactory; - List itemTypeExpression = _options.experimentNewRti + List itemTypeExpression = _options.useNewRti ? _fetchItemTypeNewRti(commonElements, registry, elementType) : _fetchItemType(codegen, emitter, elementType); @@ -243,7 +243,7 @@ class SsaFunctionCompiler implements FunctionCompiler { js.Expression code, DartType asyncTypeParameter, js.Name name) { - List itemTypeExpression = _options.experimentNewRti + List itemTypeExpression = _options.useNewRti ? _fetchItemTypeNewRti(commonElements, registry, asyncTypeParameter) : _fetchItemType(codegen, emitter, asyncTypeParameter); @@ -279,7 +279,7 @@ class SsaFunctionCompiler implements FunctionCompiler { js.Expression code, DartType asyncTypeParameter, js.Name name) { - List itemTypeExpression = _options.experimentNewRti + List itemTypeExpression = _options.useNewRti ? _fetchItemTypeNewRti(commonElements, registry, asyncTypeParameter) : _fetchItemType(codegen, emitter, asyncTypeParameter); diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart index d72ec9df928..bd064b14aa4 100644 --- a/pkg/compiler/lib/src/ssa/type_builder.dart +++ b/pkg/compiler/lib/src/ssa/type_builder.dart @@ -251,7 +251,7 @@ abstract class TypeBuilder { HInstruction analyzeTypeArgument( DartType argument, MemberEntity sourceElement, {SourceInformation sourceInformation}) { - if (builder.options.experimentNewRti) { + if (builder.options.useNewRti) { return analyzeTypeArgumentNewRti(argument, sourceElement, sourceInformation: sourceInformation); } @@ -425,7 +425,7 @@ abstract class TypeBuilder { HInstruction buildTypeConversion( HInstruction original, DartType type, int kind, {SourceInformation sourceInformation}) { - if (builder.options.experimentNewRti) { + if (builder.options.useNewRti) { return buildAsCheck(original, type, isTypeError: kind == HTypeConversion.TYPE_CHECK, sourceInformation: sourceInformation); diff --git a/sdk/lib/_internal/js_runtime/lib/rti.dart b/sdk/lib/_internal/js_runtime/lib/rti.dart index d24f0968e73..5eef1d22dc8 100644 --- a/sdk/lib/_internal/js_runtime/lib/rti.dart +++ b/sdk/lib/_internal/js_runtime/lib/rti.dart @@ -849,11 +849,11 @@ _generalTypeCheckImplementation(object) { } /// Called from generated code. -checkTypeBound(Rti type, Rti bound, variable) { +checkTypeBound(Rti type, Rti bound, variable, methodName) { if (isSubtype(_theUniverse(), type, bound)) return type; - String message = "Type '${_rtiToString(type, null)}'" - " is not a subtype of type '${_rtiToString(bound, null)}'" - " of '${_Utils.asString(variable)}'"; + String message = "The type argument '${_rtiToString(type, null)}' is not" + " a subtype of the type variable bound '${_rtiToString(bound, null)}'" + " of type variable '${_Utils.asString(variable)}' in '$methodName'."; throw _TypeError.fromMessage(message); } diff --git a/sdk_nnbd/lib/_internal/js_runtime/lib/rti.dart b/sdk_nnbd/lib/_internal/js_runtime/lib/rti.dart index 2717c6fa88b..5f1ea63005d 100644 --- a/sdk_nnbd/lib/_internal/js_runtime/lib/rti.dart +++ b/sdk_nnbd/lib/_internal/js_runtime/lib/rti.dart @@ -849,11 +849,11 @@ _generalTypeCheckImplementation(object) { } /// Called from generated code. -checkTypeBound(Rti type, Rti bound, variable) { +checkTypeBound(Rti type, Rti bound, variable, methodName) { if (isSubtype(_theUniverse(), type, bound)) return type; - String message = "Type '${_rtiToString(type, null)}'" - " is not a subtype of type '${_rtiToString(bound, null)}'" - " of '${_Utils.asString(variable)}'"; + String message = "The type argument '${_rtiToString(type, null)}' is not" + " a subtype of the type variable bound '${_rtiToString(bound, null)}'" + " of type variable '${_Utils.asString(variable)}' in '$methodName'."; throw _TypeError.fromMessage(message); } diff --git a/tests/compiler/dart2js/codegen/class_codegen_test.dart b/tests/compiler/dart2js/codegen/class_codegen_test.dart index a38938e7082..d46135e89d6 100644 --- a/tests/compiler/dart2js/codegen/class_codegen_test.dart +++ b/tests/compiler/dart2js/codegen/class_codegen_test.dart @@ -76,7 +76,8 @@ twoClasses() async { subClass() async { checkOutput(String generated) { - Expect.isTrue(generated.contains(RegExp(r'_inherit\(.\.A, .\.Object\)'))); + Expect.isTrue( + generated.contains(RegExp(r'_inheritMany\(.\.Object, .*, .\.A]'))); Expect.isTrue(generated.contains(RegExp(r'_inherit\(.\.B, .\.A\)'))); } diff --git a/tests/compiler/dart2js/codegen/use_strict_test.dart b/tests/compiler/dart2js/codegen/use_strict_test.dart index 896cbd4a27f..9dfe0f5c862 100644 --- a/tests/compiler/dart2js/codegen/use_strict_test.dart +++ b/tests/compiler/dart2js/codegen/use_strict_test.dart @@ -55,13 +55,21 @@ main() { // Skip comments. List lines = jsOutput.split("\n"); - RegExp commentLine = new RegExp(r' *//'); - String filtered = - lines.where((String line) => !commentLine.hasMatch(line)).join("\n"); - // TODO(floitsch): we will need to adjust this filter if we start using - // 'eval' or 'arguments' ourselves. Currently we disallow any 'eval' or - // 'arguments'. + // Filter out any lines unrelated to the code above where dart2js today + // produces the text "eval" or "arguments" + // Currently this includes comments, and a few lines in the body of + // Closure.cspForwardCall and Closure.cspForwardInterceptedCall. + List filters = [ + RegExp(r' *//'), // skip comments + RegExp(r'"Intercepted function with no arguments."'), + RegExp(r'f.apply\(s\(this\), arguments\)'), + RegExp(r'Array.prototype.push.apply\(a, arguments\)'), + ]; + String filtered = lines + .where((String line) => !filters.any((regexp) => regexp.hasMatch(line))) + .join("\n"); + RegExp re = new RegExp(r'[^\w$](arguments|eval)[^\w$]'); Expect.isFalse(re.hasMatch(filtered)); } diff --git a/tests/compiler/dart2js/impact/data/as.dart b/tests/compiler/dart2js/impact/data/as.dart index fd2fe102fb4..45a687fe3ca 100644 --- a/tests/compiler/dart2js/impact/data/as.dart +++ b/tests/compiler/dart2js/impact/data/as.dart @@ -9,14 +9,14 @@ main() { promoted(null); } -/*member: explicitAs:dynamic=[String.length],type=[inst:JSBool,param:String]*/ +/*member: explicitAs:dynamic=[String.length],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:String]*/ explicitAs(String i) { i.length; // ignore: unnecessary_cast return i as String; } -/*member: implicitAs:dynamic=[String.length],type=[inst:JSBool,param:String]*/ +/*member: implicitAs:dynamic=[String.length],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:String]*/ String implicitAs(String i) { dynamic j = i; i.length; @@ -24,7 +24,7 @@ String implicitAs(String i) { return j; } -/*member: promoted:dynamic=[String.length],type=[inst:JSBool,inst:JSNull,is:String]*/ +/*member: promoted:dynamic=[String.length],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,is:String]*/ String promoted(dynamic i) { if (i is! String) return null; i.length; diff --git a/tests/compiler/dart2js/impact/data/async.dart b/tests/compiler/dart2js/impact/data/async.dart index 0684ce77a94..541c67fb286 100644 --- a/tests/compiler/dart2js/impact/data/async.dart +++ b/tests/compiler/dart2js/impact/data/async.dart @@ -217,50 +217,13 @@ testAnonymousAsyncStar() { return () async* {}; } -/*member: testAsyncForIn: - dynamic=[ - _StreamIterator.cancel(0), - _StreamIterator.current, - _StreamIterator.moveNext(0)], - static=[ - StreamIterator.(1), - _asyncAwait(2), - _asyncRethrow(2), - _asyncReturn(2), - _asyncStartSync(2), - _makeAsyncAwaitCompleter(0), - _wrapJsFunctionForAsync(1)], - type=[ - impl:Stream, - inst:JSBool, - inst:JSNull, - inst:Null] -*/ +/*member: testAsyncForIn:dynamic=[_StreamIterator.cancel(0),_StreamIterator.current,_StreamIterator.moveNext(0)],static=[Rti._bind(1),Rti._eval(1),StreamIterator.(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_asyncAwait(2),_asyncRethrow(2),_asyncReturn(2),_asyncStartSync(2),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),_makeAsyncAwaitCompleter(0),_wrapJsFunctionForAsync(1),findType(1),instanceType(1)],type=[impl:Stream,inst:Closure,inst:JSBool,inst:JSNull,inst:Null]*/ testAsyncForIn(o) async { // ignore: UNUSED_LOCAL_VARIABLE await for (var e in o) {} } -/*member: testAsyncForInTyped: - dynamic=[ - _StreamIterator.cancel(0), - _StreamIterator.current, - _StreamIterator.moveNext(0)], - static=[ - StreamIterator.(1), - _asyncAwait(2), - _asyncRethrow(2), - _asyncReturn(2), - _asyncStartSync(2), - _makeAsyncAwaitCompleter(0), - _wrapJsFunctionForAsync(1)], - type=[ - impl:Stream, - impl:int, - inst:JSBool, - inst:JSNull, - inst:Null] -*/ +/*member: testAsyncForInTyped:dynamic=[_StreamIterator.cancel(0),_StreamIterator.current,_StreamIterator.moveNext(0)],static=[Rti._bind(1),Rti._eval(1),StreamIterator.(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_asyncAwait(2),_asyncRethrow(2),_asyncReturn(2),_asyncStartSync(2),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),_makeAsyncAwaitCompleter(0),_wrapJsFunctionForAsync(1),findType(1),instanceType(1)],type=[impl:Stream,impl:int,inst:Closure,inst:JSBool,inst:JSNull,inst:Null]*/ testAsyncForInTyped(o) async { // ignore: UNUSED_LOCAL_VARIABLE await for (int e in o) {} diff --git a/tests/compiler/dart2js/impact/data/classes.dart b/tests/compiler/dart2js/impact/data/classes.dart index 9c5076dcdc5..bb334a7e87d 100644 --- a/tests/compiler/dart2js/impact/data/classes.dart +++ b/tests/compiler/dart2js/impact/data/classes.dart @@ -137,10 +137,7 @@ class ForwardingConstructorClass = ForwardingConstructorSuperClass testForwardingConstructor() => new ForwardingConstructorClass(null); class ForwardingConstructorTypedSuperClass { - /*member: ForwardingConstructorTypedSuperClass.: - static=[Object.(0)], - type=[inst:JSBool,param:int] - */ + /*member: ForwardingConstructorTypedSuperClass.:static=[Object.(0),Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:int]*/ ForwardingConstructorTypedSuperClass(int arg); } @@ -154,45 +151,21 @@ class ForwardingConstructorTypedClass = ForwardingConstructorTypedSuperClass testForwardingConstructorTyped() => new ForwardingConstructorTypedClass(null); class ForwardingConstructorGenericSuperClass { - /*member: ForwardingConstructorGenericSuperClass.: - static=[ - Object.(0), - checkSubtype(4), - checkSubtypeOfRuntimeType(2), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - param:ForwardingConstructorGenericSuperClass.T] - */ + /*member: ForwardingConstructorGenericSuperClass.:static=[Object.(0),Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),checkSubtypeOfRuntimeType(2),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:ForwardingConstructorGenericSuperClass.T]*/ ForwardingConstructorGenericSuperClass(T arg); } class ForwardingConstructorGenericClass< S> = ForwardingConstructorGenericSuperClass with EmptyMixin; -/*member: testForwardingConstructorGeneric: - static=[ - ForwardingConstructorGenericClass.(1), - assertIsSubtype(5), - throwTypeError(1)], - type=[inst:JSNull] -*/ +/*member: testForwardingConstructorGeneric:static=[ForwardingConstructorGenericClass.(1),checkTypeBound(4),throwTypeError(1)],type=[inst:JSNull]*/ testForwardingConstructorGeneric() { new ForwardingConstructorGenericClass(null); } enum Enum { A } -/*strong.member: testEnum: +/*member: testEnum: static=[ Enum._name=StringConstant("Enum.A"), Enum.index=IntConstant(0)], @@ -208,26 +181,7 @@ enum Enum { A } */ testEnum() => Enum.A; -/*member: staticGenericMethod: - static=[ - checkSubtype(4), - checkSubtypeOfRuntimeType(2), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - inst:List, - param:Object, - param:staticGenericMethod.T] -*/ +/*member: staticGenericMethod:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),checkSubtypeOfRuntimeType(2),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,inst:List,param:Object,param:staticGenericMethod.T]*/ List staticGenericMethod(T arg) => [arg]; /*member: testStaticGenericMethod: @@ -238,14 +192,7 @@ testStaticGenericMethod() { staticGenericMethod(true); } -/*member: testInstanceGenericMethod: - dynamic=[exact:GenericClass.genericMethod(1)], - static=[ - GenericClass.generative(0), - assertIsSubtype(5), - throwTypeError(1)], - type=[inst:JSBool] -*/ +/*member: testInstanceGenericMethod:dynamic=[exact:GenericClass.genericMethod(1)],static=[GenericClass.generative(0),checkTypeBound(4),throwTypeError(1)],type=[inst:JSBool]*/ testInstanceGenericMethod() { new GenericClass.generative().genericMethod(false); } @@ -267,20 +214,10 @@ testMixinInstantiation() => new Sub(); /*member: testNamedMixinInstantiation:static=[NamedMixin.(0)]*/ testNamedMixinInstantiation() => new NamedMixin(); -/*member: testGenericMixinInstantiation: - static=[ - GenericSub.(0), - assertIsSubtype(5), - throwTypeError(1)] -*/ +/*member: testGenericMixinInstantiation:static=[GenericSub.(0),checkTypeBound(4),throwTypeError(1)]*/ testGenericMixinInstantiation() => new GenericSub(); -/*member: testGenericNamedMixinInstantiation: - static=[ - GenericNamedMixin.(0), - assertIsSubtype(5), - throwTypeError(1)] -*/ +/*member: testGenericNamedMixinInstantiation:static=[GenericNamedMixin.(0),checkTypeBound(4),throwTypeError(1)]*/ testGenericNamedMixinInstantiation() => new GenericNamedMixin(); class Class { @@ -291,27 +228,7 @@ class Class { class GenericClass { const GenericClass.generative(); - /*member: GenericClass.genericMethod: - static=[ - checkSubtype(4), - checkSubtypeOfRuntimeType(2), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - inst:Map, - param:Object, - param:genericMethod.T] - */ + /*member: GenericClass.genericMethod:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),checkSubtypeOfRuntimeType(2),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,inst:Map,param:Object,param:genericMethod.T]*/ Map genericMethod(T arg) => {null: arg}; } diff --git a/tests/compiler/dart2js/impact/data/constants/lib.dart b/tests/compiler/dart2js/impact/data/constants/lib.dart index fd209741566..a8968631c49 100644 --- a/tests/compiler/dart2js/impact/data/constants/lib.dart +++ b/tests/compiler/dart2js/impact/data/constants/lib.dart @@ -42,7 +42,7 @@ const instanceConstantField = const Class(true, false); const typeLiteralField = String; -/*member: id:static=[checkSubtype(4),checkSubtypeOfRuntimeType(2),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),setRuntimeTypeInfo(2)],type=[inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:Object,param:id.T]*/ +/*member: id:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),checkSubtypeOfRuntimeType(2),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:Object,param:id.T]*/ T id(T t) => t; const int Function(int) _instantiation = id; diff --git a/tests/compiler/dart2js/impact/data/constants/main.dart b/tests/compiler/dart2js/impact/data/constants/main.dart index b971c4f5262..81913aaacb9 100644 --- a/tests/compiler/dart2js/impact/data/constants/main.dart +++ b/tests/compiler/dart2js/impact/data/constants/main.dart @@ -101,19 +101,19 @@ stringMapLiteral() => const {'foo': false}; /*member: setLiteral:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:_UnmodifiableSet]*/ setLiteral() => const {true, false}; -/*strong.member: instanceConstant: +/*member: instanceConstant: static=[Class.field2=BoolConstant(false),SuperClass.field1=BoolConstant(true)], type=[const:Class,inst:JSBool] */ instanceConstant() => const Class(true, false); -/*member: typeLiteral:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String]*/ +/*member: typeLiteral:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String]*/ typeLiteral() { const dynamic local = String; return local; } -/*member: instantiation:static=[extractFunctionTypeObjectFromInternal(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1]*/ +/*member: instantiation:static=[closureFunctionType(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1]*/ instantiation() { const int Function(int) local = id; return local; @@ -131,103 +131,103 @@ staticTearOff() { return local; } -/*strong.member: nullLiteralRef:type=[inst:JSNull]*/ +/*member: nullLiteralRef:type=[inst:JSNull]*/ nullLiteralRef() => nullLiteralField; -/*strong.member: boolLiteralRef:type=[inst:JSBool]*/ +/*member: boolLiteralRef:type=[inst:JSBool]*/ boolLiteralRef() => boolLiteralField; -/*strong.member: intLiteralRef:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ +/*member: intLiteralRef:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ intLiteralRef() => intLiteralField; -/*strong.member: doubleLiteralRef:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ +/*member: doubleLiteralRef:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ doubleLiteralRef() => doubleLiteralField; -/*strong.member: stringLiteralRef:type=[inst:JSString]*/ +/*member: stringLiteralRef:type=[inst:JSString]*/ stringLiteralRef() => stringLiteralField; -/*strong.member: symbolLiteralRef:static=[Symbol.(1)],type=[inst:Symbol]*/ +/*member: symbolLiteralRef:static=[Symbol.(1)],type=[inst:Symbol]*/ symbolLiteralRef() => symbolLiteralField; -/*strong.member: listLiteralRef:type=[inst:JSBool,inst:List]*/ +/*member: listLiteralRef:type=[inst:JSBool,inst:List]*/ listLiteralRef() => listLiteralField; -/*strong.member: mapLiteralRef:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool]*/ +/*member: mapLiteralRef:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool]*/ mapLiteralRef() => mapLiteralField; -/*strong.member: stringMapLiteralRef:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:JSString]*/ +/*member: stringMapLiteralRef:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:JSString]*/ stringMapLiteralRef() => stringMapLiteralField; -/*strong.member: setLiteralRef:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:_UnmodifiableSet]*/ +/*member: setLiteralRef:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:_UnmodifiableSet]*/ setLiteralRef() => setLiteralField; -/*strong.member: instanceConstantRef: +/*member: instanceConstantRef: static=[Class.field2=BoolConstant(false),SuperClass.field1=BoolConstant(true)], type=[const:Class,inst:JSBool] */ instanceConstantRef() => instanceConstantField; -/*strong.member: typeLiteralRef:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String]*/ +/*member: typeLiteralRef:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String]*/ typeLiteralRef() => typeLiteralField; -/*strong.member: instantiationRef:static=[extractFunctionTypeObjectFromInternal(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1]*/ +/*member: instantiationRef:static=[closureFunctionType(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1]*/ instantiationRef() => instantiationField; -/*strong.member: topLevelTearOffRef:static=[topLevelMethod]*/ +/*member: topLevelTearOffRef:static=[topLevelMethod]*/ topLevelTearOffRef() => topLevelTearOffField; -/*strong.member: staticTearOffRef:static=[Class.staticMethodField]*/ +/*member: staticTearOffRef:static=[Class.staticMethodField]*/ staticTearOffRef() => staticTearOffField; -/*strong.member: nullLiteralDeferred:type=[inst:JSNull]*/ +/*member: nullLiteralDeferred:type=[inst:JSNull]*/ nullLiteralDeferred() => defer.nullLiteralField; -/*strong.member: boolLiteralDeferred:type=[inst:JSBool]*/ +/*member: boolLiteralDeferred:type=[inst:JSBool]*/ boolLiteralDeferred() => defer.boolLiteralField; -/*strong.member: intLiteralDeferred:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ +/*member: intLiteralDeferred:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ intLiteralDeferred() => defer.intLiteralField; -/*strong.member: doubleLiteralDeferred:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ +/*member: doubleLiteralDeferred:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ doubleLiteralDeferred() => defer.doubleLiteralField; -/*strong.member: stringLiteralDeferred:type=[inst:JSString]*/ +/*member: stringLiteralDeferred:type=[inst:JSString]*/ stringLiteralDeferred() => defer.stringLiteralField; // TODO(johnniwinther): Should we record that this is deferred? -/*strong.member: symbolLiteralDeferred:static=[Symbol.(1)],type=[inst:Symbol]*/ +/*member: symbolLiteralDeferred:static=[Symbol.(1)],type=[inst:Symbol]*/ symbolLiteralDeferred() => defer.symbolLiteralField; // TODO(johnniwinther): Should we record that this is deferred? -/*strong.member: listLiteralDeferred:type=[inst:JSBool,inst:List]*/ +/*member: listLiteralDeferred:type=[inst:JSBool,inst:List]*/ listLiteralDeferred() => defer.listLiteralField; // TODO(johnniwinther): Should we record that this is deferred? -/*strong.member: mapLiteralDeferred:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool]*/ +/*member: mapLiteralDeferred:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool]*/ mapLiteralDeferred() => defer.mapLiteralField; // TODO(johnniwinther): Should we record that this is deferred? -/*strong.member: stringMapLiteralDeferred:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:JSString]*/ +/*member: stringMapLiteralDeferred:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:JSString]*/ stringMapLiteralDeferred() => defer.stringMapLiteralField; // TODO(johnniwinther): Should we record that this is deferred? -/*strong.member: setLiteralDeferred:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:_UnmodifiableSet]*/ +/*member: setLiteralDeferred:type=[inst:ConstantMap,inst:ConstantProtoMap,inst:ConstantStringMap,inst:GeneralConstantMap,inst:JSBool,inst:_UnmodifiableSet]*/ setLiteralDeferred() => defer.setLiteralField; -/*strong.member: instanceConstantDeferred: +/*member: instanceConstantDeferred: static=[Class.field2=BoolConstant(false),SuperClass.field1=BoolConstant(true)], type=[const:Class{defer},inst:JSBool] */ instanceConstantDeferred() => defer.instanceConstantField; -/*strong.member: typeLiteralDeferred:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String{defer}]*/ +/*member: typeLiteralDeferred:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String{defer}]*/ typeLiteralDeferred() => defer.typeLiteralField; -/*strong.member: instantiationDeferred:static=[extractFunctionTypeObjectFromInternal(1),id{defer},instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1]*/ +/*member: instantiationDeferred:static=[closureFunctionType(1),id{defer},instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1]*/ instantiationDeferred() => defer.instantiationField; -/*strong.member: topLevelTearOffDeferred:static=[topLevelMethod{defer}]*/ +/*member: topLevelTearOffDeferred:static=[topLevelMethod{defer}]*/ topLevelTearOffDeferred() => defer.topLevelTearOffField; -/*strong.member: staticTearOffDeferred:static=[Class.staticMethodField{defer}]*/ +/*member: staticTearOffDeferred:static=[Class.staticMethodField{defer}]*/ staticTearOffDeferred() => defer.staticTearOffField; diff --git a/tests/compiler/dart2js/impact/data/constructors.dart b/tests/compiler/dart2js/impact/data/constructors.dart index 22dd2e09216..2d6b9919c41 100644 --- a/tests/compiler/dart2js/impact/data/constructors.dart +++ b/tests/compiler/dart2js/impact/data/constructors.dart @@ -49,7 +49,7 @@ testConstructorInvoke() { new Class.generative(); } -/*member: testConstructorInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/ +/*member: testConstructorInvokeGeneric:static=[GenericClass.generative(0),checkTypeBound(4),throwTypeError(1)]*/ testConstructorInvokeGeneric() { new GenericClass.generative(); } @@ -69,7 +69,7 @@ testFactoryInvoke() { new Class.fact(); } -/*member: testFactoryInvokeGeneric:static=[GenericClass.fact(0),assertIsSubtype(5),throwTypeError(1)]*/ +/*member: testFactoryInvokeGeneric:static=[GenericClass.fact(0),checkTypeBound(4),throwTypeError(1)]*/ testFactoryInvokeGeneric() { new GenericClass.fact(); } @@ -89,7 +89,7 @@ testRedirectingFactoryInvoke() { new Class.redirect(); } -/*member: testRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/ +/*member: testRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),checkTypeBound(4),throwTypeError(1)]*/ testRedirectingFactoryInvokeGeneric() { new GenericClass.redirect(); } @@ -104,22 +104,22 @@ testRedirectingFactoryInvokeGenericDynamic() { new GenericClass.redirect(); } -/*strong.member: testConstRedirectingFactoryInvoke:type=[const:Class]*/ +/*member: testConstRedirectingFactoryInvoke:type=[const:Class]*/ testConstRedirectingFactoryInvoke() { const Class.redirect(); } -/*strong.member: testConstRedirectingFactoryInvokeGeneric:type=[const:GenericClass]*/ +/*member: testConstRedirectingFactoryInvokeGeneric:type=[const:GenericClass]*/ testConstRedirectingFactoryInvokeGeneric() { const GenericClass.redirect(); } -/*strong.member: testConstRedirectingFactoryInvokeGenericRaw:type=[const:GenericClass]*/ +/*member: testConstRedirectingFactoryInvokeGenericRaw:type=[const:GenericClass]*/ testConstRedirectingFactoryInvokeGenericRaw() { const GenericClass.redirect(); } -/*strong.member: testConstRedirectingFactoryInvokeGenericDynamic:type=[const:GenericClass]*/ +/*member: testConstRedirectingFactoryInvokeGenericDynamic:type=[const:GenericClass]*/ testConstRedirectingFactoryInvokeGenericDynamic() { const GenericClass.redirect(); } @@ -152,7 +152,7 @@ class GenericClass { /*member: GenericClass.generative:static=[Object.(0)]*/ const GenericClass.generative(); - /*member: GenericClass.fact:type=[inst:JSBool,inst:JSNull,param:Object]*/ + /*member: GenericClass.fact:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Object]*/ factory GenericClass.fact() => null; const factory GenericClass.redirect() = GenericClass.generative; diff --git a/tests/compiler/dart2js/impact/data/effectively_final.dart b/tests/compiler/dart2js/impact/data/effectively_final.dart index 99828457e60..2b5f3cd1cee 100644 --- a/tests/compiler/dart2js/impact/data/effectively_final.dart +++ b/tests/compiler/dart2js/impact/data/effectively_final.dart @@ -67,19 +67,7 @@ notEffectivelyFinalList() { /*member: _method1:type=[inst:JSNull]*/ num _method1() => null; -/*member: effectivelyFinalPromoted: - dynamic=[int.+,num.+], - static=[_method1(0)], - type=[ - inst:JSBool, - inst:JSDouble, - inst:JSInt, - inst:JSNumber, - inst:JSPositiveInt, - inst:JSUInt31, - inst:JSUInt32, - is:int] -*/ +/*member: effectivelyFinalPromoted:dynamic=[int.+,num.+],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),_method1(0),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32,is:int]*/ effectivelyFinalPromoted() { dynamic c = _method1(); c + 0; @@ -91,20 +79,7 @@ effectivelyFinalPromoted() { /*member: _method2:type=[inst:JSNull]*/ String _method2() => null; -/*member: effectivelyFinalPromotedInvalid: - dynamic=[String.+,int.+], - static=[_method2(0)], - type=[ - inst:JSBool, - inst:JSDouble, - inst:JSInt, - inst:JSNumber, - inst:JSPositiveInt, - inst:JSString, - inst:JSUInt31, - inst:JSUInt32, - is:int] -*/ +/*member: effectivelyFinalPromotedInvalid:dynamic=[String.+,int.+],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),_method2(0),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSString,inst:JSUInt31,inst:JSUInt32,is:int]*/ effectivelyFinalPromotedInvalid() { dynamic c = _method2(); c + ''; diff --git a/tests/compiler/dart2js/impact/data/expressions.dart b/tests/compiler/dart2js/impact/data/expressions.dart index 612c3ce0874..ef74e9487ad 100644 --- a/tests/compiler/dart2js/impact/data/expressions.dart +++ b/tests/compiler/dart2js/impact/data/expressions.dart @@ -105,204 +105,58 @@ testPreInc(o) => ++o; */ testPreDec(o) => --o; -/*member: testIs:type=[inst:JSBool,inst:JSNull,is:Class]*/ +/*member: testIs:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,is:Class]*/ testIs() => null is Class; -/*member: testIsGeneric: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - is:GenericClass] - */ +/*member: testIsGeneric:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,is:GenericClass]*/ testIsGeneric() => null is GenericClass; -/*member: testIsGenericRaw: - type=[inst:JSBool,inst:JSNull,is:GenericClass] -*/ +/*member: testIsGenericRaw:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,is:GenericClass]*/ testIsGenericRaw() => null is GenericClass; -/*member: testIsGenericDynamic: - type=[inst:JSBool,inst:JSNull,is:GenericClass] -*/ +/*member: testIsGenericDynamic:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,is:GenericClass]*/ testIsGenericDynamic() => null is GenericClass; -/*member: testIsNot:type=[inst:JSBool,inst:JSNull,is:Class]*/ +/*member: testIsNot:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,is:Class]*/ testIsNot() => null is! Class; -/*member: testIsNotGeneric: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - is:GenericClass] -*/ +/*member: testIsNotGeneric:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,is:GenericClass]*/ testIsNotGeneric() => null is! GenericClass; -/*member: testIsNotGenericRaw: - type=[inst:JSBool,inst:JSNull,is:GenericClass] -*/ +/*member: testIsNotGenericRaw:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,is:GenericClass]*/ testIsNotGenericRaw() => null is! GenericClass; -/*member: testIsNotGenericDynamic: - type=[inst:JSBool,inst:JSNull,is:GenericClass] -*/ +/*member: testIsNotGenericDynamic:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,is:GenericClass]*/ testIsNotGenericDynamic() => null is! GenericClass; -/*member: testIsTypedef: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - is:dynamic Function()] -*/ +/*member: testIsTypedef:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,is:dynamic Function()]*/ testIsTypedef() => null is Typedef; -/*member: testIsTypedefGeneric: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - is:int Function(String)]*/ +/*member: testIsTypedefGeneric:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,is:int Function(String)]*/ testIsTypedefGeneric() => null is GenericTypedef; -/*member: testIsTypedefGenericRaw: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - is:dynamic Function(dynamic)]*/ +/*member: testIsTypedefGenericRaw:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,is:dynamic Function(dynamic)]*/ testIsTypedefGenericRaw() => null is GenericTypedef; -/*member: testIsTypedefGenericDynamic: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - is:dynamic Function(dynamic)]*/ +/*member: testIsTypedefGenericDynamic:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,is:dynamic Function(dynamic)]*/ testIsTypedefGenericDynamic() => null is GenericTypedef; -/*member: testIsTypedefDeep: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - is:List]*/ +/*member: testIsTypedefDeep:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,is:List]*/ testIsTypedefDeep() => null is List>; -/*member: testAs: - static=[throwRuntimeError(1)], - type=[as:Class,inst:JSBool] -*/ +/*member: testAs:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1),throwRuntimeError(1)],type=[as:Class,inst:Closure,inst:JSBool]*/ // ignore: UNNECESSARY_CAST testAs(dynamic o) => o as Class; -/*member: testAsGeneric:static=[checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2), - throwRuntimeError(1)], - type=[as:GenericClass, - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray]*/ +/*member: testAsGeneric:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2),throwRuntimeError(1)],type=[as:GenericClass,inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray]*/ // ignore: UNNECESSARY_CAST testAsGeneric(dynamic o) => o as GenericClass; -/*member: testAsGenericRaw: - static=[throwRuntimeError(1)], - type=[as:GenericClass,inst:JSBool] -*/ +/*member: testAsGenericRaw:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1),throwRuntimeError(1)],type=[as:GenericClass,inst:Closure,inst:JSBool]*/ // ignore: UNNECESSARY_CAST testAsGenericRaw(dynamic o) => o as GenericClass; -/*member: testAsGenericDynamic: - static=[throwRuntimeError(1)], - type=[as:GenericClass,inst:JSBool] -*/ +/*member: testAsGenericDynamic:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1),throwRuntimeError(1)],type=[as:GenericClass,inst:Closure,inst:JSBool]*/ // ignore: UNNECESSARY_CAST testAsGenericDynamic(dynamic o) => o as GenericClass; @@ -314,7 +168,7 @@ testThrow() => throw ''; /*member: testIfNotNull:dynamic=[Object.==,foo],type=[inst:JSNull]*/ testIfNotNull(o) => o?.foo; -/*member: testTypedIfNotNull:dynamic=[Class.==,Class.field],type=[inst:JSBool,inst:JSNull,param:Class]*/ +/*member: testTypedIfNotNull:dynamic=[Class.==,Class.field],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class]*/ testTypedIfNotNull(Class o) => o?.field; /*member: testIfNotNullSet:dynamic=[Object.==,foo=],type=[inst:JSBool,inst:JSNull]*/ diff --git a/tests/compiler/dart2js/impact/data/extract_type_arguments.dart b/tests/compiler/dart2js/impact/data/extract_type_arguments.dart index 9971b617b23..ef75dc86e36 100644 --- a/tests/compiler/dart2js/impact/data/extract_type_arguments.dart +++ b/tests/compiler/dart2js/impact/data/extract_type_arguments.dart @@ -12,49 +12,10 @@ class B {} /*member: C.:static=[Object.(0)]*/ class C implements A, B {} -/*member: testA: - dynamic=[call(0)], - static=[ - checkSubtype(4), - extractTypeArguments>(2), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - impl:A, - impl:Function, - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray,is:A] -*/ +/*member: testA:dynamic=[call(0)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),extractTypeArguments>(2),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[impl:A,impl:Function,inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,is:A]*/ testA(c, f) => extractTypeArguments(c, f); -/*member: testB: - dynamic=[call(0)], - static=[ - checkSubtype(4), - extractTypeArguments>(2), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - impl:B, - impl:Function, - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - is:B] -*/ +/*member: testB:dynamic=[call(0)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),extractTypeArguments>(2),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[impl:B,impl:Function,inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,is:B]*/ testB(c, f) => extractTypeArguments(c, f); /*member: main:static=[C.(0),testA(2),testB(2)],type=[inst:JSNull]*/ diff --git a/tests/compiler/dart2js/impact/data/future_or.dart b/tests/compiler/dart2js/impact/data/future_or.dart index 40cdeea6889..acf5373d5e2 100644 --- a/tests/compiler/dart2js/impact/data/future_or.dart +++ b/tests/compiler/dart2js/impact/data/future_or.dart @@ -4,12 +4,7 @@ import "dart:async"; -/*member: main: - dynamic=[runtimeType], - runtimeType=[unknown:FutureOr], - static=[Future.value(1),assertIsSubtype(5),print(1),throwTypeError(1)], - type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32] -*/ +/*member: main:dynamic=[runtimeType],runtimeType=[unknown:FutureOr],static=[Future.value(1),checkTypeBound(4),print(1),throwTypeError(1)],type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ @pragma('dart2js:disableFinal') void main() { FutureOr i = new Future.value(0); diff --git a/tests/compiler/dart2js/impact/data/initializers.dart b/tests/compiler/dart2js/impact/data/initializers.dart index 9dce347545f..c083e9da250 100644 --- a/tests/compiler/dart2js/impact/data/initializers.dart +++ b/tests/compiler/dart2js/impact/data/initializers.dart @@ -28,10 +28,10 @@ main() { testGenericClass(); } -/*strong.member: testDefaultValuesPositional:type=[inst:JSBool,param:bool]*/ +/*member: testDefaultValuesPositional:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:bool]*/ testDefaultValuesPositional([bool value = false]) {} -/*strong.member: testDefaultValuesNamed:type=[inst:JSBool,param:bool]*/ +/*member: testDefaultValuesNamed:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:bool]*/ testDefaultValuesNamed({bool value: false}) {} class ClassFieldInitializer1 { @@ -84,7 +84,7 @@ testFieldInitializer3() { /*member: ClassInstanceFieldWithInitializer.:static=[Object.(0)]*/ class ClassInstanceFieldWithInitializer { - /*member: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool,param:bool]*/ + /*member: ClassInstanceFieldWithInitializer.field:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:bool]*/ var field = false; } @@ -93,7 +93,7 @@ testInstanceFieldWithInitializer() => new ClassInstanceFieldWithInitializer(); /*member: ClassInstanceFieldTyped.:static=[Object.(0)]*/ class ClassInstanceFieldTyped { - /*member: ClassInstanceFieldTyped.field:type=[inst:JSBool,inst:JSNull,param:int]*/ + /*member: ClassInstanceFieldTyped.field:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:int]*/ int field; } @@ -120,27 +120,9 @@ class ClassSuperInitializer extends ClassThisInitializer { testSuperInitializer() => new ClassSuperInitializer(); class ClassGeneric { - /*member: ClassGeneric.: - static=[ - Object.(0), - checkSubtype(4), - checkSubtypeOfRuntimeType(2), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - param:ClassGeneric.T] - */ + /*member: ClassGeneric.:static=[Object.(0),Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),checkSubtypeOfRuntimeType(2),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:ClassGeneric.T]*/ ClassGeneric(T arg); } -/*member: testGenericClass:static=[ClassGeneric.(1),assertIsSubtype(5),throwTypeError(1)],type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ +/*member: testGenericClass:static=[ClassGeneric.(1),checkTypeBound(4),throwTypeError(1)],type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/ testGenericClass() => new ClassGeneric(0); diff --git a/tests/compiler/dart2js/impact/data/injected_cast.dart b/tests/compiler/dart2js/impact/data/injected_cast.dart index 9fa188cee08..92ea4a3ae8a 100644 --- a/tests/compiler/dart2js/impact/data/injected_cast.dart +++ b/tests/compiler/dart2js/impact/data/injected_cast.dart @@ -14,17 +14,11 @@ class E {} /*member: Class1.:static=[Object.(0)]*/ class Class1 { - /*member: Class1.field1:type=[inst:JSBool,inst:JSNull,param:A]*/ + /*member: Class1.field1:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:A]*/ A field1; } -/*member: method1: - dynamic=[Class1.field1=], - type=[ - impl:A, - inst:JSBool, - is:Class1] -*/ +/*member: method1:dynamic=[Class1.field1=],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[impl:A,inst:Closure,inst:JSBool,is:Class1]*/ method1(dynamic o, dynamic value) { if (o is! Class1) return; o.field1 = value; @@ -54,19 +48,11 @@ method2(dynamic o, dynamic value) { /*member: Class3.:static=[Object.(0)]*/ class Class3 { - /*member: Class3.method3:type=[inst:JSBool,inst:JSNull,param:A,param:B,param:C]*/ + /*member: Class3.method3:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:A,param:B,param:C]*/ method3(A a, [B b, C c]) {} } -/*member: method3: - dynamic=[Class3.method3(3)], - type=[ - impl:A, - impl:C, - inst:JSBool, - is:Class3, - param:B] -*/ +/*member: method3:dynamic=[Class3.method3(3)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[impl:A,impl:C,inst:Closure,inst:JSBool,is:Class3,param:B]*/ method3(dynamic o, dynamic a, B b, dynamic c) { if (o is! Class3) return; o.method3(a, b, c); @@ -74,21 +60,11 @@ method3(dynamic o, dynamic a, B b, dynamic c) { /*member: Class4.:static=[Object.(0)]*/ class Class4 { - /*member: Class4.method4: - type=[inst:JSBool,inst:JSNull,param:A,param:B,param:C] - */ + /*member: Class4.method4:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:A,param:B,param:C]*/ method4(A a, {B b, C c}) {} } -/*member: method4: - dynamic=[Class4.method4(1,b,c)], - type=[ - impl:A, - impl:C, - inst:JSBool, - is:Class4, - param:B] -*/ +/*member: method4:dynamic=[Class4.method4(1,b,c)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[impl:A,impl:C,inst:Closure,inst:JSBool,is:Class4,param:B]*/ method4(dynamic o, dynamic a, B b, dynamic c) { if (o is! Class4) return; o.method4(a, c: c, b: b); @@ -166,10 +142,7 @@ class Class7 { A Function(A) get f => null; } -/*member: method7: - dynamic=[Class7.f(1),call(1)], - type=[impl:A,inst:JSBool,is:Class7] -*/ +/*member: method7:dynamic=[Class7.f(1),call(1)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[impl:A,inst:Closure,inst:JSBool,is:Class7]*/ method7(dynamic o, dynamic a) { if (o is! Class7) return; o.f(a); @@ -197,10 +170,7 @@ method8(dynamic g, Iterable iterable) { return g.method(iterable); } -/*member: method9: - dynamic=[G.field=], - type=[impl:int,inst:JSBool,inst:JSNull,is:G,param:num] -*/ +/*member: method9:dynamic=[G.field=],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[impl:int,inst:Closure,inst:JSBool,inst:JSNull,is:G,param:num]*/ method9(dynamic g, num value) { if (g is! G) return null; return g.field = value; diff --git a/tests/compiler/dart2js/impact/data/invokes.dart b/tests/compiler/dart2js/impact/data/invokes.dart index 3d24c7d0149..77f827d6b6c 100644 --- a/tests/compiler/dart2js/impact/data/invokes.dart +++ b/tests/compiler/dart2js/impact/data/invokes.dart @@ -115,39 +115,13 @@ testTopLevelInvoke() { topLevelFunction3(15, c: 16, b: 17); } -/*member: topLevelFunction1Typed:type=[inst:JSBool,param:int]*/ +/*member: topLevelFunction1Typed:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:int]*/ void topLevelFunction1Typed(int a) {} -/*member: topLevelFunction2Typed: - type=[ - inst:JSBool, - inst:JSNull, - param:String, - param:double, - param:num] -*/ +/*member: topLevelFunction2Typed:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:String,param:double,param:num]*/ int topLevelFunction2Typed(String a, [num b, double c]) => null; -/*member: topLevelFunction3Typed: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - param:List, - param:Map, - param:bool] -*/ +/*member: topLevelFunction3Typed:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,param:List,param:Map,param:bool]*/ double topLevelFunction3Typed(bool a, {List b, Map c}) { return null; } @@ -188,80 +162,16 @@ testTopLevelInvokeTyped() { topLevelFunction3Typed(false, c: {'16': false}, b: [17]); } -/*member: topLevelFunctionTyped1: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - param:void Function(num)] -*/ +/*member: topLevelFunctionTyped1:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:void Function(num)]*/ topLevelFunctionTyped1(void a(num b)) {} -/*member: topLevelFunctionTyped2: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - param:void Function(num,[String])] -*/ +/*member: topLevelFunctionTyped2:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:void Function(num,[String])]*/ topLevelFunctionTyped2(void a(num b, [String c])) {} -/*member: topLevelFunctionTyped3: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - param:void Function(num,{String c,int d})] -*/ +/*member: topLevelFunctionTyped3:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:void Function(num,{String c,int d})]*/ topLevelFunctionTyped3(void a(num b, {String c, int d})) {} -/*member: topLevelFunctionTyped4: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - param:void Function(num,{int c,String d})] -*/ +/*member: topLevelFunctionTyped4:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:void Function(num,{int c,String d})]*/ topLevelFunctionTyped4(void a(num b, {String d, int c})) {} /*member: testTopLevelFunctionTyped: @@ -300,7 +210,7 @@ set topLevelSetter(_) {} /*member: testTopLevelSetterSet:static=[set:topLevelSetter],type=[inst:JSNull]*/ testTopLevelSetterSet() => topLevelSetter = null; -/*member: topLevelSetterTyped=:type=[inst:JSBool,param:int]*/ +/*member: topLevelSetterTyped=:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:int]*/ void set topLevelSetterTyped(int value) {} /*member: testTopLevelSetterSetTyped:static=[set:topLevelSetterTyped],type=[inst:JSNull]*/ @@ -320,7 +230,7 @@ testTopLevelFieldLazy() => topLevelFieldLazy; const topLevelFieldConst = null; -/*strong.member: testTopLevelFieldConst:type=[inst:JSNull]*/ +/*member: testTopLevelFieldConst:type=[inst:JSNull]*/ testTopLevelFieldConst() => topLevelFieldConst; /*member: topLevelFieldFinal:static=[throwCyclicInit(1),topLevelFunction1(1)],type=[inst:JSNull]*/ @@ -329,42 +239,25 @@ final topLevelFieldFinal = topLevelFunction1(null); /*member: testTopLevelFieldFinal:static=[topLevelFieldFinal]*/ testTopLevelFieldFinal() => topLevelFieldFinal; -/*member: topLevelFieldTyped:type=[inst:JSBool,inst:JSNull,param:int]*/ +/*member: topLevelFieldTyped:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:int]*/ int topLevelFieldTyped; /*member: testTopLevelFieldTyped:static=[topLevelFieldTyped]*/ testTopLevelFieldTyped() => topLevelFieldTyped; -/*member: topLevelFieldGeneric1:type=[inst:JSBool,inst:JSNull,param:GenericClass]*/ +/*member: topLevelFieldGeneric1:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:GenericClass]*/ GenericClass topLevelFieldGeneric1; /*member: testTopLevelFieldGeneric1:static=[topLevelFieldGeneric1]*/ testTopLevelFieldGeneric1() => topLevelFieldGeneric1; -/*member: topLevelFieldGeneric2:type=[inst:JSBool,inst:JSNull,param:GenericClass]*/ +/*member: topLevelFieldGeneric2:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:GenericClass]*/ GenericClass topLevelFieldGeneric2; /*member: testTopLevelFieldGeneric2:static=[topLevelFieldGeneric2]*/ testTopLevelFieldGeneric2() => topLevelFieldGeneric2; -/*member: topLevelFieldGeneric3: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - param:GenericClass] -*/ +/*member: topLevelFieldGeneric3:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,param:GenericClass]*/ GenericClass topLevelFieldGeneric3; /*member: testTopLevelFieldGeneric3:static=[topLevelFieldGeneric3]*/ @@ -489,22 +382,7 @@ testLocalFunction() { localFunction() {} } -/*member: testLocalFunctionTyped: - static=[ - computeSignature(3), - def:localFunction, - getRuntimeTypeArguments(3), - getRuntimeTypeInfo(1), - setRuntimeTypeInfo(2)], - type=[inst:Function, - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - param:String]*/ +/*member: testLocalFunctionTyped:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),computeSignature(3),def:localFunction,findType(1),getRuntimeTypeArguments(3),getRuntimeTypeInfo(1),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:Function,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,param:String]*/ testLocalFunctionTyped() { // ignore: UNUSED_ELEMENT int localFunction(String a) => null; diff --git a/tests/compiler/dart2js/impact/data/jsinterop.dart b/tests/compiler/dart2js/impact/data/jsinterop.dart index 2f40854d2ea..703c91cf7bc 100644 --- a/tests/compiler/dart2js/impact/data/jsinterop.dart +++ b/tests/compiler/dart2js/impact/data/jsinterop.dart @@ -59,24 +59,7 @@ typedef void Callback(T value); /*member: GenericClass.:static=[JavaScriptObject.(0)]*/ @JS() class GenericClass { - /*member: GenericClass.method: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - param:void Function(GenericClass.T)] - */ + /*member: GenericClass.method:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,param:void Function(GenericClass.T)]*/ external GenericClass method([Callback callback]); } diff --git a/tests/compiler/dart2js/impact/data/jsinterop_setter1.dart b/tests/compiler/dart2js/impact/data/jsinterop_setter1.dart index eab4fd4e6df..24dd87c3fef 100644 --- a/tests/compiler/dart2js/impact/data/jsinterop_setter1.dart +++ b/tests/compiler/dart2js/impact/data/jsinterop_setter1.dart @@ -9,30 +9,11 @@ import 'dart:html' show File; import 'package:js/js.dart'; -/*member: foo=: - type=[ - inst:JSBool, - native:ApplicationCacheErrorEvent, - native:DomError, - native:DomException, - native:ErrorEvent, - native:MediaError, - native:NavigatorUserMediaError, - native:OverconstrainedError, - native:PositionError, - native:SensorErrorEvent, - native:SpeechRecognitionError, - native:SqlError, - param:Function] - */ +/*member: foo=:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,native:ApplicationCacheErrorEvent,native:DomError,native:DomException,native:ErrorEvent,native:MediaError,native:NavigatorUserMediaError,native:OverconstrainedError,native:PositionError,native:SensorErrorEvent,native:SpeechRecognitionError,native:SqlError,param:Function]*/ @JS() external set foo(Function f); -/*member: _doStuff: - dynamic=[File.==,File.name], - static=[defineProperty(3),print(1)], - type=[inst:JSBool,inst:JSNull,inst:JSString,param:File,param:String] -*/ +/*member: _doStuff:dynamic=[File.==,File.name],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),defineProperty(3),findType(1),instanceType(1),print(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,inst:JSString,param:File,param:String]*/ void _doStuff(String name, File file) { if (file == null) { print('OK'); diff --git a/tests/compiler/dart2js/impact/data/jsinterop_setter2.dart b/tests/compiler/dart2js/impact/data/jsinterop_setter2.dart index 0dbb3225fe8..5cc18d3aaa6 100644 --- a/tests/compiler/dart2js/impact/data/jsinterop_setter2.dart +++ b/tests/compiler/dart2js/impact/data/jsinterop_setter2.dart @@ -9,43 +9,11 @@ import 'dart:html' show File; import 'package:js/js.dart'; -/*member: foo=: - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - native:ApplicationCacheErrorEvent, - native:DomError, - native:DomException, - native:ErrorEvent, - native:File, - native:MediaError, - native:NavigatorUserMediaError, - native:OverconstrainedError, - native:PositionError, - native:SensorErrorEvent, - native:SpeechRecognitionError, - native:SqlError, - param:void Function(String,File)] -*/ +/*member: foo=:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,native:ApplicationCacheErrorEvent,native:DomError,native:DomException,native:ErrorEvent,native:File,native:MediaError,native:NavigatorUserMediaError,native:OverconstrainedError,native:PositionError,native:SensorErrorEvent,native:SpeechRecognitionError,native:SqlError,param:void Function(String,File)]*/ @JS() external set foo(void Function(String, File) f); -/*member: _doStuff: - dynamic=[File.==,File.name], - static=[defineProperty(3),print(1)], - type=[inst:JSBool,inst:JSNull,inst:JSString,param:File,param:String] -*/ +/*member: _doStuff:dynamic=[File.==,File.name],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),defineProperty(3),findType(1),instanceType(1),print(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,inst:JSString,param:File,param:String]*/ void _doStuff(String name, File file) { if (file == null) { print('OK'); diff --git a/tests/compiler/dart2js/impact/data/literals.dart b/tests/compiler/dart2js/impact/data/literals.dart index 740209db5e7..987e6461238 100644 --- a/tests/compiler/dart2js/impact/data/literals.dart +++ b/tests/compiler/dart2js/impact/data/literals.dart @@ -86,7 +86,7 @@ testString() => 'foo'; */ testStringInterpolation() => '${true}'; -/*strong.member: testStringInterpolationConst:type=[inst:JSString]*/ +/*member: testStringInterpolationConst:type=[inst:JSString]*/ testStringInterpolationConst() { const b = '${true}'; return b; @@ -102,7 +102,7 @@ testStringJuxtaposition() => 'a' 'b'; /*member: testSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/ testSymbol() => #main; -/*strong.member: testConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/ +/*member: testConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/ testConstSymbol() => const Symbol('main'); const complexSymbolField1 = "true".length == 4; @@ -123,19 +123,16 @@ const complexSymbolField3 = const { const complexSymbolField = complexSymbolField1 ? complexSymbolField2 : complexSymbolField3; -/*strong.member: testComplexConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/ +/*member: testComplexConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/ testComplexConstSymbol() => const Symbol(complexSymbolField); -/*strong.member: testIfNullConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/ +/*member: testIfNullConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/ testIfNullConstSymbol() => const Symbol(null ?? 'foo'); -/*member: testTypeLiteral: - static=[createRuntimeType(1)], - type=[inst:Type,inst:TypeImpl,lit:Object] -*/ +/*member: testTypeLiteral:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:Object]*/ testTypeLiteral() => Object; -/*strong.member: testBoolFromEnvironment:type=[inst:JSBool]*/ +/*member: testBoolFromEnvironment:type=[inst:JSBool]*/ testBoolFromEnvironment() => const bool.fromEnvironment('FOO'); /*member: testEmptyListLiteral:type=[inst:List]*/ diff --git a/tests/compiler/dart2js/impact/data/native.dart b/tests/compiler/dart2js/impact/data/native.dart index 678528c66fa..9d6abb53d89 100644 --- a/tests/compiler/dart2js/impact/data/native.dart +++ b/tests/compiler/dart2js/impact/data/native.dart @@ -56,18 +56,7 @@ testNativeMethodReturns() native; @Native("NativeClass") class NativeClass { - /*member: NativeClass.field: - type=[ - inst:JSBool, - inst:JSNull, - native:JSExtendableArray, - native:Object, - native:String, - native:bool, - native:double, - native:int, - param:Object] - */ + /*member: NativeClass.field:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,native:JSExtendableArray,native:Object,native:String,native:bool,native:double,native:int,param:Object]*/ @annotation_Creates_SerializedScriptValue final Object field; @@ -76,9 +65,5 @@ class NativeClass { } } -/*member: testNativeField: - dynamic=[NativeClass.field], - static=[defineProperty(3)], - type=[inst:JSBool,param:NativeClass] -*/ +/*member: testNativeField:dynamic=[NativeClass.field],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),defineProperty(3),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:NativeClass]*/ testNativeField(NativeClass c) => c.field; diff --git a/tests/compiler/dart2js/impact/data/promotion.dart b/tests/compiler/dart2js/impact/data/promotion.dart index 6b36fb0ce5f..fb8f608fac7 100644 --- a/tests/compiler/dart2js/impact/data/promotion.dart +++ b/tests/compiler/dart2js/impact/data/promotion.dart @@ -37,17 +37,17 @@ main() { dynamicToNoSuchMethodTearOff(null); } -/*member: positiveTyped:dynamic=[SubClass.method(0)],type=[inst:JSBool,is:SubClass,param:Class]*/ +/*member: positiveTyped:dynamic=[SubClass.method(0)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,is:SubClass,param:Class]*/ positiveTyped(Class cls) { if (cls is SubClass) cls.method(); } -/*member: positiveDynamic:dynamic=[SubClass.method(0)],type=[inst:JSBool,is:SubClass]*/ +/*member: positiveDynamic:dynamic=[SubClass.method(0)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,is:SubClass]*/ positiveDynamic(dynamic cls) { if (cls is SubClass) cls.method(); } -/*member: negativeDynamic:dynamic=[SubClass.method(0)],type=[inst:JSBool,is:SubClass]*/ +/*member: negativeDynamic:dynamic=[SubClass.method(0)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,is:SubClass]*/ negativeDynamic(dynamic cls) { if (cls is! SubClass) return; cls.method(); diff --git a/tests/compiler/dart2js/impact/data/runtime_type.dart b/tests/compiler/dart2js/impact/data/runtime_type.dart index 78bfeeb5e5f..77a187c5804 100644 --- a/tests/compiler/dart2js/impact/data/runtime_type.dart +++ b/tests/compiler/dart2js/impact/data/runtime_type.dart @@ -60,366 +60,91 @@ class Class3 { /*member: Class4.:static=[Object.(0)]*/ class Class4 {} -/*member: toString1: - dynamic=[Class2.runtimeType,toString(0)], - runtimeType=[string:Class2], - static=[ - S(1), - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSString, - inst:JSUnmodifiableArray, - param:Class2] -*/ +/*member: toString1:dynamic=[Class2.runtimeType,toString(0)],runtimeType=[string:Class2],static=[Rti._bind(1),Rti._eval(1),S(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSString,inst:JSUnmodifiableArray,param:Class2]*/ toString1(Class2 c) => '${c.runtimeType}'; -/*member: toString2: - dynamic=[Class2.==,Class2.runtimeType,toString(0)], - runtimeType=[string:Class2], - static=[ - S(1), - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSString, - inst:JSUnmodifiableArray, - param:Class2] -*/ +/*member: toString2:dynamic=[Class2.==,Class2.runtimeType,toString(0)],runtimeType=[string:Class2],static=[Rti._bind(1),Rti._eval(1),S(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSString,inst:JSUnmodifiableArray,param:Class2]*/ toString2(Class2 c) => '${c?.runtimeType}'; -/*member: toString3: - dynamic=[Class2.runtimeType,Type.toString(0)], - runtimeType=[string:Class2], - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - param:Class2] -*/ +/*member: toString3:dynamic=[Class2.runtimeType,Type.toString(0)],runtimeType=[string:Class2],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:Class2]*/ toString3(Class2 c) => c.runtimeType.toString(); -/*member: toString4: - dynamic=[Class2.runtimeType,Type.==,Type.toString(0)], - runtimeType=[string:Class2], - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - param:Class2] -*/ +/*member: toString4:dynamic=[Class2.runtimeType,Type.==,Type.toString(0)],runtimeType=[string:Class2],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,param:Class2]*/ toString4(Class2 c) => c.runtimeType?.toString(); -/*member: toString5: - dynamic=[Class2.==,Class2.runtimeType,Type.==,Type.toString(0)], - runtimeType=[string:Class2], - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - param:Class2] -*/ +/*member: toString5:dynamic=[Class2.==,Class2.runtimeType,Type.==,Type.toString(0)],runtimeType=[string:Class2],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,param:Class2]*/ toString5(Class2 c) => c?.runtimeType?.toString(); -/*member: toString6: - dynamic=[Class2.==,Class2.runtimeType,Type.toString(0)], - runtimeType=[string:Class2], - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - param:Class2] -*/ +/*member: toString6:dynamic=[Class2.==,Class2.runtimeType,Type.toString(0)],runtimeType=[string:Class2],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,param:Class2]*/ toString6(Class2 c) => c?.runtimeType.toString(); -/*member: unknown: - dynamic=[Class2.runtimeType], - runtimeType=[unknown:Class2], - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSUnmodifiableArray, - param:Class2] -*/ +/*member: unknown:dynamic=[Class2.runtimeType],runtimeType=[unknown:Class2],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSUnmodifiableArray,param:Class2]*/ unknown(Class2 c) => c.runtimeType; -/*member: equals1: - dynamic=[Class1a.==,Class1a.runtimeType,Class1d.==,Class1d.runtimeType,Type.==], - runtimeType=[equals:Class1a/Class1d], - static=[ - checkSubtype(4), - getRuntimeTypeArgument(3), - getRuntimeTypeArgumentIntercepted(4), - getRuntimeTypeInfo(1), - getTypeArgumentByIndex(2), - setRuntimeTypeInfo(2)], - type=[ - inst:JSArray, - inst:JSBool, - inst:JSExtendableArray, - inst:JSFixedArray, - inst:JSMutableArray, - inst:JSNull, - inst:JSUnmodifiableArray, - param:Class1a, - param:Class1d] -*/ +/*member: equals1:dynamic=[Class1a.==,Class1a.runtimeType,Class1d.==,Class1d.runtimeType,Type.==],runtimeType=[equals:Class1a/Class1d],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkSubtype(4),findType(1),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),instanceType(1),setRuntimeTypeInfo(2)],type=[inst:Closure,inst:JSArray,inst:JSBool,inst:JSExtendableArray,inst:JSFixedArray,inst:JSMutableArray,inst:JSNull,inst:JSUnmodifiableArray,param:Class1a,param:Class1d]*/ equals1(Class1a a, Class1d b) => a?.runtimeType == b?.runtimeType; -/*member: almostEquals1: - dynamic=[Class3.runtimeType,Type.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals1:dynamic=[Class3.runtimeType,Type.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals1(Class3 a) => a.runtimeType == null; -/*member: almostEquals2: - dynamic=[Class3.==,Class3.runtimeType,Type.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals2:dynamic=[Class3.==,Class3.runtimeType,Type.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals2(Class3 a) => a?.runtimeType == null; -/*member: almostEquals3: - dynamic=[Class3.runtimeType,Null.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals3:dynamic=[Class3.runtimeType,Null.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals3(Class3 a) => null == a.runtimeType; -/*member: almostEquals4: - dynamic=[Class3.==,Class3.runtimeType,Null.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals4:dynamic=[Class3.==,Class3.runtimeType,Null.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals4(Class3 a) => null == a?.runtimeType; -/*member: almostEquals5: - dynamic=[Class3.field,Class3.runtimeType,Type.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,param:Class3] -*/ +/*member: almostEquals5:dynamic=[Class3.field,Class3.runtimeType,Type.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:Class3]*/ almostEquals5(Class3 a) => a.runtimeType == a.field; -/*member: almostEquals6: - dynamic=[Class3.==,Class3.field,Class3.runtimeType,Type.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals6:dynamic=[Class3.==,Class3.field,Class3.runtimeType,Type.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals6(Class3 a) => a?.runtimeType == a.field; -/*member: almostEquals7: - dynamic=[Class3.==,Class3.field,Class3.runtimeType,Type.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals7:dynamic=[Class3.==,Class3.field,Class3.runtimeType,Type.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals7(Class3 a) => a.runtimeType == a?.field; -/*member: almostEquals8: - dynamic=[Class3.==,Class3.field,Class3.runtimeType,Type.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals8:dynamic=[Class3.==,Class3.field,Class3.runtimeType,Type.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals8(Class3 a) => a?.runtimeType == a?.field; -/*member: almostEquals9: - dynamic=[Class3.field,Class3.runtimeType,Object.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,param:Class3] -*/ +/*member: almostEquals9:dynamic=[Class3.field,Class3.runtimeType,Object.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:Class3]*/ almostEquals9(Class3 a) => a.field == a.runtimeType; -/*member: almostEquals10: - dynamic=[Class3.==,Class3.field,Class3.runtimeType,Object.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals10:dynamic=[Class3.==,Class3.field,Class3.runtimeType,Object.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals10(Class3 a) => a?.field == a.runtimeType; -/*member: almostEquals11: - dynamic=[Class3.==,Class3.field,Class3.runtimeType,Object.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals11:dynamic=[Class3.==,Class3.field,Class3.runtimeType,Object.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals11(Class3 a) => a.field == a?.runtimeType; -/*member: almostEquals12: - dynamic=[Class3.==,Class3.field,Class3.runtimeType,Object.==], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostEquals12:dynamic=[Class3.==,Class3.field,Class3.runtimeType,Object.==],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostEquals12(Class3 a) => a?.field == a?.runtimeType; -/*member: almostToString1: - dynamic=[Class3.runtimeType,Type.toString], - runtimeType=[unknown:Class3], - type=[inst:JSBool,param:Class3] -*/ +/*member: almostToString1:dynamic=[Class3.runtimeType,Type.toString],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:Class3]*/ almostToString1(Class3 a) => a.runtimeType.toString; -/*member: almostToString2: - dynamic=[Class3.==,Class3.runtimeType,Type.==,Type.toString], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostToString2:dynamic=[Class3.==,Class3.runtimeType,Type.==,Type.toString],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostToString2(Class3 a) => a?.runtimeType?.toString; -/*member: almostToString3: - dynamic=[Class3.runtimeType,Type.noSuchMethod(1)], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostToString3:dynamic=[Class3.runtimeType,Type.noSuchMethod(1)],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostToString3(Class3 a) => a.runtimeType.noSuchMethod(null); -/*member: almostToString4: - dynamic=[Class3.==,Class3.runtimeType,Type.noSuchMethod(1)], - runtimeType=[unknown:Class3], - type=[inst:JSBool,inst:JSNull,param:Class3] -*/ +/*member: almostToString4:dynamic=[Class3.==,Class3.runtimeType,Type.noSuchMethod(1)],runtimeType=[unknown:Class3],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3]*/ almostToString4(Class3 a) => a?.runtimeType.noSuchMethod(null); -/*member: notEquals1: - dynamic=[Class3.runtimeType,Class4.runtimeType,Type.==], - runtimeType=[equals:Class3/Class4], - type=[inst:JSBool,param:Class3,param:Class4] -*/ +/*member: notEquals1:dynamic=[Class3.runtimeType,Class4.runtimeType,Type.==],runtimeType=[equals:Class3/Class4],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,param:Class3,param:Class4]*/ notEquals1(Class3 a, Class4 b) => a.runtimeType != b.runtimeType; -/*member: notEquals2: - dynamic=[Class3.==,Class3.runtimeType,Class4.runtimeType,Type.==], - runtimeType=[equals:Class3/Class4], - type=[inst:JSBool,inst:JSNull,param:Class3,param:Class4] -*/ +/*member: notEquals2:dynamic=[Class3.==,Class3.runtimeType,Class4.runtimeType,Type.==],runtimeType=[equals:Class3/Class4],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3,param:Class4]*/ notEquals2(Class3 a, Class4 b) => a?.runtimeType != b.runtimeType; -/*member: notEquals3: - dynamic=[Class3.runtimeType,Class4.==,Class4.runtimeType,Type.==], - runtimeType=[equals:Class3/Class4], - type=[inst:JSBool,inst:JSNull,param:Class3,param:Class4] -*/ +/*member: notEquals3:dynamic=[Class3.runtimeType,Class4.==,Class4.runtimeType,Type.==],runtimeType=[equals:Class3/Class4],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3,param:Class4]*/ notEquals3(Class3 a, Class4 b) => a.runtimeType != b?.runtimeType; -/*member: notEquals4: - dynamic=[Class3.==,Class3.runtimeType,Class4.==,Class4.runtimeType,Type.==], - runtimeType=[equals:Class3/Class4], - type=[inst:JSBool,inst:JSNull,param:Class3,param:Class4] -*/ +/*member: notEquals4:dynamic=[Class3.==,Class3.runtimeType,Class4.==,Class4.runtimeType,Type.==],runtimeType=[equals:Class3/Class4],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1)],type=[inst:Closure,inst:JSBool,inst:JSNull,param:Class3,param:Class4]*/ notEquals4(Class3 a, Class4 b) => a?.runtimeType != b?.runtimeType; -/*member: main: - dynamic=[exact:Class1a.==], - static=[ - Class1a.(0), - Class1b.(0), - Class1c.(0), - Class1d.(0), - Class2.(0), - Class3.(0), - Class4.(0), - almostEquals1(1), - almostEquals10(1), - almostEquals11(1), - almostEquals12(1), - almostEquals2(1), - almostEquals3(1), - almostEquals4(1), - almostEquals5(1), - almostEquals6(1), - almostEquals7(1), - almostEquals8(1), - almostEquals9(1), - almostToString1(1), - almostToString2(1), - almostToString3(1), - almostToString4(1), - assertIsSubtype(5), - equals1(2), - notEquals1(2), - notEquals2(2), - notEquals3(2), - notEquals4(2), - print(1), - throwTypeError(1), - toString1(1), - toString2(1), - toString3(1), - toString4(1), - toString5(1), - toString6(1), - unknown(1)] -*/ +/*member: main:dynamic=[exact:Class1a.==],static=[Class1a.(0),Class1b.(0),Class1c.(0),Class1d.(0),Class2.(0),Class3.(0),Class4.(0),almostEquals1(1),almostEquals10(1),almostEquals11(1),almostEquals12(1),almostEquals2(1),almostEquals3(1),almostEquals4(1),almostEquals5(1),almostEquals6(1),almostEquals7(1),almostEquals8(1),almostEquals9(1),almostToString1(1),almostToString2(1),almostToString3(1),almostToString4(1),checkTypeBound(4),equals1(2),notEquals1(2),notEquals2(2),notEquals3(2),notEquals4(2),print(1),throwTypeError(1),toString1(1),toString2(1),toString3(1),toString4(1),toString5(1),toString6(1),unknown(1)]*/ main() { Class1a c1a = new Class1a(); Class1b c1b = new Class1b(); diff --git a/tests/compiler/dart2js/impact/data/statements.dart b/tests/compiler/dart2js/impact/data/statements.dart index 77936d338a5..4eb9ab4c664 100644 --- a/tests/compiler/dart2js/impact/data/statements.dart +++ b/tests/compiler/dart2js/impact/data/statements.dart @@ -65,36 +65,13 @@ testIfThenElse() { return 1; } -/*member: testForIn: - dynamic=[ - Iterator.current, - Iterator.iterator, - Iterator.moveNext(0)], - static=[checkConcurrentModificationError(2)], - type=[ - impl:Iterable, - inst:JSBool, - inst:JSNull, - inst:Null] -*/ +/*member: testForIn:dynamic=[Iterator.current,Iterator.iterator,Iterator.moveNext(0)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkConcurrentModificationError(2),findType(1),instanceType(1)],type=[impl:Iterable,inst:Closure,inst:JSBool,inst:JSNull,inst:Null]*/ testForIn(o) { // ignore: UNUSED_LOCAL_VARIABLE for (var e in o) {} } -/*member: testForInTyped: - dynamic=[ - Iterator.current, - Iterator.iterator, - Iterator.moveNext(0)], - static=[checkConcurrentModificationError(2)], - type=[ - impl:Iterable, - impl:int, - inst:JSBool, - inst:JSNull, - inst:Null] -*/ +/*member: testForInTyped:dynamic=[Iterator.current,Iterator.iterator,Iterator.moveNext(0)],static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),checkConcurrentModificationError(2),findType(1),instanceType(1)],type=[impl:Iterable,impl:int,inst:Closure,inst:JSBool,inst:JSNull,inst:Null]*/ testForInTyped(o) { // ignore: UNUSED_LOCAL_VARIABLE for (int e in o) {} @@ -110,14 +87,7 @@ testTryCatch() { try {} catch (e) {} } -/*member: testTryCatchOn: - static=[unwrapException(1)], - type=[ - catch:String, - inst:JSBool, - inst:PlainJavaScriptObject, - inst:UnknownJavaScriptObject] -*/ +/*member: testTryCatchOn:static=[Rti._bind(1),Rti._eval(1),_arrayInstanceType(1),_asBoolNullable(1),_asDoubleNullable(1),_asIntNullable(1),_asNumNullable(1),_asStringNullable(1),_asTop(1),_checkBoolNullable(1),_checkDoubleNullable(1),_checkIntNullable(1),_checkNumNullable(1),_checkStringNullable(1),_generalAsCheckImplementation(1),_generalIsTestImplementation(1),_generalTypeCheckImplementation(1),_instanceType(1),_isBool(1),_isInt(1),_isNum(1),_isString(1),_isTop(1),findType(1),instanceType(1),unwrapException(1)],type=[catch:String,inst:Closure,inst:JSBool,inst:PlainJavaScriptObject,inst:UnknownJavaScriptObject]*/ testTryCatchOn() { // ignore: UNUSED_CATCH_CLAUSE try {} on String catch (e) {} diff --git a/tests/compiler/dart2js/impact/impact_test.dart b/tests/compiler/dart2js/impact/impact_test.dart index 0a88beef6e1..b1d9e3d531c 100644 --- a/tests/compiler/dart2js/impact/impact_test.dart +++ b/tests/compiler/dart2js/impact/impact_test.dart @@ -23,14 +23,17 @@ main(List args) { print('=================================================================='); useImpactDataForTesting = false; await checkTests(dataDir, const ImpactDataComputer(), - args: args, testedConfigs: [strongConfig]); + args: args, + supportedMarkers: [strongMarker], + testedConfigs: [strongConfig]); print('Testing computation of ResolutionImpact through ImpactData'); print('=================================================================='); useImpactDataForTesting = true; await checkTests(dataDir, const ImpactDataComputer(), args: args, - testedConfigs: allStrongConfigs); + supportedMarkers: [strongMarker], + testedConfigs: [strongConfig]); }); } diff --git a/tests/compiler/dart2js/inference/data/call_in_loop.dart b/tests/compiler/dart2js/inference/data/call_in_loop.dart index f91fbc9a99f..b948889d5a6 100644 --- a/tests/compiler/dart2js/inference/data/call_in_loop.dart +++ b/tests/compiler/dart2js/inference/data/call_in_loop.dart @@ -12,8 +12,8 @@ class Class { /*current: [exact=ArrayIterator]*/ /*moveNext: [exact=ArrayIterator]*/ for (var a in []) { - (T as dynamic) /*invoke: [exact=TypeImpl]*/ (a); - (Object as dynamic) /*invoke: [exact=TypeImpl]*/ (); + (T as dynamic) /*invoke: [exact=_Type]*/ (a); + (Object as dynamic) /*invoke: [exact=_Type]*/ (); (this as dynamic) /*invoke: [exact=Class]*/ (); (1 as dynamic) /*invoke: [exact=JSUInt31]*/ (); } diff --git a/tests/compiler/dart2js/inference/data/general.dart b/tests/compiler/dart2js/inference/data/general.dart index beb067daf3e..775adb09ec9 100644 --- a/tests/compiler/dart2js/inference/data/general.dart +++ b/tests/compiler/dart2js/inference/data/general.dart @@ -424,7 +424,8 @@ testSwitch2() { return a; } -/*member: testSwitch3:Union([exact=JSString], [null|subclass=JSNumber])*/ +/*strong.member: testSwitch3:Union([null|exact=JSString], [subclass=JSNumber])*/ +/*omit.member: testSwitch3:Union([exact=JSString], [null|subclass=JSNumber])*/ testSwitch3() { dynamic a = 42; var b; @@ -461,7 +462,8 @@ testSwitch5() { } } -/*member: testContinue1:Union([exact=JSString], [null|subclass=JSNumber])*/ +/*strong.member: testContinue1:Union([null|exact=JSString], [subclass=JSNumber])*/ +/*omit.member: testContinue1:Union([exact=JSString], [null|subclass=JSNumber])*/ testContinue1() { dynamic a = 42; var b; @@ -760,7 +762,7 @@ class C { C(); /*member: C.returnInt1:[subclass=JSPositiveInt]*/ - returnInt1() => /*invoke: [subclass=JSPositiveInt]*/ ++ /*[exact=C]*/ /*update: [exact=C]*/ myField; + returnInt1() => /*invoke: [subclass=JSPositiveInt]*/ ++ /*update: [exact=C]*/ /*[exact=C]*/ myField; /*member: C.returnInt2:[subclass=JSPositiveInt]*/ returnInt2() => /*invoke: [subclass=JSPositiveInt]*/ ++this diff --git a/tests/compiler/dart2js/inference/data/simple.dart b/tests/compiler/dart2js/inference/data/simple.dart index 81fcc947e1d..ada01a11530 100644 --- a/tests/compiler/dart2js/inference/data/simple.dart +++ b/tests/compiler/dart2js/inference/data/simple.dart @@ -136,5 +136,5 @@ symbolLiteral() => #main; /// Return a type literal. //////////////////////////////////////////////////////////////////////////////// -/*member: typeLiteral:[exact=TypeImpl]*/ +/*member: typeLiteral:[exact=_Type]*/ typeLiteral() => Object; diff --git a/tests/compiler/dart2js/inference/data/type_literal.dart b/tests/compiler/dart2js/inference/data/type_literal.dart index 63ab341bb64..48f1ce86d64 100644 --- a/tests/compiler/dart2js/inference/data/type_literal.dart +++ b/tests/compiler/dart2js/inference/data/type_literal.dart @@ -9,16 +9,16 @@ main() { typeLiteralSubstring(); } -/*member: typeLiteral:[exact=TypeImpl]*/ +/*member: typeLiteral:[exact=_Type]*/ typeLiteral() => Object; -/*member: typeLiteralToString:[exact=JSString]*/ -typeLiteralToString() => (Object). /*invoke: [exact=TypeImpl]*/ toString(); +/*member: typeLiteralToString:[null|exact=JSString]*/ +typeLiteralToString() => (Object). /*invoke: [exact=_Type]*/ toString(); /*member: typeLiteralSubstring:[exact=JSString]*/ typeLiteralSubstring() { - String name = (List). /*invoke: [exact=TypeImpl]*/ toString(); - name = name. /*invoke: [exact=JSString]*/ substring( - 0, name. /*invoke: [exact=JSString]*/ indexOf('<')); + String name = (List). /*invoke: [exact=_Type]*/ toString(); + name = name. /*invoke: [null|exact=JSString]*/ substring( + 0, name. /*invoke: [null|exact=JSString]*/ indexOf('<')); return name; } diff --git a/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05.dart b/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05.dart index c1b9be7894d..4a666a0c397 100644 --- a/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05.dart +++ b/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05.dart @@ -5,22 +5,21 @@ // Test derived from language_2/generic_methods_dynamic_test/05 /*omit.class: global#JSArray:deps=[List],explicit=[JSArray],needsArgs*/ -/*strong.class: global#JSArray:deps=[ArrayIterator,List],explicit=[JSArray,JSArray.E,JSArray],implicit=[JSArray.E],indirect,needsArgs*/ - -/*omit.class: global#List:deps=[C.bar],explicit=[List,List],needsArgs*/ +/*strong.class: global#JSArray:deps=[ArrayIterator,List],direct,explicit=[JSArray,JSArray.E,JSArray],implicit=[JSArray.E],needsArgs*/ /*strong.class: global#List:deps=[C.bar],explicit=[List,List,List],indirect,needsArgs*/ +/*omit.class: global#List:deps=[C.bar],explicit=[List,List],needsArgs*/ import "package:expect/expect.dart"; class A {} -/*omit.class: B:explicit=[List]*/ /*strong.class: B:explicit=[List],implicit=[B]*/ +/*omit.class: B:explicit=[List]*/ class B {} class C { - /*omit.member: C.bar:needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/ /*strong.member: C.bar:direct,explicit=[Iterable],implicit=[bar.T],needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/ + /*omit.member: C.bar:needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/ List bar(Iterable t) => [t.first]; } diff --git a/tests/compiler/dart2js/rti/data/local_function_list_literal.dart b/tests/compiler/dart2js/rti/data/local_function_list_literal.dart index d3894cddbed..190c4c53366 100644 --- a/tests/compiler/dart2js/rti/data/local_function_list_literal.dart +++ b/tests/compiler/dart2js/rti/data/local_function_list_literal.dart @@ -4,11 +4,11 @@ import 'package:expect/expect.dart'; -/*strong.class: global#JSArray:deps=[ArrayIterator,List],explicit=[JSArray,JSArray.E,JSArray],implicit=[JSArray.E],indirect,needsArgs*/ -/*omit.class: global#JSArray:deps=[List],explicit=[JSArray],needsArgs*/ - /*strong.member: method:implicit=[method.T],indirect,needsArgs*/ /*omit.member: method:needsArgs*/ +/*strong.class: global#JSArray:deps=[ArrayIterator,List],direct,explicit=[JSArray,JSArray.E,JSArray],implicit=[JSArray.E],needsArgs*/ +/*omit.class: global#JSArray:deps=[List],explicit=[JSArray],needsArgs*/ + @pragma('dart2js:noInline') method() { return () => []; diff --git a/tests/compiler/dart2js/rti/disable_rti_test.dart b/tests/compiler/dart2js/rti/disable_rti_test.dart index 55207539e47..e02891c8f7a 100644 --- a/tests/compiler/dart2js/rti/disable_rti_test.dart +++ b/tests/compiler/dart2js/rti/disable_rti_test.dart @@ -58,9 +58,12 @@ const Map> expectedIsChecksMap = 'A': const [], 'B': const [], 'C': const [r'$isB'], - 'D': const [r'$isB', r'$asB'], + // TODO(sigmund): change these tests to check that the new rti medatada + // includes the information we need to check the equivalent of D.$asB and + // F.$asB + 'D': const [r'$isB'], 'E': const [], - 'F': const [r'$asB'], + 'F': const [], 'G': const [], 'H': const [r'$isG'], 'I': const [], diff --git a/tests/compiler/dart2js/rti/emission/event_callback.dart b/tests/compiler/dart2js/rti/emission/event_callback.dart index 0c11ed547e3..4273b86f38d 100644 --- a/tests/compiler/dart2js/rti/emission/event_callback.dart +++ b/tests/compiler/dart2js/rti/emission/event_callback.dart @@ -5,12 +5,9 @@ import 'dart:html'; /*strong.class: global#Event:checkedInstance,checkedTypeArgument,checks=[$isEvent],instance,typeArgument*/ - -/*strong.class: global#MouseEvent:checks=[$isMouseEvent],instance,typeArgument*/ -/*omit.class: global#MouseEvent:instance*/ - -/*strong.class: global#KeyboardEvent:checks=[$isKeyboardEvent],instance,typeArgument*/ -/*omit.class: global#KeyboardEvent:instance*/ +/*omit.class: global#Event:checkedTypeArgument,checks=[$isEvent],instance,typeArgument*/ +/*class: global#MouseEvent:checks=[$isMouseEvent],instance,typeArgument*/ +/*class: global#KeyboardEvent:checks=[$isKeyboardEvent],instance,typeArgument*/ void main() { print('InputElement'); diff --git a/tests/compiler/dart2js/rti/emission/fixed_type_argument.dart b/tests/compiler/dart2js/rti/emission/fixed_type_argument.dart index 3db4d67aef4..0d862eb3126 100644 --- a/tests/compiler/dart2js/rti/emission/fixed_type_argument.dart +++ b/tests/compiler/dart2js/rti/emission/fixed_type_argument.dart @@ -16,8 +16,7 @@ class C { method(void Function(T) f) {} } -/*strong.class: D:checks=[$asC],instance*/ -/*omit.class: D:checks=[],instance*/ +/*class: D:checks=[],instance*/ class D extends C {} main() { diff --git a/tests/compiler/dart2js/rti/emission/fixed_type_argument_implements.dart b/tests/compiler/dart2js/rti/emission/fixed_type_argument_implements.dart index 61cf1c83cc9..a7f3624531a 100644 --- a/tests/compiler/dart2js/rti/emission/fixed_type_argument_implements.dart +++ b/tests/compiler/dart2js/rti/emission/fixed_type_argument_implements.dart @@ -16,7 +16,7 @@ class B implements A {} /*omit.class: C:*/ class C {} -/*strong.class: D:checks=[$asC,$isC],instance*/ +/*strong.class: D:checks=[$isC],instance*/ /*omit.class: D:checks=[],instance*/ class D implements C {} diff --git a/tests/compiler/dart2js/rti/emission/function_typed_arguments.dart b/tests/compiler/dart2js/rti/emission/function_typed_arguments.dart index a434694724d..60796eb3cc2 100644 --- a/tests/compiler/dart2js/rti/emission/function_typed_arguments.dart +++ b/tests/compiler/dart2js/rti/emission/function_typed_arguments.dart @@ -19,7 +19,7 @@ main() { /*class: B1:checkedTypeArgument,checks=[],typeArgument*/ class B1 {} -/*class: C1:checkedTypeArgument,checks=[$asB1],typeArgument*/ +/*class: C1:checkedTypeArgument,checks=[],typeArgument*/ class C1 extends B1 {} @pragma('dart2js:noInline') @@ -51,7 +51,7 @@ _test2(f) => f is A; /*class: B3:checkedTypeArgument,checks=[],typeArgument*/ class B3 {} -/*class: C3:checkedTypeArgument,checks=[$asB3],typeArgument*/ +/*class: C3:checkedTypeArgument,checks=[],typeArgument*/ class C3 extends B3 {} @pragma('dart2js:noInline') @@ -67,7 +67,7 @@ _test3(f) => f is A)>; /*class: B4:checkedTypeArgument,checks=[],typeArgument*/ class B4 {} -/*class: C4:checks=[$asB4],typeArgument*/ +/*class: C4:checks=[],typeArgument*/ class C4 extends B4 {} @pragma('dart4js:noInline') @@ -83,7 +83,7 @@ _test4(f) => f is A Function()>; /*class: B5:checkedTypeArgument,checks=[],typeArgument*/ class B5 {} -/*class: C5:checkedTypeArgument,checks=[$asB5],typeArgument*/ +/*class: C5:checkedTypeArgument,checks=[],typeArgument*/ class C5 extends B5 {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/jsinterop.dart b/tests/compiler/dart2js/rti/emission/jsinterop.dart index b677aba09dd..9cadf45a0b6 100644 --- a/tests/compiler/dart2js/rti/emission/jsinterop.dart +++ b/tests/compiler/dart2js/rti/emission/jsinterop.dart @@ -35,7 +35,7 @@ class D { external factory D(); } -/*class: E:checkedInstance,checks=[],instance*/ +/*class: E:checks=[],instance,typeLiteral*/ class E { E(); } diff --git a/tests/compiler/dart2js/rti/emission/jsinterop_generic.dart b/tests/compiler/dart2js/rti/emission/jsinterop_generic.dart index aec7f0da9e0..1a38ffe949b 100644 --- a/tests/compiler/dart2js/rti/emission/jsinterop_generic.dart +++ b/tests/compiler/dart2js/rti/emission/jsinterop_generic.dart @@ -9,7 +9,7 @@ library foo; // TODO(johnniwinther): Avoid generating duplicate is/as function when multiple // jsinterop classes implement the same interface. -/*class: global#JavaScriptObject:checks=[$asA,$asB,$asB,$isA,$isB,$isB],instance*/ +/*class: global#JavaScriptObject:checks=[$isA,$isB,$isB],instance*/ import 'package:expect/expect.dart'; import 'package:js/js.dart'; diff --git a/tests/compiler/dart2js/rti/emission/jsinterop_generic_factory_args.dart b/tests/compiler/dart2js/rti/emission/jsinterop_generic_factory_args.dart index 49c64c3c3a1..cd2577a097b 100644 --- a/tests/compiler/dart2js/rti/emission/jsinterop_generic_factory_args.dart +++ b/tests/compiler/dart2js/rti/emission/jsinterop_generic_factory_args.dart @@ -7,7 +7,7 @@ @JS() library foo; -/*class: global#JavaScriptObject:checks=[$asA,$isA]*/ +/*class: global#JavaScriptObject:checks=[$isA]*/ import 'package:expect/expect.dart'; import 'package:js/js.dart'; diff --git a/tests/compiler/dart2js/rti/emission/list.dart b/tests/compiler/dart2js/rti/emission/list.dart index 72f7d541f63..6dc93d8caa1 100644 --- a/tests/compiler/dart2js/rti/emission/list.dart +++ b/tests/compiler/dart2js/rti/emission/list.dart @@ -2,13 +2,13 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/ +/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/ /*strong.class: global#JSArray:checkedInstance,checks=[$isIterable],instance*/ -/*omit.class: global#JSArray:checkedInstance,checks=[$isIterable],instance*/ +/*omit.class: global#JSArray:checks=[$isIterable],instance*/ /*class: global#Iterable:checkedInstance*/ -/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/ -/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/ class A {} /*strong.class: B:checkedInstance,checks=[],typeArgument*/ diff --git a/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart b/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart index c62e2c85a45..a873118e6ea 100644 --- a/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart +++ b/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart @@ -5,7 +5,7 @@ import 'package:expect/expect.dart'; /*strong.class: global#JSArray:checkedInstance,checks=[$isIterable,$isList],instance*/ -/*omit.class: global#JSArray:checkedInstance,checks=[$isList],instance*/ +/*omit.class: global#JSArray:checks=[$isList],instance*/ @pragma('dart2js:noInline') method() { diff --git a/tests/compiler/dart2js/rti/emission/mixin_mixin2.dart b/tests/compiler/dart2js/rti/emission/mixin_mixin2.dart index d2957cbb382..578d0e1f562 100644 --- a/tests/compiler/dart2js/rti/emission/mixin_mixin2.dart +++ b/tests/compiler/dart2js/rti/emission/mixin_mixin2.dart @@ -17,22 +17,22 @@ class A = Object with M; /*class: B:checks=[],indirectInstance*/ class B = Object with A; -/*class: C:checks=[$asM],indirectInstance*/ +/*class: C:checks=[],indirectInstance*/ class C = Object with M>; -/*class: D:checks=[$asM],indirectInstance*/ +/*class: D:checks=[],indirectInstance*/ class D = Object with C>; -/*class: E:checks=[$asM],instance*/ +/*class: E:checks=[],instance*/ class E extends A {} -/*class: F:checks=[$asM],instance*/ +/*class: F:checks=[],instance*/ class F extends B {} /*class: G:checks=[],instance*/ class G extends C {} -/*class: H:checks=[$asM],instance*/ +/*class: H:checks=[],instance*/ class H extends D> {} main() { diff --git a/tests/compiler/dart2js/rti/emission/mixin_mixin4.dart b/tests/compiler/dart2js/rti/emission/mixin_mixin4.dart index 1b9f2bffe35..0831234e98f 100644 --- a/tests/compiler/dart2js/rti/emission/mixin_mixin4.dart +++ b/tests/compiler/dart2js/rti/emission/mixin_mixin4.dart @@ -23,7 +23,7 @@ class M { /*class: A:checkedInstance*/ class A = Object with M> implements I; -/*class: C:checks=[$asA,$asI,$asJ,$asM,$asS,$isA,$isI,$isJ],instance*/ +/*class: C:checks=[$isA,$isI,$isJ],instance*/ class C = S with A> implements J; @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/mixin_subtype.dart b/tests/compiler/dart2js/rti/emission/mixin_subtype.dart index fbc9b8579d1..2fe7a05f28c 100644 --- a/tests/compiler/dart2js/rti/emission/mixin_subtype.dart +++ b/tests/compiler/dart2js/rti/emission/mixin_subtype.dart @@ -71,13 +71,13 @@ class GI {} /*class: GJ:checkedInstance,checks=[],typeArgument*/ class GJ {} -/*class: GM:checkedInstance,checks=[$asGB,$asGI,$asGJ,$isGA,$isGB,$isGI,$isGJ],typeArgument*/ +/*class: GM:checkedInstance,checks=[$isGA,$isGB,$isGI,$isGJ],typeArgument*/ mixin GM on GA, GB> implements GI>, GJ> {} -/*class: GC:checkedInstance,checks=[$asGB,$isGA,$isGB],typeArgument*/ +/*class: GC:checkedInstance,checks=[$isGA,$isGB],typeArgument*/ class GC implements GA, GB> {} -/*class: GD:checkedInstance,checks=[$asGI,$asGJ,$isGI,$isGJ,$isGM],typeArgument*/ +/*class: GD:checkedInstance,checks=[$isGI,$isGJ,$isGM],typeArgument*/ class GD = GC with GM; @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/mixin_type_arguments.dart b/tests/compiler/dart2js/rti/emission/mixin_type_arguments.dart index 9644a405b01..044ba38e2cf 100644 --- a/tests/compiler/dart2js/rti/emission/mixin_type_arguments.dart +++ b/tests/compiler/dart2js/rti/emission/mixin_type_arguments.dart @@ -47,35 +47,35 @@ class M5 { m5() => "M5<$Tm5>"; } -/*class: C1:checks=[$asM1,$asM2,$asM3,$asM4,$asM5],instance*/ +/*class: C1:checks=[],instance*/ class C1 = Object with M1, M2, M3, M4, M5; -/*class: C2:checks=[$asM1,$asM2,$asM3,$asM4,$asM5],instance*/ +/*class: C2:checks=[],instance*/ class C2 = Object with M1, M2, M3, M4, M5; -/*class: C3:checks=[$asM1,$asM3,$asM4,$asM5],instance*/ +/*class: C3:checks=[],instance*/ class C3 = Object with M1, M2, M3, M4, M5; -/*class: C4:checks=[$asM1,$asM2,$asM3,$asM4,$asM5],instance*/ +/*class: C4:checks=[],instance*/ class C4 extends Object with M1, M2, M3, M4, M5 {} -/*class: C5:checks=[$asM1,$asM2,$asM3,$asM4,$asM5],instance*/ +/*class: C5:checks=[],instance*/ class C5 extends Object with M1, M2, M3, M4, M5 {} -/*class: C6:checks=[$asM1,$asM3,$asM4,$asM5],instance*/ +/*class: C6:checks=[],instance*/ class C6 extends Object with M1, M2, M3, M4, M5 {} -/*class: C7:checks=[$asM1,$asM2,$asM3,$asM4,$asM5],instance*/ +/*class: C7:checks=[],instance*/ class C7 = Object with M1, M2, M3, M4, M5; -/*class: C8:checks=[$asM1,$asM2,$asM3,$asM4,$asM5],instance*/ +/*class: C8:checks=[],instance*/ class C8 extends Object with M1, M2, M3, M4, M5 {} -/*class: C9:checks=[$asM1,$asM2,$asM3,$asM4,$asM5],instance*/ +/*class: C9:checks=[],instance*/ class C9 = Object with M1>, M2>, M3>, M4>, M5>; -/*class: CA:checks=[$asM1,$asM2,$asM3,$asM4,$asM5],instance*/ +/*class: CA:checks=[],instance*/ class CA extends Object with M1>, M2>, M3>, M4>, M5> {} diff --git a/tests/compiler/dart2js/rti/emission/regress_18713.dart b/tests/compiler/dart2js/rti/emission/regress_18713.dart index 53b012a40de..212e67b56de 100644 --- a/tests/compiler/dart2js/rti/emission/regress_18713.dart +++ b/tests/compiler/dart2js/rti/emission/regress_18713.dart @@ -16,7 +16,7 @@ class S { Type get getSType => Y; } -/*class: TS:checks=[$asS0,$asT],instance*/ +/*class: TS:checks=[],instance*/ class TS = T with S; @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/replaced_type_variable.dart b/tests/compiler/dart2js/rti/emission/replaced_type_variable.dart index 091258b0cd7..778a75eec25 100644 --- a/tests/compiler/dart2js/rti/emission/replaced_type_variable.dart +++ b/tests/compiler/dart2js/rti/emission/replaced_type_variable.dart @@ -5,7 +5,7 @@ import 'package:expect/expect.dart'; // This class is inlined away. -/*class: Class:*/ +/*class: Class:checks=[],instance*/ class Class { const Class(); diff --git a/tests/compiler/dart2js/rti/emission/self.dart b/tests/compiler/dart2js/rti/emission/self.dart index 7c91d8daf87..07fdeea7e14 100644 --- a/tests/compiler/dart2js/rti/emission/self.dart +++ b/tests/compiler/dart2js/rti/emission/self.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/*class: C:checkedInstance,checks=[],instance,typeLiteral*/ +/*class: C:checks=[],instance,typeLiteral*/ class C {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/superclass.dart b/tests/compiler/dart2js/rti/emission/superclass.dart index d383f65bcc1..05591605997 100644 --- a/tests/compiler/dart2js/rti/emission/superclass.dart +++ b/tests/compiler/dart2js/rti/emission/superclass.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/*class: B:checkedInstance,checks=[],indirectInstance,typeLiteral*/ +/*class: B:checks=[],indirectInstance,typeLiteral*/ class B {} /*class: C:checks=[],instance*/ diff --git a/tests/compiler/dart2js/rti/emission/superclass_as.dart b/tests/compiler/dart2js/rti/emission/superclass_as.dart index d9685dd87bc..d6366d3c79e 100644 --- a/tests/compiler/dart2js/rti/emission/superclass_as.dart +++ b/tests/compiler/dart2js/rti/emission/superclass_as.dart @@ -13,7 +13,7 @@ class B { method() => new A(); } -/*class: C:checks=[$asB],instance*/ +/*class: C:checks=[],instance*/ class C extends B {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/superclass_complex.dart b/tests/compiler/dart2js/rti/emission/superclass_complex.dart index 37c4e228c8f..d7c93bd9e6c 100644 --- a/tests/compiler/dart2js/rti/emission/superclass_complex.dart +++ b/tests/compiler/dart2js/rti/emission/superclass_complex.dart @@ -8,7 +8,7 @@ class A {} /*class: B:checkedInstance,checks=[],indirectInstance*/ class B {} -/*class: C:checks=[$asB],instance*/ +/*class: C:checks=[],instance*/ class C extends B> {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/superclass_fixed.dart b/tests/compiler/dart2js/rti/emission/superclass_fixed.dart index 2330a1e9043..8470cd4aad1 100644 --- a/tests/compiler/dart2js/rti/emission/superclass_fixed.dart +++ b/tests/compiler/dart2js/rti/emission/superclass_fixed.dart @@ -5,7 +5,7 @@ /*class: B:checkedInstance,checks=[],indirectInstance*/ class B {} -/*class: C:checks=[$asB],instance*/ +/*class: C:checks=[],instance*/ class C extends B {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/superclass_supertype_complex.dart b/tests/compiler/dart2js/rti/emission/superclass_supertype_complex.dart index 2a6c7f422ed..d69c0d4bbf3 100644 --- a/tests/compiler/dart2js/rti/emission/superclass_supertype_complex.dart +++ b/tests/compiler/dart2js/rti/emission/superclass_supertype_complex.dart @@ -11,7 +11,7 @@ class B {} /*class: C:checks=[],indirectInstance*/ class C {} -/*class: D:checks=[$asB,$isB],instance*/ +/*class: D:checks=[$isB],instance*/ class D extends C implements B> {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/superclass_supertype_fixed.dart b/tests/compiler/dart2js/rti/emission/superclass_supertype_fixed.dart index 7c660ccbdb1..b6ee559726c 100644 --- a/tests/compiler/dart2js/rti/emission/superclass_supertype_fixed.dart +++ b/tests/compiler/dart2js/rti/emission/superclass_supertype_fixed.dart @@ -8,7 +8,7 @@ class A {} /*class: B:checkedInstance*/ class B {} -/*class: C:checks=[$asB,$isB],instance*/ +/*class: C:checks=[$isB],instance*/ class C extends A implements B {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/superclasses_non_trivial.dart b/tests/compiler/dart2js/rti/emission/superclasses_non_trivial.dart index 5105e9c74e6..3d58258c88a 100644 --- a/tests/compiler/dart2js/rti/emission/superclasses_non_trivial.dart +++ b/tests/compiler/dart2js/rti/emission/superclasses_non_trivial.dart @@ -5,7 +5,7 @@ /*class: A:checkedInstance,checks=[],indirectInstance*/ class A {} -/*class: B:checks=[$asA],instance*/ +/*class: B:checks=[],instance*/ class B extends A {} // Non-trivial substitution of A. /*class: C:checks=[],instance*/ diff --git a/tests/compiler/dart2js/rti/emission/superclasses_trivial.dart b/tests/compiler/dart2js/rti/emission/superclasses_trivial.dart index da3622c755d..19ba5cf24c5 100644 --- a/tests/compiler/dart2js/rti/emission/superclasses_trivial.dart +++ b/tests/compiler/dart2js/rti/emission/superclasses_trivial.dart @@ -5,10 +5,10 @@ /*class: A:checkedInstance,checks=[],indirectInstance*/ class A {} -/*class: B:checks=[$asA],instance*/ +/*class: B:checks=[],instance*/ class B extends A {} // Non-trivial substitution of A. -/*class: C:checks=[$asA,$asB],instance*/ +/*class: C:checks=[],instance*/ class C extends B {} // Trivial substitution of A @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/supertype_complex.dart b/tests/compiler/dart2js/rti/emission/supertype_complex.dart index 34104d87518..5a4b4584a6a 100644 --- a/tests/compiler/dart2js/rti/emission/supertype_complex.dart +++ b/tests/compiler/dart2js/rti/emission/supertype_complex.dart @@ -8,7 +8,7 @@ class A {} /*class: B:checkedInstance*/ class B {} -/*class: C:checks=[$asB,$isB],instance*/ +/*class: C:checks=[$isB],instance*/ class C implements B> {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/supertype_fixed.dart b/tests/compiler/dart2js/rti/emission/supertype_fixed.dart index 8866c90206e..2470677364a 100644 --- a/tests/compiler/dart2js/rti/emission/supertype_fixed.dart +++ b/tests/compiler/dart2js/rti/emission/supertype_fixed.dart @@ -5,7 +5,7 @@ /*class: B:checkedInstance*/ class B {} -/*class: C:checks=[$asB,$isB],instance*/ +/*class: C:checks=[$isB],instance*/ class C implements B {} @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/supertypes_non_trivial.dart b/tests/compiler/dart2js/rti/emission/supertypes_non_trivial.dart index ad90ae45202..04106c56706 100644 --- a/tests/compiler/dart2js/rti/emission/supertypes_non_trivial.dart +++ b/tests/compiler/dart2js/rti/emission/supertypes_non_trivial.dart @@ -5,10 +5,10 @@ /*class: A:checkedInstance,checks=[],indirectInstance*/ class A {} -/*class: B:checks=[$asA],instance*/ +/*class: B:checks=[],instance*/ class B extends A {} // Non-trivial substitution of A. -/*class: C:checks=[$asA,$isA],instance*/ +/*class: C:checks=[$isA],instance*/ class C implements B {} // Non-trivial substitution of A @pragma('dart2js:noInline') diff --git a/tests/compiler/dart2js/rti/emission/supertypes_trivial.dart b/tests/compiler/dart2js/rti/emission/supertypes_trivial.dart index 31ac65a3dde..04429d2e0fa 100644 --- a/tests/compiler/dart2js/rti/emission/supertypes_trivial.dart +++ b/tests/compiler/dart2js/rti/emission/supertypes_trivial.dart @@ -5,7 +5,7 @@ /*class: A:checkedInstance,checks=[],indirectInstance*/ class A {} -/*class: B:checks=[$asA],instance*/ +/*class: B:checks=[],instance*/ class B extends A {} // Non-trivial substitution of A. /*class: C:checks=[$isA],instance*/ diff --git a/tests/compiler/dart2js/rti/emission/tear_off_types.dart b/tests/compiler/dart2js/rti/emission/tear_off_types.dart index 86d41eb8a0e..e3b0d2c4829 100644 --- a/tests/compiler/dart2js/rti/emission/tear_off_types.dart +++ b/tests/compiler/dart2js/rti/emission/tear_off_types.dart @@ -17,7 +17,7 @@ main() { /*class: A1:checkedTypeArgument,checks=[],typeArgument*/ class A1 {} -/*class: B1:checks=[$asA1],typeArgument*/ +/*class: B1:checks=[],typeArgument*/ class B1 extends A1 {} @pragma('dart2js:noInline') @@ -38,8 +38,8 @@ bool _test1(f) => f is A1 Function(); /*omit.class: A2:checkedTypeArgument,checks=[],typeArgument*/ class A2 {} -/*strong.class: B2:checkedInstance,checkedTypeArgument,checks=[$asA2],typeArgument*/ -/*omit.class: B2:checkedTypeArgument,checks=[$asA2],typeArgument*/ +/*strong.class: B2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/ +/*omit.class: B2:checkedTypeArgument,checks=[],typeArgument*/ class B2 extends A2 {} @pragma('dart2js:noInline') @@ -60,8 +60,8 @@ bool _test2(f) => f is void Function(A2); /*omit.class: A3:checkedTypeArgument,checks=[],typeArgument*/ class A3 {} -/*strong.class: B3:checkedInstance,checkedTypeArgument,checks=[$asA3],typeArgument*/ -/*omit.class: B3:checkedTypeArgument,checks=[$asA3],typeArgument*/ +/*strong.class: B3:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/ +/*omit.class: B3:checkedTypeArgument,checks=[],typeArgument*/ class B3 extends A3 {} @pragma('dart3js:noInline') @@ -101,7 +101,7 @@ _test4(f) => f is B4 Function(); /*class: A5:checkedTypeArgument,checks=[],typeArgument*/ class A5 {} -/*class: B5:checks=[$asA5],typeArgument*/ +/*class: B5:checks=[],typeArgument*/ class B5 extends A5 {} @pragma('dart2js:noInline') @@ -121,7 +121,7 @@ bool _test5(f) => f is void Function(void Function(A5)); /*class: A6:checkedTypeArgument,checks=[],typeArgument*/ class A6 {} -/*class: B6:checkedTypeArgument,checks=[$asA6],typeArgument*/ +/*class: B6:checkedTypeArgument,checks=[],typeArgument*/ class B6 extends A6 {} @pragma('dart6js:noInline') diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json index bebed039791..a77b5d545f9 100644 --- a/tools/bots/test_matrix.json +++ b/tools/bots/test_matrix.json @@ -385,17 +385,17 @@ "options": { "host-checked": true }}, - "dart2js-new-rti-(linux|mac|win)-x64-d8": { + "dart2js-old-rti-(linux|mac|win)-x64-d8": { "options": { - "builder-tag": "new_rti", - "dart2js-options": ["--experiment-new-rti"], + "builder-tag": "old_rti", + "dart2js-options": ["--use-old-rti"], "host-checked": true }}, - "dart2js-new-rti-minified-csp-(linux|mac|win)-x64-d8": { + "dart2js-old-rti-minified-csp-(linux|mac|win)-x64-d8": { "options": { - "builder-tag": "new_rti", + "builder-tag": "old_rti", "csp": true, - "dart2js-options": ["--experiment-new-rti"], + "dart2js-options": ["--use-old-rti"], "minified": true, "use-sdk": true }}, @@ -1674,9 +1674,9 @@ "arguments": ["dart2js_bot"] }, { - "name": "dart2js new-rti tests", + "name": "dart2js old-rti tests", "arguments": [ - "-ndart2js-new-rti-linux-x64-d8", + "-ndart2js-old-rti-linux-x64-d8", "--dart2js-batch", "language_2", "corelib_2", @@ -1687,9 +1687,9 @@ "fileset": "dart2js_hostasserts" }, { - "name": "dart2js new-rti minified+csp tests", + "name": "dart2js old-rti minified+csp tests", "arguments": [ - "-ndart2js-new-rti-minified-csp-linux-x64-d8", + "-ndart2js-old-rti-minified-csp-linux-x64-d8", "--dart2js-batch", "language_2", "corelib_2",