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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_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 tree_ir_tracer; 5 library tree_ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import '../tracer.dart'; 8 import '../tracer.dart';
9 import 'tree_ir_nodes.dart'; 9 import 'tree_ir_nodes.dart';
10 10
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 return 'Read ${node.variable.element} ${visitExpression(node.target)}'; 516 return 'Read ${node.variable.element} ${visitExpression(node.target)}';
517 } 517 }
518 518
519 @override 519 @override
520 String visitReifyRuntimeType(ReifyRuntimeType node) { 520 String visitReifyRuntimeType(ReifyRuntimeType node) {
521 return 'Reify ${node.value}'; 521 return 'Reify ${node.value}';
522 } 522 }
523 523
524 @override 524 @override
525 String visitTypeExpression(TypeExpression node) { 525 String visitTypeExpression(TypeExpression node) {
526 return node.dartType.toString(); 526 String kind = '${node.kind}'.split('.').last;
527 String args = node.arguments.map(visitExpression).join(', ');
528 return 'TypeExpression($kind, ${node.dartType}, $args)';
527 } 529 }
528 530
529 @override 531 @override
530 String visitCreateInvocationMirror(CreateInvocationMirror node) { 532 String visitCreateInvocationMirror(CreateInvocationMirror node) {
531 String args = node.arguments.map(visitExpression).join(', '); 533 String args = node.arguments.map(visitExpression).join(', ');
532 return 'CreateInvocationMirror(${node.selector.name}, $args)'; 534 return 'CreateInvocationMirror(${node.selector.name}, $args)';
533 } 535 }
534 536
535 @override 537 @override
536 String visitInterceptor(Interceptor node) { 538 String visitInterceptor(Interceptor node) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 610 String prefix = v.element == null ? 'v' : '${v.element.name}_';
609 while (name == null || _usedNames.contains(name)) { 611 while (name == null || _usedNames.contains(name)) {
610 name = "$prefix${_counter++}"; 612 name = "$prefix${_counter++}";
611 } 613 }
612 _names[v] = name; 614 _names[v] = name;
613 _usedNames.add(name); 615 _usedNames.add(name);
614 } 616 }
615 return name; 617 return name;
616 } 618 }
617 } 619 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698