hotspot/src/share/vm/opto/compile.cpp
changeset 46619 a3919f5e8d2b
parent 46618 d503911aa948
child 46625 edefffab74e2
equal deleted inserted replaced
46618:d503911aa948 46619:a3919f5e8d2b
  3887   for (int i = 0; i < _constants.length(); i++) {
  3887   for (int i = 0; i < _constants.length(); i++) {
  3888     Constant* con = _constants.adr_at(i);
  3888     Constant* con = _constants.adr_at(i);
  3889 
  3889 
  3890     // Align offset for type.
  3890     // Align offset for type.
  3891     int typesize = type_to_size_in_bytes(con->type());
  3891     int typesize = type_to_size_in_bytes(con->type());
  3892     offset = align_size_up(offset, typesize);
  3892     offset = align_up(offset, typesize);
  3893     con->set_offset(offset);   // set constant's offset
  3893     con->set_offset(offset);   // set constant's offset
  3894 
  3894 
  3895     if (con->type() == T_VOID) {
  3895     if (con->type() == T_VOID) {
  3896       MachConstantNode* n = (MachConstantNode*) con->get_jobject();
  3896       MachConstantNode* n = (MachConstantNode*) con->get_jobject();
  3897       offset = offset + typesize * n->outcnt();  // expand jump-table
  3897       offset = offset + typesize * n->outcnt();  // expand jump-table
  3901   }
  3901   }
  3902 
  3902 
  3903   // Align size up to the next section start (which is insts; see
  3903   // Align size up to the next section start (which is insts; see
  3904   // CodeBuffer::align_at_start).
  3904   // CodeBuffer::align_at_start).
  3905   assert(_size == -1, "already set?");
  3905   assert(_size == -1, "already set?");
  3906   _size = align_size_up(offset, (int)CodeEntryAlignment);
  3906   _size = align_up(offset, (int)CodeEntryAlignment);
  3907 }
  3907 }
  3908 
  3908 
  3909 void Compile::ConstantTable::emit(CodeBuffer& cb) {
  3909 void Compile::ConstantTable::emit(CodeBuffer& cb) {
  3910   MacroAssembler _masm(&cb);
  3910   MacroAssembler _masm(&cb);
  3911   for (int i = 0; i < _constants.length(); i++) {
  3911   for (int i = 0; i < _constants.length(); i++) {