Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Reduce unneeded forcing to boolean #27648

Merged
merged 1 commit into from Nov 4, 2019
Merged

Reduce unneeded forcing to boolean #27648

merged 1 commit into from Nov 4, 2019

Conversation

ghost
Copy link

@ghost ghost commented Nov 3, 2019

In a couple of files related to GC, there is the problem in which whenever one runs the getter pThread->PreemptiveGCDisabled(), the getter checks to see if the member variable m_fPreemptiveGCDisabled is 0 or not, AND then the value of that expression is checked to be 1 or 0 AGAIN.

This is unnecessary and now only does this check when running the getter.

src/vm/gcenv.ee.cpp Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Nov 3, 2019

Thank you!

src/gc/sample/gcenv.ee.cpp Outdated Show resolved Hide resolved
src/gc/sample/gcenv.ee.cpp Outdated Show resolved Hide resolved
src/gc/sample/gcenv.h Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Nov 4, 2019

Fixed

src/gc/sample/gcenv.h Outdated Show resolved Hide resolved
src/vm/gcenv.ee.cpp Outdated Show resolved Hide resolved
@ghost ghost changed the title Reduce unneeded forcing to true or false Reduce unneeded forcing to boolean Nov 4, 2019
@jkotas jkotas merged commit 96e08af into dotnet:master Nov 4, 2019
MichalStrehovsky pushed a commit to MichalStrehovsky/corert that referenced this pull request Mar 28, 2020
MichalStrehovsky pushed a commit to MichalStrehovsky/corert that referenced this pull request Mar 31, 2020
jkotas pushed a commit to dotnet/corert that referenced this pull request Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants