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

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

Issue 1353843002: dart2js cps: Support sync* and yield. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 } 360 }
361 361
362 @override 362 @override
363 String visitAwait(Await node) { 363 String visitAwait(Await node) {
364 String value = access(node.input); 364 String value = access(node.input);
365 String continuation = access(node.continuation); 365 String continuation = access(node.continuation);
366 return '(Await $value $continuation)'; 366 return '(Await $value $continuation)';
367 } 367 }
368 368
369 @override 369 @override
370 String visitYield(Yield node) {
371 String value = access(node.input);
372 String continuation = access(node.continuation);
373 return '(Yield $value $continuation)';
374 }
375
370 String visitRefinement(Refinement node) { 376 String visitRefinement(Refinement node) {
371 String value = access(node.value); 377 String value = access(node.value);
372 return '(Refinement $value ${node.type})'; 378 return '(Refinement $value ${node.type})';
373 } 379 }
374 } 380 }
375 381
376 class ConstantStringifier extends ConstantValueVisitor<String, Null> { 382 class ConstantStringifier extends ConstantValueVisitor<String, Null> {
377 // Some of these methods are unimplemented because we haven't had a need 383 // Some of these methods are unimplemented because we haven't had a need
378 // to print such constants. When printing is implemented, the corresponding 384 // to print such constants. When printing is implemented, the corresponding
379 // parsing support should be added to SExpressionUnstringifier.parseConstant 385 // parsing support should be added to SExpressionUnstringifier.parseConstant
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 void setReturnContinuation(Continuation node) { 484 void setReturnContinuation(Continuation node) {
479 assert(!_names.containsKey(node) || _names[node] == 'return'); 485 assert(!_names.containsKey(node) || _names[node] == 'return');
480 _names[node] = 'return'; 486 _names[node] = 'return';
481 } 487 }
482 488
483 String getName(Node node) { 489 String getName(Node node) {
484 if (!_names.containsKey(node)) return 'MISSING_NAME'; 490 if (!_names.containsKey(node)) return 'MISSING_NAME';
485 return _names[node]; 491 return _names[node];
486 } 492 }
487 } 493 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698