< prev index next >

src/share/vm/c1/c1_LIRGenerator.cpp

Print this page

        

*** 1270,1279 **** --- 1270,1299 ---- x->type(), NULL); // NULL CodeEmitInfo results in a leaf call __ move(call_result, result); } + // java.lang.Class::isPrimitive() + void LIRGenerator::do_isPrimitive(Intrinsic* x) { + assert(x->number_of_arguments() == 1, "wrong type"); + + LIRItem clazz(x->argument_at(0), this); + clazz.load_item(); + LIR_Opr result = rlock_result(x); + + if (x->needs_null_check()) { + CodeEmitInfo* info = state_for(x); + __ null_check(clazz.result(), info); + } + + LIR_Opr call_result = call_runtime(clazz.value(), + CAST_FROM_FN_PTR(address, Runtime1::is_primitive), + x->type(), + NULL); // NULL CodeEmitInfo results in a leaf call + __ move(call_result, result); + } + // Example: object.getClass () void LIRGenerator::do_getClass(Intrinsic* x) { assert(x->number_of_arguments() == 1, "wrong type"); LIRItem rcvr(x->argument_at(0), this);
*** 3130,3139 **** --- 3150,3160 ---- do_RuntimeCall(CAST_FROM_FN_PTR(address, os::javaTimeNanos), x); break; case vmIntrinsics::_Object_init: do_RegisterFinalizer(x); break; case vmIntrinsics::_isInstance: do_isInstance(x); break; + case vmIntrinsics::_isPrimitive: do_isPrimitive(x); break; case vmIntrinsics::_getClass: do_getClass(x); break; case vmIntrinsics::_currentThread: do_currentThread(x); break; case vmIntrinsics::_dlog: // fall through case vmIntrinsics::_dlog10: // fall through
< prev index next >