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

Unified Diff: pkg/dev_compiler/lib/src/compiler/code_generator.dart

Issue 2772433002: Clarify in dev_compiler docs the reason for the angular whitelist hack (Closed)
Patch Set: Created 3 years, 9 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 | pkg/dev_compiler/lib/src/compiler/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/code_generator.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
index c86ccd4d3fbebece5f8623022109a29f758feac7..50d6c19e5535a112484041abfd2cd437bdcaf34b 100644
--- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
@@ -5872,24 +5872,22 @@ class CodeGenerator extends GeneralizingAstVisitor
return js.statement('#.$code', args);
}
+ // TODO(kevmoo): https://github.com/dart-lang/sdk/issues/27255
+ // TODO(kevmoo): Remove once pkg/angular2 has moved to the new compiler
+ // See https://github.com/dart-lang/angular2/issues/48
+ /// Temporary workaround *cough* total hack *cough*.
+ ///
/// Maps whitelisted files to a list of whitelisted methods
/// within the file.
///
/// If the value is null, the entire file is whitelisted.
///
- // TODO(jmesserly): why is this here, and what can we do to remove it?
- //
- // Hard coded lists are completely unnecessary -- if a feature is needed,
- // metadata, type system features, or command line options are the right way
- // to express it.
- //
- // As it is this is completely unsound and unmaintainable.
- static Map<String, List<String>> _uncheckedWhitelist = {
- 'dom_renderer.dart': ['moveNodesAfterSibling'],
- 'template_ref.dart': ['createEmbeddedView'],
- 'ng_class.dart': ['_applyIterableChanges'],
- 'ng_for.dart': ['_bulkRemove', '_bulkInsert'],
- 'view_container_ref.dart': ['createEmbeddedView'],
+ static const Map<String, List<String>> _uncheckedWhitelist = const {
+ 'dom_renderer.dart': const ['moveNodesAfterSibling'],
+ 'template_ref.dart': const ['createEmbeddedView'],
+ 'ng_class.dart': const ['_applyIterableChanges'],
+ 'ng_for.dart': const ['_bulkRemove', '_bulkInsert'],
+ 'view_container_ref.dart': const ['createEmbeddedView'],
'default_iterable_differ.dart': null,
};
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/src/compiler/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698