mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8215644: Clean up globalDefinitions_<compiler>.hpp
Remove non-existent classes from forward declarations, delete unused functions, etc. Reviewed-by: coleenp, kbarrett
This commit is contained in:
parent
ee69ace28a
commit
89ea902f51
8 changed files with 19 additions and 195 deletions
|
@ -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
|
||||
|
@ -222,25 +222,6 @@ void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState o
|
|||
def(code, flags, in, out, (Template::generator)gen, (int)cc);
|
||||
}
|
||||
|
||||
#if defined(TEMPLATE_TABLE_BUG)
|
||||
//
|
||||
// It appears that gcc (version 2.91) generates bad code for the template
|
||||
// table init if this macro is not defined. My symptom was an assertion
|
||||
// assert(Universe::heap()->is_in(obj), "sanity check") in handles.cpp line 24.
|
||||
// when called from interpreterRuntime.resolve_invoke().
|
||||
//
|
||||
#define iload TemplateTable::iload
|
||||
#define lload TemplateTable::lload
|
||||
#define fload TemplateTable::fload
|
||||
#define dload TemplateTable::dload
|
||||
#define aload TemplateTable::aload
|
||||
#define istore TemplateTable::istore
|
||||
#define lstore TemplateTable::lstore
|
||||
#define fstore TemplateTable::fstore
|
||||
#define dstore TemplateTable::dstore
|
||||
#define astore TemplateTable::astore
|
||||
#endif // TEMPLATE_TABLE_BUG
|
||||
|
||||
void TemplateTable::initialize() {
|
||||
if (_is_initialized) return;
|
||||
|
||||
|
@ -530,20 +511,6 @@ void TemplateTable::initialize() {
|
|||
_is_initialized = true;
|
||||
}
|
||||
|
||||
#if defined(TEMPLATE_TABLE_BUG)
|
||||
#undef iload
|
||||
#undef lload
|
||||
#undef fload
|
||||
#undef dload
|
||||
#undef aload
|
||||
#undef istore
|
||||
#undef lstore
|
||||
#undef fstore
|
||||
#undef dstore
|
||||
#undef astore
|
||||
#endif // TEMPLATE_TABLE_BUG
|
||||
|
||||
|
||||
void templateTable_init() {
|
||||
TemplateTable::initialize();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -53,6 +53,13 @@
|
|||
#define falseInTiered true
|
||||
#endif
|
||||
|
||||
// Default and minimum StringTable and SymbolTable size values
|
||||
// Must be powers of 2
|
||||
const size_t defaultStringTableSize = NOT_LP64(1024) LP64_ONLY(65536);
|
||||
const size_t minimumStringTableSize = 128;
|
||||
const size_t defaultSymbolTableSize = 32768; // 2^15
|
||||
const size_t minimumSymbolTableSize = 1024;
|
||||
|
||||
#include CPU_HEADER(globals)
|
||||
#include OS_HEADER(globals)
|
||||
#include OS_CPU_HEADER(globals)
|
||||
|
|
|
@ -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
|
||||
|
@ -51,9 +51,6 @@ typedef void (*dll_func)(...);
|
|||
|
||||
class Thread;
|
||||
class JavaThread;
|
||||
class Event;
|
||||
class DLL;
|
||||
class FileHandle;
|
||||
class NativeCallStack;
|
||||
class methodHandle;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -413,16 +413,6 @@ const jint max_jint = (juint)min_jint - 1; // 0x7FFFFFFF ==
|
|||
|
||||
const int max_method_code_size = 64*K - 1; // JVM spec, 2nd ed. section 4.8.1 (p.134)
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Default and minimum StringTable and SymbolTable size values
|
||||
// Must be a power of 2
|
||||
|
||||
const size_t defaultStringTableSize = NOT_LP64(1024) LP64_ONLY(65536);
|
||||
const size_t minimumStringTableSize = 128;
|
||||
|
||||
const size_t defaultSymbolTableSize = 32768; // 2^15
|
||||
const size_t minimumSymbolTableSize = 1024;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Object alignment, in units of HeapWords.
|
||||
//
|
||||
|
@ -839,8 +829,6 @@ enum JavaThreadState {
|
|||
|
||||
class ClassFileStream;
|
||||
|
||||
class Event;
|
||||
|
||||
class Thread;
|
||||
class VMThread;
|
||||
class JavaThread;
|
||||
|
@ -853,17 +841,11 @@ class CodeBlob;
|
|||
class CompiledMethod;
|
||||
class nmethod;
|
||||
class RuntimeBlob;
|
||||
class OSRAdapter;
|
||||
class I2CAdapter;
|
||||
class C2IAdapter;
|
||||
class CompiledIC;
|
||||
class relocInfo;
|
||||
class ScopeDesc;
|
||||
class PcDesc;
|
||||
|
||||
class Recompiler;
|
||||
class Recompilee;
|
||||
class RecompilationPolicy;
|
||||
class RFrame;
|
||||
class CompiledRFrame;
|
||||
class InterpretedRFrame;
|
||||
|
@ -872,7 +854,6 @@ class vframe;
|
|||
class javaVFrame;
|
||||
class interpretedVFrame;
|
||||
class compiledVFrame;
|
||||
class deoptimizedVFrame;
|
||||
class externalVFrame;
|
||||
class entryVFrame;
|
||||
|
||||
|
@ -888,12 +869,9 @@ class PeriodicTask;
|
|||
class JavaCallWrapper;
|
||||
|
||||
class oopDesc;
|
||||
class metaDataOopDesc;
|
||||
|
||||
class NativeCall;
|
||||
|
||||
class zone;
|
||||
|
||||
class StubQueue;
|
||||
|
||||
class outputStream;
|
||||
|
@ -906,10 +884,6 @@ class CompressedStream;
|
|||
class DebugInfoReadStream;
|
||||
class DebugInfoWriteStream;
|
||||
class LocationValue;
|
||||
class ConstantValue;
|
||||
class IllegalValue;
|
||||
|
||||
class MonitorArray;
|
||||
|
||||
class MonitorInfo;
|
||||
|
||||
|
@ -1124,111 +1098,15 @@ inline intx byte_size(void* from, void* to) {
|
|||
// Avoid non-portable casts with these routines (DEPRECATED)
|
||||
|
||||
// NOTE: USE Bytes class INSTEAD WHERE POSSIBLE
|
||||
// Bytes is optimized machine-specifically and may be much faster then the portable routines below.
|
||||
// Bytes is optimized machine-specifically and may be much faster than the portable routines below.
|
||||
|
||||
// Given sequence of four bytes, build into a 32-bit word
|
||||
// following the conventions used in class files.
|
||||
// On the 386, this could be realized with a simple address cast.
|
||||
//
|
||||
|
||||
// This routine takes eight bytes:
|
||||
inline u8 build_u8_from( u1 c1, u1 c2, u1 c3, u1 c4, u1 c5, u1 c6, u1 c7, u1 c8 ) {
|
||||
return (( u8(c1) << 56 ) & ( u8(0xff) << 56 ))
|
||||
| (( u8(c2) << 48 ) & ( u8(0xff) << 48 ))
|
||||
| (( u8(c3) << 40 ) & ( u8(0xff) << 40 ))
|
||||
| (( u8(c4) << 32 ) & ( u8(0xff) << 32 ))
|
||||
| (( u8(c5) << 24 ) & ( u8(0xff) << 24 ))
|
||||
| (( u8(c6) << 16 ) & ( u8(0xff) << 16 ))
|
||||
| (( u8(c7) << 8 ) & ( u8(0xff) << 8 ))
|
||||
| (( u8(c8) << 0 ) & ( u8(0xff) << 0 ));
|
||||
}
|
||||
|
||||
// This routine takes four bytes:
|
||||
inline u4 build_u4_from( u1 c1, u1 c2, u1 c3, u1 c4 ) {
|
||||
return (( u4(c1) << 24 ) & 0xff000000)
|
||||
| (( u4(c2) << 16 ) & 0x00ff0000)
|
||||
| (( u4(c3) << 8 ) & 0x0000ff00)
|
||||
| (( u4(c4) << 0 ) & 0x000000ff);
|
||||
}
|
||||
|
||||
// And this one works if the four bytes are contiguous in memory:
|
||||
inline u4 build_u4_from( u1* p ) {
|
||||
return build_u4_from( p[0], p[1], p[2], p[3] );
|
||||
}
|
||||
|
||||
// Ditto for two-byte ints:
|
||||
inline u2 build_u2_from( u1 c1, u1 c2 ) {
|
||||
return u2((( u2(c1) << 8 ) & 0xff00)
|
||||
| (( u2(c2) << 0 ) & 0x00ff));
|
||||
}
|
||||
|
||||
// And this one works if the two bytes are contiguous in memory:
|
||||
// This one works if the two bytes are contiguous in memory:
|
||||
inline u2 build_u2_from( u1* p ) {
|
||||
return build_u2_from( p[0], p[1] );
|
||||
}
|
||||
|
||||
// Ditto for floats:
|
||||
inline jfloat build_float_from( u1 c1, u1 c2, u1 c3, u1 c4 ) {
|
||||
u4 u = build_u4_from( c1, c2, c3, c4 );
|
||||
return *(jfloat*)&u;
|
||||
}
|
||||
|
||||
inline jfloat build_float_from( u1* p ) {
|
||||
u4 u = build_u4_from( p );
|
||||
return *(jfloat*)&u;
|
||||
}
|
||||
|
||||
|
||||
// now (64-bit) longs
|
||||
|
||||
inline jlong build_long_from( u1 c1, u1 c2, u1 c3, u1 c4, u1 c5, u1 c6, u1 c7, u1 c8 ) {
|
||||
return (( jlong(c1) << 56 ) & ( jlong(0xff) << 56 ))
|
||||
| (( jlong(c2) << 48 ) & ( jlong(0xff) << 48 ))
|
||||
| (( jlong(c3) << 40 ) & ( jlong(0xff) << 40 ))
|
||||
| (( jlong(c4) << 32 ) & ( jlong(0xff) << 32 ))
|
||||
| (( jlong(c5) << 24 ) & ( jlong(0xff) << 24 ))
|
||||
| (( jlong(c6) << 16 ) & ( jlong(0xff) << 16 ))
|
||||
| (( jlong(c7) << 8 ) & ( jlong(0xff) << 8 ))
|
||||
| (( jlong(c8) << 0 ) & ( jlong(0xff) << 0 ));
|
||||
}
|
||||
|
||||
inline jlong build_long_from( u1* p ) {
|
||||
return build_long_from( p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7] );
|
||||
}
|
||||
|
||||
|
||||
// Doubles, too!
|
||||
inline jdouble build_double_from( u1 c1, u1 c2, u1 c3, u1 c4, u1 c5, u1 c6, u1 c7, u1 c8 ) {
|
||||
jlong u = build_long_from( c1, c2, c3, c4, c5, c6, c7, c8 );
|
||||
return *(jdouble*)&u;
|
||||
}
|
||||
|
||||
inline jdouble build_double_from( u1* p ) {
|
||||
jlong u = build_long_from( p );
|
||||
return *(jdouble*)&u;
|
||||
}
|
||||
|
||||
|
||||
// Portable routines to go the other way:
|
||||
|
||||
inline void explode_short_to( u2 x, u1& c1, u1& c2 ) {
|
||||
c1 = u1(x >> 8);
|
||||
c2 = u1(x);
|
||||
}
|
||||
|
||||
inline void explode_short_to( u2 x, u1* p ) {
|
||||
explode_short_to( x, p[0], p[1]);
|
||||
}
|
||||
|
||||
inline void explode_int_to( u4 x, u1& c1, u1& c2, u1& c3, u1& c4 ) {
|
||||
c1 = u1(x >> 24);
|
||||
c2 = u1(x >> 16);
|
||||
c3 = u1(x >> 8);
|
||||
c4 = u1(x);
|
||||
}
|
||||
|
||||
inline void explode_int_to( u4 x, u1* p ) {
|
||||
explode_int_to( x, p[0], p[1], p[2], p[3]);
|
||||
return u2((( u2(p[0]) << 8 ) & 0xff00)
|
||||
| (( u2(p[1]) << 0 ) & 0x00ff));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2018, 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
|
||||
|
@ -227,17 +227,6 @@ inline int g_isfinite(jdouble f) { return isfinite(f); }
|
|||
inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
|
||||
|
||||
|
||||
// Portability macros
|
||||
#define PRAGMA_INTERFACE #pragma interface
|
||||
#define PRAGMA_IMPLEMENTATION #pragma implementation
|
||||
|
||||
#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
|
||||
#define TEMPLATE_TABLE_BUG
|
||||
#endif
|
||||
#if (__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)
|
||||
#define CONST_SDM_BUG
|
||||
#endif
|
||||
|
||||
// Formatting.
|
||||
#ifdef _LP64
|
||||
# ifdef __APPLE__
|
||||
|
|
|
@ -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
|
||||
|
@ -236,11 +236,6 @@ inline int g_isfinite(jdouble f) { return finite(f); }
|
|||
|
||||
inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
|
||||
|
||||
// Portability macros
|
||||
#define PRAGMA_INTERFACE
|
||||
#define PRAGMA_IMPLEMENTATION
|
||||
#define PRAGMA_IMPLEMENTATION_(arg)
|
||||
|
||||
// Formatting.
|
||||
#ifdef _LP64
|
||||
#define FORMAT64_MODIFIER "l"
|
||||
|
|
|
@ -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
|
||||
|
@ -148,11 +148,6 @@ inline int g_isfinite(jdouble f) { return _finite(f); }
|
|||
#pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE
|
||||
#endif
|
||||
|
||||
// Portability macros
|
||||
#define PRAGMA_INTERFACE
|
||||
#define PRAGMA_IMPLEMENTATION
|
||||
#define PRAGMA_IMPLEMENTATION_(arg)
|
||||
|
||||
// Formatting.
|
||||
#define FORMAT64_MODIFIER "I64"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2017 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
|
@ -126,10 +126,6 @@ inline int g_isfinite(jdouble f) { return finite(f); }
|
|||
inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
|
||||
|
||||
|
||||
// Portability macros
|
||||
#define PRAGMA_INTERFACE #pragma interface
|
||||
#define PRAGMA_IMPLEMENTATION #pragma implementation
|
||||
|
||||
// Formatting.
|
||||
#ifdef _LP64
|
||||
#define FORMAT64_MODIFIER "l"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue