| Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| index 99b1dae4bf595b127dcfa7fc5e77273911429b5b..b266dfd435c498cb87a1d2facebf377369b6ffe5 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| @@ -105,23 +105,6 @@ class FunctionTypeCheckedModeHelper extends CheckedModeHelper {
|
| }
|
| }
|
|
|
| -class AmbiguousTypeCheckedModeHelper extends CheckedModeHelper {
|
| - const AmbiguousTypeCheckedModeHelper(SourceString name) : super(name);
|
| -
|
| - void generateAdditionalArguments(SsaCodeGenerator codegen,
|
| - HTypeConversion node,
|
| - List<jsAst.Expression> arguments) {
|
| - DartType type = node.typeExpression;
|
| - assert(type.containsAmbiguousTypes);
|
| - String reasons = Types.fetchReasonsFromAmbiguousType(type);
|
| -
|
| - arguments.add(js.string(quote('$type')));
|
| - arguments.add(js.string(quote(reasons)));
|
| - }
|
| -
|
| - String quote(String string) => string.replaceAll('"', r'\"');
|
| -}
|
| -
|
| /*
|
| * Invariants:
|
| * canInline(function) implies canInline(function, insideLoop:true)
|
| @@ -853,13 +836,6 @@ class JavaScriptBackend extends Backend {
|
| // We also need the native variant of the check (for DOM types).
|
| helper = getNativeCheckedModeHelper(type, typeCast: false);
|
| if (helper != null) world.addToWorkList(helper.getElement(compiler));
|
| - if (type.containsAmbiguousTypes) {
|
| - enqueueInResolution(getThrowMalformedSubtypeError(), elements);
|
| - return;
|
| - }
|
| - } else if (type.containsAmbiguousTypes) {
|
| - registerThrowRuntimeError(elements);
|
| - return;
|
| }
|
| bool isTypeVariable = type.kind == TypeKind.TYPE_VARIABLE;
|
| if (!type.isRaw || type.containsTypeVariables) {
|
| @@ -1120,16 +1096,7 @@ class JavaScriptBackend extends Backend {
|
| Element element = type.element;
|
| bool nativeCheck = nativeCheckOnly ||
|
| emitter.nativeEmitter.requiresNativeIsCheck(element);
|
| - if (type.containsAmbiguousTypes) {
|
| - // Check for malformed types first, because the type may be a list type
|
| - // with a malformed argument type.
|
| - if (nativeCheckOnly) return null;
|
| - return typeCast
|
| - ? const AmbiguousTypeCheckedModeHelper(
|
| - const SourceString('malformedTypeCast'))
|
| - : const AmbiguousTypeCheckedModeHelper(
|
| - const SourceString('malformedTypeCheck'));
|
| - } else if (type == compiler.types.voidType) {
|
| + if (type == compiler.types.voidType) {
|
| assert(!typeCast); // Cannot cast to void.
|
| if (nativeCheckOnly) return null;
|
| return const CheckedModeHelper(const SourceString('voidTypeCheck'));
|
| @@ -1255,11 +1222,6 @@ class JavaScriptBackend extends Backend {
|
| return compiler.findHelper(const SourceString('throwRuntimeError'));
|
| }
|
|
|
| - Element getThrowMalformedSubtypeError() {
|
| - return compiler.findHelper(
|
| - const SourceString('throwMalformedSubtypeError'));
|
| - }
|
| -
|
| Element getThrowAbstractClassInstantiationError() {
|
| return compiler.findHelper(
|
| const SourceString('throwAbstractClassInstantiationError'));
|
|
|