aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/library_call.cpp
diff options
context:
space:
mode:
authorcoleenp <none@none>2011-12-06 18:28:51 -0500
committercoleenp <none@none>2011-12-06 18:28:51 -0500
commit8b82357933d21c5d75cd2b33585307a71e5a7eb9 (patch)
tree184c8461ff7f2a2e0e7f2f6c69c8356fba1431f5 /src/share/vm/opto/library_call.cpp
parentda3434a563a3a25706cd9763ebf7ac6ecbe4e305 (diff)
7117052: instanceKlass::_init_state can be u1 type
Summary: Change instanceKlass::_init_state field to u1 type. Reviewed-by: bdelsart, coleenp, dholmes, phh, never Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
Diffstat (limited to 'src/share/vm/opto/library_call.cpp')
-rw-r--r--src/share/vm/opto/library_call.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call.cpp
index d5ad00e16..7d4bb881a 100644
--- a/src/share/vm/opto/library_call.cpp
+++ b/src/share/vm/opto/library_call.cpp
@@ -2807,7 +2807,9 @@ bool LibraryCallKit::inline_unsafe_allocate() {
// Serializable.class or Object[].class. The runtime will handle it.
// But we must make an explicit check for initialization.
Node* insp = basic_plus_adr(kls, instanceKlass::init_state_offset_in_bytes() + sizeof(oopDesc));
- Node* inst = make_load(NULL, insp, TypeInt::INT, T_INT);
+ // Use T_BOOLEAN for instanceKlass::_init_state so the compiler
+ // can generate code to load it as unsigned byte.
+ Node* inst = make_load(NULL, insp, TypeInt::UBYTE, T_BOOLEAN);
Node* bits = intcon(instanceKlass::fully_initialized);
Node* test = _gvn.transform( new (C, 3) SubINode(inst, bits) );
// The 'test' is non-zero if we need to take a slow path.