Skip to content

Commit 77a5010

Browse files
author
David Holmes
committedJan 24, 2023
8286775: Remove identical per-compiler definitions of unsigned integral jtypes
Reviewed-by: kbarrett, coleenp
1 parent f79e587 commit 77a5010

File tree

4 files changed

+8
-24
lines changed

4 files changed

+8
-24
lines changed
 

‎src/hotspot/share/utilities/globalDefinitions.hpp

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include COMPILER_HEADER(utilities/globalDefinitions)
3636

3737
#include <cstddef>
38+
#include <cstdint>
3839
#include <type_traits>
3940

4041
class oopDesc;
@@ -525,6 +526,13 @@ extern "C" {
525526
typedef int (*_sort_Fn)(const void *, const void *);
526527
}
527528

529+
// Additional Java basic types
530+
531+
typedef uint8_t jubyte;
532+
typedef uint16_t jushort;
533+
typedef uint32_t juint;
534+
typedef uint64_t julong;
535+
528536
// Unsigned byte types for os and stream.hpp
529537

530538
// Unsigned one, two, four and eight byte quantities used for describing

‎src/hotspot/share/utilities/globalDefinitions_gcc.hpp

-7
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,6 @@ typedef unsigned int uintptr_t;
101101

102102
#endif // !LINUX && !_ALLBSD_SOURCE
103103

104-
// Additional Java basic types
105-
106-
typedef uint8_t jubyte;
107-
typedef uint16_t jushort;
108-
typedef uint32_t juint;
109-
typedef uint64_t julong;
110-
111104
// checking for nanness
112105
#if defined(__APPLE__)
113106
inline int g_isnan(double f) { return isnan(f); }

‎src/hotspot/share/utilities/globalDefinitions_visCPP.hpp

-7
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ typedef int64_t ssize_t;
8585
typedef int32_t ssize_t;
8686
#endif
8787

88-
// Additional Java basic types
89-
90-
typedef uint8_t jubyte;
91-
typedef uint16_t jushort;
92-
typedef uint32_t juint;
93-
typedef uint64_t julong;
94-
9588
// Non-standard stdlib-like stuff:
9689
inline int strcasecmp(const char *s1, const char *s2) { return _stricmp(s1,s2); }
9790
inline int strncasecmp(const char *s1, const char *s2, size_t n) {

‎src/hotspot/share/utilities/globalDefinitions_xlc.hpp

-10
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,6 @@
9191
#endif
9292
#endif
9393

94-
// Compiler-specific primitive types
95-
// All defs of int (uint16_6 etc) are defined in AIX' /usr/include/stdint.h
96-
97-
// Additional Java basic types
98-
99-
typedef uint8_t jubyte;
100-
typedef uint16_t jushort;
101-
typedef uint32_t juint;
102-
typedef uint64_t julong;
103-
10494
// checking for nanness
10595
inline int g_isnan(float f) { return isnan(f); }
10696
inline int g_isnan(double f) { return isnan(f); }

0 commit comments

Comments
 (0)
Please sign in to comment.