< prev index next >
src/hotspot/share/runtime/handles.inline.hpp
Print this page
rev 49225 : 8199472: Fix non-PCH build after JDK-8199319
Reviewed-by: coleenp, stefank
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -38,10 +38,21 @@
} else {
_handle = thread->handle_area()->allocate_handle(obj);
}
}
+// Inline constructors for Specific Handles for different oop types
+#define DEF_HANDLE_CONSTR(type, is_a) \
+inline type##Handle::type##Handle (Thread* thread, type##Oop obj) : Handle(thread, (oop)obj) { \
+ assert(is_null() || ((oop)obj)->is_a(), "illegal type"); \
+}
+
+DEF_HANDLE_CONSTR(instance , is_instance_noinline )
+DEF_HANDLE_CONSTR(array , is_array_noinline )
+DEF_HANDLE_CONSTR(objArray , is_objArray_noinline )
+DEF_HANDLE_CONSTR(typeArray, is_typeArray_noinline)
+
// Constructor for metadata handles
#define DEF_METADATA_HANDLE_FN(name, type) \
inline name##Handle::name##Handle(type* obj) : _value(obj), _thread(NULL) { \
if (obj != NULL) { \
assert(((Metadata*)obj)->is_valid(), "obj is valid"); \
< prev index next >