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

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

Issue 3002953002: Split getClosureRepresentationInfo into MemberEntity and (ir/ast) nodes (Closed)
Patch Set: 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
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = compiler
215 .backendStrategy.closureDataLookup 215 .backendStrategy.closureDataLookup
216 .getClosureRepresentationInfo(element.methodElement); 216 .getClosureRepresentationInfo(element.node);
217 assert(closureRepresentation.closureClassEntity == element); 217 assert(closureRepresentation.closureClassEntity == element);
218 218
219 FunctionInfo functionInfo = this.process(closureRepresentation.callMethod); 219 FunctionInfo functionInfo = this.process(closureRepresentation.callMethod);
220 if (functionInfo == null) return null; 220 if (functionInfo == null) return null;
221 closureInfo.function = functionInfo; 221 closureInfo.function = functionInfo;
222 functionInfo.parent = closureInfo; 222 functionInfo.parent = closureInfo;
223 223
224 result.closures.add(closureInfo); 224 result.closures.add(closureInfo);
225 return closureInfo; 225 return closureInfo;
226 } 226 }
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 619
620 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 620 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
621 new StringConversionSink.fromStringSink(buffer)); 621 new StringConversionSink.fromStringSink(buffer));
622 sink.add(new AllInfoJsonCodec().encode(result)); 622 sink.add(new AllInfoJsonCodec().encode(result));
623 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 623 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
624 'text': "View the dumped .info.json file at " 624 'text': "View the dumped .info.json file at "
625 "https://dart-lang.github.io/dump-info-visualizer" 625 "https://dart-lang.github.io/dump-info-visualizer"
626 }); 626 });
627 } 627 }
628 } 628 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698