Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart

Issue 26166003: Revert "Add TypeVariable object on runtime to support reflection on type variables." and "Fix type … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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) => 341 .map((DartType type) => rti.getTypeRepresentation(type, (_){}));
342 rti.getTypeRepresentationWithHashes(type, (_){}));
343 jsAst.Expression argumentList = 342 jsAst.Expression argumentList =
344 new jsAst.LiteralString('[${arguments.join(', ')}]'); 343 new jsAst.LiteralString('[${arguments.join(', ')}]');
345 return new jsAst.Call(getHelperProperty(backend.getSetRuntimeTypeInfo()), 344 return new jsAst.Call(getHelperProperty(backend.getSetRuntimeTypeInfo()),
346 [value, argumentList]); 345 [value, argumentList]);
347 } 346 }
348 return value; 347 return value;
349 } 348 }
350 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698