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 locations in intermediate statements #253

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Fix locations in intermediate statements #253

merged 1 commit into from
Aug 6, 2024

Conversation

Lipen
Copy link
Collaborator

@Lipen Lipen commented Aug 5, 2024

This PR fixes some spurious locations mismatches by extracting the recursive calls (such as EtsAssignStmt(location = loc(), lhv = <recurse>, rhv = <recurse>)) with ensureOneAddress inside them. Without extracting these sub-expressions, loc() produces a location that might be "reused" by another loc() call inside ensureOneAddress (which creates extra assignment statement for complex expressions, thus allocates and fills a location). The proper way of doing it is to ensure that lhv and rhv are computed (and all necessary extra statements are already created and put inside currentStmts) before calling loc() for the newly created statement.
In fact, not all extractions that were made in this PR are strictly necessary for the correctness, but I just made the code changes uniform and consistent.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Lifecycle test results

78 tests  ±0   78 ✅ ±0   1m 54s ⏱️ -2s
 7 suites ±0    0 💤 ±0 
 7 files   ±0    0 ❌ ±0 

Results for commit bfd8e76. ± Comparison against base commit 00164e3.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Test results on JDK 19

   83 files  ±0     83 suites  ±0   25m 40s ⏱️ -4s
2 511 tests ±0  2 469 ✅ ±0  42 💤 ±0  0 ❌ ±0 
2 539 runs  ±0  2 497 ✅ ±0  42 💤 ±0  0 ❌ ±0 

Results for commit bfd8e76. ± Comparison against base commit 00164e3.

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 74.35897% with 10 lines in your changes missing coverage. Please review.

Project coverage is 59.55%. Comparing base (00164e3) to head (bfd8e76).

Files Patch % Lines
...-ets/src/main/kotlin/org/jacodb/ets/dto/Convert.kt 74.35% 8 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                neo     #253      +/-   ##
============================================
+ Coverage     59.53%   59.55%   +0.01%     
  Complexity     2238     2238              
============================================
  Files           309      309              
  Lines         18297    18313      +16     
  Branches       3261     3261              
============================================
+ Hits          10894    10906      +12     
- Misses         6329     6333       +4     
  Partials       1074     1074              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Test results on JDK 11

   83 files  ±0     83 suites  ±0   29m 28s ⏱️ +6s
2 511 tests ±0  2 471 ✅ ±0  40 💤 ±0  0 ❌ ±0 
2 539 runs  ±0  2 499 ✅ ±0  40 💤 ±0  0 ❌ ±0 

Results for commit bfd8e76. ± Comparison against base commit 00164e3.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Test results on JDK 8

   83 files  ±0     83 suites  ±0   33m 32s ⏱️ + 4m 31s
2 511 tests ±0  2 466 ✅ ±0  45 💤 ±0  0 ❌ ±0 
2 539 runs  ±0  2 494 ✅ ±0  45 💤 ±0  0 ❌ ±0 

Results for commit bfd8e76. ± Comparison against base commit 00164e3.

@CaelmBleidd CaelmBleidd self-requested a review August 6, 2024 16:57
Copy link
Member

@CaelmBleidd CaelmBleidd left a comment

Choose a reason for hiding this comment

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

LGTM

@Lipen Lipen merged commit 8130e98 into neo Aug 6, 2024
12 checks passed
@Lipen Lipen deleted the lipen/fix-location branch August 6, 2024 17:02
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