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

Unified Diff: src/transitions-inl.h

Issue 10784014: Removed transitions from the accessor pair descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 5 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/transitions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions-inl.h
diff --git a/src/transitions-inl.h b/src/transitions-inl.h
index 16496ddd2d7e76a31167dfc91562771bc65823ad..0de98541526ef4936525863ed03bf4aa7d34b3d7 100644
--- a/src/transitions-inl.h
+++ b/src/transitions-inl.h
@@ -138,44 +138,28 @@ void TransitionArray::SetKey(int transition_number, String* key) {
}
-Object* TransitionArray::GetValue(int transition_number) {
+Map* TransitionArray::GetTarget(int transition_number) {
ASSERT(transition_number < number_of_transitions());
- return get(ToValueIndex(transition_number));
+ return Map::cast(get(ToTargetIndex(transition_number)));
}
-Object** TransitionArray::GetValueSlot(int transition_number) {
+Object** TransitionArray::GetTargetSlot(int transition_number) {
ASSERT(transition_number < number_of_transitions());
return HeapObject::RawField(
reinterpret_cast<HeapObject*>(this),
- OffsetOfElementAt(ToValueIndex(transition_number)));
+ OffsetOfElementAt(ToTargetIndex(transition_number)));
}
-void TransitionArray::SetValue(int transition_number, Object* value) {
+void TransitionArray::SetTarget(int transition_number, Map* value) {
ASSERT(transition_number < number_of_transitions());
- set(ToValueIndex(transition_number), value);
-}
-
-
-Map* TransitionArray::GetTargetMap(int transition_number) {
- Object* value = GetValue(transition_number);
- if (value->IsAccessorPair()) {
- // TODO(verwaest): Currently details are always taken from the getter if it
- // is a transition, otherwise from the setter which in that case has to be a
- // transition. Details should be dependent on which component is requested.
- AccessorPair* accessors = AccessorPair::cast(value);
- if (accessors->getter()->IsMap()) {
- return Map::cast(accessors->getter());
- }
- return Map::cast(accessors->setter());
- }
- return Map::cast(value);
+ set(ToTargetIndex(transition_number), value);
}
PropertyDetails TransitionArray::GetTargetDetails(int transition_number) {
- Map* map = GetTargetMap(transition_number);
+ Map* map = GetTarget(transition_number);
DescriptorArray* descriptors = map->instance_descriptors();
int descriptor = descriptors->LastAdded();
ASSERT(descriptor != DescriptorArray::kNotFound);
@@ -196,14 +180,14 @@ int TransitionArray::Search(String* name) {
void TransitionArray::Set(int transition_number,
String* key,
- Object* value,
+ Map* target,
const WhitenessWitness&) {
NoIncrementalWriteBarrierSet(this,
ToKeyIndex(transition_number),
key);
NoIncrementalWriteBarrierSet(this,
- ToValueIndex(transition_number),
- value);
+ ToTargetIndex(transition_number),
+ target);
}
« no previous file with comments | « src/transitions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698