| OLD | NEW |
| 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 | 4 |
| 5 import '../common.dart'; | 5 import '../common.dart'; |
| 6 import '../common_elements.dart'; | 6 import '../common_elements.dart'; |
| 7 import '../elements/elements.dart' show ErroneousElement; | 7 import '../elements/elements.dart' show ErroneousElement; |
| 8 import '../elements/entities.dart'; | 8 import '../elements/entities.dart'; |
| 9 import '../elements/resolution_types.dart' show MalformedType; | 9 import '../elements/resolution_types.dart' show MalformedType; |
| 10 import '../elements/types.dart'; | 10 import '../elements/types.dart'; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 | 38 |
| 39 class MalformedCheckedModeHelper extends CheckedModeHelper { | 39 class MalformedCheckedModeHelper extends CheckedModeHelper { |
| 40 const MalformedCheckedModeHelper(String name) : super(name); | 40 const MalformedCheckedModeHelper(String name) : super(name); |
| 41 | 41 |
| 42 CallStructure get callStructure => CallStructure.TWO_ARGS; | 42 CallStructure get callStructure => CallStructure.TWO_ARGS; |
| 43 | 43 |
| 44 void generateAdditionalArguments(SsaCodeGenerator codegen, Namer namer, | 44 void generateAdditionalArguments(SsaCodeGenerator codegen, Namer namer, |
| 45 HTypeConversion node, List<jsAst.Expression> arguments) { | 45 HTypeConversion node, List<jsAst.Expression> arguments) { |
| 46 // TODO(johnniwinther): Support malformed types in [types.dart]. | 46 // TODO(redemption): Support malformed types in [types.dart]. |
| 47 MalformedType type = node.typeExpression; | 47 MalformedType type = node.typeExpression; |
| 48 ErroneousElement element = type.element; | 48 ErroneousElement element = type.element; |
| 49 arguments.add(js.escapedString(element.message)); | 49 arguments.add(js.escapedString(element.message)); |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 | 52 |
| 53 class PropertyCheckedModeHelper extends CheckedModeHelper { | 53 class PropertyCheckedModeHelper extends CheckedModeHelper { |
| 54 const PropertyCheckedModeHelper(String name) : super(name); | 54 const PropertyCheckedModeHelper(String name) : super(name); |
| 55 | 55 |
| 56 CallStructure get callStructure => CallStructure.TWO_ARGS; | 56 CallStructure get callStructure => CallStructure.TWO_ARGS; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 if (nativeCheck) { | 284 if (nativeCheck) { |
| 285 // TODO(karlklose): can we get rid of this branch when we use | 285 // TODO(karlklose): can we get rid of this branch when we use |
| 286 // interceptors? | 286 // interceptors? |
| 287 return 'intercepted$suffix'; | 287 return 'intercepted$suffix'; |
| 288 } else { | 288 } else { |
| 289 return 'property$suffix'; | 289 return 'property$suffix'; |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 } | 292 } |
| OLD | NEW |