Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1641883002: Fix analyzer warnings in assertions of the TypeExpression CL (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/codegen/codegen.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 library dart2js.ir_nodes; 4 library dart2js.ir_nodes;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'cps_fragment.dart' show CpsFragment; 7 import 'cps_fragment.dart' show CpsFragment;
8 import 'cps_ir_nodes_sexpr.dart'; 8 import 'cps_ir_nodes_sexpr.dart';
9 import '../constants/values.dart' as values; 9 import '../constants/values.dart' as values;
10 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; 10 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType;
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 class TypeExpression extends Primitive { 1858 class TypeExpression extends Primitive {
1859 final TypeExpressionKind kind; 1859 final TypeExpressionKind kind;
1860 final DartType dartType; 1860 final DartType dartType;
1861 final List<Reference<Primitive>> arguments; 1861 final List<Reference<Primitive>> arguments;
1862 1862
1863 TypeExpression(this.kind, 1863 TypeExpression(this.kind,
1864 this.dartType, 1864 this.dartType,
1865 List<Primitive> arguments) 1865 List<Primitive> arguments)
1866 : this.arguments = _referenceList(arguments) { 1866 : this.arguments = _referenceList(arguments) {
1867 assert(kind == TypeExpressionKind.INSTANCE 1867 assert(kind == TypeExpressionKind.INSTANCE
1868 ? dartType == dartType.element.thisType 1868 ? dartType == (dartType.element as ClassElement).thisType
1869 : true); 1869 : true);
1870 } 1870 }
1871 1871
1872 @override 1872 @override
1873 accept(Visitor visitor) { 1873 accept(Visitor visitor) {
1874 return visitor.visitTypeExpression(this); 1874 return visitor.visitTypeExpression(this);
1875 } 1875 }
1876 1876
1877 bool get hasValue => true; 1877 bool get hasValue => true;
1878 bool get isSafeForElimination => true; 1878 bool get isSafeForElimination => true;
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
2906 plug(new Branch.loose(_definitions.getCopy(node.condition), 2906 plug(new Branch.loose(_definitions.getCopy(node.condition),
2907 _copies[node.trueContinuation.definition], 2907 _copies[node.trueContinuation.definition],
2908 _copies[node.falseContinuation.definition]) 2908 _copies[node.falseContinuation.definition])
2909 ..isStrictCheck = node.isStrictCheck); 2909 ..isStrictCheck = node.isStrictCheck);
2910 } 2910 }
2911 2911
2912 visitUnreachable(Unreachable node) { 2912 visitUnreachable(Unreachable node) {
2913 plug(new Unreachable()); 2913 plug(new Unreachable());
2914 } 2914 }
2915 } 2915 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/codegen/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698