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

Unified Diff: src/transitions-inl.h

Issue 661133002: TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 2 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') | test/cctest/cctest.gyp » ('j') | 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 cc4d4b11d4165bac0ebab6d06317f8e902566ba5..41c14e0235b7df878e832b2e0ee5b0ea2d89e582 100644
--- a/src/transitions-inl.h
+++ b/src/transitions-inl.h
@@ -34,7 +34,7 @@ TransitionArray* TransitionArray::cast(Object* object) {
bool TransitionArray::HasElementsTransition() {
- return Search(GetHeap()->elements_transition_symbol()) != kNotFound;
+ return SearchSpecial(GetHeap()->elements_transition_symbol()) != kNotFound;
}
@@ -140,7 +140,7 @@ Object* TransitionArray::GetTargetValue(int transition_number) {
}
-int TransitionArray::Search(Name* name) {
+int TransitionArray::SearchFirst(Name* name) {
if (IsSimpleTransition()) {
Name* key = GetKey(kSimpleTransitionIndex);
if (key->Equals(name)) return kSimpleTransitionIndex;
@@ -150,6 +150,27 @@ int TransitionArray::Search(Name* name) {
}
+bool TransitionArray::IsSpecialTransition(Name* name) {
Toon Verwaest 2014/10/24 06:43:34 Please get rid of this method; instead make it dep
Igor Sheludko 2014/11/04 10:05:01 Done. Now I'm using SimpleTransitionFlag as a to d
+ if (!name->IsSymbol()) return false;
+ Heap* heap = name->GetHeap();
+ return name == heap->frozen_symbol() ||
+ name == heap->elements_transition_symbol() ||
+ name == heap->observed_symbol();
+}
+
+
+PropertyDetails TransitionArray::GetTargetDetails(Name* name, Map* target) {
+ DCHECK(!IsSpecialTransition(name));
+ int descriptor = target->LastAdded();
+ DescriptorArray* descriptors = target->instance_descriptors();
+ if (!descriptors->GetKey(descriptor)->Equals(name)) {
+ descriptor = descriptors->SearchWithCache(name, target);
+ DCHECK_NE(kNotFound, descriptor);
+ }
+ return descriptors->GetDetails(descriptor);
+}
+
+
void TransitionArray::NoIncrementalWriteBarrierSet(int transition_number,
Name* key,
Map* target) {
« no previous file with comments | « src/transitions.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698