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

Unified Diff: src/objects-inl.h

Issue 10537050: Use the syntax of a property addition as a hint for controlling the fast-mode vs. dictionary mode h… (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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.cc ('k') | test/mjsunit/fast-non-keyed.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h (revision 11731)
+++ src/objects-inl.h (working copy)
@@ -1611,7 +1611,8 @@
}
-bool JSObject::TooManyFastProperties(int properties) {
+bool JSObject::TooManyFastProperties(int properties,
+ JSObject::StoreFromKeyed store_mode) {
// Allow extra fast properties if the object has more than
// kFastPropertiesSoftLimit in-object properties. When this is the case,
// it is very unlikely that the object is being used as a dictionary
@@ -1620,7 +1621,8 @@
int inobject = map()->inobject_properties();
int limit;
- if (map()->used_for_prototype()) {
+ if (store_mode == CERTAINLY_NOT_STORE_FROM_KEYED ||
+ map()->used_for_prototype()) {
limit = Max(inobject, kMaxFastProperties);
} else {
limit = Max(inobject, kFastPropertiesSoftLimit);
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/fast-non-keyed.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698