RFR: thaw_kind cleanup
Ron Pressler
rpressler at openjdk.java.net
Wed Apr 27 21:09:52 UTC 2022
On Wed, 27 Apr 2022 18:36:19 GMT, Frederic Parain <fparain at openjdk.org> wrote:
> In continuationFreezeThaw.cpp, the following enum is declared:
> enum thaw_kind {
> thaw_top = 0,
> thaw_return_barrier = 1,
> thaw_exception = 2,
> };
>
> thaw_kind being declared in a .cpp file, it cannot be exported to other files. The consequence of that is that in the assembly code preparing the argument for the thaw() method, hard coded values are used instead of values from the enum:
> if (exception) __ movl(c_rarg1, (int32_t)2);
> else if (return_barrier) __ movl(c_rarg1, (int32_t)1);
> else __ movl(c_rarg1, (int32_t)0);
>
> The fix is to move the declaration of thaw_kind to continuation.hpp and use it everywhere instead of using hard coded values.
>
> Tested with Loom test, tier 1 to 5.
>
> Thank you,
>
> Fred
Marked as reviewed by rpressler (Lead).
-------------
PR: https://git.openjdk.java.net/loom/pull/174
More information about the loom-dev
mailing list