| OLD | NEW |
| 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 /** | 5 /** |
| 6 * Top level generator object for writing code and keeping track of | 6 * Top level generator object for writing code and keeping track of |
| 7 * dependencies. | 7 * dependencies. |
| 8 * | 8 * |
| 9 * Should have two compilation models, but only one implemented so far. | 9 * Should have two compilation models, but only one implemented so far. |
| 10 * | 10 * |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 int nlibs=0, ntypes=0, nmems=0, nnews=0; | 51 int nlibs=0, ntypes=0, nmems=0, nnews=0; |
| 52 for (var lib in world.libraries.getValues()) { | 52 for (var lib in world.libraries.getValues()) { |
| 53 nlibs += 1; | 53 nlibs += 1; |
| 54 for (var type in lib.types.getValues()) { | 54 for (var type in lib.types.getValues()) { |
| 55 // TODO(jmesserly): we can't accurately track if DOM types are | 55 // TODO(jmesserly): we can't accurately track if DOM types are |
| 56 // created or not, so we need to prepare to handle them. | 56 // created or not, so we need to prepare to handle them. |
| 57 // This should be fixed by tightening up the return types in DOM. | 57 // This should be fixed by tightening up the return types in DOM. |
| 58 // Until then, this 'analysis' just marks all the DOM types as used. | 58 // Until then, this 'analysis' just marks all the DOM types as used. |
| 59 // TODO(jimhug): Do we still need this? Or do/can we handle this by | 59 // TODO(jimhug): Do we still need this? Or do/can we handle this by |
| 60 // using return values? | 60 // using return values? |
| 61 if (type.library.isDom || type.isHiddenNativeType) { | 61 if (type.library.isDomOrHtml || type.isHiddenNativeType) { |
| 62 if (type.isClass) type.markUsed(); | 62 if (type.isClass) type.markUsed(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 ntypes += 1; | 65 ntypes += 1; |
| 66 var allMembers = []; | 66 var allMembers = []; |
| 67 allMembers.addAll(type.constructors.getValues()); | 67 allMembers.addAll(type.constructors.getValues()); |
| 68 allMembers.addAll(type.members.getValues()); | 68 allMembers.addAll(type.members.getValues()); |
| 69 type.factories.forEach((f) => allMembers.add(f)); | 69 type.factories.forEach((f) => allMembers.add(f)); |
| 70 for (var m in allMembers) { | 70 for (var m in allMembers) { |
| 71 if (m.isAbstract || !(m.isMethod || m.isConstructor)) continue; | 71 if (m.isAbstract || !(m.isMethod || m.isConstructor)) continue; |
| (...skipping 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 return true; | 2536 return true; |
| 2537 } | 2537 } |
| 2538 | 2538 |
| 2539 } | 2539 } |
| 2540 | 2540 |
| 2541 class ReturnKind { | 2541 class ReturnKind { |
| 2542 static final int IGNORE = 1; | 2542 static final int IGNORE = 1; |
| 2543 static final int POST = 2; | 2543 static final int POST = 2; |
| 2544 static final int PRE = 3; | 2544 static final int PRE = 3; |
| 2545 } | 2545 } |
| OLD | NEW |