aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/name-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/name-inl.h')
-rw-r--r--deps/v8/src/objects/name-inl.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/deps/v8/src/objects/name-inl.h b/deps/v8/src/objects/name-inl.h
index af1724b76d..b3e04bbd50 100644
--- a/deps/v8/src/objects/name-inl.h
+++ b/deps/v8/src/objects/name-inl.h
@@ -45,28 +45,26 @@ void Symbol::set_is_private_name() {
}
bool Name::IsUniqueName() const {
- uint32_t type = map()->instance_type();
+ uint32_t type = map().instance_type();
bool result = (type & (kIsNotStringMask | kIsNotInternalizedMask)) !=
(kStringTag | kNotInternalizedTag);
SLOW_DCHECK(result == HeapObject::IsUniqueName());
return result;
}
-uint32_t Name::hash_field() {
- return READ_UINT32_FIELD(*this, kHashFieldOffset);
-}
+uint32_t Name::hash_field() { return ReadField<uint32_t>(kHashFieldOffset); }
void Name::set_hash_field(uint32_t value) {
- WRITE_UINT32_FIELD(*this, kHashFieldOffset, value);
+ WriteField<uint32_t>(kHashFieldOffset, value);
}
bool Name::Equals(Name other) {
if (other == *this) return true;
- if ((this->IsInternalizedString() && other->IsInternalizedString()) ||
- this->IsSymbol() || other->IsSymbol()) {
+ if ((this->IsInternalizedString() && other.IsInternalizedString()) ||
+ this->IsSymbol() || other.IsSymbol()) {
return false;
}
- return String::cast(*this)->SlowEquals(String::cast(other));
+ return String::cast(*this).SlowEquals(String::cast(other));
}
bool Name::Equals(Isolate* isolate, Handle<Name> one, Handle<Name> two) {
@@ -90,26 +88,26 @@ uint32_t Name::Hash() {
uint32_t field = hash_field();
if (IsHashFieldComputed(field)) return field >> kHashShift;
// Slow case: compute hash code and set it. Has to be a string.
- return String::cast(*this)->ComputeAndSetHash();
+ return String::cast(*this).ComputeAndSetHash();
}
bool Name::IsInterestingSymbol() const {
- return IsSymbol() && Symbol::cast(*this)->is_interesting_symbol();
+ return IsSymbol() && Symbol::cast(*this).is_interesting_symbol();
}
bool Name::IsPrivate() {
- return this->IsSymbol() && Symbol::cast(*this)->is_private();
+ return this->IsSymbol() && Symbol::cast(*this).is_private();
}
bool Name::IsPrivateName() {
bool is_private_name =
- this->IsSymbol() && Symbol::cast(*this)->is_private_name();
+ this->IsSymbol() && Symbol::cast(*this).is_private_name();
DCHECK_IMPLIES(is_private_name, IsPrivate());
return is_private_name;
}
bool Name::AsArrayIndex(uint32_t* index) {
- return IsString() && String::cast(*this)->AsArrayIndex(index);
+ return IsString() && String::cast(*this).AsArrayIndex(index);
}
// static