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

Side by Side Diff: sdk/lib/_internal/lib/js_mirrors.dart

Issue 189293002: Revert "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/vm/symbols.h ('k') | sdk/lib/mirrors/mirrors.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library dart._js_mirrors; 5 library dart._js_mirrors;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'dart:collection' show 9 import 'dart:collection' show
10 UnmodifiableListView; 10 UnmodifiableListView;
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 return _cachedMetadata = 481 return _cachedMetadata =
482 new UnmodifiableListView<InstanceMirror>(_metadata.map(reflect)); 482 new UnmodifiableListView<InstanceMirror>(_metadata.map(reflect));
483 } 483 }
484 484
485 // TODO(ahe): Test this getter. 485 // TODO(ahe): Test this getter.
486 DeclarationMirror get owner => null; 486 DeclarationMirror get owner => null;
487 487
488 // TODO(ahe): Implement this. 488 // TODO(ahe): Implement this.
489 Function operator [](Symbol name) 489 Function operator [](Symbol name)
490 => throw new UnimplementedError(); 490 => throw new UnimplementedError();
491
492 List<LibraryDependencyMirror> get libraryDependencies
493 => throw new UnimplementedError();
494 } 491 }
495 492
496 String n(Symbol symbol) => _symbol_dev.Symbol.getName(symbol); 493 String n(Symbol symbol) => _symbol_dev.Symbol.getName(symbol);
497 494
498 Symbol s(String name) { 495 Symbol s(String name) {
499 if (name == null) return null; 496 if (name == null) return null;
500 return new _symbol_dev.Symbol.unvalidated(name); 497 return new _symbol_dev.Symbol.unvalidated(name);
501 } 498 }
502 499
503 Symbol setterSymbol(Symbol symbol) => s("${n(symbol)}="); 500 Symbol setterSymbol(Symbol symbol) => s("${n(symbol)}=");
(...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 // have a part (following a '.') that starts with '_'. 2819 // have a part (following a '.') that starts with '_'.
2823 const int UNDERSCORE = 0x5f; 2820 const int UNDERSCORE = 0x5f;
2824 if (name.isEmpty) return true; 2821 if (name.isEmpty) return true;
2825 int index = -1; 2822 int index = -1;
2826 do { 2823 do {
2827 if (name.codeUnitAt(index + 1) == UNDERSCORE) return false; 2824 if (name.codeUnitAt(index + 1) == UNDERSCORE) return false;
2828 index = name.indexOf('.', index + 1); 2825 index = name.indexOf('.', index + 1);
2829 } while (index >= 0 && index + 1 < name.length); 2826 } while (index >= 0 && index + 1 < name.length);
2830 return true; 2827 return true;
2831 } 2828 }
OLDNEW
« no previous file with comments | « runtime/vm/symbols.h ('k') | sdk/lib/mirrors/mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698