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

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

Issue 10653002: Fix some warnings in the core library identified by the static analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments 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 | « runtime/lib/growable_array.dart ('k') | runtime/lib/string_buffer.dart » ('j') | 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // language objects (except for objects of type VMReference, of 43 // language objects (except for objects of type VMReference, of
44 // course). 44 // course).
45 VMReference _reference; 45 VMReference _reference;
46 } 46 }
47 47
48 abstract class _LocalObjectMirrorImpl extends _LocalVMObjectMirrorImpl 48 abstract class _LocalObjectMirrorImpl extends _LocalVMObjectMirrorImpl
49 implements ObjectMirror { 49 implements ObjectMirror {
50 _LocalObjectMirrorImpl(ref) : super(ref) {} 50 _LocalObjectMirrorImpl(ref) : super(ref) {}
51 51
52 Future<InstanceMirror> invoke(String memberName, 52 Future<InstanceMirror> invoke(String memberName,
53 List<Object> positionalArguments, 53 List positionalArguments,
54 [Map<String,Object> namedArguments]) { 54 [Map<String,Dynamic> namedArguments]) {
55 if (namedArguments !== null) { 55 if (namedArguments !== null) {
56 throw new NotImplementedException('named arguments not implemented'); 56 throw new NotImplementedException('named arguments not implemented');
57 } 57 }
58 // Walk the arguments and make sure they are legal. 58 // Walk the arguments and make sure they are legal.
59 for (int i = 0; i < positionalArguments.length; i++) { 59 for (int i = 0; i < positionalArguments.length; i++) {
60 var arg = positionalArguments[i]; 60 var arg = positionalArguments[i];
61 if (arg is Mirror) { 61 if (arg is Mirror) {
62 if (arg is! InstanceMirror) { 62 if (arg is! InstanceMirror) {
63 throw new MirrorException( 63 throw new MirrorException(
64 'positional argument $i ($arg) was not an InstanceMirror'); 64 'positional argument $i ($arg) was not an InstanceMirror');
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 // Creates a new local InstanceMirror 303 // Creates a new local InstanceMirror
304 static InstanceMirror makeLocalInstanceMirror(Object reflectee) 304 static InstanceMirror makeLocalInstanceMirror(Object reflectee)
305 native 'Mirrors_makeLocalInstanceMirror'; 305 native 'Mirrors_makeLocalInstanceMirror';
306 306
307 // The IsolateMirror for the current isolate. 307 // The IsolateMirror for the current isolate.
308 static InstanceMirror mirrorOf(Object reflectee) { 308 static InstanceMirror mirrorOf(Object reflectee) {
309 return makeLocalInstanceMirror(reflectee); 309 return makeLocalInstanceMirror(reflectee);
310 } 310 }
311 } 311 }
OLDNEW
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | runtime/lib/string_buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698