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

Side by Side Diff: lib/compiler/implementation/dart_backend/backend.dart

Issue 10996062: Use static final empty Modifier instead of null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Missing uses fixed. Created 8 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 const bool REMOVE_ASSERTS = false; 5 const bool REMOVE_ASSERTS = false;
6 6
7 class ElementAst { 7 class ElementAst {
8 final Node ast; 8 final Node ast;
9 final TreeElements treeElements; 9 final TreeElements treeElements;
10 10
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 constructor.type = new FunctionType( 353 constructor.type = new FunctionType(
354 compiler.types.voidType, const EmptyLink<DartType>(), 354 compiler.types.voidType, const EmptyLink<DartType>(),
355 constructor); 355 constructor);
356 constructor.cachedNode = new FunctionExpression( 356 constructor.cachedNode = new FunctionExpression(
357 new Send(receiver: classElement.parseNode(compiler).name, 357 new Send(receiver: classElement.parseNode(compiler).name,
358 selector: synthesizedIdentifier), 358 selector: synthesizedIdentifier),
359 new NodeList(beginToken: new StringToken(OPEN_PAREN_INFO, '(', -1), 359 new NodeList(beginToken: new StringToken(OPEN_PAREN_INFO, '(', -1),
360 endToken: new StringToken(CLOSE_PAREN_INFO, ')', -1), 360 endToken: new StringToken(CLOSE_PAREN_INFO, ')', -1),
361 nodes: const EmptyLink<Node>()), 361 nodes: const EmptyLink<Node>()),
362 new EmptyStatement(new StringToken(SEMICOLON_INFO, ';', -1)), 362 new EmptyStatement(new StringToken(SEMICOLON_INFO, ';', -1)),
363 null, null, null, null); 363 null, Modifiers.EMPTY, null, null);
364 364
365 classMembers[classElement].add(constructor); 365 classMembers[classElement].add(constructor);
366 elementAsts[constructor] = 366 elementAsts[constructor] =
367 new ElementAst(constructor.cachedNode, new TreeElementMapping()); 367 new ElementAst(constructor.cachedNode, new TreeElementMapping());
368 } 368 }
369 369
370 // Create all necessary placeholders. 370 // Create all necessary placeholders.
371 PlaceholderCollector collector = 371 PlaceholderCollector collector =
372 new PlaceholderCollector(compiler, fixedMemberNames, elementAsts); 372 new PlaceholderCollector(compiler, fixedMemberNames, elementAsts);
373 // Add synthesizedIdentifier to set of unresolved names to rename it to 373 // Add synthesizedIdentifier to set of unresolved names to rename it to
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } 515 }
516 516
517 compareElements(e0, e1) { 517 compareElements(e0, e1) {
518 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1); 518 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1);
519 if (result != 0) return result; 519 if (result != 0) return result;
520 return compareBy((e) => e.position().charOffset)(e0, e1); 520 return compareBy((e) => e.position().charOffset)(e0, e1);
521 } 521 }
522 522
523 List<Element> sortElements(Collection<Element> elements) => 523 List<Element> sortElements(Collection<Element> elements) =>
524 sorted(elements, compareElements); 524 sorted(elements, compareElements);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698