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

Side by Side Diff: lib/compiler/implementation/elements/elements.dart

Issue 10854158: Make selector registration in the resolver and code generator more explicit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge from master. Created 8 years, 4 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 #library('elements'); 5 #library('elements');
6 6
7 #import('dart:uri'); 7 #import('dart:uri');
8 8
9 #import('../tree/tree.dart'); 9 #import('../tree/tree.dart');
10 #import('../scanner/scannerlib.dart'); 10 #import('../scanner/scannerlib.dart');
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 return (element !== null) 1279 return (element !== null)
1280 && element.isInstanceMember() 1280 && element.isInstanceMember()
1281 && (element.kind === ElementKind.FIELD 1281 && (element.kind === ElementKind.FIELD
1282 || element.kind === ElementKind.GETTER 1282 || element.kind === ElementKind.GETTER
1283 || element.kind === ElementKind.SETTER); 1283 || element.kind === ElementKind.SETTER);
1284 } 1284 }
1285 1285
1286 static bool isStaticOrTopLevel(Element element) { 1286 static bool isStaticOrTopLevel(Element element) {
1287 return (element != null) 1287 return (element != null)
1288 && !element.isInstanceMember() 1288 && !element.isInstanceMember()
1289 && !element.isPrefix()
1289 && element.enclosingElement !== null 1290 && element.enclosingElement !== null
1290 && (element.enclosingElement.kind == ElementKind.CLASS || 1291 && (element.enclosingElement.kind == ElementKind.CLASS ||
1291 element.enclosingElement.kind == ElementKind.COMPILATION_UNIT || 1292 element.enclosingElement.kind == ElementKind.COMPILATION_UNIT ||
1292 element.enclosingElement.kind == ElementKind.LIBRARY); 1293 element.enclosingElement.kind == ElementKind.LIBRARY);
1293 } 1294 }
1294 1295
1295 static bool isStaticOrTopLevelField(Element element) { 1296 static bool isStaticOrTopLevelField(Element element) {
1296 return isStaticOrTopLevel(element) 1297 return isStaticOrTopLevel(element)
1297 && (element.kind === ElementKind.FIELD 1298 && (element.kind === ElementKind.FIELD
1298 || element.kind === ElementKind.GETTER 1299 || element.kind === ElementKind.GETTER
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 Node parseNode(compiler) => cachedNode; 1452 Node parseNode(compiler) => cachedNode;
1452 1453
1453 String toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1454 String toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1454 1455
1455 TypeVariableElement cloneTo(Element enclosing, DiagnosticListener listener) { 1456 TypeVariableElement cloneTo(Element enclosing, DiagnosticListener listener) {
1456 TypeVariableElement result = 1457 TypeVariableElement result =
1457 new TypeVariableElement(name, enclosing, node, type, bound); 1458 new TypeVariableElement(name, enclosing, node, type, bound);
1458 return result; 1459 return result;
1459 } 1460 }
1460 } 1461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698