mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-28 07:41:10 +00:00
8377658: Cleanup files for enabling conversion warnings for g1ConcurrentMark.cpp
Reviewed-by: stefank, tschatzl, jsjolen
This commit is contained in:
parent
256512147d
commit
acbd1febdd
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
// Total virtual time so far.
|
||||
inline double G1ConcurrentMarkThread::total_mark_cpu_time_s() {
|
||||
return os::thread_cpu_time(this) + worker_threads_cpu_time_s();
|
||||
return static_cast<double>(os::thread_cpu_time(this)) + worker_threads_cpu_time_s();
|
||||
}
|
||||
|
||||
// Marking virtual time so far
|
||||
|
||||
@ -95,7 +95,7 @@ private:
|
||||
// Evict a given element of the statistics cache.
|
||||
void evict(uint idx);
|
||||
|
||||
size_t _num_cache_entries_mask;
|
||||
const uint _num_cache_entries_mask;
|
||||
|
||||
uint hash(uint idx) {
|
||||
return idx & _num_cache_entries_mask;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,18 +61,18 @@ public:
|
||||
_argv_offset = 2
|
||||
};
|
||||
|
||||
int bootstrap_method_index() const {
|
||||
u2 bootstrap_method_index() const {
|
||||
return _bootstrap_method_index;
|
||||
}
|
||||
int argument_count() const {
|
||||
u2 argument_count() const {
|
||||
return _argument_count;
|
||||
}
|
||||
int argument(int n) const {
|
||||
assert(checked_cast<u2>(n) < _argument_count, "oob");
|
||||
u2 argument(u2 n) const {
|
||||
assert(n < _argument_count, "oob");
|
||||
return argument_indexes()[n];
|
||||
}
|
||||
|
||||
void set_argument(int index, u2 value) {
|
||||
void set_argument(u2 index, u2 value) {
|
||||
assert(index >= 0 && index < argument_count(), "invariant");
|
||||
argument_indexes()[index] = value;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,7 +47,7 @@ inline BSMAttributeEntry* BSMAttributeEntries::InsertionIterator::reserve_new_en
|
||||
|
||||
inline void BSMAttributeEntry::copy_args_into(BSMAttributeEntry* entry) const {
|
||||
assert(entry->argument_count() == this->argument_count(), "must be same");
|
||||
for (int i = 0; i < argument_count(); i++) {
|
||||
for (u2 i = 0; i < argument_count(); i++) {
|
||||
entry->set_argument(i, this->argument(i));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -231,7 +231,7 @@ public:
|
||||
// Returns the alignment a Klass* is guaranteed to have.
|
||||
// Note: *Not* the same as 1 << shift ! Klass are always guaranteed to be at least 64-bit aligned,
|
||||
// so this will return 8 even if shift is 0.
|
||||
static int klass_alignment_in_bytes() { return nth_bit(MAX2(3, _shift)); }
|
||||
static int klass_alignment_in_bytes() { return static_cast<int>(nth_bit(MAX2(3, _shift))); }
|
||||
static int klass_alignment_in_words() { return klass_alignment_in_bytes() / BytesPerWord; }
|
||||
|
||||
// Returns the highest possible narrowKlass value given the current Klass range
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -554,8 +554,8 @@ class ConstantPool : public Metadata {
|
||||
u2 bootstrap_argument_index_at(int cp_index, int j) {
|
||||
int bsmai = bootstrap_methods_attribute_index(cp_index);
|
||||
BSMAttributeEntry* bsme = bsm_attribute_entry(bsmai);
|
||||
assert((uint)j < (uint)bsme->argument_count(), "oob");
|
||||
return bsm_attribute_entry(bsmai)->argument(j);
|
||||
assert(j < bsme->argument_count(), "oob");
|
||||
return bsm_attribute_entry(bsmai)->argument(checked_cast<u2>(j));
|
||||
}
|
||||
|
||||
// The following methods (name/signature/klass_ref_at, klass_ref_at_noresolve,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -302,7 +302,7 @@ class FieldStatus {
|
||||
|
||||
// boilerplate:
|
||||
u1 _flags;
|
||||
static constexpr u1 flag_mask(FieldStatusBitPosition pos) { return (u1)1 << (int)pos; }
|
||||
static constexpr u1 flag_mask(FieldStatusBitPosition pos) { return checked_cast<u1>(1 << pos); }
|
||||
bool test_flag(FieldStatusBitPosition pos) { return (_flags & flag_mask(pos)) != 0; }
|
||||
// this performs an atomic update on a live status byte!
|
||||
void update_flag(FieldStatusBitPosition pos, bool z);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user