comparison src/share/vm/opto/library_call.cpp @ 4739:52b5d32fbfaf

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>
author coleenp
date Tue, 06 Dec 2011 18:28:51 -0500
parents a92cdbac8b9e
children 22cee0ee8927
comparison
equal deleted inserted replaced
4738:da4dd142ea01 4739:52b5d32fbfaf
2805 2805
2806 // Note: The argument might still be an illegal value like 2806 // Note: The argument might still be an illegal value like
2807 // Serializable.class or Object[].class. The runtime will handle it. 2807 // Serializable.class or Object[].class. The runtime will handle it.
2808 // But we must make an explicit check for initialization. 2808 // But we must make an explicit check for initialization.
2809 Node* insp = basic_plus_adr(kls, instanceKlass::init_state_offset_in_bytes() + sizeof(oopDesc)); 2809 Node* insp = basic_plus_adr(kls, instanceKlass::init_state_offset_in_bytes() + sizeof(oopDesc));
2810 Node* inst = make_load(NULL, insp, TypeInt::INT, T_INT); 2810 // Use T_BOOLEAN for instanceKlass::_init_state so the compiler
2811 // can generate code to load it as unsigned byte.
2812 Node* inst = make_load(NULL, insp, TypeInt::UBYTE, T_BOOLEAN);
2811 Node* bits = intcon(instanceKlass::fully_initialized); 2813 Node* bits = intcon(instanceKlass::fully_initialized);
2812 Node* test = _gvn.transform( new (C, 3) SubINode(inst, bits) ); 2814 Node* test = _gvn.transform( new (C, 3) SubINode(inst, bits) );
2813 // The 'test' is non-zero if we need to take a slow path. 2815 // The 'test' is non-zero if we need to take a slow path.
2814 2816
2815 Node* obj = new_instance(kls, test); 2817 Node* obj = new_instance(kls, test);