anchor.diff:      return js_ast.PropertyAccess(js_ast.This(), jsMethod.name);
     }
   
  +  /// If [e] is a [TypeLiteral] or a [TypeLiteralConstant] expression, return
  +  /// the underlying [DartType], otherwise returns null.
  +  // TODO(sigmund,nshahan): remove all uses of type literals in the runtime
  +  // libraries, so that this pattern can be deleted.
  +  DartType getTypeLiteralType(Expression e) {
  +    if (e is TypeLiteral) return e.type;
  +    if (e is ConstantExpression) {
  +      var constant = e.constant;
  +      if (constant is TypeLiteralConstant) {
  +        return constant.type.withDeclaredNullability(Nullability.nonNullable);
  +      }
  +    }
  +    return null;
  +  }
  +
     @override
     js_ast.Expression visitStaticInvocation(StaticInvocation node) {
       var target = node.target;
  
positive.code:         }
        } else if (node.arguments.positional.length == 1) {
          var firstArg = node.arguments.positional[0];
          if (name == 'unwrapType' && firstArg is TypeLiteral) {
            return _emitType(firstArg.type);
          }
          if (name == 'extensionSymbol' && firstArg is StringLiteral) {
            return getSymbol(getExtensionSymbolInternal(firstArg.value));
  
negative.code:             'tearoffInterop(#)', [_emitStaticTarget(node.procedure)]);
        }
      }
      if (_isInForeignJS && node is TypeLiteralConstant) {
        return _emitTypeLiteral(
            node.type.withDeclaredNullability(Nullability.nonNullable));
      }
      if (isSdkInternalRuntime(_currentLibrary) || node is PrimitiveConstant) {
        return super.visitConstant(node);
      }
  