| 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 '../compiler.dart' show Compiler; | 6 import '../compiler.dart' show Compiler; |
| 7 import '../constants/values.dart'; | 7 import '../constants/values.dart'; |
| 8 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
| 9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 10 import '../io/code_output.dart'; | 10 import '../io/code_output.dart'; |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 | 329 |
| 330 jsAst.Expression _reifiedTypeArguments(InterfaceType type) { | 330 jsAst.Expression _reifiedTypeArguments(InterfaceType type) { |
| 331 jsAst.Expression unexpected(TypeVariableType variable) { | 331 jsAst.Expression unexpected(TypeVariableType variable) { |
| 332 reporter.internalError( | 332 reporter.internalError( |
| 333 NO_LOCATION_SPANNABLE, | 333 NO_LOCATION_SPANNABLE, |
| 334 "Unexpected type variable '${variable.getStringAsDeclared(null)}'" | 334 "Unexpected type variable '${variable.getStringAsDeclared(null)}'" |
| 335 " in constant type '${type.getStringAsDeclared(null)}'"); | 335 " in constant type '${type.getStringAsDeclared(null)}'"); |
| 336 return null; | 336 return null; |
| 337 } | 337 } |
| 338 |
| 338 List<jsAst.Expression> arguments = <jsAst.Expression>[]; | 339 List<jsAst.Expression> arguments = <jsAst.Expression>[]; |
| 339 RuntimeTypesEncoder rtiEncoder = backend.rtiEncoder; | 340 RuntimeTypesEncoder rtiEncoder = backend.rtiEncoder; |
| 340 for (DartType argument in type.typeArguments) { | 341 for (DartType argument in type.typeArguments) { |
| 341 arguments.add(rtiEncoder.getTypeRepresentation(argument, unexpected)); | 342 arguments.add(rtiEncoder.getTypeRepresentation(argument, unexpected)); |
| 342 } | 343 } |
| 343 return new jsAst.ArrayInitializer(arguments); | 344 return new jsAst.ArrayInitializer(arguments); |
| 344 } | 345 } |
| 345 | 346 |
| 346 @override | 347 @override |
| 347 jsAst.Expression visitDeferred(DeferredConstantValue constant, [_]) { | 348 jsAst.Expression visitDeferred(DeferredConstantValue constant, [_]) { |
| 348 return constantReferenceGenerator(constant.referenced); | 349 return constantReferenceGenerator(constant.referenced); |
| 349 } | 350 } |
| 350 } | 351 } |
| OLD | NEW |