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

Unified Diff: src/objects.cc

Issue 7864: Incorporate patches by Paolo Giarrusso to allow profiling... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 546)
+++ src/objects.cc (working copy)
@@ -3920,7 +3920,10 @@
static inline uint32_t HashField(uint32_t hash, bool is_array_index) {
- return (hash << String::kLongLengthShift) | (is_array_index ? 3 : 1);
+ uint32_t result =
+ (hash << String::kLongLengthShift) | String::kHashComputedMask;
+ if (is_array_index) result |= String::kIsArrayIndexMask;
+ return result;
}
@@ -6063,13 +6066,13 @@
// Check if this index is high enough that we should require slow
// elements.
if (key > kRequiresSlowElementsLimit) {
- set(kPrefixStartIndex, Smi::FromInt(kRequiresSlowElementsMask));
+ set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask));
return;
}
// Update max key value.
- Object* max_index_object = get(kPrefixStartIndex);
+ Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi() || max_number_key() < key) {
- set(kPrefixStartIndex, Smi::FromInt(key << kRequiresSlowElementsTagSize));
+ set(kMaxNumberKeyIndex, Smi::FromInt(key << kRequiresSlowElementsTagSize));
}
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698