Skip to content

Commit 8f79d88

Browse files
committed
8318155: Remove unnecessary virtual specifier in Space
Reviewed-by: tschatzl, mli
1 parent b2b8db6 commit 8f79d88

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/hotspot/share/gc/shared/space.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ class Space: public CHeapObj<mtGC> {
8686
virtual void set_bottom(HeapWord* value) { _bottom = value; }
8787
virtual void set_end(HeapWord* value) { _end = value; }
8888

89-
virtual HeapWord* saved_mark_word() const { return _saved_mark_word; }
89+
HeapWord* saved_mark_word() const { return _saved_mark_word; }
9090

9191
void set_saved_mark_word(HeapWord* p) { _saved_mark_word = p; }
9292

9393
// Returns true if this object has been allocated since a
9494
// generation's "save_marks" call.
95-
virtual bool obj_allocated_since_save_marks(const oop obj) const {
95+
bool obj_allocated_since_save_marks(const oop obj) const {
9696
return cast_from_oop<HeapWord*>(obj) >= saved_mark_word();
9797
}
9898

@@ -178,7 +178,7 @@ class Space: public CHeapObj<mtGC> {
178178
// structure supporting these calls, possibly speeding up future calls.
179179
// The default implementation, however, is simply to call the const
180180
// version.
181-
virtual HeapWord* block_start(const void* p);
181+
HeapWord* block_start(const void* p);
182182

183183
// Requires "addr" to be the start of a chunk, and returns its size.
184184
// "addr + size" is required to be the start of a new chunk, or the end
@@ -191,7 +191,7 @@ class Space: public CHeapObj<mtGC> {
191191

192192
// Requires "addr" to be the start of a block, and returns "TRUE" iff
193193
// the block is an object and the object is alive.
194-
virtual bool obj_is_alive(const HeapWord* addr) const;
194+
bool obj_is_alive(const HeapWord* addr) const;
195195

196196
// Allocation (return null if full). Assumes the caller has established
197197
// mutually exclusive access to the space.
@@ -206,10 +206,10 @@ class Space: public CHeapObj<mtGC> {
206206
virtual void adjust_pointers() = 0;
207207
#endif
208208

209-
virtual void print() const;
209+
void print() const;
210210
virtual void print_on(outputStream* st) const;
211-
virtual void print_short() const;
212-
virtual void print_short_on(outputStream* st) const;
211+
void print_short() const;
212+
void print_short_on(outputStream* st) const;
213213

214214
// Debugging
215215
virtual void verify() const = 0;

0 commit comments

Comments
 (0)