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

Fix panic when updating array with dynamic value #1606

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Jun 3, 2024

This fixes a panic that was introduced in #1571, where if the content being used to update an array was a dynamic, non-array value it would panic when trying to aggreate a default array type into a element type. To make sure the update matches the chosen type, generate the ValueKind from the matching expression type. Added unit tests for both array and non-array dynamic update types.

This fixes a panic that was introduced in #1571, where if the content being used to update an array was a dynamic, non-array value it would panic when trying to aggreate a default array type into a element type. To make sure the update matches the chosen type, generate the `ValueKind` from the matching expression type. Added unit tests for both array and non-array dynamic update types.
@swernli swernli enabled auto-merge June 3, 2024 22:29
Copy link

github-actions bot commented Jun 3, 2024

Benchmark for 3ff2105

Click to view benchmark
Test Base PR %
Array append evaluation 331.1±1.81µs 339.9±11.79µs +2.66%
Array literal evaluation 173.4±0.79µs 184.1±0.90µs +6.17%
Array update evaluation 410.9±1.59µs 415.5±8.12µs +1.12%
Core + Standard library compilation 21.7±0.90ms 21.5±1.03ms -0.92%
Deutsch-Jozsa evaluation 5.1±0.05ms 5.0±0.04ms -1.96%
Large file parity evaluation 34.3±0.17ms 34.3±0.50ms 0.00%
Large input file compilation 14.7±1.04ms 14.4±0.45ms -2.04%
Large input file compilation (interpreter) 53.4±2.12ms 51.3±1.33ms -3.93%
Large nested iteration 32.7±0.64ms 32.9±0.23ms +0.61%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1640.4±161.67µs 1605.4±137.78µs -2.13%
Perform Runtime Capabilities Analysis (RCA) on large file sample 8.3±0.23ms 8.1±0.15ms -2.41%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1510.3±167.02µs 1478.2±178.87µs -2.13%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 29.4±0.73ms 29.2±0.69ms -0.68%
Teleport evaluation 90.0±4.69µs 89.6±5.08µs -0.44%

@swernli swernli added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit 8c68c44 Jun 3, 2024
16 checks passed
@swernli swernli deleted the swernli/rca-panic-fix branch June 3, 2024 23:26
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

2 participants