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

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

Issue 23452029: Address comments from CL 23304012. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: emitConvertToFastObjectFunction Created 7 years, 3 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 | « dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 38b5424bc0abedcb627f4ca27846959c67abd2bb..10c423dede80dad35c8300c8857696dbc53cb5bd 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -806,9 +806,17 @@ class Namer implements ClosureNamer {
String getNameOfGlobalFunction(FunctionElement element) => getNameX(element);
- /// Returns true if [element] is stored on CURRENT_ISOLATE ('$').
+ /// Returns true if [element] is stored on CURRENT_ISOLATE ('$'). We intend
+ /// to store only mutable static state in [CURRENT_ISOLATE], constants are
+ /// stored in 'C', and functions, accessors, classes, etc. are stored in one
+ /// of the other objects in [reservedGlobalObjectNames].
bool isPropertyOfCurrentIsolate(Element element) {
+ // TODO(ahe): Make sure this method's documentation is always true and
+ // remove the word "intend".
return
+ // TODO(ahe): Re-write these tests to be positive (so it only returns
+ // true for static/top-level mutable fields). Right now, a number of
+ // other elements, such as bound closures also live in CURRENT_ISOLATE.
!element.isAccessor() &&
!element.isClass() &&
!element.isConstructor() &&
@@ -816,11 +824,7 @@ class Namer implements ClosureNamer {
!element.isLibrary();
}
- /// Returns [CURRENT_ISOLATE] or one of [reservedGlobalObjectNames]. We
- /// intend to store only mutable static state in [CURRENT_ISOLATE], constants
- /// are stored in 'C', and functions, accessors, classes, etc. are stored in
- /// one of the other objects in [reservedGlobalObjectNames].
- // TODO(ahe): Make sure the above is always true and remove the word "intend".
+ /// Returns [CURRENT_ISOLATE] or one of [reservedGlobalObjectNames].
String globalObjectFor(Element element) {
if (isPropertyOfCurrentIsolate(element)) return CURRENT_ISOLATE;
LibraryElement library = element.getLibrary();
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698