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

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

Issue 2615223003: Use MemberElement instead of Element in function sets and selectors. (Closed)
Patch Set: Created 3 years, 11 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 signature.forEachParameter((parameter) { 255 signature.forEachParameter((parameter) {
256 parameters.add(new ParameterInfo(parameter.name, 256 parameters.add(new ParameterInfo(parameter.name,
257 '${_resultOf(parameter).type}', '${parameter.node.type}')); 257 '${_resultOf(parameter).type}', '${parameter.node.type}'));
258 }); 258 });
259 } 259 }
260 260
261 String returnType = null; 261 String returnType = null;
262 // TODO(sigmund): why all these checks? 262 // TODO(sigmund): why all these checks?
263 if (element.isInstanceMember && 263 if (element.isInstanceMember &&
264 !element.isAbstract && 264 !element.isAbstract &&
265 closedWorld.allFunctions.contains(element)) { 265 closedWorld.allFunctions.contains(element as MemberElement)) {
266 returnType = '${element.type.returnType}'; 266 returnType = '${element.type.returnType}';
267 } 267 }
268 String inferredReturnType = '${_resultOf(element).returnType}'; 268 String inferredReturnType = '${_resultOf(element).returnType}';
269 String sideEffects = '${closedWorld.getSideEffectsOfElement(element)}'; 269 String sideEffects = '${closedWorld.getSideEffectsOfElement(element)}';
270 270
271 int inlinedCount = compiler.dumpInfoTask.inlineCount[element]; 271 int inlinedCount = compiler.dumpInfoTask.inlineCount[element];
272 if (inlinedCount == null) inlinedCount = 0; 272 if (inlinedCount == null) inlinedCount = 0;
273 273
274 FunctionInfo info = new FunctionInfo( 274 FunctionInfo info = new FunctionInfo(
275 name: name, 275 name: name,
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 601
602 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 602 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
603 new StringConversionSink.fromStringSink(buffer)); 603 new StringConversionSink.fromStringSink(buffer));
604 sink.add(new AllInfoJsonCodec().encode(result)); 604 sink.add(new AllInfoJsonCodec().encode(result));
605 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 605 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
606 'text': "View the dumped .info.json file at " 606 'text': "View the dumped .info.json file at "
607 "https://dart-lang.github.io/dump-info-visualizer" 607 "https://dart-lang.github.io/dump-info-visualizer"
608 }); 608 });
609 } 609 }
610 } 610 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/closure_tracer.dart » ('j') | pkg/compiler/lib/src/inferrer/closure_tracer.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698