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

Unified Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2614663007: Revert "Non-format-changing kernel offset changes" (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/kernel.dart ('k') | pkg/kernel/lib/transformations/async.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/text/ast_to_text.dart
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 4991490f3f2888a82cf4e1cc4cce639b667e0dc2..18be9de8860b332563538e31d135145a2867ce16 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -181,7 +181,6 @@ class Printer extends Visitor<Null> {
int indentation = 0;
int column = 0;
bool showExternal;
- bool showOffsets;
static int SPACE = 0;
static int WORD = 1;
@@ -191,7 +190,6 @@ class Printer extends Visitor<Null> {
Printer(this.sink,
{NameSystem syntheticNames,
this.showExternal,
- this.showOffsets,
this.importTable,
this.annotator: const InferredValueAnnotator()})
: this.syntheticNames = syntheticNames ?? new NameSystem();
@@ -200,8 +198,7 @@ class Printer extends Visitor<Null> {
: sink = parent.sink,
syntheticNames = parent.syntheticNames,
annotator = parent.annotator,
- showExternal = parent.showExternal,
- showOffsets = parent.showOffsets;
+ showExternal = parent.showExternal;
String getLibraryName(Library node) {
return node.name ?? syntheticNames.nameLibrary(node);
@@ -396,9 +393,6 @@ class Printer extends Visitor<Null> {
}
void writeNode(Node node) {
- if (showOffsets && node is TreeNode) {
- writeWord("[${node.fileOffset}]");
- }
node.accept(this);
}
@@ -492,7 +486,6 @@ class Printer extends Visitor<Null> {
if (function.asyncMarker != AsyncMarker.Sync) {
writeSpaced(getAsyncMarkerKeyword(function.asyncMarker));
}
- if (!function.debuggable) writeSpaced("/* not debuggable */");
if (function.body != null) {
writeFunctionBody(function.body, terminateLine: terminateLine);
} else if (terminateLine) {
@@ -633,7 +626,6 @@ class Printer extends Visitor<Null> {
}
void writeExpression(Expression node, [int minimumPrecedence]) {
- if (showOffsets) writeWord("[${node.fileOffset}]");
bool needsParenteses = false;
if (minimumPrecedence != null && getPrecedence(node) < minimumPrecedence) {
needsParenteses = true;
@@ -1295,7 +1287,6 @@ class Printer extends Visitor<Null> {
void writeVariableDeclaration(VariableDeclaration node,
{bool useVarKeyword: false}) {
- if (showOffsets) writeWord("[${node.fileOffset}]");
writeModifier(node.isFinal, 'final');
writeModifier(node.isConst, 'const');
if (node.type != null) {
« no previous file with comments | « pkg/kernel/lib/kernel.dart ('k') | pkg/kernel/lib/transformations/async.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698