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

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

Issue 1130813002: dart2js cps: Handle error cases. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase, fixes due to rebase, and update status files Created 5 years, 7 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 | Annotate | Revision Log
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 10
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 String visitTypeExpression(TypeExpression node) { 367 String visitTypeExpression(TypeExpression node) {
368 String args = node.arguments.map(access).join(', '); 368 String args = node.arguments.map(access).join(', ');
369 return '(TypeExpression ${node.dartType.toString()} $args)'; 369 return '(TypeExpression ${node.dartType.toString()} $args)';
370 } 370 }
371 371
372 String visitNonTailThrow(NonTailThrow node) { 372 String visitNonTailThrow(NonTailThrow node) {
373 String value = access(node.value); 373 String value = access(node.value);
374 return '(NonTailThrow $value)'; 374 return '(NonTailThrow $value)';
375 } 375 }
376
377 String visitCreateInvocationMirror(CreateInvocationMirror node) {
378 String selector = node.selector.name;
379 String args = node.arguments.map(access).join(', ');
380 return '(CreateInvocationMirror $selector $args)';
381 }
376 } 382 }
377 383
378 class ConstantStringifier extends ConstantValueVisitor<String, Null> { 384 class ConstantStringifier extends ConstantValueVisitor<String, Null> {
379 // Some of these methods are unimplemented because we haven't had a need 385 // Some of these methods are unimplemented because we haven't had a need
380 // to print such constants. When printing is implemented, the corresponding 386 // to print such constants. When printing is implemented, the corresponding
381 // parsing support should be added to SExpressionUnstringifier.parseConstant 387 // parsing support should be added to SExpressionUnstringifier.parseConstant
382 // in the dart2js tests (currently in the file 388 // in the dart2js tests (currently in the file
383 // tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart). 389 // tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart).
384 390
385 String _failWith(ConstantValue constant) { 391 String _failWith(ConstantValue constant) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 void setReturnContinuation(Continuation node) { 486 void setReturnContinuation(Continuation node) {
481 assert(!_names.containsKey(node) || _names[node] == 'return'); 487 assert(!_names.containsKey(node) || _names[node] == 'return');
482 _names[node] = 'return'; 488 _names[node] = 'return';
483 } 489 }
484 490
485 String getName(Node node) { 491 String getName(Node node) {
486 if (!_names.containsKey(node)) return 'MISSING_NAME'; 492 if (!_names.containsKey(node)) return 'MISSING_NAME';
487 return _names[node]; 493 return _names[node];
488 } 494 }
489 } 495 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698