< prev index next >
hotspot/src/share/vm/asm/codeBuffer.cpp
Print this page
*** 1091,1103 ****
}
}
void CodeStrings::assign(CodeStrings& other) {
other.check_valid();
- // Cannot do following because CodeStrings constructor is not alway run!
assert(is_null(), "Cannot assign onto non-empty CodeStrings");
_strings = other._strings;
other.set_null_and_invalidate();
}
// Deep copy of CodeStrings for consistent memory management.
// Only used for actual disassembly so this is cheaper than reference counting
--- 1091,1105 ----
}
}
void CodeStrings::assign(CodeStrings& other) {
other.check_valid();
assert(is_null(), "Cannot assign onto non-empty CodeStrings");
_strings = other._strings;
+ #ifdef ASSERT
+ _defunct = false;
+ #endif
other.set_null_and_invalidate();
}
// Deep copy of CodeStrings for consistent memory management.
// Only used for actual disassembly so this is cheaper than reference counting
*** 1113,1129 ****
ps = &((*ps)->_next);
n = n->next();
}
}
void CodeStrings::print_block_comment(outputStream* stream, intptr_t offset) const {
check_valid();
if (_strings != NULL) {
CodeString* c = find(offset);
while (c && c->offset() == offset) {
stream->bol();
! stream->print(" ;; ");
stream->print_cr("%s", c->string());
c = c->next_comment();
}
}
}
--- 1115,1133 ----
ps = &((*ps)->_next);
n = n->next();
}
}
+ const char* CodeStrings::_prefix = " ;; "; // default: can be changed via set_prefix
+
void CodeStrings::print_block_comment(outputStream* stream, intptr_t offset) const {
check_valid();
if (_strings != NULL) {
CodeString* c = find(offset);
while (c && c->offset() == offset) {
stream->bol();
! stream->print("%s", _prefix);
stream->print_cr("%s", c->string());
c = c->next_comment();
}
}
}
< prev index next >