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

Unified Diff: src/objects-inl.h

Issue 2633553002: [runtime] Cleanup DescriptorArray interface, remove more PropertyType usages. (Closed)
Patch Set: 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.cc ('k') | src/property-descriptor.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 e1778f367de93d3c1f45131754501ef53e244c23..9276b661434b6c8e1446b7c8cea735a72f25fdfb 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3118,11 +3118,6 @@ PropertyDetails DescriptorArray::GetDetails(int descriptor_number) {
}
-PropertyType DescriptorArray::GetType(int descriptor_number) {
- return GetDetails(descriptor_number).type();
-}
-
-
int DescriptorArray::GetFieldIndex(int descriptor_number) {
DCHECK(GetDetails(descriptor_number).location() == kField);
return GetDetails(descriptor_number).field_index();
@@ -3134,47 +3129,25 @@ FieldType* DescriptorArray::GetFieldType(int descriptor_number) {
return Map::UnwrapFieldType(wrapped_type);
}
-Object* DescriptorArray::GetConstant(int descriptor_number) {
- return GetValue(descriptor_number);
-}
-
-
-Object* DescriptorArray::GetCallbacksObject(int descriptor_number) {
- DCHECK(GetType(descriptor_number) == ACCESSOR_CONSTANT);
- return GetValue(descriptor_number);
-}
-
-
-AccessorDescriptor* DescriptorArray::GetCallbacks(int descriptor_number) {
- DCHECK(GetType(descriptor_number) == ACCESSOR_CONSTANT);
- Foreign* p = Foreign::cast(GetCallbacksObject(descriptor_number));
- return reinterpret_cast<AccessorDescriptor*>(p->foreign_address());
-}
-
-
void DescriptorArray::Get(int descriptor_number, Descriptor* desc) {
desc->Init(handle(GetKey(descriptor_number), GetIsolate()),
handle(GetValue(descriptor_number), GetIsolate()),
GetDetails(descriptor_number));
}
-
-void DescriptorArray::SetDescriptor(int descriptor_number, Descriptor* desc) {
+void DescriptorArray::Set(int descriptor_number, Name* key, Object* value,
+ PropertyDetails details) {
// Range check.
DCHECK(descriptor_number < number_of_descriptors());
- set(ToKeyIndex(descriptor_number), *desc->GetKey());
- set(ToValueIndex(descriptor_number), *desc->GetValue());
- set(ToDetailsIndex(descriptor_number), desc->GetDetails().AsSmi());
+ set(ToKeyIndex(descriptor_number), key);
+ set(ToValueIndex(descriptor_number), value);
+ set(ToDetailsIndex(descriptor_number), details.AsSmi());
}
-
void DescriptorArray::Set(int descriptor_number, Descriptor* desc) {
- // Range check.
- DCHECK(descriptor_number < number_of_descriptors());
-
- set(ToKeyIndex(descriptor_number), *desc->GetKey());
- set(ToValueIndex(descriptor_number), *desc->GetValue());
- set(ToDetailsIndex(descriptor_number), desc->GetDetails().AsSmi());
+ Name* key = *desc->GetKey();
+ Object* value = *desc->GetValue();
+ Set(descriptor_number, key, value, desc->GetDetails());
}
« no previous file with comments | « src/objects.cc ('k') | src/property-descriptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698