From 0761bc5fa8384ac44644223dd1e97331aa42edf7 Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Tue, 12 Mar 2019 16:18:31 +0100 Subject: [PATCH] 8220515: Revert removal of for_each_lock_value removal Reviewed-by: thartmann --- src/hotspot/share/c1/c1_ValueStack.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hotspot/share/c1/c1_ValueStack.hpp b/src/hotspot/share/c1/c1_ValueStack.hpp index b442a7a96d4..9d5d793bc98 100644 --- a/src/hotspot/share/c1/c1_ValueStack.hpp +++ b/src/hotspot/share/c1/c1_ValueStack.hpp @@ -261,6 +261,14 @@ class ValueStack: public CompilationResourceObj { index += value->type()->size()) +#define for_each_lock_value(state, index, value) \ + int temp_var = state->locks_size(); \ + for (index = 0; \ + index < temp_var && (value = state->lock_at(index), true); \ + index++) \ + if (value != NULL) + + // Macro definition for simple iteration of all state values of a ValueStack // Because the code cannot be executed in a single loop, the code must be passed // as a macro parameter.