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

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

Issue 15861028: Implement MethodMirror.metadata. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments and deal with private members of BoundClosure Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 7 /**
8 * Assigns JavaScript identifiers to Dart variables, class-names and members. 8 * Assigns JavaScript identifiers to Dart variables, class-names and members.
9 */ 9 */
10 class Namer implements ClosureNamer { 10 class Namer implements ClosureNamer {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 _jsVariableReserved.addAll(reservedPropertySymbols); 169 _jsVariableReserved.addAll(reservedPropertySymbols);
170 _jsVariableReserved.addAll(reservedGlobalSymbols); 170 _jsVariableReserved.addAll(reservedGlobalSymbols);
171 } 171 }
172 return _jsVariableReserved; 172 return _jsVariableReserved;
173 } 173 }
174 174
175 final String CURRENT_ISOLATE; 175 final String CURRENT_ISOLATE;
176 176
177 final String getterPrefix = r'get$'; 177 final String getterPrefix = r'get$';
178 final String setterPrefix = r'set$'; 178 final String setterPrefix = r'set$';
179 final String metadataField = '@';
179 180
180 /** 181 /**
181 * Map from top-level or static elements to their unique identifiers provided 182 * Map from top-level or static elements to their unique identifiers provided
182 * by [getName]. 183 * by [getName].
183 * 184 *
184 * Invariant: Keys must be declaration elements. 185 * Invariant: Keys must be declaration elements.
185 */ 186 */
186 final Compiler compiler; 187 final Compiler compiler;
187 final Map<Element, String> globals; 188 final Map<Element, String> globals;
188 final Map<String, LibraryElement> shortPrivateNameOwners; 189 final Map<String, LibraryElement> shortPrivateNameOwners;
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 hash = hash ^ (hash >> 6); 1154 hash = hash ^ (hash >> 6);
1154 return hash; 1155 return hash;
1155 } 1156 }
1156 1157
1157 static int _finish(int hash) { 1158 static int _finish(int hash) {
1158 hash = _MASK & (hash + (((_MASK >> 3) & hash) << 3)); 1159 hash = _MASK & (hash + (((_MASK >> 3) & hash) << 3));
1159 hash = hash & (hash >> 11); 1160 hash = hash & (hash >> 11);
1160 return _MASK & (hash + (((_MASK >> 15) & hash) << 15)); 1161 return _MASK & (hash + (((_MASK >> 15) & hash) << 15));
1161 } 1162 }
1162 } 1163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698