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

Side by Side Diff: sdk/lib/_internal/js_runtime/lib/js_mirrors.dart

Issue 2754013002: Format all dart: library files (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 unified diff | Download patch
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 library dart._js_mirrors; 5 library dart._js_mirrors;
6 6
7 import 'dart:_js_embedded_names' 7 import 'dart:_js_embedded_names'
8 show 8 show
9 JsGetName, 9 JsGetName,
10 ALL_CLASSES, 10 ALL_CLASSES,
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2751 for (var name in extractKeys(_namedArguments)) { 2751 for (var name in extractKeys(_namedArguments)) {
2752 var type = JS('', '#[#]', _namedArguments, name); 2752 var type = JS('', '#[#]', _namedArguments, name);
2753 result.add(new JsParameterMirror(name, this, type)); 2753 result.add(new JsParameterMirror(name, this, type));
2754 } 2754 }
2755 } 2755 }
2756 return _cachedParameters = 2756 return _cachedParameters =
2757 new UnmodifiableListView<ParameterMirror>(result); 2757 new UnmodifiableListView<ParameterMirror>(result);
2758 } 2758 }
2759 2759
2760 bool get hasReflectedType => true; 2760 bool get hasReflectedType => true;
2761 Type get reflectedType => _cachedReflectedType 2761 Type get reflectedType => _cachedReflectedType ??=
2762 ??= createRuntimeType(runtimeTypeToString(_typeData)); 2762 createRuntimeType(runtimeTypeToString(_typeData));
2763 2763
2764 String _unmangleIfPreserved(String mangled) { 2764 String _unmangleIfPreserved(String mangled) {
2765 String result = unmangleGlobalNameIfPreservedAnyways(mangled); 2765 String result = unmangleGlobalNameIfPreservedAnyways(mangled);
2766 if (result != null) return result; 2766 if (result != null) return result;
2767 return mangled; 2767 return mangled;
2768 } 2768 }
2769 2769
2770 String toString() { 2770 String toString() {
2771 if (_cachedToString != null) return _cachedToString; 2771 if (_cachedToString != null) return _cachedToString;
2772 var s = "FunctionTypeMirror on '("; 2772 var s = "FunctionTypeMirror on '(";
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
3081 // have a part (following a '.') that starts with '_'. 3081 // have a part (following a '.') that starts with '_'.
3082 const int UNDERSCORE = 0x5f; 3082 const int UNDERSCORE = 0x5f;
3083 if (name.isEmpty) return true; 3083 if (name.isEmpty) return true;
3084 int index = -1; 3084 int index = -1;
3085 do { 3085 do {
3086 if (name.codeUnitAt(index + 1) == UNDERSCORE) return false; 3086 if (name.codeUnitAt(index + 1) == UNDERSCORE) return false;
3087 index = name.indexOf('.', index + 1); 3087 index = name.indexOf('.', index + 1);
3088 } while (index >= 0 && index + 1 < name.length); 3088 } while (index >= 0 && index + 1 < name.length);
3089 return true; 3089 return true;
3090 } 3090 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698