JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
88 stars 4 forks source link

Store ParseErr on heap #406

Closed JSAbrahams closed 1 year ago

JSAbrahams commented 1 year ago

Relevant issues

Summary

This is because ParseErr is relatively large. Now it is stored on the heap, and the compiler also doesn't have to create extra space for the Ok value.

codecov[bot] commented 1 year ago

Codecov Report

Merging #406 (37dfff6) into develop (dbeb53e) will decrease coverage by 0.01%. The diff coverage is 31.11%.

@@             Coverage Diff             @@
##           develop     #406      +/-   ##
===========================================
- Coverage    87.56%   87.54%   -0.02%     
===========================================
  Files          109      109              
  Lines        12035    12016      -19     
===========================================
- Hits         10538    10519      -19     
  Misses        1497     1497              
Impacted Files Coverage Ξ”
src/parse/class.rs 88.15% <0.00%> (ΓΈ)
src/parse/collection.rs 87.33% <0.00%> (ΓΈ)
src/parse/control_flow_stmt.rs 87.68% <0.00%> (ΓΈ)
src/parse/result.rs 43.13% <0.00%> (ΓΈ)
src/parse/statement.rs 91.33% <0.00%> (ΓΈ)
src/parse/definition.rs 93.68% <14.28%> (ΓΈ)
src/parse/iterator.rs 95.61% <50.00%> (ΓΈ)
src/parse/mod.rs 71.42% <50.00%> (-3.58%) :arrow_down:
src/parse/ty.rs 96.73% <60.00%> (ΓΈ)
src/parse/control_flow_expr.rs 93.19% <66.66%> (ΓΈ)
... and 8 more