[cleanup] Fix a bunch of -Wshadow
Bug: v8:12244,v8:12245 Change-Id: I49326278fa43cd07c17a01b70253303d2e861b06 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3291558 Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/main@{#78024}
This commit is contained in:
parent
180839cff9
commit
caddd5ee65
@ -490,13 +490,14 @@ PersistentMap<Key, Value, Hasher>::FindLeftmost(
|
||||
std::array<const FocusedTree*, kHashBits>* path) {
|
||||
const FocusedTree* current = start;
|
||||
while (*level < current->length) {
|
||||
if (const FocusedTree* child = GetChild(current, *level, kLeft)) {
|
||||
if (const FocusedTree* left_child = GetChild(current, *level, kLeft)) {
|
||||
(*path)[*level] = GetChild(current, *level, kRight);
|
||||
current = child;
|
||||
current = left_child;
|
||||
++*level;
|
||||
} else if (const FocusedTree* child = GetChild(current, *level, kRight)) {
|
||||
} else if (const FocusedTree* right_child =
|
||||
GetChild(current, *level, kRight)) {
|
||||
(*path)[*level] = GetChild(current, *level, kLeft);
|
||||
current = child;
|
||||
current = right_child;
|
||||
++*level;
|
||||
} else {
|
||||
UNREACHABLE();
|
||||
|
@ -210,8 +210,8 @@ void SamplerManager::AddSampler(Sampler* sampler) {
|
||||
sampler_map_.emplace(thread_id, std::move(samplers));
|
||||
} else {
|
||||
SamplerList& samplers = it->second;
|
||||
auto it = std::find(samplers.begin(), samplers.end(), sampler);
|
||||
if (it == samplers.end()) samplers.push_back(sampler);
|
||||
auto sampler_it = std::find(samplers.begin(), samplers.end(), sampler);
|
||||
if (sampler_it == samplers.end()) samplers.push_back(sampler);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1900,14 +1900,15 @@ Handle<Map> Map::TransitionToAccessorProperty(Isolate* isolate, Handle<Map> map,
|
||||
if (!maybe_transition.is_null()) {
|
||||
Handle<Map> transition(maybe_transition, isolate);
|
||||
DescriptorArray descriptors = transition->instance_descriptors(isolate);
|
||||
InternalIndex descriptor = transition->LastAdded();
|
||||
DCHECK(descriptors.GetKey(descriptor).Equals(*name));
|
||||
InternalIndex last_descriptor = transition->LastAdded();
|
||||
DCHECK(descriptors.GetKey(last_descriptor).Equals(*name));
|
||||
|
||||
DCHECK_EQ(PropertyKind::kAccessor,
|
||||
descriptors.GetDetails(descriptor).kind());
|
||||
DCHECK_EQ(attributes, descriptors.GetDetails(descriptor).attributes());
|
||||
descriptors.GetDetails(last_descriptor).kind());
|
||||
DCHECK_EQ(attributes, descriptors.GetDetails(last_descriptor).attributes());
|
||||
|
||||
Handle<Object> maybe_pair(descriptors.GetStrongValue(descriptor), isolate);
|
||||
Handle<Object> maybe_pair(descriptors.GetStrongValue(last_descriptor),
|
||||
isolate);
|
||||
if (!maybe_pair->IsAccessorPair()) {
|
||||
return Map::Normalize(isolate, map, mode,
|
||||
"TransitionToAccessorFromNonPair");
|
||||
|
@ -417,7 +417,6 @@ bool String::SupportsExternalization() {
|
||||
const char* String::PrefixForDebugPrint() const {
|
||||
StringShape shape(*this);
|
||||
if (IsTwoByteRepresentation()) {
|
||||
StringShape shape(*this);
|
||||
if (shape.IsInternalized()) {
|
||||
return "u#";
|
||||
} else if (shape.IsCons()) {
|
||||
@ -430,7 +429,6 @@ const char* String::PrefixForDebugPrint() const {
|
||||
return "u\"";
|
||||
}
|
||||
} else {
|
||||
StringShape shape(*this);
|
||||
if (shape.IsInternalized()) {
|
||||
return "#";
|
||||
} else if (shape.IsCons()) {
|
||||
|
Loading…
Reference in New Issue
Block a user