< prev index next >

src/share/vm/opto/parse2.cpp

Print this page
rev 12906 : [mq]: gc_interface

*** 49,81 **** extern int explicit_null_checks_inserted, explicit_null_checks_elided; #endif //---------------------------------array_load---------------------------------- ! void Parse::array_load(BasicType elem_type) { ! const Type* elem = Type::TOP; ! Node* adr = array_addressing(elem_type, 0, &elem); if (stopped()) return; // guaranteed null or range check ! dec_sp(2); // Pop array and index ! const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type); ! Node* ld = make_load(control(), adr, elem, elem_type, adr_type, MemNode::unordered); push(ld); } //--------------------------------array_store---------------------------------- ! void Parse::array_store(BasicType elem_type) { ! const Type* elem = Type::TOP; ! Node* adr = array_addressing(elem_type, 1, &elem); if (stopped()) return; // guaranteed null or range check ! Node* val = pop(); ! dec_sp(2); // Pop array and index ! const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type); ! if (elem == TypeInt::BOOL) { ! elem_type = T_BOOLEAN; } ! store_to_memory(control(), adr, val, elem_type, adr_type, StoreNode::release_if_reference(elem_type)); } //------------------------------array_addressing------------------------------- // Pull array and index from the stack. Compute pointer-to-element. --- 49,111 ---- extern int explicit_null_checks_inserted, explicit_null_checks_elided; #endif //---------------------------------array_load---------------------------------- ! void Parse::array_load(BasicType bt) { ! const Type* elemtype = Type::TOP; ! bool big_val = bt == T_DOUBLE || bt == T_LONG; ! Node* adr = array_addressing(bt, 0, &elemtype); if (stopped()) return; // guaranteed null or range check ! ! pop(); // index (already used) ! Node* array = pop(); // the array itself ! ! if (elemtype == TypeInt::BOOL) { ! bt = T_BOOLEAN; ! } else if (bt == T_OBJECT) { ! elemtype = _gvn.type(array)->is_aryptr()->elem()->make_oopptr(); ! } ! ! const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(bt); ! ! Node* ld = access_load_at(array, adr, adr_type, elemtype, bt, C2_MO_RELAXED | C2_ACCESS_ON_HEAP | C2_ACCESS_ON_ARRAY); ! if (big_val) { ! push_pair(ld); ! } else { push(ld); + } } //--------------------------------array_store---------------------------------- ! void Parse::array_store(BasicType bt) { ! const Type* elemtype = Type::TOP; ! bool big_val = bt == T_DOUBLE || bt == T_LONG; ! Node* adr = array_addressing(bt, big_val ? 2 : 1, &elemtype); if (stopped()) return; // guaranteed null or range check ! if (bt == T_OBJECT) { ! array_store_check(); } ! Node* val; // Oop to store ! if (big_val) { ! val = pop_pair(); ! } else { ! val = pop(); ! } ! pop(); // index (already used) ! Node* array = pop(); // the array itself ! ! if (elemtype == TypeInt::BOOL) { ! bt = T_BOOLEAN; ! } else if (bt == T_OBJECT) { ! elemtype = _gvn.type(array)->is_aryptr()->elem()->make_oopptr(); ! } ! ! const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(bt); ! ! access_store_at(control(), array, adr, adr_type, val, elemtype, bt, C2_MO_RELAXED | C2_ACCESS_ON_HEAP | C2_ACCESS_ON_ARRAY); } //------------------------------array_addressing------------------------------- // Pull array and index from the stack. Compute pointer-to-element.
*** 1711,1769 **** case Bytecodes::_caload: array_load(T_CHAR); break; case Bytecodes::_iaload: array_load(T_INT); break; case Bytecodes::_saload: array_load(T_SHORT); break; case Bytecodes::_faload: array_load(T_FLOAT); break; case Bytecodes::_aaload: array_load(T_OBJECT); break; ! case Bytecodes::_laload: { ! a = array_addressing(T_LONG, 0); ! if (stopped()) return; // guaranteed null or range check ! dec_sp(2); // Pop array and index ! push_pair(make_load(control(), a, TypeLong::LONG, T_LONG, TypeAryPtr::LONGS, MemNode::unordered)); ! break; ! } ! case Bytecodes::_daload: { ! a = array_addressing(T_DOUBLE, 0); ! if (stopped()) return; // guaranteed null or range check ! dec_sp(2); // Pop array and index ! push_pair(make_load(control(), a, Type::DOUBLE, T_DOUBLE, TypeAryPtr::DOUBLES, MemNode::unordered)); ! break; ! } case Bytecodes::_bastore: array_store(T_BYTE); break; case Bytecodes::_castore: array_store(T_CHAR); break; case Bytecodes::_iastore: array_store(T_INT); break; case Bytecodes::_sastore: array_store(T_SHORT); break; case Bytecodes::_fastore: array_store(T_FLOAT); break; ! case Bytecodes::_aastore: { ! d = array_addressing(T_OBJECT, 1); ! if (stopped()) return; // guaranteed null or range check ! array_store_check(); ! c = pop(); // Oop to store ! b = pop(); // index (already used) ! a = pop(); // the array itself ! const TypeOopPtr* elemtype = _gvn.type(a)->is_aryptr()->elem()->make_oopptr(); ! const TypeAryPtr* adr_type = TypeAryPtr::OOPS; ! Node* store = store_oop_to_array(control(), a, d, adr_type, c, elemtype, T_OBJECT, ! StoreNode::release_if_reference(T_OBJECT)); ! break; ! } ! case Bytecodes::_lastore: { ! a = array_addressing(T_LONG, 2); ! if (stopped()) return; // guaranteed null or range check ! c = pop_pair(); ! dec_sp(2); // Pop array and index ! store_to_memory(control(), a, c, T_LONG, TypeAryPtr::LONGS, MemNode::unordered); ! break; ! } ! case Bytecodes::_dastore: { ! a = array_addressing(T_DOUBLE, 2); ! if (stopped()) return; // guaranteed null or range check ! c = pop_pair(); ! dec_sp(2); // Pop array and index ! c = dstore_rounding(c); ! store_to_memory(control(), a, c, T_DOUBLE, TypeAryPtr::DOUBLES, MemNode::unordered); ! break; ! } case Bytecodes::_getfield: do_getfield(); break; case Bytecodes::_getstatic: --- 1741,1761 ---- case Bytecodes::_caload: array_load(T_CHAR); break; case Bytecodes::_iaload: array_load(T_INT); break; case Bytecodes::_saload: array_load(T_SHORT); break; case Bytecodes::_faload: array_load(T_FLOAT); break; case Bytecodes::_aaload: array_load(T_OBJECT); break; ! case Bytecodes::_laload: array_load(T_LONG); break; ! case Bytecodes::_daload: array_load(T_DOUBLE); break; case Bytecodes::_bastore: array_store(T_BYTE); break; case Bytecodes::_castore: array_store(T_CHAR); break; case Bytecodes::_iastore: array_store(T_INT); break; case Bytecodes::_sastore: array_store(T_SHORT); break; case Bytecodes::_fastore: array_store(T_FLOAT); break; ! case Bytecodes::_aastore: array_store(T_OBJECT); break; ! case Bytecodes::_lastore: array_store(T_LONG); break; ! case Bytecodes::_dastore: array_store(T_DOUBLE); break; ! case Bytecodes::_getfield: do_getfield(); break; case Bytecodes::_getstatic:
< prev index next >