Chromium Code Reviews| Index: frog/leg/scanner/scanner_task.dart |
| =================================================================== |
| --- frog/leg/scanner/scanner_task.dart (revision 4354) |
| +++ frog/leg/scanner/scanner_task.dart (working copy) |
| @@ -12,6 +12,20 @@ |
| if (compilationUnit.kind === ElementKind.LIBRARY) { |
| processScriptTags(compilationUnit); |
| } |
| + for (Link<Element> link = compilationUnit.topLevelElements; |
|
ahe
2012/02/19 14:38:02
This should be in the if case above. Also, I'd lik
ngeoffray
2012/02/20 09:09:37
How about elements defined in a non-library compil
|
| + !link.isEmpty(); link = link.tail) { |
| + Element element = link.head; |
| + if (element.kind == ElementKind.CLASS) { |
| + ClassElement classElement = element; |
| + if (element.isNative()) { |
| + compiler.registerInstantiatedClass(classElement); |
| + // Also parse the node to know all its methods because |
| + // otherwise it will only be parsed if there is a call to |
| + // one of its constructor. |
| + element.parseNode(compiler); |
| + } |
| + } |
| + } |
| }); |
| } |