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

Side by Side Diff: pkg/kernel/lib/transformations/continuation.dart

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Address comments Created 3 years, 9 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 kernel.transformations.continuation; 5 library kernel.transformations.continuation;
6 6
7 import 'dart:math' as math; 7 import 'dart:math' as math;
8 8
9 import '../ast.dart'; 9 import '../ast.dart';
10 import '../core_types.dart'; 10 import '../core_types.dart';
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 new Name("complete", helper.asyncLibrary), 843 new Name("complete", helper.asyncLibrary),
844 new Arguments([new VariableGet(returnVariable)]))), 844 new Arguments([new VariableGet(returnVariable)]))),
845 new ReturnStatement()..fileOffset = enclosingFunction.fileEndOffset 845 new ReturnStatement()..fileOffset = enclosingFunction.fileEndOffset
846 ]); 846 ]);
847 } 847 }
848 848
849 visitReturnStatement(ReturnStatement node) { 849 visitReturnStatement(ReturnStatement node) {
850 var expr = node.expression == null 850 var expr = node.expression == null
851 ? new NullLiteral() 851 ? new NullLiteral()
852 : expressionRewriter.rewrite(node.expression, statements); 852 : expressionRewriter.rewrite(node.expression, statements);
853 statements 853 statements.add(new ExpressionStatement(
854 .add(new ExpressionStatement(new VariableSet(returnVariable, expr))); 854 new VariableSet(returnVariable, expr)..fileOffset = node.fileOffset));
855 statements 855 statements.add(new BreakStatement(labeledBody));
856 .add(new BreakStatement(labeledBody)..fileOffset = node.fileOffset);
857 return null; 856 return null;
858 } 857 }
859 } 858 }
860 859
861 class HelperNodes { 860 class HelperNodes {
862 final Library asyncLibrary; 861 final Library asyncLibrary;
863 final Library coreLibrary; 862 final Library coreLibrary;
864 final Class iteratorClass; 863 final Class iteratorClass;
865 final Class futureClass; 864 final Class futureClass;
866 final Class completerClass; 865 final Class completerClass;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 coreTypes.getMember('dart:core', '_SyncIterable', ''), 904 coreTypes.getMember('dart:core', '_SyncIterable', ''),
906 coreTypes.getMember('dart:async', '_StreamIterator', ''), 905 coreTypes.getMember('dart:async', '_StreamIterator', ''),
907 coreTypes.getMember('dart:async', 'Future', 'microtask'), 906 coreTypes.getMember('dart:async', 'Future', 'microtask'),
908 coreTypes.getMember('dart:async', '_AsyncStarStreamController', ''), 907 coreTypes.getMember('dart:async', '_AsyncStarStreamController', ''),
909 coreTypes.getTopLevelMember('dart:async', '_asyncThenWrapperHelper'), 908 coreTypes.getTopLevelMember('dart:async', '_asyncThenWrapperHelper'),
910 coreTypes.getTopLevelMember('dart:async', '_asyncErrorWrapperHelper'), 909 coreTypes.getTopLevelMember('dart:async', '_asyncErrorWrapperHelper'),
911 coreTypes.getTopLevelMember('dart:async', '_awaitHelper'), 910 coreTypes.getTopLevelMember('dart:async', '_awaitHelper'),
912 coreTypes); 911 coreTypes);
913 } 912 }
914 } 913 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | runtime/observatory/tests/service/add_breakpoint_rpc_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698