src/share/vm/utilities/globalDefinitions.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/utilities/globalDefinitions.hpp Thu Feb 19 16:21:14 2015
--- new/src/share/vm/utilities/globalDefinitions.hpp Thu Feb 19 16:21:14 2015
*** 1344,1353 ****
--- 1344,1360 ----
// Convert pointer to intptr_t, for use in printing pointers.
inline intptr_t p2i(const void * p) {
return (intptr_t) p;
}
+ // swap a & b
+ template<class T> static void swap(T& a, T& b) {
+ T tmp = a;
+ a = b;
+ b = tmp;
+ }
+
// Printf-style formatters for fixed- and variable-width types as pointers and
// integers. These are derived from the definitions in inttypes.h. If the platform
// doesn't provide appropriate definitions, they should be provided in
// the compiler-specific definitions file (e.g., globalDefinitions_gcc.hpp)
src/share/vm/utilities/globalDefinitions.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File