Chromium Code Reviews| 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 // VM-specific implementation of the dart:mirrors library. | 5 // VM-specific implementation of the dart:mirrors library. |
| 6 | 6 |
| 7 import "dart:collection"; | 7 import "dart:collection"; |
| 8 | 8 |
| 9 // These values are allowed to be passed directly over the wire. | 9 // These values are allowed to be passed directly over the wire. |
| 10 bool _isSimpleValue(var value) { | 10 bool _isSimpleValue(var value) { |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 453 Type get reflectedType { | 453 Type get reflectedType { |
| 454 if (!hasReflectedType) { | 454 if (!hasReflectedType) { |
| 455 throw new UnsupportedError( | 455 throw new UnsupportedError( |
| 456 "Declarations of generics have no reflected type"); | 456 "Declarations of generics have no reflected type"); |
| 457 } | 457 } |
| 458 return _reflectedType; | 458 return _reflectedType; |
| 459 } | 459 } |
| 460 | 460 |
| 461 Symbol _simpleName; | 461 Symbol _simpleName; |
| 462 Symbol get simpleName { | 462 Symbol get simpleName { |
| 463 // dynamic, void and the function types have their names set eagerly in the | 463 // dynamic, void and the function types have their names set eagerly in the |
|
rmacnak
2013/09/10 23:38:51
Comment out-of-sync. All but anonymous mixin appl
Michael Lippautz (Google)
2013/09/11 01:01:16
Done.
| |
| 464 // constructor. | 464 // constructor. |
| 465 if(_simpleName == null) { | 465 if(_simpleName == null) { |
| 466 var simpleString = _name(_reflectee); | 466 _simpleName = this._mixinApplicationName; |
| 467 if (simpleString.contains('&')) { | |
| 468 _simpleName = this._mixinApplicationName; | |
| 469 } else { | |
| 470 _simpleName = _s(simpleString); | |
| 471 } | |
| 472 } | 467 } |
| 473 return _simpleName; | 468 return _simpleName; |
| 474 } | 469 } |
| 475 | 470 |
| 476 Symbol _qualifiedName = null; | 471 Symbol _qualifiedName = null; |
| 477 Symbol get qualifiedName { | 472 Symbol get qualifiedName { |
| 478 if (_qualifiedName == null) { | 473 if (_qualifiedName == null) { |
| 479 _qualifiedName = _computeQualifiedName(owner, simpleName); | 474 _qualifiedName = _computeQualifiedName(owner, simpleName); |
| 480 } | 475 } |
| 481 return _qualifiedName; | 476 return _qualifiedName; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 711 } | 706 } |
| 712 | 707 |
| 713 bool operator ==(other) { | 708 bool operator ==(other) { |
| 714 return this.runtimeType == other.runtimeType && | 709 return this.runtimeType == other.runtimeType && |
| 715 this._reflectee == other._reflectee && | 710 this._reflectee == other._reflectee && |
| 716 this._reflectedType == other._reflectedType; | 711 this._reflectedType == other._reflectedType; |
| 717 } | 712 } |
| 718 | 713 |
| 719 int get hashCode => simpleName.hashCode; | 714 int get hashCode => simpleName.hashCode; |
| 720 | 715 |
| 721 static _name(reflectee) | |
| 722 native "ClassMirror_name"; | |
| 723 | |
| 724 static _library(reflectee) | 716 static _library(reflectee) |
| 725 native "ClassMirror_library"; | 717 native "ClassMirror_library"; |
| 726 | 718 |
| 727 static _supertype(reflectee) | 719 static _supertype(reflectee) |
| 728 native "ClassMirror_supertype"; | 720 native "ClassMirror_supertype"; |
| 729 | 721 |
| 730 static _interfaces(reflectee) | 722 static _interfaces(reflectee) |
| 731 native "ClassMirror_interfaces"; | 723 native "ClassMirror_interfaces"; |
| 732 | 724 |
| 733 static _computeMixin(reflectee) | 725 static _computeMixin(reflectee) |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1381 if (typeMirror == null) { | 1373 if (typeMirror == null) { |
| 1382 typeMirror = makeLocalTypeMirror(key); | 1374 typeMirror = makeLocalTypeMirror(key); |
| 1383 _instanitationCache[key] = typeMirror; | 1375 _instanitationCache[key] = typeMirror; |
| 1384 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { | 1376 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { |
| 1385 _declarationCache[key] = typeMirror; | 1377 _declarationCache[key] = typeMirror; |
| 1386 } | 1378 } |
| 1387 } | 1379 } |
| 1388 return typeMirror; | 1380 return typeMirror; |
| 1389 } | 1381 } |
| 1390 } | 1382 } |
| OLD | NEW |