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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.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, 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) 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_nodes_sexpr; 5 library dart2js.ir_nodes_sexpr;
6 6
7 import '../constants/values.dart'; 7 import '../constants/values.dart';
8 import '../util/util.dart'; 8 import '../util/util.dart';
9 import 'cps_ir_nodes.dart'; 9 import 'cps_ir_nodes.dart';
10 import '../universe/call_structure.dart' show 10 import '../universe/call_structure.dart' show
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return '(GetLazyStatic $element)'; 354 return '(GetLazyStatic $element)';
355 } 355 }
356 356
357 String visitCreateBox(CreateBox node) { 357 String visitCreateBox(CreateBox node) {
358 return '(CreateBox)'; 358 return '(CreateBox)';
359 } 359 }
360 360
361 String visitCreateInstance(CreateInstance node) { 361 String visitCreateInstance(CreateInstance node) {
362 String className = node.classElement.name; 362 String className = node.classElement.name;
363 String arguments = node.arguments.map(access).join(' '); 363 String arguments = node.arguments.map(access).join(' ');
364 String typeInformation = node.typeInformation.map(access).join(' '); 364 String typeInformation = optionalAccess(node.typeInformation);
365 return '(CreateInstance $className ($arguments) ($typeInformation))'; 365 return '(CreateInstance $className ($arguments) ($typeInformation))';
366 } 366 }
367 367
368 String visitInterceptor(Interceptor node) { 368 String visitInterceptor(Interceptor node) {
369 return '(Interceptor ${access(node.input)})'; 369 return '(Interceptor ${access(node.input)})';
370 } 370 }
371 371
372 String visitReifyRuntimeType(ReifyRuntimeType node) { 372 String visitReifyRuntimeType(ReifyRuntimeType node) {
373 return '(ReifyRuntimeType ${access(node.value)})'; 373 return '(ReifyRuntimeType ${access(node.value)})';
374 } 374 }
375 375
376 String visitReadTypeVariable(ReadTypeVariable node) { 376 String visitReadTypeVariable(ReadTypeVariable node) {
377 return '(ReadTypeVariable ${access(node.target)}.${node.variable})'; 377 return '(ReadTypeVariable ${access(node.target)}.${node.variable})';
378 } 378 }
379 379
380 String visitTypeExpression(TypeExpression node) { 380 String visitTypeExpression(TypeExpression node) {
381 String args = node.arguments.map(access).join(' '); 381 String args = node.arguments.map(access).join(' ');
382 return '(TypeExpression ${node.dartType} ($args))'; 382 return '(TypeExpression ${node.kindAsString} ${node.dartType} ($args))';
383 } 383 }
384 384
385 String visitCreateInvocationMirror(CreateInvocationMirror node) { 385 String visitCreateInvocationMirror(CreateInvocationMirror node) {
386 String selector = node.selector.name; 386 String selector = node.selector.name;
387 String args = node.arguments.map(access).join(' '); 387 String args = node.arguments.map(access).join(' ');
388 return '(CreateInvocationMirror $selector ($args))'; 388 return '(CreateInvocationMirror $selector ($args))';
389 } 389 }
390 390
391 String visitApplyBuiltinOperator(ApplyBuiltinOperator node) { 391 String visitApplyBuiltinOperator(ApplyBuiltinOperator node) {
392 String operator = node.operator.toString(); 392 String operator = node.operator.toString();
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 void setReturnContinuation(Continuation node) { 560 void setReturnContinuation(Continuation node) {
561 assert(!_names.containsKey(node) || _names[node] == 'return'); 561 assert(!_names.containsKey(node) || _names[node] == 'return');
562 _names[node] = 'return'; 562 _names[node] = 'return';
563 } 563 }
564 564
565 String getName(Node node) { 565 String getName(Node node) {
566 if (!_names.containsKey(node)) return 'MISSING_NAME'; 566 if (!_names.containsKey(node)) return 'MISSING_NAME';
567 return _names[node]; 567 return _names[node];
568 } 568 }
569 } 569 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698