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

Side by Side Diff: src/objects.h

Issue 6016003: Allow 4 more fast properties for objects. (Closed)
Patch Set: Created 10 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 // the number of maps for objects used as dictionaries. 1727 // the number of maps for objects used as dictionaries.
1728 inline int MaxFastProperties(); 1728 inline int MaxFastProperties();
1729 1729
1730 // Maximal number of elements (numbered 0 .. kMaxElementCount - 1). 1730 // Maximal number of elements (numbered 0 .. kMaxElementCount - 1).
1731 // Also maximal value of JSArray's length property. 1731 // Also maximal value of JSArray's length property.
1732 static const uint32_t kMaxElementCount = 0xffffffffu; 1732 static const uint32_t kMaxElementCount = 0xffffffffu;
1733 1733
1734 static const uint32_t kMaxGap = 1024; 1734 static const uint32_t kMaxGap = 1024;
1735 static const int kMaxFastElementsLength = 5000; 1735 static const int kMaxFastElementsLength = 5000;
1736 static const int kInitialMaxFastElementArray = 100000; 1736 static const int kInitialMaxFastElementArray = 100000;
1737 static const int kMaxFastProperties = 8; 1737 static const int kMaxFastProperties = 12;
1738 static const int kMaxInstanceSize = 255 * kPointerSize; 1738 static const int kMaxInstanceSize = 255 * kPointerSize;
1739 // When extending the backing storage for property values, we increase 1739 // When extending the backing storage for property values, we increase
1740 // its size by more than the 1 entry necessary, so sequentially adding fields 1740 // its size by more than the 1 entry necessary, so sequentially adding fields
1741 // to the same object requires fewer allocations and copies. 1741 // to the same object requires fewer allocations and copies.
1742 static const int kFieldsAdded = 3; 1742 static const int kFieldsAdded = 3;
1743 1743
1744 // Layout description. 1744 // Layout description.
1745 static const int kPropertiesOffset = HeapObject::kHeaderSize; 1745 static const int kPropertiesOffset = HeapObject::kHeaderSize;
1746 static const int kElementsOffset = kPropertiesOffset + kPointerSize; 1746 static const int kElementsOffset = kPropertiesOffset + kPointerSize;
1747 static const int kHeaderSize = kElementsOffset + kPointerSize; 1747 static const int kHeaderSize = kElementsOffset + kPointerSize;
(...skipping 4600 matching lines...) Expand 10 before | Expand all | Expand 10 after
6348 } else { 6348 } else {
6349 value &= ~(1 << bit_position); 6349 value &= ~(1 << bit_position);
6350 } 6350 }
6351 return value; 6351 return value;
6352 } 6352 }
6353 }; 6353 };
6354 6354
6355 } } // namespace v8::internal 6355 } } // namespace v8::internal
6356 6356
6357 #endif // V8_OBJECTS_H_ 6357 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698