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

fail const eval if return_type is error #6023

Merged
merged 3 commits into from
May 17, 2024

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented May 16, 2024

Description

This PR is part of #5727.
Fix the issue of trying to solve expressions that were typed as ErrorRecovery inside const_eval.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@xunilrj xunilrj self-assigned this May 16, 2024
Copy link

Benchmark for 80a9a69

Click to view benchmark
Test Base PR %
code_action 5.2±0.08ms 5.4±0.08ms +3.85%
code_lens 278.7±4.71ns 280.6±8.99ns +0.68%
compile 2.9±0.07s 3.0±0.04s +3.45%
completion 4.5±0.01ms 4.7±0.09ms +4.44%
did_change_with_caching 2.8±0.04s 2.8±0.04s 0.00%
document_symbol 961.9±42.79µs 1005.7±58.19µs +4.55%
format 69.7±1.20ms 70.1±1.01ms +0.57%
goto_definition 379.9±9.46µs 369.0±5.87µs -2.87%
highlight 8.7±0.18ms 9.1±0.44ms +4.60%
hover 493.2±22.46µs 490.1±13.90µs -0.63%
idents_at_position 122.2±0.39µs 122.6±0.70µs +0.33%
inlay_hints 666.1±34.39µs 658.5±11.34µs -1.14%
on_enter 464.4±10.57ns 481.3±14.08ns +3.64%
parent_decl_at_position 3.6±0.03ms 3.8±0.25ms +5.56%
prepare_rename 367.7±2.55µs 369.0±3.38µs +0.35%
rename 9.2±0.01ms 9.6±0.16ms +4.35%
semantic_tokens 952.7±12.38µs 968.8±24.78µs +1.69%
token_at_position 360.3±3.10µs 359.7±2.35µs -0.17%
tokens_at_position 3.6±0.03ms 3.7±0.03ms +2.78%
tokens_for_file 426.1±16.74µs 420.1±1.83µs -1.41%
traverse 40.5±1.23ms 40.1±1.13ms -0.99%

@xunilrj xunilrj requested a review from a team May 16, 2024 16:39
@IGI-111 IGI-111 enabled auto-merge (squash) May 17, 2024 07:02
@IGI-111 IGI-111 merged commit 76860b8 into master May 17, 2024
35 checks passed
@IGI-111 IGI-111 deleted the xunilrj/fix-const-eval-error-recovery branch May 17, 2024 07:16
Copy link

Benchmark for 1dad6a0

Click to view benchmark
Test Base PR %
code_action 5.4±0.01ms 5.2±0.09ms -3.70%
code_lens 294.6±8.33ns 289.7±14.11ns -1.66%
compile 2.9±0.05s 3.0±0.05s +3.45%
completion 4.7±0.08ms 4.6±0.06ms -2.13%
did_change_with_caching 2.8±0.05s 2.8±0.03s 0.00%
document_symbol 955.4±23.87µs 958.0±22.46µs +0.27%
format 84.9±1.13ms 84.9±1.17ms 0.00%
goto_definition 364.6±7.27µs 361.1±6.65µs -0.96%
highlight 9.2±0.20ms 8.8±0.02ms -4.35%
hover 485.3±13.23µs 481.3±6.12µs -0.82%
idents_at_position 123.5±1.78µs 123.2±0.55µs -0.24%
inlay_hints 659.4±19.08µs 652.1±23.71µs -1.11%
on_enter 476.2±10.70ns 470.2±18.57ns -1.26%
parent_decl_at_position 3.8±0.18ms 3.6±0.08ms -5.26%
prepare_rename 361.0±7.02µs 357.1±7.11µs -1.08%
rename 9.6±0.09ms 9.3±0.22ms -3.12%
semantic_tokens 957.7±15.91µs 949.4±12.04µs -0.87%
token_at_position 361.6±1.48µs 353.7±2.32µs -2.18%
tokens_at_position 3.7±0.14ms 3.6±0.05ms -2.70%
tokens_for_file 422.0±1.68µs 414.9±4.76µs -1.68%
traverse 40.8±1.70ms 41.5±1.19ms +1.72%

@xunilrj xunilrj requested a review from a team May 17, 2024 11:13
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.

3 participants