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

Unified Diff: src/property.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/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.h
diff --git a/src/property.h b/src/property.h
index 6ec826c1406bef800b804a1557416d5d8881f89f..a94754061a2ec6bbf0f8cb38e1f06af3a3cfab9f 100644
--- a/src/property.h
+++ b/src/property.h
@@ -236,12 +236,6 @@ class LookupResult BASE_EMBEDDED {
return details_.type() == CALLBACKS;
}
- // Is callbacks contains both property callbacks and transitions to callbacks.
- bool IsCallbacks() {
- return IsPropertyCallbacks() ||
- (IsTransition() && GetTransitionValue()->IsAccessorPair());
- }
-
bool IsReadOnly() {
ASSERT(IsFound());
ASSERT(!IsTransition());
@@ -299,11 +293,10 @@ class LookupResult BASE_EMBEDDED {
}
}
- Object* GetTransitionValue() {
+ Map* GetTransitionTarget() {
ASSERT(IsTransition());
TransitionArray* transitions = holder()->map()->transitions();
- Object* value = transitions->GetValue(number_);
- return value;
+ return transitions->GetTarget(number_);
}
PropertyDetails GetTransitionDetails(Map* map) {
@@ -327,7 +320,7 @@ class LookupResult BASE_EMBEDDED {
Map* GetTransitionMapFromMap(Map* map) {
ASSERT(IsTransition());
- return Map::cast(map->transitions()->GetValue(number_));
+ return map->transitions()->GetTarget(number_);
}
int GetTransitionIndex() {
@@ -363,14 +356,11 @@ class LookupResult BASE_EMBEDDED {
}
Object* GetCallbackObject() {
- switch (lookup_type_) {
- case CONSTANT_TYPE:
- return HEAP->prototype_accessors();
- case TRANSITION_TYPE:
- return GetTransitionValue();
- default:
- return GetValue();
+ if (lookup_type_ == CONSTANT_TYPE) {
+ return HEAP->prototype_accessors();
}
+ ASSERT(!IsTransition());
+ return GetValue();
}
#ifdef OBJECT_PRINT
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698