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

Unified Diff: src/factory.cc

Issue 10802034: Moved lastadded from DescriptorArray to Map. Renamed kLastAdded to kEnumCache. (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/arm/macro-assembler-arm.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 5fefaae47d9ee842a1b96130fb8ffb553a94a0ea..25989cace4ec30487ddcad893ea4dd45e90df6dd 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -906,7 +906,6 @@ void Factory::CopyAppendCallbackDescriptors(Handle<Map> map,
// Copy the descriptors from the array.
if (0 < descriptor_count) {
- result->SetLastAdded(array->LastAdded());
for (int i = 0; i < descriptor_count; i++) {
result->CopyFrom(i, *array, i, witness);
}
@@ -924,14 +923,14 @@ void Factory::CopyAppendCallbackDescriptors(Handle<Map> map,
Handle<String> key =
SymbolFromString(Handle<String>(String::cast(entry->name())));
// Check if a descriptor with this name already exists before writing.
- if (LinearSearch(*result, *key, result->NumberOfSetDescriptors()) ==
+ if (LinearSearch(*result, *key, map->NumberOfSetDescriptors()) ==
DescriptorArray::kNotFound) {
CallbacksDescriptor desc(*key, *entry, entry->property_attributes());
map->AppendDescriptor(&desc, witness);
}
}
- int new_number_of_descriptors = result->NumberOfSetDescriptors();
+ int new_number_of_descriptors = map->NumberOfSetDescriptors();
// Reinstall the original descriptor array if no new elements were added.
if (new_number_of_descriptors == descriptor_count) {
map->set_instance_descriptors(*array);
@@ -946,7 +945,6 @@ void Factory::CopyAppendCallbackDescriptors(Handle<Map> map,
for (int i = 0; i < new_number_of_descriptors; i++) {
new_result->CopyFrom(i, *result, i, witness);
}
- new_result->SetLastAdded(result->LastAdded());
map->set_instance_descriptors(*new_result);
}
}
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698