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

Side by Side Diff: runtime/lib/mirrors_impl.dart

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 // These values are allowed to be passed directly over the wire. 7 // These values are allowed to be passed directly over the wire.
8 bool _isSimpleValue(var value) { 8 bool _isSimpleValue(var value) {
9 return (value == null || value is num || value is String || value is bool); 9 return (value == null || value is num || value is String || value is bool);
10 } 10 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 parameters); 87 parameters);
88 _functionTypes[sigString] = mirror; 88 _functionTypes[sigString] = mirror;
89 } 89 }
90 return mirror; 90 return mirror;
91 } 91 }
92 92
93 String toString() => "MirrorSystem for isolate '${isolate.debugName}'"; 93 String toString() => "MirrorSystem for isolate '${isolate.debugName}'";
94 } 94 }
95 95
96 abstract class _LocalMirrorImpl implements Mirror { 96 abstract class _LocalMirrorImpl implements Mirror {
97 int hashCode() { 97 int get hashCode {
98 throw new NotImplementedException('Mirror.hashCode() is not implemented'); 98 throw new NotImplementedException('Mirror.hashCode is not implemented');
99 } 99 }
100 100
101 // Local mirrors always return the same MirrorSystem. This field 101 // Local mirrors always return the same MirrorSystem. This field
102 // is more interesting once we implement remote mirrors. 102 // is more interesting once we implement remote mirrors.
103 MirrorSystem get mirrors => _Mirrors.currentMirrorSystem(); 103 MirrorSystem get mirrors => _Mirrors.currentMirrorSystem();
104 } 104 }
105 105
106 class _LocalIsolateMirrorImpl extends _LocalMirrorImpl 106 class _LocalIsolateMirrorImpl extends _LocalMirrorImpl
107 implements IsolateMirror { 107 implements IsolateMirror {
108 _LocalIsolateMirrorImpl(this.debugName, this._rootLibrary) {} 108 _LocalIsolateMirrorImpl(this.debugName, this._rootLibrary) {}
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 964
965 // Creates a new local InstanceMirror 965 // Creates a new local InstanceMirror
966 static InstanceMirror makeLocalInstanceMirror(Object reflectee) 966 static InstanceMirror makeLocalInstanceMirror(Object reflectee)
967 native 'Mirrors_makeLocalInstanceMirror'; 967 native 'Mirrors_makeLocalInstanceMirror';
968 968
969 // Creates a new local mirror for some Object. 969 // Creates a new local mirror for some Object.
970 static InstanceMirror reflect(Object reflectee) { 970 static InstanceMirror reflect(Object reflectee) {
971 return makeLocalInstanceMirror(reflectee); 971 return makeLocalInstanceMirror(reflectee);
972 } 972 }
973 } 973 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698