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

Unified Diff: src/objects.h

Issue 1218403002: Increment descriptor array slack for prototypes by a constant rather than 50% (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More comments Created 5 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/api-natives.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 15924b22c129178b60135026b1aa836a00d07525..e02230d49140a341faf257e23da2fce4b50fcc8f 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6021,7 +6021,8 @@ class Map: public HeapObject {
static void AppendCallbackDescriptors(Handle<Map> map,
Handle<Object> descriptors);
- static inline int SlackForArraySize(int old_size, int size_limit);
+ static inline int SlackForArraySize(bool is_prototype_map, int old_size,
+ int size_limit);
static void EnsureDescriptorSlack(Handle<Map> map, int slack);
@@ -10452,13 +10453,16 @@ class CallHandlerInfo: public Struct {
class TemplateInfo: public Struct {
public:
DECL_ACCESSORS(tag, Object)
+ inline int number_of_properties() const;
+ inline void set_number_of_properties(int value);
DECL_ACCESSORS(property_list, Object)
DECL_ACCESSORS(property_accessors, Object)
DECLARE_VERIFIER(TemplateInfo)
static const int kTagOffset = HeapObject::kHeaderSize;
- static const int kPropertyListOffset = kTagOffset + kPointerSize;
+ static const int kNumberOfProperties = kTagOffset + kPointerSize;
+ static const int kPropertyListOffset = kNumberOfProperties + kPointerSize;
static const int kPropertyAccessorsOffset =
kPropertyListOffset + kPointerSize;
static const int kHeaderSize = kPropertyAccessorsOffset + kPointerSize;
« no previous file with comments | « src/api-natives.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698