54 static int _tail_offset;
55 static int _mounted_offset;
56 static int _done_offset;
57 static int _preempted_offset;
58
59 static void compute_offsets();
60 public:
61 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
62 // Accessors
63 static inline oop scope(oop continuation);
64 static inline oop parent(oop continuation);
65 static inline stackChunkOop tail(oop continuation);
66 static inline void set_tail(oop continuation, stackChunkOop value);
67 static inline bool done(oop continuation);
68 static inline bool is_preempted(oop continuation);
69 static inline void set_preempted(oop continuation, bool value);
70 };
71
72 // Interface to jdk.internal.vm.StackChunk objects
73 #define STACKCHUNK_INJECTED_FIELDS(macro) \
74 macro(jdk_internal_vm_StackChunk, cont, continuation_signature, false) \
75 macro(jdk_internal_vm_StackChunk, flags, byte_signature, false) \
76 macro(jdk_internal_vm_StackChunk, pc, intptr_signature, false) \
77 macro(jdk_internal_vm_StackChunk, maxThawingSize, int_signature, false) \
78
79 class jdk_internal_vm_StackChunk: AllStatic {
80 friend class JavaClasses;
81 private:
82 static int _parent_offset;
83 static int _size_offset;
84 static int _sp_offset;
85 static int _pc_offset;
86 static int _argsize_offset;
87 static int _flags_offset;
88 static int _maxThawingSize_offset;
89 static int _cont_offset;
90
91
92 static void compute_offsets();
93 public:
94 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
95
96 static inline int parent_offset() { return _parent_offset; }
97 static inline int cont_offset() { return _cont_offset; }
98
99 // Accessors
100 static inline oop parent(oop chunk);
101 static inline void set_parent(oop chunk, oop value);
102 template<typename P>
103 static inline void set_parent_raw(oop chunk, oop value);
104 template<DecoratorSet decorators>
105 static inline void set_parent_access(oop chunk, oop value);
106
107 static inline int size(oop chunk);
108 static inline void set_size(HeapWord* chunk, int value);
109
110 static inline int sp(oop chunk);
111 static inline void set_sp(oop chunk, int value);
112 static inline void set_sp(HeapWord* chunk, int value); // used while allocating
113 static inline address pc(oop chunk);
114 static inline void set_pc(oop chunk, address value);
115 static inline int argsize(oop chunk);
116 static inline void set_argsize(oop chunk, int value);
117 static inline uint8_t flags(oop chunk);
118 static inline void set_flags(oop chunk, uint8_t value);
119 static inline uint8_t flags_acquire(oop chunk);
120 static inline void release_set_flags(oop chunk, uint8_t value);
121 static inline bool try_set_flags(oop chunk, uint8_t expected_value, uint8_t new_value);
122
123 static inline int maxThawingSize(oop chunk);
124 static inline void set_maxThawingSize(oop chunk, int value);
125
126 // cont oop's processing is essential for the chunk's GC protocol
127 static inline oop cont(oop chunk);
128 template<typename P>
129 static inline oop cont_raw(oop chunk);
130 static inline void set_cont(oop chunk, oop value);
131 template<typename P>
132 static inline void set_cont_raw(oop chunk, oop value);
133 template<DecoratorSet decorators>
134 static inline void set_cont_access(oop chunk, oop value);
135 };
136
137 #endif // SHARE_RUNTIME_CONTINUATIONJAVACLASSES_HPP
|
54 static int _tail_offset;
55 static int _mounted_offset;
56 static int _done_offset;
57 static int _preempted_offset;
58
59 static void compute_offsets();
60 public:
61 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
62 // Accessors
63 static inline oop scope(oop continuation);
64 static inline oop parent(oop continuation);
65 static inline stackChunkOop tail(oop continuation);
66 static inline void set_tail(oop continuation, stackChunkOop value);
67 static inline bool done(oop continuation);
68 static inline bool is_preempted(oop continuation);
69 static inline void set_preempted(oop continuation, bool value);
70 };
71
72 // Interface to jdk.internal.vm.StackChunk objects
73 #define STACKCHUNK_INJECTED_FIELDS(macro) \
74 macro(jdk_internal_vm_StackChunk, cont, continuation_signature, false) \
75 macro(jdk_internal_vm_StackChunk, flags, byte_signature, false) \
76 macro(jdk_internal_vm_StackChunk, pc, intptr_signature, false) \
77 macro(jdk_internal_vm_StackChunk, maxThawingSize, int_signature, false) \
78 macro(jdk_internal_vm_StackChunk, lockStackSize, byte_signature, false) \
79 macro(jdk_internal_vm_StackChunk, objectMonitor, intptr_signature, false) \
80
81 class jdk_internal_vm_StackChunk: AllStatic {
82 friend class JavaClasses;
83 private:
84 static int _parent_offset;
85 static int _size_offset;
86 static int _sp_offset;
87 static int _pc_offset;
88 static int _argsize_offset;
89 static int _flags_offset;
90 static int _maxThawingSize_offset;
91 static int _lockStackSize_offset;
92 static int _objectMonitor_offset;
93 static int _cont_offset;
94
95
96 static void compute_offsets();
97 public:
98 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
99
100 static inline int parent_offset() { return _parent_offset; }
101 static inline int cont_offset() { return _cont_offset; }
102
103 // Accessors
104 static inline oop parent(oop chunk);
105 static inline void set_parent(oop chunk, oop value);
106 template<typename P>
107 static inline void set_parent_raw(oop chunk, oop value);
108 template<DecoratorSet decorators>
109 static inline void set_parent_access(oop chunk, oop value);
110
111 static inline int size(oop chunk);
112 static inline void set_size(HeapWord* chunk, int value);
113
114 static inline int sp(oop chunk);
115 static inline void set_sp(oop chunk, int value);
116 static inline void set_sp(HeapWord* chunk, int value); // used while allocating
117 static inline address pc(oop chunk);
118 static inline void set_pc(oop chunk, address value);
119 static inline int argsize(oop chunk);
120 static inline void set_argsize(oop chunk, int value);
121 static inline uint8_t flags(oop chunk);
122 static inline void set_flags(oop chunk, uint8_t value);
123 static inline uint8_t flags_acquire(oop chunk);
124 static inline void release_set_flags(oop chunk, uint8_t value);
125 static inline bool try_set_flags(oop chunk, uint8_t expected_value, uint8_t new_value);
126
127 static inline int maxThawingSize(oop chunk);
128 static inline void set_maxThawingSize(oop chunk, int value);
129
130 static inline uint8_t lockStackSize(oop chunk);
131 static inline void set_lockStackSize(oop chunk, uint8_t value);
132
133 static inline address objectMonitor(oop chunk);
134 static inline void set_objectMonitor(oop chunk, address mon);
135
136 // cont oop's processing is essential for the chunk's GC protocol
137 static inline oop cont(oop chunk);
138 template<typename P>
139 static inline oop cont_raw(oop chunk);
140 static inline void set_cont(oop chunk, oop value);
141 template<typename P>
142 static inline void set_cont_raw(oop chunk, oop value);
143 template<DecoratorSet decorators>
144 static inline void set_cont_access(oop chunk, oop value);
145 };
146
147 #endif // SHARE_RUNTIME_CONTINUATIONJAVACLASSES_HPP
|