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

Unified Diff: pkg/front_end/lib/src/fasta/source/stack_listener.dart

Issue 2926953004: Various semantic checks on formal parameters. (Closed)
Patch Set: Added missing FASTA_IGNORED and rebased on aa8ca9244a3cc5fa7c3816a9340558e7d2f37ae1. Created 3 years, 6 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
Index: pkg/front_end/lib/src/fasta/source/stack_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/source/stack_listener.dart b/pkg/front_end/lib/src/fasta/source/stack_listener.dart
index 650c0a18285675373865503a31c5dafffcc5c2ea..1138c5bb0928d74b6b30210560a94f2cc4db079c 100644
--- a/pkg/front_end/lib/src/fasta/source/stack_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/stack_listener.dart
@@ -84,9 +84,9 @@ abstract class StackListener extends Listener {
return value == null ? null : pop();
}
- List popList(int n) {
+ List popList(int n, [List list]) {
if (n == 0) return null;
- return stack.popList(n);
+ return stack.popList(n, list);
}
void debugEvent(String name) {
@@ -298,13 +298,13 @@ class Stack {
return value is NullValue ? null : value;
}
- List popList(int count) {
+ List popList(int count, List list) {
assert(arrayLength >= count);
final table = array;
final length = arrayLength;
- final tailList = new List.filled(count, null, growable: true);
+ final tailList = list ?? new List.filled(count, null, growable: true);
final startIndex = length - count;
for (int i = 0; i < count; i++) {
final value = table[startIndex + i];

Powered by Google App Engine
This is Rietveld 408576698