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

Refactor - Error handling #527

Merged
merged 3 commits into from
Sep 29, 2023
Merged

Refactor - Error handling #527

merged 3 commits into from
Sep 29, 2023

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Sep 28, 2023

Stops heap allocating errors for efficiency and removes fields from runtime errors for layout stability.
The fields of these errors are mostly redundant and can be retrieved by other means anyway.
Sometimes they are completely pointless such as the pc field for AccessViolation which syscalls always set to 0.
The address where the exception occurred can now be read from the VM (see #529).
Also, we have much better debugging support now, so we don't need to rely on these fields for diagnosis anymore.

@Lichtso Lichtso requested a review from alessandrod September 28, 2023 22:26
@Lichtso Lichtso force-pushed the refactor/error_handling branch 4 times, most recently from ee0a0c4 to afee924 Compare September 28, 2023 23:52
@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2023

Codecov Report

Merging #527 (c9c5a3e) into main (5b77958) will decrease coverage by 0.09%.
The diff coverage is 95.29%.

@@            Coverage Diff             @@
##             main     #527      +/-   ##
==========================================
- Coverage   89.68%   89.59%   -0.09%     
==========================================
  Files          24       24              
  Lines       10317    10220      -97     
==========================================
- Hits         9253     9157      -96     
+ Misses       1064     1063       -1     
Files Coverage Δ
src/error.rs 100.00% <ø> (ø)
src/syscalls.rs 98.42% <100.00%> (-0.08%) ⬇️
src/vm.rs 81.25% <100.00%> (ø)
src/jit.rs 92.05% <89.47%> (-0.15%) ⬇️
src/interpreter.rs 98.35% <93.75%> (-0.07%) ⬇️
src/memory_region.rs 94.10% <96.90%> (-0.16%) ⬇️

@Lichtso Lichtso force-pushed the refactor/error_handling branch from afee924 to 30fc37c Compare September 29, 2023 08:33
@Lichtso Lichtso force-pushed the refactor/error_handling branch from 30fc37c to c9c5a3e Compare September 29, 2023 08:47
@Lichtso Lichtso merged commit 3568ee3 into main Sep 29, 2023
12 checks passed
@Lichtso Lichtso deleted the refactor/error_handling branch September 29, 2023 10:51
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.

2 participants