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

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

Issue 2965223002: Change inference element invariants (Closed)
Patch Set: Updated cf. comments 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
« no previous file with comments | « pkg/compiler/lib/src/common_elements.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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 FunctionModifiers modifiers = new FunctionModifiers( 256 FunctionModifiers modifiers = new FunctionModifiers(
257 isStatic: element.isStatic, 257 isStatic: element.isStatic,
258 isConst: element.isConst, 258 isConst: element.isConst,
259 isFactory: element.isFactoryConstructor, 259 isFactory: element.isFactoryConstructor,
260 isExternal: element.isPatched); 260 isExternal: element.isPatched);
261 String code = compiler.dumpInfoTask.codeOf(element); 261 String code = compiler.dumpInfoTask.codeOf(element);
262 262
263 String returnType = null; 263 String returnType = null;
264 List<ParameterInfo> parameters = <ParameterInfo>[]; 264 List<ParameterInfo> parameters = <ParameterInfo>[];
265 if (element.hasFunctionSignature) { 265 if (element.hasFunctionSignature) {
266 FunctionSignature signature = element.functionSignature; 266 FunctionElement implementation = element.implementation;
267 FunctionSignature signature = implementation.functionSignature;
267 signature.forEachParameter((parameter) { 268 signature.forEachParameter((parameter) {
268 parameters.add(new ParameterInfo(parameter.name, 269 parameters.add(new ParameterInfo(parameter.name,
269 '${_resultOfParameter(parameter).type}', '${parameter.node.type}')); 270 '${_resultOfParameter(parameter).type}', '${parameter.node.type}'));
270 }); 271 });
271 returnType = '${element.type.returnType}'; 272 returnType = '${element.type.returnType}';
272 } 273 }
273 274
274 MethodElement method; 275 MethodElement method;
275 if (element is LocalFunctionElement) { 276 if (element is LocalFunctionElement) {
276 method = element.callMethod; 277 method = element.callMethod;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 619
619 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 620 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
620 new StringConversionSink.fromStringSink(buffer)); 621 new StringConversionSink.fromStringSink(buffer));
621 sink.add(new AllInfoJsonCodec().encode(result)); 622 sink.add(new AllInfoJsonCodec().encode(result));
622 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 623 compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
623 'text': "View the dumped .info.json file at " 624 'text': "View the dumped .info.json file at "
624 "https://dart-lang.github.io/dump-info-visualizer" 625 "https://dart-lang.github.io/dump-info-visualizer"
625 }); 626 });
626 } 627 }
627 } 628 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common_elements.dart ('k') | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698