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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
323 bool is_setter = false; | 323 bool is_setter = false; |
324 | 324 |
325 for (intptr_t i = start; i < len; i++) { | 325 for (intptr_t i = start; i < len; i++) { |
326 if (name.CharAt(i) == ':') { | 326 if (name.CharAt(i) == ':') { |
327 ASSERT(start == 0); // Only one : is possible in getters or setters. | 327 ASSERT(start == 0); // Only one : is possible in getters or setters. |
328 if (name.CharAt(0) == 's') { | 328 if (name.CharAt(0) == 's') { |
329 is_setter = true; | 329 is_setter = true; |
330 } | 330 } |
331 start = i + 1; | 331 start = i + 1; |
332 } else if (name.CharAt(i) == '@') { | 332 } else if (name.CharAt(i) == '@') { |
333 ASSERT(at_pos == -1); // Only one @ is supported. | 333 // Setters should have only one @ so we know where to put the =. |
334 ASSERT(!is_setter || (at_pos == -1)); | |
rmacnak
2013/10/22 18:32:52
This change allows for names of the form
_Private
| |
334 at_pos = i; | 335 at_pos = i; |
335 } | 336 } |
336 } | 337 } |
337 | 338 |
338 if (start == 0) { | 339 if (start == 0) { |
339 // This unmangled_name is fine as it is. | 340 // This unmangled_name is fine as it is. |
340 return name.raw(); | 341 return name.raw(); |
341 } | 342 } |
342 | 343 |
343 String& result = | 344 String& result = |
(...skipping 15223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15567 return "_MirrorReference"; | 15568 return "_MirrorReference"; |
15568 } | 15569 } |
15569 | 15570 |
15570 | 15571 |
15571 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 15572 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
15572 JSONObject jsobj(stream); | 15573 JSONObject jsobj(stream); |
15573 } | 15574 } |
15574 | 15575 |
15575 | 15576 |
15576 } // namespace dart | 15577 } // namespace dart |
OLD | NEW |