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

Side by Side Diff: tool/input_sdk/private/debugger.dart

Issue 2208533003: Get rid of library proto information for debugger libraries (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Deletion of library name caching Created 4 years, 4 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
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | tool/sdk_expected_errors.txt » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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._debugger; 5 library dart._debugger;
6 6
7 import 'dart:_foreign_helper' show JS; 7 import 'dart:_foreign_helper' show JS;
8 import 'dart:_runtime' as dart; 8 import 'dart:_runtime' as dart;
9 import 'dart:core'; 9 import 'dart:core';
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 properties.add(new NameValuePair(name: name, value: value)); 500 properties.add(new NameValuePair(name: name, value: value));
501 } 501 }
502 } 502 }
503 503
504 return properties.toList(); 504 return properties.toList();
505 } 505 }
506 } 506 }
507 507
508 /// Formatter for module Dart Library objects. 508 /// Formatter for module Dart Library objects.
509 class LibraryModuleFormatter implements Formatter { 509 class LibraryModuleFormatter implements Formatter {
510 String libraryName; 510 accept(object, config) => dart.getDartLibraryName(object) != null;
511
512 accept(object, config) {
513 libraryName = dart.getDartLibraryName(object);
514 return libraryName != null;
515 }
516 511
517 bool hasChildren(object) => true; 512 bool hasChildren(object) => true;
518 513
519 String preview(object) { 514 String preview(object) {
520 var libraryNames = libraryName.split('/'); 515 var libraryNames = dart.getDartLibraryName(object).split('/');
521 // Library names are received with a repeat directory name, so strip the 516 // Library names are received with a repeat directory name, so strip the
522 // last directory entry here to make the path cleaner. For example, the 517 // last directory entry here to make the path cleaner. For example, the
523 // library "third_party/dart/utf/utf" shoud display as 518 // library "third_party/dart/utf/utf" shoud display as
524 // "third_party/dart/utf/". 519 // "third_party/dart/utf/".
525 if (libraryNames.length > 1) { 520 if (libraryNames.length > 1) {
526 libraryNames[libraryNames.length - 1] = ''; 521 libraryNames[libraryNames.length - 1] = '';
527 } 522 }
528 return 'Library Module: ${libraryNames.join('/')}'; 523 return 'Library Module: ${libraryNames.join('/')}';
529 } 524 }
530 525
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 return children; 838 return children;
844 } 839 }
845 } 840 }
846 841
847 /// This entry point is automatically invoked by the code generated by 842 /// This entry point is automatically invoked by the code generated by
848 /// Dart Dev Compiler 843 /// Dart Dev Compiler
849 registerDevtoolsFormatter() { 844 registerDevtoolsFormatter() {
850 var formatters = [_devtoolsFormatter]; 845 var formatters = [_devtoolsFormatter];
851 JS('', 'dart.global.devtoolsFormatters = #', formatters); 846 JS('', 'dart.global.devtoolsFormatters = #', formatters);
852 } 847 }
OLDNEW
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698