Skip to content

Commit

Permalink
8215731: Move forward class definitions out of globalDefinitions.hpp
Browse files Browse the repository at this point in the history
Redistribute the forward declarations to the header files that need them.

Reviewed-by: dholmes, lfoltan
  • Loading branch information
coleenp committed Jan 4, 2019
1 parent 3460182 commit 1509c1f
Show file tree
Hide file tree
Showing 39 changed files with 108 additions and 122 deletions.
4 changes: 3 additions & 1 deletion src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2108, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -48,6 +48,8 @@
// The base class for different kinds of native instruction abstractions.
// Provides the primitive operations to manipulate code relative to this.

class NativeCall;

class NativeInstruction {
friend class Relocation;
friend bool is_NativeCallTrampolineStub_at(address);
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/cpu/arm/nativeInst_arm_32.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2019, 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
Expand Down Expand Up @@ -45,6 +45,7 @@
// The non-raw classes are the front-end entry point, hiding potential
// back-end extensions or the actual instructions size.
class NativeInstruction;
class NativeCall;

class RawNativeInstruction {
public:
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/cpu/sparc/nativeInst_sparc.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -311,6 +311,8 @@ inline NativeInstruction* nativeInstruction_at(address address) {

// The NativeCall is an abstraction for accessing/manipulating native call imm32 instructions.
// (used to manipulate inline caches, primitive & dll calls, etc.)
class NativeCall;

inline NativeCall* nativeCall_at(address instr);
inline NativeCall* nativeCall_overwriting_at(address instr,
address destination);
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/cpu/x86/nativeInst_x86.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -149,6 +149,7 @@ inline NativePltCall* nativePltCall_before(address addr) {
return nativePltCall_at(at);
}

class NativeCall;
inline NativeCall* nativeCall_at(address address);
// The NativeCall is an abstraction for accessing/manipulating native call imm32/rel32off
// instructions (used to manipulate inline caches, primitive & dll calls, etc.).
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/os_cpu/linux_aarch64/globals_linux_aarch64.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -40,6 +40,7 @@ define_pd_global(uintx,JVMInvokeMethodSlack, 8192);
// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx,HeapBaseMinAddress, 2*G);

class Thread;
extern __thread Thread *aarch64_currentThread;

#endif // OS_CPU_LINUX_AARCH64_VM_GLOBALS_LINUX_AARCH64_HPP
4 changes: 3 additions & 1 deletion src/hotspot/share/classfile/symbolTable.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -31,6 +31,8 @@
#include "utilities/concurrentHashTable.hpp"
#include "utilities/hashtable.hpp"

class JavaThread;

// TempNewSymbol acts as a handle class in a handle/body idiom and is
// responsible for proper resource management of the body (which is a Symbol*).
// The body is resource managed by a reference counting scheme.
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/code/compiledMethod.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
Expand Down Expand Up @@ -36,6 +36,8 @@ class AbstractCompiler;
class xmlStream;
class CompiledStaticCall;
class NativeCallWrapper;
class ScopeDesc;
class CompiledIC;

// This class is used internally by nmethods, to cache
// exception/pc/handler information.
Expand Down
5 changes: 4 additions & 1 deletion src/hotspot/share/code/location.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -28,6 +28,9 @@
#include "asm/assembler.hpp"
#include "code/vmreg.hpp"

class DebugInfoReadStream;
class DebugInfoWriteStream;

// A Location describes a concrete machine variable location
// (such as integer or floating point register or a stack-held
// variable). Used when generating debug-information for nmethods.
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/code/nmethod.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -29,6 +29,7 @@

class DepChange;
class DirectiveSet;
class DebugInformationRecorder;

// nmethods (native methods) are the compiled code versions of Java methods.
//
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/compiler/compilerOracle.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2019, 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
Expand Down Expand Up @@ -28,6 +28,8 @@
#include "memory/allocation.hpp"
#include "oops/oopsHierarchy.hpp"

class methodHandle;

// CompilerOracle is an interface for turning on and off compilation
// for some methods

Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/gc/cms/cmsOopClosures.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2019, 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
Expand Down Expand Up @@ -39,6 +39,8 @@ class CMSCollector;
class MarkFromRootsClosure;
class ParMarkFromRootsClosure;

class Mutex;

// Decode the oop and call do_oop on it.
#define DO_OOP_WORK_DEFN \
void do_oop(oop obj); \
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/gc/g1/dirtyCardQueue.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2019, 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
Expand Down Expand Up @@ -30,6 +30,8 @@

class FreeIdSet;
class DirtyCardQueueSet;
class JavaThread;
class Monitor;

// A closure class for processing card table entries. Note that we don't
// require these closure objects to be stack-allocated.
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/gc/g1/g1SATBMarkQueueSet.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019, 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
Expand Down Expand Up @@ -28,6 +28,7 @@
#include "gc/shared/satbMarkQueue.hpp"

class G1CollectedHeap;
class Monitor;
class JavaThread;

class G1SATBMarkQueueSet : public SATBMarkQueueSet {
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/gc/shared/blockOffsetTable.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2019, 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
Expand Down Expand Up @@ -265,6 +265,8 @@ class BlockOffsetSharedArray: public CHeapObj<mtGC> {
HeapWord* address_for_index(size_t index) const;
};

class Space;

//////////////////////////////////////////////////////////////////////////
// The BlockOffsetArray whose subtypes use the BlockOffsetSharedArray.
//////////////////////////////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/gc/shared/ptrQueue.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2019, 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
Expand Down Expand Up @@ -29,6 +29,7 @@
#include "utilities/sizes.hpp"

class Mutex;
class Monitor;

// There are various techniques that require threads to be able to log
// addresses. For example, a generational write barrier might log
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/gc/shared/satbMarkQueue.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2019, 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
Expand Down Expand Up @@ -29,6 +29,7 @@
#include "memory/allocation.hpp"

class JavaThread;
class Monitor;
class SATBMarkQueueSet;

// Base class for processing the contents of a SATB buffer.
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/interpreter/bytecodeTracer.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -37,6 +37,8 @@

// class BytecodeTracer is used by TraceBytecodes option and PrintMethodData

class methodHandle;

class BytecodeClosure;
class BytecodeTracer: AllStatic {
private:
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/interpreter/oopMapCache.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -60,6 +60,7 @@ class OffsetClosure {
virtual void offset_do(int offset) = 0;
};

class OopMapCacheEntry;

class InterpreterOopMap: ResourceObj {
friend class OopMapCache;
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/jfr/leakprofiler/emitEventOperation.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, 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
Expand Down Expand Up @@ -34,6 +34,8 @@ class JfrThreadData;
class ObjectSample;
class ObjectSampler;

class VMThread;

// Safepoint operation for emitting object sample events
class EmitEventOperation : public VM_Operation {
private:
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/jfr/leakprofiler/leakProfiler.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, 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
Expand Down Expand Up @@ -30,6 +30,7 @@
class BoolObjectClosure;
class ObjectSampler;
class OopClosure;
class JavaThread;
class Thread;

class LeakProfiler : public AllStatic {
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/logging/logDecorators.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
Expand All @@ -26,6 +26,8 @@

#include "utilities/globalDefinitions.hpp"

class outputStream;

// The list of available decorators:
// time - Current time and date in ISO-8601 format
// uptime - Time since the start of the JVM in seconds and milliseconds (e.g., 6.567s)
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/memory/allocation.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -31,6 +31,8 @@

#include <new>

class Thread;

class AllocFailStrategy {
public:
enum AllocFailEnum { EXIT_OOM, RETURN_NULL };
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/memory/virtualspace.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -27,6 +27,8 @@

#include "utilities/globalDefinitions.hpp"

class outputStream;

// ReservedSpace is a data structure for reserving a contiguous address range.

class ReservedSpace {
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/oops/instanceKlass.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -71,6 +71,8 @@ class JNIid;
class JvmtiCachedClassFieldMap;
class nmethodBucket;
class SuperTypeClosure;
class OopMapCache;
class InterpreterOopMap;

// This is used in iterators below.
class FieldClosure: public StackObj {
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/oops/method.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, 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
Expand Down Expand Up @@ -66,6 +66,7 @@ class ConstMethod;
class InlineTableSizes;
class KlassSizeStats;
class CompiledMethod;
class InterpreterOopMap;

class Method : public Metadata {
friend class VMStructs;
Expand Down

0 comments on commit 1509c1f

Please sign in to comment.