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

Side by Side Diff: pkg/polymer/lib/src/loader.dart

Issue 26734004: use symbol literals instead of const ctor in packages (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/src/instance.dart ('k') | pkg/polymer_expressions/example/person.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 polymer; 5 part of polymer;
6 6
7 /** Annotation used to automatically register polymer elements. */ 7 /** Annotation used to automatically register polymer elements. */
8 class CustomTag { 8 class CustomTag {
9 final String tagName; 9 final String tagName;
10 const CustomTag(this.tagName); 10 const CustomTag(this.tagName);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (uri.scheme == '' && srcUrl != null) { 69 if (uri.scheme == '' && srcUrl != null) {
70 uri = Uri.parse(path.normalize(path.join(path.dirname(srcUrl), uriString))); 70 uri = Uri.parse(path.normalize(path.join(path.dirname(srcUrl), uriString)));
71 } 71 }
72 var lib = _libs[uri]; 72 var lib = _libs[uri];
73 if (lib == null) { 73 if (lib == null) {
74 print('warning: $uri library not found'); 74 print('warning: $uri library not found');
75 return; 75 return;
76 } 76 }
77 77
78 // Invoke `main`, if present. 78 // Invoke `main`, if present.
79 if (lib.functions[const Symbol('main')] != null) { 79 if (lib.functions[#main] != null) {
80 lib.invoke(const Symbol('main'), const []); 80 lib.invoke(#main, const []);
81 } 81 }
82 82
83 // Search top-level functions marked with @initMethod 83 // Search top-level functions marked with @initMethod
84 for (var f in lib.functions.values) { 84 for (var f in lib.functions.values) {
85 _maybeInvoke(lib, f); 85 _maybeInvoke(lib, f);
86 } 86 }
87 87
88 for (var c in lib.classes.values) { 88 for (var c in lib.classes.values) {
89 // Search for @CustomTag on classes 89 // Search for @CustomTag on classes
90 for (var m in c.metadata) { 90 for (var m in c.metadata) {
(...skipping 30 matching lines...) Expand all
121 print("warning: methods marked with @initMethod should take no " 121 print("warning: methods marked with @initMethod should take no "
122 "arguments, ${method.simpleName} expects some."); 122 "arguments, ${method.simpleName} expects some.");
123 return; 123 return;
124 } 124 }
125 obj.invoke(method.simpleName, const []); 125 obj.invoke(method.simpleName, const []);
126 } 126 }
127 127
128 class _InitMethodAnnotation { 128 class _InitMethodAnnotation {
129 const _InitMethodAnnotation(); 129 const _InitMethodAnnotation();
130 } 130 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/instance.dart ('k') | pkg/polymer_expressions/example/person.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698