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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart

Issue 51883006: Revert "Substitute types in generic superclasses and interfaces." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_emitter/reflection_data_parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 class ClassEmitter extends CodeEmitterHelper { 7 class ClassEmitter extends CodeEmitterHelper {
8 /** 8 /**
9 * Documentation wanted -- johnniwinther 9 * Documentation wanted -- johnniwinther
10 * 10 *
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 if (!buffer.isEmpty) { 348 if (!buffer.isEmpty) {
349 buffer.write(',$n$n'); 349 buffer.write(',$n$n');
350 } 350 }
351 buffer.write('$className:$_'); 351 buffer.write('$className:$_');
352 buffer.write(jsAst.prettyPrint(builder.toObjectInitializer(), compiler)); 352 buffer.write(jsAst.prettyPrint(builder.toObjectInitializer(), compiler));
353 String reflectionName = task.getReflectionName(classElement, className); 353 String reflectionName = task.getReflectionName(classElement, className);
354 if (reflectionName != null) { 354 if (reflectionName != null) {
355 if (!backend.isNeededForReflection(classElement)) { 355 if (!backend.isNeededForReflection(classElement)) {
356 buffer.write(',$n$n"+$reflectionName": 0'); 356 buffer.write(',$n$n"+$reflectionName": 0');
357 } else { 357 } else {
358 List<int> types = <int>[]; 358 List<int> interfaces = <int>[];
359 if (classElement.supertype != null) { 359 for (DartType interface in classElement.interfaces) {
360 types.add( 360 interfaces.add(task.metadataEmitter.reifyType(interface));
361 task.metadataEmitter.reifyType(classElement.supertype));
362 } 361 }
363 for (DartType interface in classElement.interfaces) { 362 buffer.write(',$n$n"+$reflectionName": $interfaces');
364 types.add(task.metadataEmitter.reifyType(interface));
365 }
366 buffer.write(',$n$n"+$reflectionName": $types');
367 } 363 }
368 } 364 }
369 } 365 }
370 366
371 /** 367 /**
372 * Calls [addField] for each of the fields of [element]. 368 * Calls [addField] for each of the fields of [element].
373 * 369 *
374 * [element] must be a [ClassElement] or a [LibraryElement]. 370 * [element] must be a [ClassElement] or a [LibraryElement].
375 * 371 *
376 * If [element] is a [ClassElement], the static fields of the class are 372 * If [element] is a [ClassElement], the static fields of the class are
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 ? new Selector.getter(member.name, member.getLibrary()) 600 ? new Selector.getter(member.name, member.getLibrary())
605 : new Selector.setter(member.name, member.getLibrary()); 601 : new Selector.setter(member.name, member.getLibrary());
606 String reflectionName = task.getReflectionName(selector, name); 602 String reflectionName = task.getReflectionName(selector, name);
607 if (reflectionName != null) { 603 if (reflectionName != null) {
608 var reflectable = 604 var reflectable =
609 js(backend.isAccessibleByReflection(member) ? '1' : '0'); 605 js(backend.isAccessibleByReflection(member) ? '1' : '0');
610 builder.addProperty('+$reflectionName', reflectable); 606 builder.addProperty('+$reflectionName', reflectable);
611 } 607 }
612 } 608 }
613 } 609 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_emitter/reflection_data_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698