Bug 13384 - [js-collector-tweaks] Shrink PropertyMap by 8 bytes
Summary: [js-collector-tweaks] Shrink PropertyMap by 8 bytes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Maciej Stachowiak
URL:
Keywords:
Depends on: 13383
Blocks: 13389
  Show dependency treegraph
 
Reported: 2007-04-18 00:09 PDT by Maciej Stachowiak
Modified: 2007-04-22 21:30 PDT (History)
0 users

See Also:


Attachments
04-js-gc-shrink-propertymap.patch.txt (20.71 KB, patch)
2007-04-18 00:10 PDT, Maciej Stachowiak
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2007-04-18 00:09:58 PDT
This is working towards a cell size of 32 bytes, which enables significant performance wins.
Comment 1 Maciej Stachowiak 2007-04-18 00:10:34 PDT
Created attachment 14065 [details]
04-js-gc-shrink-propertymap.patch.txt
Comment 2 Darin Adler 2007-04-18 11:12:42 PDT
Comment on attachment 14065 [details]
04-js-gc-shrink-propertymap.patch.txt

We should just get rid of m_singleEntryAttributes and allow single entries only when attributes are 0. But that won't save any size.

-inline PropertyMap::PropertyMap() : _table(0)
+inline PropertyMap::PropertyMap() 
+  : m_singleEntryKey(0)
+  , m_getterSetterFlag(false)
+  , m_usingTable(false)
+
 {
-    _singleEntry.globalGetterSetterFlag = 0;
+  m_u.table = 0;
 }

Should be 4-character indented.

Why are we initializing m_u.table?

Otherwise looks good. I read the whole thing.
Comment 3 Maciej Stachowiak 2007-04-22 21:29:41 PDT
I fixed the indents and removed initialization of m_u, since it isn't needed unless either m_usingTable is true or m_singleEntryKey is non-NULL.