Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Unified Diff: src/objects-inl.h

Issue 2624903003: [runtime] Use PropertyKind/PropertyLocation instead of PropertyType. (Closed)
Patch Set: Addressing comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 5ad593bfa6630d6fe0df69e71a15f6d8efe4a722..413aa517faa549951a583e441f805461e6532283 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2337,7 +2337,8 @@ void JSObject::FastPropertyAtPut(FieldIndex index, Object* value) {
void JSObject::WriteToField(int descriptor, PropertyDetails details,
Object* value) {
- DCHECK(details.type() == DATA);
+ DCHECK_EQ(kField, details.location());
+ DCHECK_EQ(kData, details.kind());
DisallowHeapAllocation no_gc;
FieldIndex index = FieldIndex::ForDescriptor(map(), descriptor);
if (details.representation().IsDouble()) {
@@ -3208,14 +3209,6 @@ void DescriptorArray::SwapSortedKeys(int first, int second) {
}
-PropertyType DescriptorArray::Entry::type() { return descs_->GetType(index_); }
-
-
-Object* DescriptorArray::Entry::GetCallbackObject() {
- return descs_->GetValue(index_);
-}
-
-
int HashTableBase::NumberOfElements() {
return Smi::cast(get(kNumberOfElementsIndex))->value();
}
@@ -4921,7 +4914,9 @@ bool Map::CanBeDeprecated() {
if (details.representation().IsSmi()) return true;
if (details.representation().IsDouble()) return true;
if (details.representation().IsHeapObject()) return true;
- if (details.type() == DATA_CONSTANT) return true;
+ if (details.kind() == kData && details.location() == kDescriptor) {
+ return true;
+ }
}
return false;
}
@@ -5645,7 +5640,7 @@ void Map::AppendDescriptor(Descriptor* desc) {
// it should never try to (otherwise, layout descriptor must be updated too).
#ifdef DEBUG
PropertyDetails details = desc->GetDetails();
- CHECK(details.type() != DATA || !details.representation().IsDouble());
+ CHECK(details.location() != kField || !details.representation().IsDouble());
#endif
}
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698