| 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" show UnmodifiableListView, UnmodifiableMapView; | 7 import "dart:collection" show UnmodifiableListView, UnmodifiableMapView; |
| 8 import "dart:async" show Future; | 8 import "dart:async" show Future; |
| 9 | 9 |
| 10 var dirty = false; | 10 var dirty = false; |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 : super(reflectee, _s(simpleName)); | 1365 : super(reflectee, _s(simpleName)); |
| 1366 | 1366 |
| 1367 static const kAbstract = 0; | 1367 static const kAbstract = 0; |
| 1368 static const kGetter = 1; | 1368 static const kGetter = 1; |
| 1369 static const kSetter = 2; | 1369 static const kSetter = 2; |
| 1370 static const kConstructor = 3; | 1370 static const kConstructor = 3; |
| 1371 static const kConstCtor = 4; | 1371 static const kConstCtor = 4; |
| 1372 static const kGenerativeCtor = 5; | 1372 static const kGenerativeCtor = 5; |
| 1373 static const kRedirectingCtor = 6; | 1373 static const kRedirectingCtor = 6; |
| 1374 static const kFactoryCtor = 7; | 1374 static const kFactoryCtor = 7; |
| 1375 static const kExternal = 8; |
| 1375 | 1376 |
| 1376 // These offsets much be kept in sync with those in mirrors.h. | 1377 // These offsets much be kept in sync with those in mirrors.h. |
| 1377 bool get isAbstract => 0 != (_kindFlags & (1 << kAbstract)); | 1378 bool get isAbstract => 0 != (_kindFlags & (1 << kAbstract)); |
| 1378 bool get isGetter => 0 != (_kindFlags & (1 << kGetter)); | 1379 bool get isGetter => 0 != (_kindFlags & (1 << kGetter)); |
| 1379 bool get isSetter => 0 != (_kindFlags & (1 << kSetter)); | 1380 bool get isSetter => 0 != (_kindFlags & (1 << kSetter)); |
| 1380 bool get isConstructor => 0 != (_kindFlags & (1 << kConstructor)); | 1381 bool get isConstructor => 0 != (_kindFlags & (1 << kConstructor)); |
| 1381 bool get isConstConstructor => 0 != (_kindFlags & (1 << kConstCtor)); | 1382 bool get isConstConstructor => 0 != (_kindFlags & (1 << kConstCtor)); |
| 1382 bool get isGenerativeConstructor => 0 != (_kindFlags & (1 << kGenerativeCtor)
); | 1383 bool get isGenerativeConstructor => 0 != (_kindFlags & (1 << kGenerativeCtor)
); |
| 1383 bool get isRedirectingConstructor => 0 != (_kindFlags & (1 << kRedirectingCtor
)); | 1384 bool get isRedirectingConstructor => 0 != (_kindFlags & (1 << kRedirectingCtor
)); |
| 1384 bool get isFactoryConstructor => 0 != (_kindFlags & (1 << kFactoryCtor)); | 1385 bool get isFactoryConstructor => 0 != (_kindFlags & (1 << kFactoryCtor)); |
| 1386 bool get isExternal => 0 != (_kindFlags & (1 << kExternal)); |
| 1385 | 1387 |
| 1386 static const _operators = const ["%", "&", "*", "+", "-", "/", "<", "<<", | 1388 static const _operators = const ["%", "&", "*", "+", "-", "/", "<", "<<", |
| 1387 "<=", "==", ">", ">=", ">>", "[]", "[]=", "^", "|", "~", "unary-", "~/"]; | 1389 "<=", "==", ">", ">=", ">>", "[]", "[]=", "^", "|", "~", "unary-", "~/"]; |
| 1388 bool get isOperator => _operators.contains(_n(simpleName)); | 1390 bool get isOperator => _operators.contains(_n(simpleName)); |
| 1389 | 1391 |
| 1390 DeclarationMirror _owner; | 1392 DeclarationMirror _owner; |
| 1391 DeclarationMirror get owner { | 1393 DeclarationMirror get owner { |
| 1392 // For nested closures it is possible, that the mirror for the owner has not | 1394 // For nested closures it is possible, that the mirror for the owner has not |
| 1393 // been created yet. | 1395 // been created yet. |
| 1394 if (_owner == null) { | 1396 if (_owner == null) { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1664 if (typeMirror == null) { | 1666 if (typeMirror == null) { |
| 1665 typeMirror = makeLocalTypeMirror(key); | 1667 typeMirror = makeLocalTypeMirror(key); |
| 1666 _instanitationCache[key] = typeMirror; | 1668 _instanitationCache[key] = typeMirror; |
| 1667 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { | 1669 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { |
| 1668 _declarationCache[key] = typeMirror; | 1670 _declarationCache[key] = typeMirror; |
| 1669 } | 1671 } |
| 1670 } | 1672 } |
| 1671 return typeMirror; | 1673 return typeMirror; |
| 1672 } | 1674 } |
| 1673 } | 1675 } |
| OLD | NEW |