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

Unified Diff: lib/compiler/implementation/dart_backend/backend.dart

Issue 10835018: Filter out core and auxilary libs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart_backend/backend.dart
diff --git a/lib/compiler/implementation/dart_backend/backend.dart b/lib/compiler/implementation/dart_backend/backend.dart
index bae2f85a9610a1af78cd1e8b18c8ff843c62af8a..f997fefb579d076a84a25033dd66f104b9071b48 100644
--- a/lib/compiler/implementation/dart_backend/backend.dart
+++ b/lib/compiler/implementation/dart_backend/backend.dart
@@ -60,10 +60,15 @@ class DartBackend extends Backend {
* Tells whether we should output given element. Corelib classes like
* Object should not be in the resulting code.
*/
- bool shouldOutput(Element element) {
- return element.kind !== ElementKind.VOID
- && element.getLibrary() !== compiler.coreLibrary;
- }
+ final LIBS_TO_IGNORE = [
+ compiler.coreImplLibrary,
+ compiler.jsHelperLibrary,
+ compiler.interceptorsLibrary,
+ compiler.coreLibrary,
+ ];
+ bool shouldOutput(Element element) =>
+ element.kind !== ElementKind.VOID &&
+ LIBS_TO_IGNORE.indexOf(element.getLibrary()) == -1;
try {
Emitter emitter = new Emitter(compiler);
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698