1818 BasicType bt = f->type()->basic_type();
1819 assert(bt < T_VALUETYPE && bt >= T_BOOLEAN, "not yet supported");
1820 field_array[pos++] = Type::get_const_type(f->type());
1821 if (bt == T_LONG || bt == T_DOUBLE) {
1822 field_array[pos++] = Type::HALF;
1823 }
1824 }
1825 }
1826
1827 // Make a TypeTuple from the domain of a method signature
1828 const TypeTuple *TypeTuple::make_domain(ciInstanceKlass* recv, ciSignature* sig, bool vt_fields_as_args) {
1829 uint arg_cnt = sig->size();
1830
1831 int vt_extra = 0;
1832 if (vt_fields_as_args) {
1833 for (int i = 0; i < sig->count(); i++) {
1834 ciType* type = sig->type_at(i);
1835 if (type->basic_type() == T_VALUETYPE) {
1836 assert(type->is_valuetype(), "inconsistent type");
1837 ciValueKlass* vk = (ciValueKlass*)type;
1838 vt_extra += vk->extra_value_args();
1839 }
1840 }
1841 assert(((int)arg_cnt) + vt_extra >= 0, "negative number of actual arguments?");
1842 }
1843
1844 uint pos = TypeFunc::Parms;
1845 const Type **field_array;
1846 if (recv != NULL) {
1847 arg_cnt++;
1848 if (vt_fields_as_args && recv->is_valuetype()) {
1849 ciValueKlass* vk = (ciValueKlass*)recv;
1850 vt_extra += vk->extra_value_args();
1851 }
1852 field_array = fields(arg_cnt + vt_extra);
1853 // Use get_const_type here because it respects UseUniqueSubclasses:
1854 if (vt_fields_as_args && recv->is_valuetype()) {
1855 ciValueKlass* vk = (ciValueKlass*)recv;
1856 collect_value_fields(vk, field_array, pos);
1857 } else {
1858 field_array[pos++] = get_const_type(recv)->join_speculative(TypePtr::NOTNULL);
1859 }
1860 } else {
1861 field_array = fields(arg_cnt + vt_extra);
1862 }
1863
1864 int i = 0;
1865 while (pos < TypeFunc::Parms + arg_cnt + vt_extra) {
1866 ciType* type = sig->type_at(i);
1867
1868 switch (type->basic_type()) {
1869 case T_LONG:
1870 field_array[pos++] = TypeLong::LONG;
|
1818 BasicType bt = f->type()->basic_type();
1819 assert(bt < T_VALUETYPE && bt >= T_BOOLEAN, "not yet supported");
1820 field_array[pos++] = Type::get_const_type(f->type());
1821 if (bt == T_LONG || bt == T_DOUBLE) {
1822 field_array[pos++] = Type::HALF;
1823 }
1824 }
1825 }
1826
1827 // Make a TypeTuple from the domain of a method signature
1828 const TypeTuple *TypeTuple::make_domain(ciInstanceKlass* recv, ciSignature* sig, bool vt_fields_as_args) {
1829 uint arg_cnt = sig->size();
1830
1831 int vt_extra = 0;
1832 if (vt_fields_as_args) {
1833 for (int i = 0; i < sig->count(); i++) {
1834 ciType* type = sig->type_at(i);
1835 if (type->basic_type() == T_VALUETYPE) {
1836 assert(type->is_valuetype(), "inconsistent type");
1837 ciValueKlass* vk = (ciValueKlass*)type;
1838 vt_extra += vk->value_arg_slots()-1;
1839 }
1840 }
1841 assert(((int)arg_cnt) + vt_extra >= 0, "negative number of actual arguments?");
1842 }
1843
1844 uint pos = TypeFunc::Parms;
1845 const Type **field_array;
1846 if (recv != NULL) {
1847 arg_cnt++;
1848 if (vt_fields_as_args && recv->is_valuetype()) {
1849 ciValueKlass* vk = (ciValueKlass*)recv;
1850 vt_extra += vk->value_arg_slots()-1;
1851 }
1852 field_array = fields(arg_cnt + vt_extra);
1853 // Use get_const_type here because it respects UseUniqueSubclasses:
1854 if (vt_fields_as_args && recv->is_valuetype()) {
1855 ciValueKlass* vk = (ciValueKlass*)recv;
1856 collect_value_fields(vk, field_array, pos);
1857 } else {
1858 field_array[pos++] = get_const_type(recv)->join_speculative(TypePtr::NOTNULL);
1859 }
1860 } else {
1861 field_array = fields(arg_cnt + vt_extra);
1862 }
1863
1864 int i = 0;
1865 while (pos < TypeFunc::Parms + arg_cnt + vt_extra) {
1866 ciType* type = sig->type_at(i);
1867
1868 switch (type->basic_type()) {
1869 case T_LONG:
1870 field_array[pos++] = TypeLong::LONG;
|