Integrated: thaw_kind cleanup
Frederic Parain
fparain at openjdk.java.net
Thu Apr 28 12:57:55 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
This pull request has now been integrated.
Changeset: 49fd5e07
Author: Frederic Parain <fparain at openjdk.org>
URL: https://git.openjdk.java.net/loom/commit/49fd5e07aae39f5eba6d5cb4c408498494bdd154
Stats: 28 lines in 4 files changed: 9 ins; 6 del; 13 mod
thaw_kind cleanup
Reviewed-by: rpressler, coleenp
-------------
PR: https://git.openjdk.java.net/loom/pull/174
More information about the loom-dev
mailing list