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

Side by Side Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2697193008: [Kernel] replace function debuggable field with originalAsyncMarker field (Closed)
Patch Set: Changes based on feedback (+ small forgotten things) 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
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 library kernel.ast_to_text; 4 library kernel.ast_to_text;
5 5
6 import '../ast.dart'; 6 import '../ast.dart';
7 import '../import_table.dart'; 7 import '../import_table.dart';
8 import '../type_propagation/type_propagation.dart'; 8 import '../type_propagation/type_propagation.dart';
9 9
10 class Namer<T> { 10 class Namer<T> {
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 endLine(); 492 endLine();
493 ++indentation; 493 ++indentation;
494 writeIndentation(); 494 writeIndentation();
495 writeComma(':'); 495 writeComma(':');
496 writeList(initializers, writeNode); 496 writeList(initializers, writeNode);
497 --indentation; 497 --indentation;
498 } 498 }
499 if (function.asyncMarker != AsyncMarker.Sync) { 499 if (function.asyncMarker != AsyncMarker.Sync) {
500 writeSpaced(getAsyncMarkerKeyword(function.asyncMarker)); 500 writeSpaced(getAsyncMarkerKeyword(function.asyncMarker));
501 } 501 }
502 if (!function.debuggable) writeSpaced("/* not debuggable */"); 502 if (function.originalAsyncMarker != AsyncMarker.Sync) {
503 writeSpaced("/* originally");
504 writeSpaced(getAsyncMarkerKeyword(function.originalAsyncMarker));
505 writeSpaced("*/");
506 }
503 if (function.body != null) { 507 if (function.body != null) {
504 writeFunctionBody(function.body, terminateLine: terminateLine); 508 writeFunctionBody(function.body, terminateLine: terminateLine);
505 } else if (terminateLine) { 509 } else if (terminateLine) {
506 endLine(';'); 510 endLine(';');
507 } 511 }
508 } 512 }
509 513
510 String getAsyncMarkerKeyword(AsyncMarker marker) { 514 String getAsyncMarkerKeyword(AsyncMarker marker) {
511 switch (marker) { 515 switch (marker) {
512 case AsyncMarker.Sync: 516 case AsyncMarker.Sync:
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 } 1591 }
1588 throw 'illegal ProcedureKind: $kind'; 1592 throw 'illegal ProcedureKind: $kind';
1589 } 1593 }
1590 1594
1591 class ExpressionPrinter { 1595 class ExpressionPrinter {
1592 final Printer writeer; 1596 final Printer writeer;
1593 final int minimumPrecedence; 1597 final int minimumPrecedence;
1594 1598
1595 ExpressionPrinter(this.writeer, this.minimumPrecedence); 1599 ExpressionPrinter(this.writeer, this.minimumPrecedence);
1596 } 1600 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698