6888953: some calls to function-like macros are missing semicolons

Reviewed-by: pbk, kvn
This commit is contained in:
John Coomes 2009-10-11 16:19:25 -07:00
parent 83f1d02a67
commit 7e76feaf42
31 changed files with 36 additions and 35 deletions

View file

@ -4082,7 +4082,7 @@ static int EnqueueCodeSize = 128 DEBUG_ONLY( + 256); // Instructions?
// make it work. // make it work.
static void check_index(int ind) { static void check_index(int ind) {
assert(0 <= ind && ind <= 64*K && ((ind % oopSize) == 0), assert(0 <= ind && ind <= 64*K && ((ind % oopSize) == 0),
"Invariants.") "Invariants.");
} }
static void generate_satb_log_enqueue(bool with_frame) { static void generate_satb_log_enqueue(bool with_frame) {

View file

@ -7975,7 +7975,7 @@ class FPU_State {
case 2: return "special"; case 2: return "special";
case 3: return "empty"; case 3: return "empty";
} }
ShouldNotReachHere() ShouldNotReachHere();
return NULL; return NULL;
} }

View file

@ -2844,7 +2844,7 @@ void LIR_Assembler::emit_static_call_stub() {
// On 64bit this will die since it will take a movq & jmp, must be only a jmp // On 64bit this will die since it will take a movq & jmp, must be only a jmp
__ jump(RuntimeAddress(__ pc())); __ jump(RuntimeAddress(__ pc()));
assert(__ offset() - start <= call_stub_size, "stub too big") assert(__ offset() - start <= call_stub_size, "stub too big");
__ end_a_stub(); __ end_a_stub();
} }

View file

@ -721,8 +721,8 @@ void ArchDesc::build_pipe_classes(FILE *fp_cpp) {
fprintf(fp_cpp, " }\n"); fprintf(fp_cpp, " }\n");
fprintf(fp_cpp, "#endif\n\n"); fprintf(fp_cpp, "#endif\n\n");
#endif #endif
fprintf(fp_cpp, " assert(this, \"NULL pipeline info\")\n"); fprintf(fp_cpp, " assert(this, \"NULL pipeline info\");\n");
fprintf(fp_cpp, " assert(pred, \"NULL predecessor pipline info\")\n\n"); fprintf(fp_cpp, " assert(pred, \"NULL predecessor pipline info\");\n\n");
fprintf(fp_cpp, " if (pred->hasFixedLatency())\n return (pred->fixedLatency());\n\n"); fprintf(fp_cpp, " if (pred->hasFixedLatency())\n return (pred->fixedLatency());\n\n");
fprintf(fp_cpp, " // If this is not an operand, then assume a dependence with 0 latency\n"); fprintf(fp_cpp, " // If this is not an operand, then assume a dependence with 0 latency\n");
fprintf(fp_cpp, " if (opnd > _read_stage_count)\n return (0);\n\n"); fprintf(fp_cpp, " if (opnd > _read_stage_count)\n return (0);\n\n");

View file

@ -127,7 +127,7 @@ void DictionaryEntry::add_protection_domain(oop protection_domain) {
bool Dictionary::do_unloading(BoolObjectClosure* is_alive) { bool Dictionary::do_unloading(BoolObjectClosure* is_alive) {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint") assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
bool class_was_unloaded = false; bool class_was_unloaded = false;
int index = 0; // Defined here for portability! Do not move int index = 0; // Defined here for portability! Do not move

View file

@ -103,7 +103,7 @@ LoaderConstraintEntry** LoaderConstraintTable::find_loader_constraint(
void LoaderConstraintTable::purge_loader_constraints(BoolObjectClosure* is_alive) { void LoaderConstraintTable::purge_loader_constraints(BoolObjectClosure* is_alive) {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint") assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
// Remove unloaded entries from constraint table // Remove unloaded entries from constraint table
for (int index = 0; index < table_size(); index++) { for (int index = 0; index < table_size(); index++) {
LoaderConstraintEntry** p = bucket_addr(index); LoaderConstraintEntry** p = bucket_addr(index);

View file

@ -102,7 +102,7 @@ void ResolutionErrorTable::always_strong_classes_do(OopClosure* blk) {
// Remove unloaded entries from the table // Remove unloaded entries from the table
void ResolutionErrorTable::purge_resolution_errors(BoolObjectClosure* is_alive) { void ResolutionErrorTable::purge_resolution_errors(BoolObjectClosure* is_alive) {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint") assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
for (int i = 0; i < table_size(); i++) { for (int i = 0; i < table_size(); i++) {
for (ResolutionErrorEntry** p = bucket_addr(i); *p != NULL; ) { for (ResolutionErrorEntry** p = bucket_addr(i); *p != NULL; ) {
ResolutionErrorEntry* entry = *p; ResolutionErrorEntry* entry = *p;

View file

@ -1534,7 +1534,8 @@ void nmethod::do_unloading(BoolObjectClosure* is_alive,
} }
} }
ic->set_to_clean(); ic->set_to_clean();
assert(ic->cached_oop() == NULL, "cached oop in IC should be cleared") assert(ic->cached_oop() == NULL,
"cached oop in IC should be cleared");
} }
} }
} }

View file

@ -310,7 +310,7 @@ class CompileBroker: AllStatic {
static AbstractCompiler* compiler(int level ) { static AbstractCompiler* compiler(int level ) {
if (level == CompLevel_fast_compile) return _compilers[0]; if (level == CompLevel_fast_compile) return _compilers[0];
assert(level == CompLevel_highest_tier, "what level?") assert(level == CompLevel_highest_tier, "what level?");
return _compilers[1]; return _compilers[1];
} }

View file

@ -68,7 +68,7 @@ static const char* split_attrs(const char* &kind, char* buffer) {
return attrs; return attrs;
} else { } else {
// park it in the buffer, so we can put a null on the end // park it in the buffer, so we can put a null on the end
assert(!(kind >= buffer && kind < buffer+100), "not obviously in buffer") assert(!(kind >= buffer && kind < buffer+100), "not obviously in buffer");
int klen = attrs - kind; int klen = attrs - kind;
strncpy(buffer, kind, klen); strncpy(buffer, kind, klen);
buffer[klen] = 0; buffer[klen] = 0;

View file

@ -118,7 +118,7 @@ TreeList* TreeList::removeChunkReplaceIfNeeded(TreeChunk* tc) {
// TreeList from the first chunk to the next chunk and update all // TreeList from the first chunk to the next chunk and update all
// the TreeList pointers in the chunks in the list. // the TreeList pointers in the chunks in the list.
if (nextTC == NULL) { if (nextTC == NULL) {
assert(prevFC == NULL, "Not last chunk in the list") assert(prevFC == NULL, "Not last chunk in the list");
set_tail(NULL); set_tail(NULL);
set_head(NULL); set_head(NULL);
} else { } else {

View file

@ -517,7 +517,7 @@ void G1BlockOffsetArray::alloc_block_work2(HeapWord** threshold_, size_t* index_
assert(blk_start != NULL && blk_end > blk_start, assert(blk_start != NULL && blk_end > blk_start,
"phantom block"); "phantom block");
assert(blk_end > threshold, "should be past threshold"); assert(blk_end > threshold, "should be past threshold");
assert(blk_start <= threshold, "blk_start should be at or before threshold") assert(blk_start <= threshold, "blk_start should be at or before threshold");
assert(pointer_delta(threshold, blk_start) <= N_words, assert(pointer_delta(threshold, blk_start) <= N_words,
"offset should be <= BlockOffsetSharedArray::N"); "offset should be <= BlockOffsetSharedArray::N");
assert(Universe::heap()->is_in_reserved(blk_start), assert(Universe::heap()->is_in_reserved(blk_start),

View file

@ -4965,7 +4965,7 @@ void G1CollectedHeap::tear_down_region_lists() {
MutexLockerEx x(ZF_mon, Mutex::_no_safepoint_check_flag); MutexLockerEx x(ZF_mon, Mutex::_no_safepoint_check_flag);
while (pop_unclean_region_list_locked() != NULL) ; while (pop_unclean_region_list_locked() != NULL) ;
assert(_unclean_region_list.hd() == NULL && _unclean_region_list.sz() == 0, assert(_unclean_region_list.hd() == NULL && _unclean_region_list.sz() == 0,
"Postconditions of loop.") "Postconditions of loop.");
while (pop_free_region_list_locked() != NULL) ; while (pop_free_region_list_locked() != NULL) ;
assert(_free_region_list == NULL, "Postcondition of loop."); assert(_free_region_list == NULL, "Postcondition of loop.");
if (_free_region_list_size != 0) { if (_free_region_list_size != 0) {

View file

@ -325,7 +325,7 @@ void ASParNewGeneration::resize_spaces(size_t requested_eden_size,
eden_size = align_size_down(eden_size, alignment); eden_size = align_size_down(eden_size, alignment);
eden_end = eden_start + eden_size; eden_end = eden_start + eden_size;
assert(eden_end >= eden_start, "addition overflowed") assert(eden_end >= eden_start, "addition overflowed");
// To may resize into from space as long as it is clear of live data. // To may resize into from space as long as it is clear of live data.
// From space must remain page aligned, though, so we need to do some // From space must remain page aligned, though, so we need to do some

View file

@ -326,7 +326,7 @@ void ASPSYoungGen::resize_spaces(size_t requested_eden_size,
} }
eden_end = eden_start + eden_size; eden_end = eden_start + eden_size;
assert(eden_end >= eden_start, "addition overflowed") assert(eden_end >= eden_start, "addition overflowed");
// To may resize into from space as long as it is clear of live data. // To may resize into from space as long as it is clear of live data.
// From space must remain page aligned, though, so we need to do some // From space must remain page aligned, though, so we need to do some
@ -413,7 +413,7 @@ void ASPSYoungGen::resize_spaces(size_t requested_eden_size,
pointer_delta(to_start, eden_start, sizeof(char))); pointer_delta(to_start, eden_start, sizeof(char)));
} }
eden_end = eden_start + eden_size; eden_end = eden_start + eden_size;
assert(eden_end >= eden_start, "addition overflowed") assert(eden_end >= eden_start, "addition overflowed");
// Don't let eden shrink down to 0 or less. // Don't let eden shrink down to 0 or less.
eden_end = MAX2(eden_end, eden_start + alignment); eden_end = MAX2(eden_end, eden_start + alignment);

View file

@ -65,7 +65,7 @@ class PSOldGen : public CHeapObj {
// and releasing the heap lock, which is held during gc's anyway. This method is not // and releasing the heap lock, which is held during gc's anyway. This method is not
// safe for use at the same time as allocate_noexpand()! // safe for use at the same time as allocate_noexpand()!
HeapWord* cas_allocate_noexpand(size_t word_size) { HeapWord* cas_allocate_noexpand(size_t word_size) {
assert(SafepointSynchronize::is_at_safepoint(), "Must only be called at safepoint") assert(SafepointSynchronize::is_at_safepoint(), "Must only be called at safepoint");
HeapWord* res = object_space()->cas_allocate(word_size); HeapWord* res = object_space()->cas_allocate(word_size);
if (res != NULL) { if (res != NULL) {
_start_array.allocate_block(res); _start_array.allocate_block(res);

View file

@ -3277,7 +3277,7 @@ void PSParallelCompact::fill_region(ParCompactionManager* cm, size_t region_idx)
if (status == ParMarkBitMap::incomplete) { if (status == ParMarkBitMap::incomplete) {
// The last obj that starts in the source region does not end in the // The last obj that starts in the source region does not end in the
// region. // region.
assert(closure.source() < end_addr, "sanity") assert(closure.source() < end_addr, "sanity");
HeapWord* const obj_beg = closure.source(); HeapWord* const obj_beg = closure.source();
HeapWord* const range_end = MIN2(obj_beg + closure.words_remaining(), HeapWord* const range_end = MIN2(obj_beg + closure.words_remaining(),
src_space_top); src_space_top);

View file

@ -521,7 +521,7 @@ void PSYoungGen::resize_spaces(size_t requested_eden_size,
} }
eden_end = eden_start + eden_size; eden_end = eden_start + eden_size;
assert(eden_end >= eden_start, "addition overflowed") assert(eden_end >= eden_start, "addition overflowed");
// To may resize into from space as long as it is clear of live data. // To may resize into from space as long as it is clear of live data.
// From space must remain page aligned, though, so we need to do some // From space must remain page aligned, though, so we need to do some
@ -605,7 +605,7 @@ void PSYoungGen::resize_spaces(size_t requested_eden_size,
pointer_delta(to_start, eden_start, sizeof(char))); pointer_delta(to_start, eden_start, sizeof(char)));
} }
eden_end = eden_start + eden_size; eden_end = eden_start + eden_size;
assert(eden_end >= eden_start, "addition overflowed") assert(eden_end >= eden_start, "addition overflowed");
// Could choose to not let eden shrink // Could choose to not let eden shrink
// to_start = MAX2(to_start, eden_end); // to_start = MAX2(to_start, eden_end);

View file

@ -224,8 +224,8 @@ void InterpreterOopMap::verify() {
// If we are doing mark sweep _method may not have a valid header // If we are doing mark sweep _method may not have a valid header
// $$$ This used to happen only for m/s collections; we might want to // $$$ This used to happen only for m/s collections; we might want to
// think of an appropriate generalization of this distinction. // think of an appropriate generalization of this distinction.
guarantee(Universe::heap()->is_gc_active() || guarantee(Universe::heap()->is_gc_active() || _method->is_oop_or_null(),
_method->is_oop_or_null(), "invalid oop in oopMapCache") "invalid oop in oopMapCache");
} }
#ifdef ENABLE_ZAP_DEAD_LOCALS #ifdef ENABLE_ZAP_DEAD_LOCALS

View file

@ -457,7 +457,7 @@ void TemplateInterpreterGenerator::set_entry_points(Bytecodes::Code code) {
void TemplateInterpreterGenerator::set_wide_entry_point(Template* t, address& wep) { void TemplateInterpreterGenerator::set_wide_entry_point(Template* t, address& wep) {
assert(t->is_valid(), "template must exist"); assert(t->is_valid(), "template must exist");
assert(t->tos_in() == vtos, "only vtos tos_in supported for wide instructions") assert(t->tos_in() == vtos, "only vtos tos_in supported for wide instructions");
wep = __ pc(); generate_and_dispatch(t); wep = __ pc(); generate_and_dispatch(t);
} }

View file

@ -689,7 +689,7 @@ void BlockOffsetArrayContigSpace::alloc_block_work(HeapWord* blk_start,
assert(blk_end > _next_offset_threshold, assert(blk_end > _next_offset_threshold,
"should be past threshold"); "should be past threshold");
assert(blk_start <= _next_offset_threshold, assert(blk_start <= _next_offset_threshold,
"blk_start should be at or before threshold") "blk_start should be at or before threshold");
assert(pointer_delta(_next_offset_threshold, blk_start) <= N_words, assert(pointer_delta(_next_offset_threshold, blk_start) <= N_words,
"offset should be <= BlockOffsetSharedArray::N"); "offset should be <= BlockOffsetSharedArray::N");
assert(Universe::heap()->is_in_reserved(blk_start), assert(Universe::heap()->is_in_reserved(blk_start),

View file

@ -315,7 +315,7 @@ class FindInstanceClosure : public ObjectClosure {
void HeapInspection::find_instances_at_safepoint(klassOop k, GrowableArray<oop>* result) { void HeapInspection::find_instances_at_safepoint(klassOop k, GrowableArray<oop>* result) {
assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped"); assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped");
assert(Heap_lock->is_locked(), "should have the Heap_lock") assert(Heap_lock->is_locked(), "should have the Heap_lock");
// Ensure that the heap is parsable // Ensure that the heap is parsable
Universe::heap()->ensure_parsability(false); // no need to retire TALBs Universe::heap()->ensure_parsability(false); // no need to retire TALBs

View file

@ -807,7 +807,7 @@ void GenerateOopMap::set_var(int localNo, CellTypeState cts) {
} }
CellTypeState GenerateOopMap::get_var(int localNo) { CellTypeState GenerateOopMap::get_var(int localNo) {
assert(localNo < _max_locals + _nof_refval_conflicts, "variable read error") assert(localNo < _max_locals + _nof_refval_conflicts, "variable read error");
if (localNo < 0 || localNo > _max_locals) { if (localNo < 0 || localNo > _max_locals) {
verify_error("variable read error: r%d", localNo); verify_error("variable read error: r%d", localNo);
return valCTS; // just to pick something; return valCTS; // just to pick something;

View file

@ -899,7 +899,7 @@ void klassItable::initialize_itable_for_interface(int method_table_offset, Klass
int nof_methods = methods()->length(); int nof_methods = methods()->length();
HandleMark hm; HandleMark hm;
KlassHandle klass = _klass; KlassHandle klass = _klass;
assert(nof_methods > 0, "at least one method must exist for interface to be in vtable") assert(nof_methods > 0, "at least one method must exist for interface to be in vtable");
Handle interface_loader (THREAD, instanceKlass::cast(interf_h())->class_loader()); Handle interface_loader (THREAD, instanceKlass::cast(interf_h())->class_loader());
int ime_num = 0; int ime_num = 0;

View file

@ -1188,7 +1188,7 @@ static void kill_dead_code( Node *dead, PhaseIterGVN *igvn ) {
Node* use = dead->last_out(k); Node* use = dead->last_out(k);
igvn->hash_delete(use); // Yank from hash table prior to mod igvn->hash_delete(use); // Yank from hash table prior to mod
if (use->in(0) == dead) { // Found another dead node if (use->in(0) == dead) { // Found another dead node
assert (!use->is_Con(), "Control for Con node should be Root node.") assert (!use->is_Con(), "Control for Con node should be Root node.");
use->set_req(0, top); // Cut dead edge to prevent processing use->set_req(0, top); // Cut dead edge to prevent processing
nstack.push(use); // the dead node again. nstack.push(use); // the dead node again.
} else { // Else found a not-dead user } else { // Else found a not-dead user

View file

@ -1231,7 +1231,7 @@ void Compile::Fill_buffer() {
if (is_sfn && !is_mcall && padding == 0 && current_offset == last_call_offset ) { if (is_sfn && !is_mcall && padding == 0 && current_offset == last_call_offset ) {
padding = nop_size; padding = nop_size;
} }
assert( labels_not_set || padding == 0, "instruction should already be aligned") assert( labels_not_set || padding == 0, "instruction should already be aligned");
if(padding > 0) { if(padding > 0) {
assert((padding % nop_size) == 0, "padding is not a multiple of NOP size"); assert((padding % nop_size) == 0, "padding is not a multiple of NOP size");

View file

@ -310,7 +310,7 @@ public:
void dump_nodes_and_types_recur( const Node *n, uint depth, bool only_ctrl, VectorSet &visited); void dump_nodes_and_types_recur( const Node *n, uint depth, bool only_ctrl, VectorSet &visited);
uint _count_progress; // For profiling, count transforms that make progress uint _count_progress; // For profiling, count transforms that make progress
void set_progress() { ++_count_progress; assert( allow_progress(),"No progress allowed during verification") } void set_progress() { ++_count_progress; assert( allow_progress(),"No progress allowed during verification"); }
void clear_progress() { _count_progress = 0; } void clear_progress() { _count_progress = 0; }
uint made_progress() const { return _count_progress; } uint made_progress() const { return _count_progress; }

View file

@ -647,7 +647,7 @@ void collector_func_load(char* name,
void Forte::register_stub(const char* name, address start, address end) { void Forte::register_stub(const char* name, address start, address end) {
#if !defined(_WINDOWS) && !defined(IA64) #if !defined(_WINDOWS) && !defined(IA64)
assert(pointer_delta(end, start, sizeof(jbyte)) < INT_MAX, assert(pointer_delta(end, start, sizeof(jbyte)) < INT_MAX,
"Code size exceeds maximum range") "Code size exceeds maximum range");
collector_func_load((char*)name, NULL, NULL, start, collector_func_load((char*)name, NULL, NULL, start,
pointer_delta(end, start, sizeof(jbyte)), 0, NULL); pointer_delta(end, start, sizeof(jbyte)), 0, NULL);

View file

@ -844,7 +844,7 @@ class EntryFrameOopFinder: public SignatureInfo {
} }
void oop_at_offset_do(int offset) { void oop_at_offset_do(int offset) {
assert (offset >= 0, "illegal offset") assert (offset >= 0, "illegal offset");
oop* addr = (oop*) _fr->entry_frame_argument_at(offset); oop* addr = (oop*) _fr->entry_frame_argument_at(offset);
_f->do_oop(addr); _f->do_oop(addr);
} }

View file

@ -106,7 +106,7 @@ VM_Operation* VMOperationQueue::queue_drain(int prio) {
// restore queue to empty state // restore queue to empty state
_queue[prio]->set_next(_queue[prio]); _queue[prio]->set_next(_queue[prio]);
_queue[prio]->set_prev(_queue[prio]); _queue[prio]->set_prev(_queue[prio]);
assert(queue_empty(prio), "drain corrupted queue") assert(queue_empty(prio), "drain corrupted queue");
#ifdef DEBUG #ifdef DEBUG
int len = 0; int len = 0;
VM_Operation* cur; VM_Operation* cur;

View file

@ -328,7 +328,7 @@ void xmlStream::done_raw(const char* kind) {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
void xmlStream::va_done(const char* format, va_list ap) { void xmlStream::va_done(const char* format, va_list ap) {
char buffer[200]; char buffer[200];
guarantee(strlen(format) + 10 < sizeof(buffer), "bigger format buffer") guarantee(strlen(format) + 10 < sizeof(buffer), "bigger format buffer");
const char* kind = format; const char* kind = format;
const char* kind_end = strchr(kind, ' '); const char* kind_end = strchr(kind, ' ');
size_t kind_len = (kind_end != NULL) ? (kind_end - kind) : strlen(kind); size_t kind_len = (kind_end != NULL) ? (kind_end - kind) : strlen(kind);