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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 78223004: Diagnose missing @MirrorsUsed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 7 years 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 part of js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 class JavaScriptItemCompilationContext extends ItemCompilationContext { 9 class JavaScriptItemCompilationContext extends ItemCompilationContext {
10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>();
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 {'count': mirrorCount, 1319 {'count': mirrorCount,
1320 'total': totalMethodCount, 1320 'total': totalMethodCount,
1321 'percentage': percentage.round()}); 1321 'percentage': percentage.round()});
1322 for (LibraryElement library in compiler.libraries.values) { 1322 for (LibraryElement library in compiler.libraries.values) {
1323 if (library.isInternalLibrary) continue; 1323 if (library.isInternalLibrary) continue;
1324 for (LibraryTag tag in library.tags) { 1324 for (LibraryTag tag in library.tags) {
1325 Import importTag = tag.asImport(); 1325 Import importTag = tag.asImport();
1326 if (importTag == null) continue; 1326 if (importTag == null) continue;
1327 LibraryElement importedLibrary = library.getLibraryFromTag(tag); 1327 LibraryElement importedLibrary = library.getLibraryFromTag(tag);
1328 if (importedLibrary != compiler.mirrorsLibrary) continue; 1328 if (importedLibrary != compiler.mirrorsLibrary) continue;
1329 MessageKind kind =
1330 compiler.mirrorUsageAnalyzerTask.hasMirrorUsage(library)
1331 ? MessageKind.MIRROR_IMPORT
1332 : MessageKind.MIRROR_IMPORT_NO_USAGE;
1329 compiler.withCurrentElement(library, () { 1333 compiler.withCurrentElement(library, () {
1330 compiler.reportInfo(importTag, MessageKind.MIRROR_IMPORT); 1334 compiler.reportInfo(importTag, kind);
1331 }); 1335 });
1332 } 1336 }
1333 } 1337 }
1334 } 1338 }
1335 } 1339 }
1336 1340
1337 Element getDartClass(Element element) { 1341 Element getDartClass(Element element) {
1338 for (ClassElement dartClass in implementationClasses.keys) { 1342 for (ClassElement dartClass in implementationClasses.keys) {
1339 if (element == implementationClasses[dartClass]) { 1343 if (element == implementationClasses[dartClass]) {
1340 return dartClass; 1344 return dartClass;
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 copy(constant.values); 2000 copy(constant.values);
1997 copy(constant.protoValue); 2001 copy(constant.protoValue);
1998 copy(constant); 2002 copy(constant);
1999 } 2003 }
2000 2004
2001 void visitConstructed(ConstructedConstant constant) { 2005 void visitConstructed(ConstructedConstant constant) {
2002 copy(constant.fields); 2006 copy(constant.fields);
2003 copy(constant); 2007 copy(constant);
2004 } 2008 }
2005 } 2009 }
OLDNEW
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/warnings.dart » ('j') | dart/sdk/lib/mirrors/mirrors.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698