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

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

Issue 2697193008: [Kernel] replace function debuggable field with originalAsyncMarker field (Closed)
Patch Set: ASSERT in kernel_reader Created 3 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
« no previous file with comments | « pkg/kernel/lib/text/ast_to_text.dart ('k') | pkg/kernel/lib/transformations/method_call.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 814
815 // return :completer.future; 815 // return :completer.future;
816 var completerGet = new VariableGet(completerVariable); 816 var completerGet = new VariableGet(completerVariable);
817 var returnStatement = new ReturnStatement( 817 var returnStatement = new ReturnStatement(
818 new PropertyGet(completerGet, new Name('future', helper.asyncLibrary))); 818 new PropertyGet(completerGet, new Name('future', helper.asyncLibrary)));
819 statements.add(returnStatement); 819 statements.add(returnStatement);
820 820
821 enclosingFunction.body = new Block(statements); 821 enclosingFunction.body = new Block(statements);
822 enclosingFunction.body.parent = enclosingFunction; 822 enclosingFunction.body.parent = enclosingFunction;
823 enclosingFunction.asyncMarker = AsyncMarker.Sync; 823 enclosingFunction.asyncMarker = AsyncMarker.Sync;
824 enclosingFunction.debuggable = false;
825 return enclosingFunction; 824 return enclosingFunction;
826 } 825 }
827 826
828 Statement buildCatchBody(exceptionVariable, stackTraceVariable) { 827 Statement buildCatchBody(exceptionVariable, stackTraceVariable) {
829 return new ExpressionStatement(new MethodInvocation( 828 return new ExpressionStatement(new MethodInvocation(
830 new VariableGet(completerVariable), 829 new VariableGet(completerVariable),
831 new Name("completeError", helper.asyncLibrary), 830 new Name("completeError", helper.asyncLibrary),
832 new Arguments([ 831 new Arguments([
833 new VariableGet(exceptionVariable), 832 new VariableGet(exceptionVariable),
834 new VariableGet(stackTraceVariable) 833 new VariableGet(stackTraceVariable)
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 findConstructor(syncIterableClass, ''), 969 findConstructor(syncIterableClass, ''),
971 findConstructor(streamIteratorClass, ''), 970 findConstructor(streamIteratorClass, ''),
972 findFactoryConstructor(futureClass, 'microtask'), 971 findFactoryConstructor(futureClass, 'microtask'),
973 findConstructor(streamControllerClass, ''), 972 findConstructor(streamControllerClass, ''),
974 findProcedure(asyncLibrary, '_asyncThenWrapperHelper'), 973 findProcedure(asyncLibrary, '_asyncThenWrapperHelper'),
975 findProcedure(asyncLibrary, '_asyncErrorWrapperHelper'), 974 findProcedure(asyncLibrary, '_asyncErrorWrapperHelper'),
976 findProcedure(asyncLibrary, '_awaitHelper'), 975 findProcedure(asyncLibrary, '_awaitHelper'),
977 new CoreTypes(program)); 976 new CoreTypes(program));
978 } 977 }
979 } 978 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/text/ast_to_text.dart ('k') | pkg/kernel/lib/transformations/method_call.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698