Skip to content

fix(struct): prevent erroneous caching of struct types#89

Merged
Wodann merged 1 commit intomun-lang:masterfrom
Wodann:fix/cached-struct-type
Jan 30, 2020
Merged

fix(struct): prevent erroneous caching of struct types#89
Wodann merged 1 commit intomun-lang:masterfrom
Wodann:fix/cached-struct-type

Conversation

@Wodann
Copy link
Collaborator

@Wodann Wodann commented Jan 24, 2020

Depends on #88

@Wodann Wodann requested a review from baszalmstra January 24, 2020 15:44
@Wodann Wodann self-assigned this Jan 24, 2020
@codecov
Copy link

codecov bot commented Jan 24, 2020

Codecov Report

Merging #89 into master will increase coverage by 0.15%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage   76.68%   76.84%   +0.15%     
==========================================
  Files         122      122              
  Lines        9827     9833       +6     
==========================================
+ Hits         7536     7556      +20     
+ Misses       2291     2277      -14
Impacted Files Coverage Δ
crates/mun_codegen/src/ir/ty.rs 82.97% <100%> (+0.75%) ⬆️
crates/mun_runtime/src/test.rs 96.96% <100%> (+0.06%) ⬆️
crates/mun_hir/src/code_model.rs 74.8% <0%> (+1.18%) ⬆️
crates/mun_hir/src/raw.rs 74.35% <0%> (+2.56%) ⬆️
crates/mun_hir/src/adt.rs 94.82% <0%> (+17.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 869e4b8...4c850ab. Read the comment docs.

@Wodann Wodann force-pushed the fix/cached-struct-type branch from 378858b to 2b49d4c Compare January 24, 2020 17:43
@Wodann
Copy link
Collaborator Author

Wodann commented Jan 24, 2020

@Wodann Wodann force-pushed the fix/cached-struct-type branch 2 times, most recently from af08c46 to 7789f99 Compare January 26, 2020 17:46
Copy link
Collaborator

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, maybe for later, we could change the IR signature of functions for GC types. Instead of storing pointers to the GC value we should store a 'GCHandle' instead of a typed pointer. Then we won't have to modify the referencing struct anymore.

Prevents salsa from returning cached struct types, when you change the
type of one of the struct fields
@Wodann Wodann force-pushed the fix/cached-struct-type branch from 7789f99 to 4c850ab Compare January 30, 2020 14:48
@Wodann Wodann merged commit 78cbcde into mun-lang:master Jan 30, 2020
@Wodann
Copy link
Collaborator Author

Wodann commented Jan 31, 2020

@Wodann Wodann changed the title Fix bug caused by erroneous caching of struct types fix(struct): prevent erroneous caching of struct types Jan 31, 2020
@Wodann Wodann deleted the fix/cached-struct-type branch March 25, 2020 11:25
@Wodann Wodann added this to the Mun v0.2 milestone May 14, 2020
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