< prev index next >

src/share/vm/opto/compile.cpp

Print this page
rev 9067 : 8139040: Fix initializations before ShouldNotReachHere()


3738     con->set_offset(offset);   // set constant's offset
3739 
3740     if (con->type() == T_VOID) {
3741       MachConstantNode* n = (MachConstantNode*) con->get_jobject();
3742       offset = offset + typesize * n->outcnt();  // expand jump-table
3743     } else {
3744       offset = offset + typesize;
3745     }
3746   }
3747 
3748   // Align size up to the next section start (which is insts; see
3749   // CodeBuffer::align_at_start).
3750   assert(_size == -1, "already set?");
3751   _size = align_size_up(offset, CodeEntryAlignment);
3752 }
3753 
3754 void Compile::ConstantTable::emit(CodeBuffer& cb) {
3755   MacroAssembler _masm(&cb);
3756   for (int i = 0; i < _constants.length(); i++) {
3757     Constant con = _constants.at(i);
3758     address constant_addr;
3759     switch (con.type()) {
3760     case T_LONG:   constant_addr = _masm.long_constant(  con.get_jlong()  ); break;
3761     case T_FLOAT:  constant_addr = _masm.float_constant( con.get_jfloat() ); break;
3762     case T_DOUBLE: constant_addr = _masm.double_constant(con.get_jdouble()); break;
3763     case T_OBJECT: {
3764       jobject obj = con.get_jobject();
3765       int oop_index = _masm.oop_recorder()->find_index(obj);
3766       constant_addr = _masm.address_constant((address) obj, oop_Relocation::spec(oop_index));
3767       break;
3768     }
3769     case T_ADDRESS: {
3770       address addr = (address) con.get_jobject();
3771       constant_addr = _masm.address_constant(addr);
3772       break;
3773     }
3774     // We use T_VOID as marker for jump-table entries (labels) which
3775     // need an internal word relocation.
3776     case T_VOID: {
3777       MachConstantNode* n = (MachConstantNode*) con.get_jobject();
3778       // Fill the jump-table with a dummy word.  The real value is




3738     con->set_offset(offset);   // set constant's offset
3739 
3740     if (con->type() == T_VOID) {
3741       MachConstantNode* n = (MachConstantNode*) con->get_jobject();
3742       offset = offset + typesize * n->outcnt();  // expand jump-table
3743     } else {
3744       offset = offset + typesize;
3745     }
3746   }
3747 
3748   // Align size up to the next section start (which is insts; see
3749   // CodeBuffer::align_at_start).
3750   assert(_size == -1, "already set?");
3751   _size = align_size_up(offset, CodeEntryAlignment);
3752 }
3753 
3754 void Compile::ConstantTable::emit(CodeBuffer& cb) {
3755   MacroAssembler _masm(&cb);
3756   for (int i = 0; i < _constants.length(); i++) {
3757     Constant con = _constants.at(i);
3758     address constant_addr = NULL;
3759     switch (con.type()) {
3760     case T_LONG:   constant_addr = _masm.long_constant(  con.get_jlong()  ); break;
3761     case T_FLOAT:  constant_addr = _masm.float_constant( con.get_jfloat() ); break;
3762     case T_DOUBLE: constant_addr = _masm.double_constant(con.get_jdouble()); break;
3763     case T_OBJECT: {
3764       jobject obj = con.get_jobject();
3765       int oop_index = _masm.oop_recorder()->find_index(obj);
3766       constant_addr = _masm.address_constant((address) obj, oop_Relocation::spec(oop_index));
3767       break;
3768     }
3769     case T_ADDRESS: {
3770       address addr = (address) con.get_jobject();
3771       constant_addr = _masm.address_constant(addr);
3772       break;
3773     }
3774     // We use T_VOID as marker for jump-table entries (labels) which
3775     // need an internal word relocation.
3776     case T_VOID: {
3777       MachConstantNode* n = (MachConstantNode*) con.get_jobject();
3778       // Fill the jump-table with a dummy word.  The real value is


< prev index next >