| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // _MyClass@6b3832b. -> _MyClass | 187 // _MyClass@6b3832b. -> _MyClass |
| 188 // _MyClass@6b3832b.named -> _MyClass.named | 188 // _MyClass@6b3832b.named -> _MyClass.named |
| 189 // | 189 // |
| 190 static RawString* IdentifierPrettyName(const String& name) { | 190 static RawString* IdentifierPrettyName(const String& name) { |
| 191 intptr_t len = name.Length(); | 191 intptr_t len = name.Length(); |
| 192 intptr_t start = 0; | 192 intptr_t start = 0; |
| 193 intptr_t at_pos = len; // Position of '@' in the name. | 193 intptr_t at_pos = len; // Position of '@' in the name. |
| 194 intptr_t dot_pos = len; // Position of '.' in the name. | 194 intptr_t dot_pos = len; // Position of '.' in the name. |
| 195 bool is_setter = false; | 195 bool is_setter = false; |
| 196 | 196 |
| 197 for (int i = 0; i < name.Length(); i++) { | 197 if (name.Equals(Symbols::TopLevel())) { |
| 198 // Name of invisible top-level class. |
| 199 return Symbols::Empty().raw(); |
| 200 } |
| 201 for (int i = start; i < name.Length(); i++) { |
| 198 if (name.CharAt(i) == ':') { | 202 if (name.CharAt(i) == ':') { |
| 199 ASSERT(start == 0); | 203 ASSERT(start == 0); |
| 200 if (name.CharAt(0) == 's') { | 204 if (name.CharAt(0) == 's') { |
| 201 is_setter = true; | 205 is_setter = true; |
| 202 } | 206 } |
| 203 start = i + 1; | 207 start = i + 1; |
| 204 } else if (name.CharAt(i) == '@') { | 208 } else if (name.CharAt(i) == '@') { |
| 205 ASSERT(at_pos == len); | 209 ASSERT(at_pos == len); |
| 206 at_pos = i; | 210 at_pos = i; |
| 207 } else if (name.CharAt(i) == '.') { | 211 } else if (name.CharAt(i) == '.') { |
| (...skipping 12842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13050 } | 13054 } |
| 13051 return result.raw(); | 13055 return result.raw(); |
| 13052 } | 13056 } |
| 13053 | 13057 |
| 13054 | 13058 |
| 13055 const char* WeakProperty::ToCString() const { | 13059 const char* WeakProperty::ToCString() const { |
| 13056 return "_WeakProperty"; | 13060 return "_WeakProperty"; |
| 13057 } | 13061 } |
| 13058 | 13062 |
| 13059 } // namespace dart | 13063 } // namespace dart |
| OLD | NEW |