| OLD | NEW |
| 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.outline_builder; | 5 library fasta.outline_builder; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' show | 7 import 'package:kernel/ast.dart' show |
| 8 AsyncMarker, | 8 AsyncMarker, |
| 9 ProcedureKind; | 9 ProcedureKind; |
| 10 | 10 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 push(parameters); | 387 push(parameters); |
| 388 } | 388 } |
| 389 | 389 |
| 390 @override | 390 @override |
| 391 void endFormalParameters(int count, Token beginToken, Token endToken) { | 391 void endFormalParameters(int count, Token beginToken, Token endToken) { |
| 392 debugEvent("FormalParameters"); | 392 debugEvent("FormalParameters"); |
| 393 List formals = popList(count); | 393 List formals = popList(count); |
| 394 if (formals != null && formals.isNotEmpty) { | 394 if (formals != null && formals.isNotEmpty) { |
| 395 var last = formals.last; | 395 var last = formals.last; |
| 396 if (last is List) { | 396 if (last is List) { |
| 397 var newList = | 397 // TODO(sigmund): change `List newList` back to `var` (this is a |
| 398 // workaround for issue #28651). Eventually, make optional |
| 399 // formals a separate stack entry (#28673). |
| 400 List newList = |
| 398 new List<FormalParameterBuilder>(formals.length - 1 + last.length); | 401 new List<FormalParameterBuilder>(formals.length - 1 + last.length); |
| 399 newList.setRange(0, formals.length - 1, formals); | 402 newList.setRange(0, formals.length - 1, formals); |
| 400 newList.setRange(formals.length - 1, newList.length, last); | 403 newList.setRange(formals.length - 1, newList.length, last); |
| 401 for (int i = 0; i < last.length; i++) { | 404 for (int i = 0; i < last.length; i++) { |
| 402 newList[i + formals.length - 1] = last[i]; | 405 newList[i + formals.length - 1] = last[i]; |
| 403 } | 406 } |
| 404 formals = newList; | 407 formals = newList; |
| 405 } | 408 } |
| 406 } | 409 } |
| 407 if (formals != null) { | 410 if (formals != null) { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 Link<Token> handleMemberName(Link<Token> identifiers) { | 578 Link<Token> handleMemberName(Link<Token> identifiers) { |
| 576 if (!isDartLibrary || identifiers.isEmpty) return identifiers; | 579 if (!isDartLibrary || identifiers.isEmpty) return identifiers; |
| 577 return removeNativeClause(identifiers); | 580 return removeNativeClause(identifiers); |
| 578 } | 581 } |
| 579 | 582 |
| 580 @override | 583 @override |
| 581 void debugEvent(String name) { | 584 void debugEvent(String name) { |
| 582 // printEvent(name); | 585 // printEvent(name); |
| 583 } | 586 } |
| 584 } | 587 } |
| OLD | NEW |