mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Parse] Eliminate backtracking in collection expression parsing
Parsing collection literal expression used to take exponential time depending on the nesting level of the first element. Stop using 'parseList()' because using it complicates libSyntax parsing. rdar://problem/45221238 / https://bugs.swift.org/browse/SR-9220 rdar://problem/38913395 / https://bugs.swift.org/browse/SR-7283
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// RUN: %scale-test -parse --begin 0 --end 10 --step 1 --select NumASTBytes %s
|
||||
|
||||
%for i in range(1, N + 1):
|
||||
[
|
||||
%end
|
||||
1
|
||||
%for i in range(1, N + 1):
|
||||
]
|
||||
%end
|
||||
Reference in New Issue
Block a user