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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart

Issue 2789863002: Sort procedures by source positions. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.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 fasta.kernel_builder; 5 library fasta.kernel_builder;
6 6
7 export 'kernel_class_builder.dart' show KernelClassBuilder; 7 export 'kernel_class_builder.dart' show KernelClassBuilder;
8 8
9 export 'kernel_enum_builder.dart' show KernelEnumBuilder; 9 export 'kernel_enum_builder.dart' show KernelEnumBuilder;
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 charOffset ??= -1; 99 charOffset ??= -1;
100 if (charOffset == -1) { 100 if (charOffset == -1) {
101 charOffset = member.fileOffset ?? -1; 101 charOffset = member.fileOffset ?? -1;
102 } 102 }
103 if (charOffset == -1) { 103 if (charOffset == -1) {
104 charOffset = cls?.fileOffset ?? -1; 104 charOffset = cls?.fileOffset ?? -1;
105 } 105 }
106 name = (cls == null ? "" : "${cls.name}::") + name; 106 name = (cls == null ? "" : "${cls.name}::") + name;
107 return inputError(uri, charOffset, "Error in $name: $error"); 107 return inputError(uri, charOffset, "Error in $name: $error");
108 } 108 }
109
110 int compareProcedures(Procedure a, Procedure b) {
111 int i = a.fileUri.compareTo(b.fileUri);
112 if (i != 0) return i;
113 return a.fileOffset.compareTo(b.fileOffset);
114 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698