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

Side by Side Diff: runtime/observatory/lib/src/elements/code_view.dart

Issue 2326483005: Shrink AOT snapshot size and memory usage. (Closed)
Patch Set: . Created 4 years, 3 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
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 code_view_element; 5 library code_view_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/cpu_profile.dart'; 9 import 'package:observatory/cpu_profile.dart';
10 import 'package:observatory/service.dart' as S; 10 import 'package:observatory/service.dart' as S;
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 tableBody.children.add(tr); 435 tableBody.children.add(tr);
436 } 436 }
437 437
438 void _fillDisassemblyDOMRow(TableRowElement tr, int rowIndex) { 438 void _fillDisassemblyDOMRow(TableRowElement tr, int rowIndex) {
439 final row = disassemblyTable.rows[rowIndex]; 439 final row = disassemblyTable.rows[rowIndex];
440 final n = row.values.length; 440 final n = row.values.length;
441 for (var i = 0; i < n; i++) { 441 for (var i = 0; i < n; i++) {
442 final cell = tr.children[i]; 442 final cell = tr.children[i];
443 final content = row.values[i]; 443 final content = row.values[i];
444 if (content is S.HeapObject) { 444 if (content is S.HeapObject) {
445 print(content.runtimeType);
446 cell.children = [ 445 cell.children = [
447 anyRef(_isolate, content, _instances, queue: _r.queue) 446 anyRef(_isolate, content, _instances, queue: _r.queue)
448 ]; 447 ];
449 } else if (content != null) { 448 } else if (content != null) {
450 String text = '$content'; 449 String text = '$content';
451 if (i == kDisassemblyColumnIndex) { 450 if (i == kDisassemblyColumnIndex) {
452 // Disassembly might be a comment. Reduce indentation, change styling, 451 // Disassembly might be a comment. Reduce indentation, change styling,
453 // widen to span next column (which should be empty). 452 // widen to span next column (which should be empty).
454 if (text.startsWith(' ;;')) { 453 if (text.startsWith(' ;;')) {
455 cell.attributes['colspan'] = '2'; 454 cell.attributes['colspan'] = '2';
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 switch (kind) { 600 switch (kind) {
602 case M.CodeKind.dart: return 'dart'; 601 case M.CodeKind.dart: return 'dart';
603 case M.CodeKind.native: return 'native'; 602 case M.CodeKind.native: return 'native';
604 case M.CodeKind.stub: return 'stub'; 603 case M.CodeKind.stub: return 'stub';
605 case M.CodeKind.tag: return 'tag'; 604 case M.CodeKind.tag: return 'tag';
606 case M.CodeKind.collected: return 'collected'; 605 case M.CodeKind.collected: return 'collected';
607 } 606 }
608 throw new Exception('Unkown CodeKind ($kind)'); 607 throw new Exception('Unkown CodeKind ($kind)');
609 } 608 }
610 } 609 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698