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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart

Issue 1642493002: Add type info to JSArray. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: array changes Created 4 years, 10 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 dart2js.ir_tracer; 5 library dart2js.ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import 'cps_ir_nodes.dart' as cps_ir; 8 import 'cps_ir_nodes.dart' as cps_ir;
9 import '../tracer.dart'; 9 import '../tracer.dart';
10 10
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 return "GetLazyStatic $element"; 288 return "GetLazyStatic $element";
289 } 289 }
290 290
291 visitCreateBox(cps_ir.CreateBox node) { 291 visitCreateBox(cps_ir.CreateBox node) {
292 return 'CreateBox'; 292 return 'CreateBox';
293 } 293 }
294 294
295 visitCreateInstance(cps_ir.CreateInstance node) { 295 visitCreateInstance(cps_ir.CreateInstance node) {
296 String className = node.classElement.name; 296 String className = node.classElement.name;
297 String arguments = node.arguments.map(formatReference).join(', '); 297 String arguments = node.arguments.map(formatReference).join(', ');
298 String typeInformation = 298 String typeInformation = formatReference(node.typeInformation);
299 node.typeInformation.map(formatReference).join(', ');
300 return 'CreateInstance $className ($arguments) <$typeInformation>'; 299 return 'CreateInstance $className ($arguments) <$typeInformation>';
301 } 300 }
302 301
303 visitInterceptor(cps_ir.Interceptor node) { 302 visitInterceptor(cps_ir.Interceptor node) {
304 return 'Interceptor(${formatReference(node.input)}, ' 303 return 'Interceptor(${formatReference(node.input)}, '
305 '${node.interceptedClasses})'; 304 '${node.interceptedClasses})';
306 } 305 }
307 306
308 visitGetMutable(cps_ir.GetMutable node) { 307 visitGetMutable(cps_ir.GetMutable node) {
309 String variable = names.name(node.variable.definition); 308 String variable = names.name(node.variable.definition);
310 return 'GetMutable $variable'; 309 return 'GetMutable $variable';
311 } 310 }
312 311
313 visitReadTypeVariable(cps_ir.ReadTypeVariable node) { 312 visitReadTypeVariable(cps_ir.ReadTypeVariable node) {
314 return "ReadTypeVariable ${node.variable.element} " 313 return "ReadTypeVariable ${node.variable.element} "
315 "${formatReference(node.target)}"; 314 "${formatReference(node.target)}";
316 } 315 }
317 316
318 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) { 317 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) {
319 return "ReifyRuntimeType ${formatReference(node.value)}"; 318 return "ReifyRuntimeType ${formatReference(node.value)}";
320 } 319 }
321 320
322 visitTypeExpression(cps_ir.TypeExpression node) { 321 visitTypeExpression(cps_ir.TypeExpression node) {
323 return "TypeExpression ${node.dartType} " 322 return "TypeExpression ${node.kindAsString} ${node.dartType}"
324 "${node.arguments.map(formatReference).join(', ')}"; 323 "${node.arguments.map(formatReference).join(', ')}";
325 } 324 }
326 325
327 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { 326 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) {
328 String args = node.arguments.map(formatReference).join(', '); 327 String args = node.arguments.map(formatReference).join(', ');
329 return "CreateInvocationMirror(${node.selector.name}, $args)"; 328 return "CreateInvocationMirror(${node.selector.name}, $args)";
330 } 329 }
331 330
332 visitTypeTest(cps_ir.TypeTest node) { 331 visitTypeTest(cps_ir.TypeTest node) {
333 String value = formatReference(node.value); 332 String value = formatReference(node.value);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 } 678 }
680 679
681 visitBoundsCheck(cps_ir.BoundsCheck node) { 680 visitBoundsCheck(cps_ir.BoundsCheck node) {
682 unexpectedNode(node); 681 unexpectedNode(node);
683 } 682 }
684 683
685 visitNullCheck(cps_ir.NullCheck node) { 684 visitNullCheck(cps_ir.NullCheck node) {
686 unexpectedNode(node); 685 unexpectedNode(node);
687 } 686 }
688 } 687 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698