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

Side by Side Diff: pkg/compiler/lib/src/dump_info.dart

Issue 2400153002: Fix access to ClosureToClassMap (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | pkg/compiler/lib/src/js_emitter/runtime_type_generator.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 dump_info; 5 library dump_info;
6 6
7 import 'dart:convert' 7 import 'dart:convert'
8 show ChunkedConversionSink, JsonEncoder, StringConversionSink; 8 show ChunkedConversionSink, JsonEncoder, StringConversionSink;
9 9
10 import 'package:dart2js_info/info.dart'; 10 import 'package:dart2js_info/info.dart';
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 ClosureInfo visitClosureClassElement(ClosureClassElement element, _) { 193 ClosureInfo visitClosureClassElement(ClosureClassElement element, _) {
194 ClosureInfo closureInfo = new ClosureInfo( 194 ClosureInfo closureInfo = new ClosureInfo(
195 name: element.name, 195 name: element.name,
196 outputUnit: _unitInfoForElement(element), 196 outputUnit: _unitInfoForElement(element),
197 size: compiler.dumpInfoTask.sizeOf(element)); 197 size: compiler.dumpInfoTask.sizeOf(element));
198 _elementToInfo[element] = closureInfo; 198 _elementToInfo[element] = closureInfo;
199 199
200 ClosureClassMap closureMap = compiler.closureToClassMapper 200 ClosureClassMap closureMap = compiler.closureToClassMapper
201 .getClosureToClassMapping(element.resolvedAst); 201 .getClosureToClassMapping(element.methodElement.resolvedAst);
202 assert(closureMap != null && closureMap.closureClassElement == element); 202 assert(closureMap != null && closureMap.closureClassElement == element);
203 203
204 FunctionInfo functionInfo = this.process(closureMap.callElement); 204 FunctionInfo functionInfo = this.process(closureMap.callElement);
205 if (functionInfo == null) return null; 205 if (functionInfo == null) return null;
206 closureInfo.function = functionInfo; 206 closureInfo.function = functionInfo;
207 functionInfo.parent = closureInfo; 207 functionInfo.parent = closureInfo;
208 208
209 result.closures.add(closureInfo); 209 result.closures.add(closureInfo);
210 return closureInfo; 210 return closureInfo;
211 } 211 }
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 597
598 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 598 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
599 new StringConversionSink.fromStringSink(buffer)); 599 new StringConversionSink.fromStringSink(buffer));
600 sink.add(new AllInfoJsonCodec().encode(result)); 600 sink.add(new AllInfoJsonCodec().encode(result));
601 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 601 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
602 'text': "View the dumped .info.json file at " 602 'text': "View the dumped .info.json file at "
603 "https://dart-lang.github.io/dump-info-visualizer" 603 "https://dart-lang.github.io/dump-info-visualizer"
604 }); 604 });
605 } 605 }
606 } 606 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698