8220515: Revert removal of for_each_lock_value removal
authorredestad
Tue, 12 Mar 2019 16:18:31 +0100
changeset 54077 b4f4778cf3d9
parent 54076 4b4745d185eb
child 54078 085309069d3c
8220515: Revert removal of for_each_lock_value removal Reviewed-by: thartmann
src/hotspot/share/c1/c1_ValueStack.hpp
--- a/src/hotspot/share/c1/c1_ValueStack.hpp	Tue Mar 12 08:04:33 2019 -0700
+++ b/src/hotspot/share/c1/c1_ValueStack.hpp	Tue Mar 12 16:18:31 2019 +0100
@@ -261,6 +261,14 @@
        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.