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

Unified Diff: pkg/polymer/lib/polymer.dart

Issue 189213003: Refactoring two pieces of polymer: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/polymer/lib/src/build/mirrors_remover.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/polymer.dart
diff --git a/pkg/polymer/lib/polymer.dart b/pkg/polymer/lib/polymer.dart
index 246b411122ea0029b379ba888f3d1316e2fd7a39..32911a4b52e53c39076a64133cefaa20d0b7c264 100644
--- a/pkg/polymer/lib/polymer.dart
+++ b/pkg/polymer/lib/polymer.dart
@@ -44,17 +44,29 @@ library polymer;
// b7200854b2441a22ce89f6563963f36c50f5150d baseline.
import 'dart:async';
-import 'dart:collection' show HashMap, HashSet, LinkedHashMap;
+import 'dart:collection' show HashMap, HashSet;
import 'dart:html';
import 'dart:js' as js show context;
import 'dart:js' hide context;
+// *** Important Note ***
+// This import is automatically replaced when calling pub build by the
+// mirrors_remover transformer. The transformer will remove any dependencies on
+// dart:mirrors in deployed polymer apps. This and the import to
+// mirror_loader.dart below should be updated in sync with changed in
+// lib/src/build/mirrors_remover.dart.
+//
+// Technically, if we have codegen for expressions we shouldn't need any
+// @MirrorsUsed (since this is for development only), but our test bots don't
+// run pub-build yet. Until then, polymer might be tested with mirror_loader
+// instead of the static_loader, however the actual code there is practically
+// dead ([initializers] will be set programatically with generated code
+// anyways), but the @MirrorsUsed helps reduce the load on our bots.
@MirrorsUsed(metaTargets:
- const [Reflectable, ObservableProperty, PublishedProperty, CustomTag,
- _InitMethodAnnotation],
+ const [Reflectable, ObservableProperty, PublishedProperty, CustomTag],
targets: const [PublishedProperty],
- override: const ['smoke.mirrors', 'polymer'])
-import 'dart:mirrors';
+ override: const ['smoke.mirrors'])
+import 'dart:mirrors' show MirrorsUsed; // ** see important note above
import 'package:logging/logging.dart' show Logger, Level;
import 'package:observe/observe.dart';
@@ -68,6 +80,7 @@ import 'package:template_binding/template_binding.dart';
import 'package:web_components/polyfill.dart' show customElementsReady;
import 'deserialize.dart' as deserialize;
+import 'src/mirror_loader.dart' as loader; // ** see important note above
export 'package:observe/observe.dart';
export 'package:observe/html.dart';
« no previous file with comments | « no previous file | pkg/polymer/lib/src/build/mirrors_remover.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698