| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 | 4 |
| 5 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart'; | 8 import '../common/names.dart'; |
| 9 import '../constants/constructors.dart'; | 9 import '../constants/constructors.dart'; |
| 10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 return function; | 498 return function; |
| 499 } | 499 } |
| 500 } | 500 } |
| 501 // If [member] is not a valid `noSuchMethod` the target is | 501 // If [member] is not a valid `noSuchMethod` the target is |
| 502 // `Object.superNoSuchMethod`. | 502 // `Object.superNoSuchMethod`. |
| 503 break; | 503 break; |
| 504 } | 504 } |
| 505 } | 505 } |
| 506 FunctionEntity function = elementEnvironment.lookupClassMember( | 506 FunctionEntity function = elementEnvironment.lookupClassMember( |
| 507 commonElements.objectClass, Identifiers.noSuchMethod_); | 507 commonElements.objectClass, Identifiers.noSuchMethod_); |
| 508 assert(invariant(cls, function != null, | 508 assert(function != null, |
| 509 message: "No super noSuchMethod found for class $cls.")); | 509 failedAt(cls, "No super noSuchMethod found for class $cls.")); |
| 510 return function; | 510 return function; |
| 511 } | 511 } |
| 512 } | 512 } |
| 513 | 513 |
| 514 /// Visitor that converts string literals and concatenations of string literals | 514 /// Visitor that converts string literals and concatenations of string literals |
| 515 /// into the string value. | 515 /// into the string value. |
| 516 class Stringifier extends ir.ExpressionVisitor<String> { | 516 class Stringifier extends ir.ExpressionVisitor<String> { |
| 517 @override | 517 @override |
| 518 String visitStringLiteral(ir.StringLiteral node) => node.value; | 518 String visitStringLiteral(ir.StringLiteral node) => node.value; |
| 519 | 519 |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 TypeMask getInferredTypeOf(MemberEntity member); | 927 TypeMask getInferredTypeOf(MemberEntity member); |
| 928 | 928 |
| 929 /// Returns the inferred type of a dynamic [selector] access on a receiver of | 929 /// Returns the inferred type of a dynamic [selector] access on a receiver of |
| 930 /// type [mask]. | 930 /// type [mask]. |
| 931 TypeMask selectorTypeOf(Selector selector, TypeMask mask); | 931 TypeMask selectorTypeOf(Selector selector, TypeMask mask); |
| 932 | 932 |
| 933 /// Returns the returned type annotation in the [nativeBehavior]. | 933 /// Returns the returned type annotation in the [nativeBehavior]. |
| 934 TypeMask typeFromNativeBehavior( | 934 TypeMask typeFromNativeBehavior( |
| 935 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld); | 935 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld); |
| 936 } | 936 } |
| OLD | NEW |