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

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

Issue 27112005: Fix type of Iterable. (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
« no previous file with comments | « no previous file | no next file » | 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 ClassElement classElement, 288 ClassElement classElement,
289 ClassBuilder builder, 289 ClassBuilder builder,
290 CodeBuffer buffer) { 290 CodeBuffer buffer) {
291 var metadata = task.metadataEmitter.buildMetadataFunction(classElement); 291 var metadata = task.metadataEmitter.buildMetadataFunction(classElement);
292 if (metadata != null) { 292 if (metadata != null) {
293 builder.addProperty("@", metadata); 293 builder.addProperty("@", metadata);
294 } 294 }
295 295
296 if (backend.isNeededForReflection(classElement)) { 296 if (backend.isNeededForReflection(classElement)) {
297 Link typeVars = classElement.typeVariables; 297 Link typeVars = classElement.typeVariables;
298 List properties = []; 298 Iterable properties = [];
299 if (task.typeVariableHandler.typeVariablesOf(classElement) != null) { 299 if (task.typeVariableHandler.typeVariablesOf(classElement) != null) {
300 properties = task.typeVariableHandler.typeVariablesOf(classElement) 300 properties = task.typeVariableHandler.typeVariablesOf(classElement)
301 .map(js.toExpression); 301 .map(js.toExpression);
302 } 302 }
303 303
304 ClassElement superclass = classElement.superclass; 304 ClassElement superclass = classElement.superclass;
305 bool hasSuper = superclass != null; 305 bool hasSuper = superclass != null;
306 if ((!properties.isEmpty && !hasSuper) || 306 if ((!properties.isEmpty && !hasSuper) ||
307 (hasSuper && superclass.typeVariables != typeVars)) { 307 (hasSuper && superclass.typeVariables != typeVars)) {
308 builder.addProperty('<>', new jsAst.ArrayInitializer.from(properties)); 308 builder.addProperty('<>', new jsAst.ArrayInitializer.from(properties));
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 ? new Selector.getter(member.name, member.getLibrary()) 593 ? new Selector.getter(member.name, member.getLibrary())
594 : new Selector.setter(member.name, member.getLibrary()); 594 : new Selector.setter(member.name, member.getLibrary());
595 String reflectionName = task.getReflectionName(selector, name); 595 String reflectionName = task.getReflectionName(selector, name);
596 if (reflectionName != null) { 596 if (reflectionName != null) {
597 var reflectable = 597 var reflectable =
598 js(backend.isAccessibleByReflection(member) ? '1' : '0'); 598 js(backend.isAccessibleByReflection(member) ? '1' : '0');
599 builder.addProperty('+$reflectionName', reflectable); 599 builder.addProperty('+$reflectionName', reflectable);
600 } 600 }
601 } 601 }
602 } 602 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698