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

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

Issue 10449072: Fix type-check failure... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // The IsolateMirror for the current isolate. 95 // The IsolateMirror for the current isolate.
96 static IsolateMirror localIsolateMirror() { 96 static IsolateMirror localIsolateMirror() {
97 if (_localIsolateMirror === null) { 97 if (_localIsolateMirror === null) {
98 _localIsolateMirror = makeLocalIsolateMirror(); 98 _localIsolateMirror = makeLocalIsolateMirror();
99 } 99 }
100 return _localIsolateMirror; 100 return _localIsolateMirror;
101 } 101 }
102 102
103 // Creates a new local IsolateMirror. 103 // Creates a new local IsolateMirror.
104 static bool makeLocalIsolateMirror() 104 static IsolateMirror makeLocalIsolateMirror()
105 native 'Mirrors_makeLocalIsolateMirror'; 105 native 'Mirrors_makeLocalIsolateMirror';
106 106
107 static Future<IsolateMirror> isolateMirrorOf(SendPort port) { 107 static Future<IsolateMirror> isolateMirrorOf(SendPort port) {
108 Completer<IsolateMirror> completer = new Completer<IsolateMirror>(); 108 Completer<IsolateMirror> completer = new Completer<IsolateMirror>();
109 if (isLocalPort(port)) { 109 if (isLocalPort(port)) {
110 // Make a local isolate mirror. 110 // Make a local isolate mirror.
111 completer.complete(localIsolateMirror()); 111 completer.complete(localIsolateMirror());
112 } else { 112 } else {
113 // Make a remote isolate mirror. 113 // Make a remote isolate mirror.
114 throw new NotImplementedException('Remote mirrors not yet implemented'); 114 throw new NotImplementedException('Remote mirrors not yet implemented');
115 } 115 }
116 return completer.future; 116 return completer.future;
117 } 117 }
118 } 118 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698