| 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 part of js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 class ConstantEmitter { | 7 class ConstantEmitter { |
| 8 ConstantReferenceEmitter _referenceEmitter; | 8 ConstantReferenceEmitter _referenceEmitter; |
| 9 ConstantInitializerEmitter _initializerEmitter; | 9 ConstantInitializerEmitter _initializerEmitter; |
| 10 | 10 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 jsAst.Expression maybeAddTypeArguments(InterfaceType type, | 332 jsAst.Expression maybeAddTypeArguments(InterfaceType type, |
| 333 jsAst.Expression value) { | 333 jsAst.Expression value) { |
| 334 if (type is InterfaceType && | 334 if (type is InterfaceType && |
| 335 !type.treatAsRaw && | 335 !type.treatAsRaw && |
| 336 backend.classNeedsRti(type.element)) { | 336 backend.classNeedsRti(type.element)) { |
| 337 InterfaceType interface = type; | 337 InterfaceType interface = type; |
| 338 RuntimeTypes rti = backend.rti; | 338 RuntimeTypes rti = backend.rti; |
| 339 Iterable<String> arguments = interface.typeArguments | 339 Iterable<String> arguments = interface.typeArguments |
| 340 .toList(growable: false) | 340 .toList(growable: false) |
| 341 .map((DartType type) => rti.getTypeRepresentation(type, (_){})); | 341 .map((DartType type) => |
| 342 rti.getTypeRepresentationWithHashes(type, (_){})); |
| 342 jsAst.Expression argumentList = | 343 jsAst.Expression argumentList = |
| 343 new jsAst.LiteralString('[${arguments.join(', ')}]'); | 344 new jsAst.LiteralString('[${arguments.join(', ')}]'); |
| 344 return new jsAst.Call(getHelperProperty(backend.getSetRuntimeTypeInfo()), | 345 return new jsAst.Call(getHelperProperty(backend.getSetRuntimeTypeInfo()), |
| 345 [value, argumentList]); | 346 [value, argumentList]); |
| 346 } | 347 } |
| 347 return value; | 348 return value; |
| 348 } | 349 } |
| 349 } | 350 } |
| OLD | NEW |