| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 '../constants/values.dart'; | 7 import '../constants/values.dart'; |
| 8 import '../elements/entities.dart'; | 8 import '../elements/entities.dart'; |
| 9 import '../elements/types.dart'; | 9 import '../elements/types.dart'; |
| 10 import '../io/code_output.dart'; | 10 import '../io/code_output.dart'; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 } | 275 } |
| 276 | 276 |
| 277 @override | 277 @override |
| 278 jsAst.Expression visitType(TypeConstantValue constant, [_]) { | 278 jsAst.Expression visitType(TypeConstantValue constant, [_]) { |
| 279 DartType type = constant.representedType; | 279 DartType type = constant.representedType; |
| 280 jsAst.Name typeName; | 280 jsAst.Name typeName; |
| 281 Entity element; | 281 Entity element; |
| 282 if (type is InterfaceType) { | 282 if (type is InterfaceType) { |
| 283 element = type.element; | 283 element = type.element; |
| 284 } else if (type is TypedefType) { | 284 } else if (type is TypedefType) { |
| 285 // TODO(redemption): Handle typedef type literals from .dill. | |
| 286 element = type.element; | 285 element = type.element; |
| 287 } else { | 286 } else { |
| 288 assert(type is DynamicType); | 287 assert(type is DynamicType); |
| 289 } | 288 } |
| 290 typeName = _namer.runtimeTypeName(element); | 289 typeName = _namer.runtimeTypeName(element); |
| 291 return new jsAst.Call(getHelperProperty(_commonElements.createRuntimeType), | 290 return new jsAst.Call(getHelperProperty(_commonElements.createRuntimeType), |
| 292 [js.quoteName(typeName)]); | 291 [js.quoteName(typeName)]); |
| 293 } | 292 } |
| 294 | 293 |
| 295 @override | 294 @override |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 _rtiEncoder.getTypeRepresentation(_emitter, argument, unexpected)); | 364 _rtiEncoder.getTypeRepresentation(_emitter, argument, unexpected)); |
| 366 } | 365 } |
| 367 return new jsAst.ArrayInitializer(arguments); | 366 return new jsAst.ArrayInitializer(arguments); |
| 368 } | 367 } |
| 369 | 368 |
| 370 @override | 369 @override |
| 371 jsAst.Expression visitDeferred(DeferredConstantValue constant, [_]) { | 370 jsAst.Expression visitDeferred(DeferredConstantValue constant, [_]) { |
| 372 return constantReferenceGenerator(constant.referenced); | 371 return constantReferenceGenerator(constant.referenced); |
| 373 } | 372 } |
| 374 } | 373 } |
| OLD | NEW |