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

Unified Diff: src/objects-inl.h

Issue 8111006: Allow new-space JSFunction objects as constant-function properties. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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
Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h (revision 9574)
+++ src/objects-inl.h (working copy)
@@ -1901,10 +1901,10 @@
}
-void DescriptorArray::fast_swap(FixedArray* array, int first, int second) {
+void DescriptorArray::swap_elements(FixedArray* array, int first, int second) {
Object* tmp = array->get(first);
- fast_set(array, first, array->get(second));
- fast_set(array, second, tmp);
+ array->set(first, array->get(second));
+ array->set(second, tmp);
}
@@ -2016,15 +2016,11 @@
// Range check.
ASSERT(descriptor_number < number_of_descriptors());
- // Make sure none of the elements in desc are in new space.
- ASSERT(!HEAP->InNewSpace(desc->GetKey()));
- ASSERT(!HEAP->InNewSpace(desc->GetValue()));
-
- fast_set(this, ToKeyIndex(descriptor_number), desc->GetKey());
+ set(ToKeyIndex(descriptor_number), desc->GetKey());
FixedArray* content_array = GetContentArray();
- fast_set(content_array, ToValueIndex(descriptor_number), desc->GetValue());
- fast_set(content_array, ToDetailsIndex(descriptor_number),
- desc->GetDetails().AsSmi());
+ content_array->set(ToValueIndex(descriptor_number), desc->GetValue());
+ content_array->set(ToDetailsIndex(descriptor_number),
+ desc->GetDetails().AsSmi());
}
@@ -2036,10 +2032,10 @@
void DescriptorArray::Swap(int first, int second) {
- fast_swap(this, ToKeyIndex(first), ToKeyIndex(second));
+ swap_elements(this, ToKeyIndex(first), ToKeyIndex(second));
FixedArray* content_array = GetContentArray();
- fast_swap(content_array, ToValueIndex(first), ToValueIndex(second));
- fast_swap(content_array, ToDetailsIndex(first), ToDetailsIndex(second));
+ swap_elements(content_array, ToValueIndex(first), ToValueIndex(second));
+ swap_elements(content_array, ToDetailsIndex(first), ToDetailsIndex(second));
}

Powered by Google App Engine
This is Rietveld 408576698