< prev index next >

src/share/vm/opto/runtime.cpp

Print this page

        

*** 1713,1717 **** --- 1713,1745 ---- const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1,fields); return TypeFunc::make(domain, range); } + + const TypeFunc *OptoRuntime::pack_value_type_Type() { + // create input type (domain) + uint total = 1 + SharedRuntime::java_return_convention_max_int + SharedRuntime::java_return_convention_max_float*2; + const Type **fields = TypeTuple::fields(total); + // We don't know the number of returned values and their + // types. Assume all registers available to the return convention + // are used. + fields[TypeFunc::Parms] = TypeRawPtr::BOTTOM; + fields[TypeFunc::Parms+1] = TypeRawPtr::BOTTOM; + uint i = 2; + for (; i < SharedRuntime::java_return_convention_max_int+1; i++) { + fields[TypeFunc::Parms+i] = TypeInt::INT; + } + for (; i < total; i+=2) { + fields[TypeFunc::Parms+i] = Type::DOUBLE; + fields[TypeFunc::Parms+i+1] = Type::HALF; + } + const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms + total, fields); + + // create result type (range) + fields = TypeTuple::fields(1); + fields[TypeFunc::Parms+0] = TypeValueTypePtr::NOTNULL; + + const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1,fields); + + return TypeFunc::make(domain, range); + }
< prev index next >