Skip to content
Permalink
Browse files
8259487: Remove unused StarTask
Reviewed-by: iklam, tschatzl
  • Loading branch information
Kim Barrett committed Jan 29, 2021
1 parent 1519632 commit 251c6419bf186273822fd5305e44e85e58bc15d7
Showing 1 changed file with 1 addition and 31 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -515,36 +515,6 @@ class TerminatorTerminator: public CHeapObj<mtInternal> {
virtual bool should_exit_termination() = 0;
};

// This is a container class for either an oop* or a narrowOop*.
// Both are pushed onto a task queue and the consumer will test is_narrow()
// to determine which should be processed.
class StarTask {
void* _holder; // either union oop* or narrowOop*

enum { COMPRESSED_OOP_MASK = 1 };

public:
StarTask(narrowOop* p) {
assert(((uintptr_t)p & COMPRESSED_OOP_MASK) == 0, "Information loss!");
_holder = (void *)((uintptr_t)p | COMPRESSED_OOP_MASK);
}
StarTask(oop* p) {
assert(((uintptr_t)p & COMPRESSED_OOP_MASK) == 0, "Information loss!");
_holder = (void*)p;
}
StarTask() { _holder = NULL; }
// Trivially copyable, for use in GenericTaskQueue.

operator oop*() { return (oop*)_holder; }
operator narrowOop*() {
return (narrowOop*)((uintptr_t)_holder & ~COMPRESSED_OOP_MASK);
}

bool is_narrow() const {
return (((uintptr_t)_holder & COMPRESSED_OOP_MASK) != 0);
}
};

class ObjArrayTask
{
public:

1 comment on commit 251c641

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 251c641 Jan 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.