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

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

Issue 2968743002: Use .callMethod instead of LocalFunctionElement as key in inference (Closed)
Patch Set: Created 3 years, 5 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 271 }
272 272
273 MethodElement method; 273 MethodElement method;
274 if (element is LocalFunctionElement) { 274 if (element is LocalFunctionElement) {
275 method = element.callMethod; 275 method = element.callMethod;
276 } else { 276 } else {
277 method = element; 277 method = element;
278 } 278 }
279 279
280 String inferredReturnType = '${_resultOfMember(method).returnType}'; 280 String inferredReturnType = '${_resultOfMember(method).returnType}';
281 String sideEffects = '${closedWorld.getSideEffectsOfElement(element)}'; 281 String sideEffects = '${closedWorld.getSideEffectsOfElement(method)}';
282 282
283 int inlinedCount = compiler.dumpInfoTask.inlineCount[element]; 283 int inlinedCount = compiler.dumpInfoTask.inlineCount[element];
284 if (inlinedCount == null) inlinedCount = 0; 284 if (inlinedCount == null) inlinedCount = 0;
285 285
286 FunctionInfo info = new FunctionInfo( 286 FunctionInfo info = new FunctionInfo(
287 name: name, 287 name: name,
288 functionKind: kind, 288 functionKind: kind,
289 modifiers: modifiers, 289 modifiers: modifiers,
290 returnType: returnType, 290 returnType: returnType,
291 inferredReturnType: inferredReturnType, 291 inferredReturnType: inferredReturnType,
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 617
618 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 618 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
619 new StringConversionSink.fromStringSink(buffer)); 619 new StringConversionSink.fromStringSink(buffer));
620 sink.add(new AllInfoJsonCodec().encode(result)); 620 sink.add(new AllInfoJsonCodec().encode(result));
621 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 621 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
622 'text': "View the dumped .info.json file at " 622 'text': "View the dumped .info.json file at "
623 "https://dart-lang.github.io/dump-info-visualizer" 623 "https://dart-lang.github.io/dump-info-visualizer"
624 }); 624 });
625 } 625 }
626 } 626 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | pkg/compiler/lib/src/inferrer/builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698