Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.0][Parse] Eliminate backtracking in collection expression parsing #21674

Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jan 7, 2019

(Cherry picked from #21487 )

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

@rintaro rintaro requested a review from a team January 7, 2019 08:42
@rintaro rintaro changed the title [Parse] Eliminate backtracking in collection expression parsing [5.0][Parse] Eliminate backtracking in collection expression parsing Jan 7, 2019
@rintaro
Copy link
Member Author

rintaro commented Jan 7, 2019

@swift-ci Please test

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 7, 2019

Build failed
Swift Test Linux Platform
Git Sha - 663ae34457235697d8ce2a54fda9e4aa9196bcbf

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 7, 2019

Build failed
Swift Test OS X Platform
Git Sha - 663ae34457235697d8ce2a54fda9e4aa9196bcbf

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
(cherry picked from commit 22652f9)
@rintaro rintaro force-pushed the 5.0-parse-collection-rdar45221238 branch from 663ae34 to 7f57ad9 Compare January 7, 2019 17:42
@rintaro
Copy link
Member Author

rintaro commented Jan 7, 2019

@swift-ci Please test

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 7, 2019

Build failed
Swift Test Linux Platform
Git Sha - 663ae34457235697d8ce2a54fda9e4aa9196bcbf

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 7, 2019

Build failed
Swift Test OS X Platform
Git Sha - 663ae34457235697d8ce2a54fda9e4aa9196bcbf

@akyrtzi akyrtzi merged commit 8012d0f into apple:swift-5.0-branch Jan 8, 2019
@rintaro rintaro deleted the 5.0-parse-collection-rdar45221238 branch January 8, 2019 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants