< prev index next >

src/hotspot/share/opto/runtime.cpp

Print this page




1727   for (; i < SharedRuntime::java_return_convention_max_int+1; i++) {
1728     fields[TypeFunc::Parms+i] = TypeInt::INT;
1729   }
1730   for (; i < total; i+=2) {
1731     fields[TypeFunc::Parms+i] = Type::DOUBLE;
1732     fields[TypeFunc::Parms+i+1] = Type::HALF;
1733   }
1734   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms + total, fields);
1735 
1736   // create result type (range)
1737   fields = TypeTuple::fields(1);
1738   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL;
1739 
1740   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1,fields);
1741 
1742   return TypeFunc::make(domain, range);
1743 }
1744 
1745 JRT_LEAF(void, OptoRuntime::load_unknown_value(valueArrayOopDesc* array, int index, instanceOopDesc* buffer))
1746 {
1747   Klass* klass = array->klass();
1748   assert(klass->is_valueArray_klass(), "expected value array oop");
1749 
1750   ValueArrayKlass* vaklass = ValueArrayKlass::cast(klass);
1751   ValueKlass* vklass = vaklass->element_klass();
1752   void* src = array->value_at_addr(index, vaklass->layout_helper());
1753   vklass->value_store(src, vklass->data_for_oop(buffer),
1754                         vaklass->element_byte_size(), true, false);
1755 }
1756 JRT_END
1757 
1758 const TypeFunc *OptoRuntime::load_unknown_value_Type() {
1759   // create input type (domain)
1760   const Type **fields = TypeTuple::fields(3);
1761   // We don't know the number of returned values and their
1762   // types. Assume all registers available to the return convention
1763   // are used.
1764   fields[TypeFunc::Parms] = TypeOopPtr::NOTNULL;
1765   fields[TypeFunc::Parms+1] = TypeInt::POS;
1766   fields[TypeFunc::Parms+2] = TypeInstPtr::NOTNULL;
1767 
1768   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+3, fields);
1769 
1770   // create result type (range)
1771   fields = TypeTuple::fields(0);
1772   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
1773 
1774   return TypeFunc::make(domain, range);
1775 }
1776 
1777 JRT_LEAF(void, OptoRuntime::store_unknown_value(instanceOopDesc* buffer, valueArrayOopDesc* array, int index))
1778 {
1779   assert(buffer != NULL, "can't store null into flat array");
1780   Klass* klass = array->klass();
1781   assert(klass->is_valueArray_klass(), "expected value array");
1782   assert(ArrayKlass::cast(klass)->element_klass() == buffer->klass(), "Store type incorrect");
1783 
1784   ValueArrayKlass* vaklass = ValueArrayKlass::cast(klass);
1785   ValueKlass* vklass = vaklass->element_klass();
1786   const int lh = vaklass->layout_helper();
1787   vklass->value_store(vklass->data_for_oop(buffer), array->value_at_addr(index, lh),
1788                       vaklass->element_byte_size(), true, false);
1789 }
1790 JRT_END
1791 
1792 const TypeFunc *OptoRuntime::store_unknown_value_Type() {
1793   // create input type (domain)
1794   const Type **fields = TypeTuple::fields(3);
1795   // We don't know the number of returned values and their
1796   // types. Assume all registers available to the return convention
1797   // are used.
1798   fields[TypeFunc::Parms] = TypeInstPtr::NOTNULL;
1799   fields[TypeFunc::Parms+1] = TypeOopPtr::NOTNULL;
1800   fields[TypeFunc::Parms+2] = TypeInt::POS;
1801 
1802   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+3, fields);
1803 
1804   // create result type (range)
1805   fields = TypeTuple::fields(0);
1806   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
1807 
1808   return TypeFunc::make(domain, range);


1727   for (; i < SharedRuntime::java_return_convention_max_int+1; i++) {
1728     fields[TypeFunc::Parms+i] = TypeInt::INT;
1729   }
1730   for (; i < total; i+=2) {
1731     fields[TypeFunc::Parms+i] = Type::DOUBLE;
1732     fields[TypeFunc::Parms+i+1] = Type::HALF;
1733   }
1734   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms + total, fields);
1735 
1736   // create result type (range)
1737   fields = TypeTuple::fields(1);
1738   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL;
1739 
1740   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1,fields);
1741 
1742   return TypeFunc::make(domain, range);
1743 }
1744 
1745 JRT_LEAF(void, OptoRuntime::load_unknown_value(valueArrayOopDesc* array, int index, instanceOopDesc* buffer))
1746 {
1747   array->value_copy_from_index(index, buffer);







1748 }
1749 JRT_END
1750 
1751 const TypeFunc *OptoRuntime::load_unknown_value_Type() {
1752   // create input type (domain)
1753   const Type **fields = TypeTuple::fields(3);
1754   // We don't know the number of returned values and their
1755   // types. Assume all registers available to the return convention
1756   // are used.
1757   fields[TypeFunc::Parms] = TypeOopPtr::NOTNULL;
1758   fields[TypeFunc::Parms+1] = TypeInt::POS;
1759   fields[TypeFunc::Parms+2] = TypeInstPtr::NOTNULL;
1760 
1761   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+3, fields);
1762 
1763   // create result type (range)
1764   fields = TypeTuple::fields(0);
1765   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
1766 
1767   return TypeFunc::make(domain, range);
1768 }
1769 
1770 JRT_LEAF(void, OptoRuntime::store_unknown_value(instanceOopDesc* buffer, valueArrayOopDesc* array, int index))
1771 {
1772   assert(buffer != NULL, "can't store null into flat array");
1773   array->value_copy_to_index(buffer, index);








1774 }
1775 JRT_END
1776 
1777 const TypeFunc *OptoRuntime::store_unknown_value_Type() {
1778   // create input type (domain)
1779   const Type **fields = TypeTuple::fields(3);
1780   // We don't know the number of returned values and their
1781   // types. Assume all registers available to the return convention
1782   // are used.
1783   fields[TypeFunc::Parms] = TypeInstPtr::NOTNULL;
1784   fields[TypeFunc::Parms+1] = TypeOopPtr::NOTNULL;
1785   fields[TypeFunc::Parms+2] = TypeInt::POS;
1786 
1787   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+3, fields);
1788 
1789   // create result type (range)
1790   fields = TypeTuple::fields(0);
1791   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
1792 
1793   return TypeFunc::make(domain, range);
< prev index next >