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

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

Issue 3002953002: Split getClosureRepresentationInfo into MemberEntity and (ir/ast) nodes (Closed)
Patch Set: Update cf. comments Created 3 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 | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/inferrer/builder.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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 return classInfo; 204 return classInfo;
205 } 205 }
206 206
207 ClosureInfo visitClosureClassElement(ClosureClassElement element, _) { 207 ClosureInfo visitClosureClassElement(ClosureClassElement element, _) {
208 ClosureInfo closureInfo = new ClosureInfo( 208 ClosureInfo closureInfo = new ClosureInfo(
209 name: element.name, 209 name: element.name,
210 outputUnit: _unitInfoForElement(element), 210 outputUnit: _unitInfoForElement(element),
211 size: compiler.dumpInfoTask.sizeOf(element)); 211 size: compiler.dumpInfoTask.sizeOf(element));
212 _elementToInfo[element] = closureInfo; 212 _elementToInfo[element] = closureInfo;
213 213
214 ClosureRepresentationInfo closureRepresentation = compiler 214 ClosureRepresentationInfo closureRepresentation =
215 .backendStrategy.closureDataLookup 215 compiler.backendStrategy.closureDataLookup.getClosureInfo(element.node);
216 .getClosureRepresentationInfo(element.methodElement);
217 assert(closureRepresentation.closureClassEntity == element); 216 assert(closureRepresentation.closureClassEntity == element);
218 217
219 FunctionInfo functionInfo = this.process(closureRepresentation.callMethod); 218 FunctionInfo functionInfo = this.process(closureRepresentation.callMethod);
220 if (functionInfo == null) return null; 219 if (functionInfo == null) return null;
221 closureInfo.function = functionInfo; 220 closureInfo.function = functionInfo;
222 functionInfo.parent = closureInfo; 221 functionInfo.parent = closureInfo;
223 222
224 result.closures.add(closureInfo); 223 result.closures.add(closureInfo);
225 return closureInfo; 224 return closureInfo;
226 } 225 }
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 618
620 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 619 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
621 new StringConversionSink.fromStringSink(buffer)); 620 new StringConversionSink.fromStringSink(buffer));
622 sink.add(new AllInfoJsonCodec().encode(result)); 621 sink.add(new AllInfoJsonCodec().encode(result));
623 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 622 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
624 'text': "View the dumped .info.json file at " 623 'text': "View the dumped .info.json file at "
625 "https://dart-lang.github.io/dump-info-visualizer" 624 "https://dart-lang.github.io/dump-info-visualizer"
626 }); 625 });
627 } 626 }
628 } 627 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698