Bug 143638 - Don't segregate heap objects based on Structure immortality.
Summary: Don't segregate heap objects based on Structure immortality.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2015-04-11 19:05 PDT by Andreas Kling
Modified: 2015-04-13 12:13 PDT (History)
3 users (show)

See Also:


Attachments
Snack for EWS (117.42 KB, patch)
2015-04-11 19:11 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch (118.30 KB, patch)
2015-04-12 20:38 PDT, Andreas Kling
darin: review+
Details | Formatted Diff | Diff
Patch for landing (120.07 KB, patch)
2015-04-13 10:50 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2015-04-11 19:05:38 PDT
To reduce heap fragmentation and improve data locality, we should try putting objects with immortal Structures together with JSDestructibleObjects. It'd cost us an extra branch during sweep, and one in JSCell::classInfo().
Comment 1 Andreas Kling 2015-04-11 19:11:00 PDT
Created attachment 250591 [details]
Snack for EWS
Comment 2 Andreas Kling 2015-04-12 20:16:09 PDT
Benchmark report for SunSpider, LongSpider, V8Spider, Octane, Kraken, JSRegress, AsmBench, and CompressionBench on megalol (MacBookPro10,1).

VMs tested:
"Vanilla" at /Users/kling/Source/Safari/ToT-Clean/WebKitBuild/Release/jsc
"Chocolate" at /Users/kling/Source/Safari/OpenSource/WebKitBuild/Release/jsc

Collected 4 samples per benchmark/VM, with 4 VM invocations per benchmark. Emitted a call to gc() between sample measurements.
Used 1 benchmark iteration per VM invocation for warm-up. Used the jsc-specific preciseTime() function to get microsecond-level
timing. Reporting benchmark execution times with 95% confidence intervals in milliseconds.

                                                         Vanilla                  Chocolate                                     
SunSpider:
   3d-cube                                            5.2593+-0.4856            5.1050+-0.3191          might be 1.0302x faster
   3d-morph                                           5.8705+-0.1659     ?      6.1027+-0.3479        ? might be 1.0396x slower
   3d-raytrace                                        6.8584+-0.7573            6.6626+-0.3816          might be 1.0294x faster
   access-binary-trees                                2.4452+-0.0509            2.3532+-0.1076          might be 1.0391x faster
   access-fannkuch                                    6.0312+-0.2398            5.9554+-0.0296          might be 1.0127x faster
   access-nbody                                       3.0800+-0.2620     ?      3.1417+-0.1327        ? might be 1.0201x slower
   access-nsieve                                      3.4506+-0.1279     ?      3.4614+-0.1411        ?
   bitops-3bit-bits-in-byte                           1.6819+-0.0278     ?      1.7048+-0.0276        ? might be 1.0136x slower
   bitops-bits-in-byte                                3.5290+-0.0650            3.4850+-0.0460          might be 1.0126x faster
   bitops-bitwise-and                                 2.1972+-0.0672     ?      2.2802+-0.1918        ? might be 1.0378x slower
   bitops-nsieve-bits                                 3.8852+-0.1011     ?      4.0129+-0.1785        ? might be 1.0329x slower
   controlflow-recursive                              2.3497+-0.2248            2.2250+-0.0512          might be 1.0561x faster
   crypto-aes                                         4.3132+-0.1069     ?      4.6793+-1.0247        ? might be 1.0849x slower
   crypto-md5                                         2.6218+-0.2737            2.4984+-0.0774          might be 1.0494x faster
   crypto-sha1                                        2.9915+-0.6794            2.6693+-0.2206          might be 1.1207x faster
   date-format-tofte                                  9.6045+-0.3433     ?      9.6757+-0.7314        ?
   date-format-xparb                                  5.7089+-0.1748     ?      5.8035+-0.1217        ? might be 1.0166x slower
   math-cordic                                        3.2627+-0.1370            3.2135+-0.1351          might be 1.0153x faster
   math-partial-sums                                  5.7245+-1.4567            5.6372+-0.4732          might be 1.0155x faster
   math-spectral-norm                                 2.0723+-0.0387            2.0703+-0.0245        
   regexp-dna                                         9.2399+-2.2493            8.7835+-2.4920          might be 1.0520x faster
   string-base64                                      5.4716+-1.6751            4.6800+-0.1463          might be 1.1691x faster
   string-fasta                                       6.9545+-0.1511            6.8262+-0.0660          might be 1.0188x faster
   string-tagcloud                                   10.3986+-0.5471           10.3863+-0.1766        
   string-unpack-code                                21.3397+-1.7174           21.0079+-0.4905          might be 1.0158x faster
   string-validate-input                              5.2018+-0.0626            5.0957+-0.1609          might be 1.0208x faster

   <arithmetic>                                       5.4440+-0.0673            5.3660+-0.0591          might be 1.0145x faster

                                                         Vanilla                  Chocolate                                     
LongSpider:
   3d-cube                                          876.8975+-32.3745    ?    890.7485+-17.5201       ? might be 1.0158x slower
   3d-morph                                        1574.5983+-4.6800     ?   1577.5056+-7.8021        ?
   3d-raytrace                                      768.5930+-7.4748     ?    768.7429+-16.8365       ?
   access-binary-trees                             1043.7885+-11.9021    ?   1049.7832+-7.2471        ?
   access-fannkuch                                  351.3836+-31.4498         345.9742+-12.6238         might be 1.0156x faster
   access-nbody                                     629.9861+-1.1358     ?    631.2038+-1.8754        ?
   access-nsieve                                    879.6464+-11.9222    ?    883.9374+-14.6119       ?
   bitops-3bit-bits-in-byte                          48.9081+-2.9110     ?     48.9441+-1.4068        ?
   bitops-bits-in-byte                               94.5201+-4.9817     ?     97.0079+-4.6505        ? might be 1.0263x slower
   bitops-nsieve-bits                               754.4360+-8.3354     ^    738.1306+-5.7224        ^ definitely 1.0221x faster
   controlflow-recursive                            506.5503+-0.6749     !    516.7132+-7.9777        ! definitely 1.0201x slower
   crypto-aes                                       720.8593+-8.2610          719.5157+-3.3806        
   crypto-md5                                       567.1433+-5.5794     ?    572.1542+-10.2877       ?
   crypto-sha1                                      662.3470+-29.2788         662.3163+-61.7000       
   date-format-tofte                                788.9193+-29.4545         783.8463+-9.7165        
   date-format-xparb                                777.4066+-13.6520    !    820.0955+-25.8354       ! definitely 1.0549x slower
   math-cordic                                      608.3392+-0.9476     ?    608.7089+-0.7911        ?
   math-partial-sums                                524.1835+-6.1472          523.4189+-4.7907        
   math-spectral-norm                               580.7155+-0.3041          580.4293+-1.5012        
   string-base64                                    372.0099+-5.9361     !    386.5706+-8.2037        ! definitely 1.0391x slower
   string-fasta                                     456.3035+-4.5244     ?    457.9473+-3.0889        ?
   string-tagcloud                                  225.2457+-5.4263     ?    226.1123+-4.4916        ?

   <geometric>                                      514.4761+-1.7778     ?    517.7246+-2.4292        ? might be 1.0063x slower

                                                         Vanilla                  Chocolate                                     
V8Spider:
   crypto                                            57.6511+-4.1754     ?     58.4796+-3.0779        ? might be 1.0144x slower
   deltablue                                        100.2304+-5.3248     ?    102.3293+-5.1072        ? might be 1.0209x slower
   earley-boyer                                      44.3036+-1.4757           42.7087+-1.2094          might be 1.0373x faster
   raytrace                                          43.5338+-6.0057           40.1332+-1.0490          might be 1.0847x faster
   regexp                                            71.3325+-2.9763           69.9002+-3.4284          might be 1.0205x faster
   richards                                          85.1258+-3.3096     ?     85.8648+-2.9198        ?
   splay                                             41.6972+-4.1207     ?     42.0938+-3.7914        ?

   <geometric>                                       60.0186+-0.9186           59.3246+-1.5343          might be 1.0117x faster

                                                         Vanilla                  Chocolate                                     
Octane:
   encrypt                                           0.22692+-0.00145    ?     0.22892+-0.00913       ?
   decrypt                                           4.03608+-0.12663          3.97795+-0.03141         might be 1.0146x faster
   deltablue                                x2       0.21045+-0.00280    ?     0.21081+-0.00245       ?
   earley                                            0.59706+-0.01013    ?     0.59898+-0.00263       ?
   boyer                                             6.57959+-0.01784    ?     6.59718+-0.08425       ?
   navier-stokes                            x2       5.35477+-0.01423          5.34915+-0.00384       
   raytrace                                 x2       1.29628+-0.03203    ?     1.31495+-0.07347       ? might be 1.0144x slower
   richards                                 x2       0.11930+-0.00242    ?     0.12025+-0.00258       ?
   splay                                    x2       0.39947+-0.00907          0.39688+-0.00518       
   regexp                                   x2      34.98955+-0.30959    ?    35.08465+-0.40378       ?
   pdfjs                                    x2      45.97834+-0.21984    ?    46.64381+-0.56745       ? might be 1.0145x slower
   mandreel                                 x2      54.70050+-1.00709    ?    54.79463+-1.03966       ?
   gbemu                                    x2      41.95623+-4.39626         40.90548+-0.45744         might be 1.0257x faster
   closure                                           0.58113+-0.00531    ^     0.57049+-0.00417       ^ definitely 1.0186x faster
   jquery                                            7.41118+-0.04189          7.35877+-0.05754       
   box2d                                    x2      12.71943+-0.15802    ?    12.72699+-0.02141       ?
   zlib                                     x2     407.24949+-0.65149        406.63298+-3.40417       
   typescript                               x2     857.19025+-16.16211       854.73541+-16.98076      

   <geometric>                                       6.97341+-0.06204          6.97080+-0.03091         might be 1.0004x faster

                                                         Vanilla                  Chocolate                                     
Kraken:
   ai-astar                                          275.144+-3.011      ?     276.914+-4.131         ?
   audio-beat-detection                              110.423+-2.574            109.957+-1.690         
   audio-dft                                         192.671+-9.090      ?     194.950+-9.552         ? might be 1.0118x slower
   audio-fft                                          80.470+-1.118      ?      82.402+-6.209         ? might be 1.0240x slower
   audio-oscillator                                  212.073+-2.847      ?     213.216+-2.888         ?
   imaging-darkroom                                  109.870+-5.175            108.895+-2.777         
   imaging-desaturate                                 68.026+-3.392             65.981+-2.356           might be 1.0310x faster
   imaging-gaussian-blur                             115.949+-2.437            113.737+-1.613           might be 1.0194x faster
   json-parse-financial                               50.999+-3.214             48.195+-2.369           might be 1.0582x faster
   json-stringify-tinderbox                           60.330+-1.785      ?      60.893+-3.929         ?
   stanford-crypto-aes                                63.128+-2.925             62.014+-0.494           might be 1.0180x faster
   stanford-crypto-ccm                                51.927+-2.448             50.903+-1.382           might be 1.0201x faster
   stanford-crypto-pbkdf2                            175.615+-1.934            173.978+-5.988         
   stanford-crypto-sha256-iterative                   58.608+-2.031             57.835+-3.979           might be 1.0134x faster

   <arithmetic>                                      116.088+-1.013            115.705+-0.476           might be 1.0033x faster

                                                         Vanilla                  Chocolate                                     
JSRegress:
   abs-boolean                                        2.8505+-0.1441            2.7382+-0.0265          might be 1.0410x faster
   adapt-to-double-divide                            17.2767+-0.2322     ?     17.4042+-0.3550        ?
   aliased-arguments-getbyval                         1.4221+-0.4549            1.3208+-0.0828          might be 1.0767x faster
   allocate-big-object                                3.0625+-0.7396            2.8810+-0.0748          might be 1.0630x faster
   arguments-named-and-reflective                    13.3830+-1.9581     ?     13.4837+-2.3145        ?
   arguments-out-of-bounds                           14.9613+-0.3301     ?     15.7365+-1.7643        ? might be 1.0518x slower
   arguments-strict-mode                             11.3931+-0.3942     ?     11.6232+-0.9674        ? might be 1.0202x slower
   arguments                                         10.4743+-1.3601           10.0594+-0.3544          might be 1.0412x faster
   arity-mismatch-inlining                            0.9122+-0.0236     ?      1.0446+-0.1614        ? might be 1.1451x slower
   array-access-polymorphic-structure                 6.7751+-0.2372     ?      7.0487+-0.3048        ? might be 1.0404x slower
   array-nonarray-polymorhpic-access                 34.6505+-2.5587     ?     35.8128+-2.6252        ? might be 1.0335x slower
   array-prototype-every                             89.5349+-3.7561     ?    114.6033+-72.3069       ? might be 1.2800x slower
   array-prototype-forEach                           91.7844+-2.9313           88.9874+-4.8712          might be 1.0314x faster
   array-prototype-map                               98.2361+-2.3348     ?     98.3002+-3.6285        ?
   array-prototype-some                              88.8912+-5.4570     ?     92.5170+-3.7671        ? might be 1.0408x slower
   array-splice-contiguous                           43.5978+-1.7575     ?     45.1972+-3.0576        ? might be 1.0367x slower
   array-with-double-add                              4.3342+-0.1315     ?      4.3698+-0.3519        ?
   array-with-double-increment                        3.4840+-0.1799            3.3582+-0.0689          might be 1.0375x faster
   array-with-double-mul-add                          5.2286+-0.1216     ?      5.2474+-0.1934        ?
   array-with-double-sum                              3.4483+-0.0620     ?      3.5318+-0.3694        ? might be 1.0242x slower
   array-with-int32-add-sub                           7.0204+-0.1562     ?      7.1384+-0.2730        ? might be 1.0168x slower
   array-with-int32-or-double-sum                     3.5243+-0.0810            3.4758+-0.1144          might be 1.0139x faster
   ArrayBuffer-DataView-alloc-large-long-lived   
                                                     35.0003+-1.8465     ?     37.1609+-2.1986        ? might be 1.0617x slower
   ArrayBuffer-DataView-alloc-long-lived             16.0860+-3.8848     ?     16.2927+-3.2921        ? might be 1.0129x slower
   ArrayBuffer-Int32Array-byteOffset                  3.8450+-0.1978     ?      3.9673+-0.3639        ? might be 1.0318x slower
   ArrayBuffer-Int8Array-alloc-large-long-lived   
                                                     35.9656+-3.1108     ?     36.5292+-2.9536        ? might be 1.0157x slower
   ArrayBuffer-Int8Array-alloc-long-lived-buffer   
                                                     22.9293+-0.4839     ?     25.2572+-7.4159        ? might be 1.1015x slower
   ArrayBuffer-Int8Array-alloc-long-lived            13.4725+-0.4898     ?     16.0270+-2.6948        ? might be 1.1896x slower
   ArrayBuffer-Int8Array-alloc                       12.1072+-2.0381           11.5989+-0.8279          might be 1.0438x faster
   asmjs_bool_bug                                     8.5217+-1.6659            8.1405+-0.6036          might be 1.0468x faster
   assign-custom-setter-polymorphic                   3.3470+-0.0608     ^      3.1308+-0.1369        ^ definitely 1.0691x faster
   assign-custom-setter                               4.6286+-0.2730            4.3310+-0.0653          might be 1.0687x faster
   basic-set                                          9.3418+-1.1906            9.2752+-0.1690        
   big-int-mul                                        4.3264+-0.3911            4.1725+-0.0620          might be 1.0369x faster
   boolean-test                                       3.1790+-0.1382            3.1280+-0.0139          might be 1.0163x faster
   branch-fold                                        3.9252+-0.2358            3.8127+-0.0331          might be 1.0295x faster
   by-val-generic                                     8.1760+-0.3284     !      8.9697+-0.3458        ! definitely 1.0971x slower
   call-spread-apply                                 32.0479+-3.1559           31.0922+-2.0057          might be 1.0307x faster
   call-spread-call                                  25.4057+-0.4680     ?     26.2829+-1.4866        ? might be 1.0345x slower
   captured-assignments                               0.4797+-0.0127            0.4755+-0.0179        
   cast-int-to-double                                 5.6230+-0.3336            5.4208+-0.0634          might be 1.0373x faster
   cell-argument                                      8.6620+-0.3429            8.5187+-0.2063          might be 1.0168x faster
   cfg-simplify                                       2.9849+-0.0925     ?      3.0175+-0.2102        ? might be 1.0109x slower
   chain-getter-access                                9.9519+-0.1992     ?     10.1432+-0.5535        ? might be 1.0192x slower
   cmpeq-obj-to-obj-other                            12.2729+-0.9068           11.9036+-1.5604          might be 1.0310x faster
   constant-test                                      5.1266+-0.0604            5.0997+-0.0312        
   DataView-custom-properties                        40.2454+-1.9065     ?     41.2012+-3.3949        ? might be 1.0237x slower
   deconstructing-parameters-overridden-by-function   
                                                      0.5475+-0.0795            0.5474+-0.1165        
   delay-tear-off-arguments-strictmode               15.3028+-2.2434           13.8484+-0.4374          might be 1.1050x faster
   deltablue-varargs                                206.2977+-2.3774          205.7591+-1.3179        
   destructuring-arguments                           18.7173+-2.5533           17.3550+-1.3083          might be 1.0785x faster
   destructuring-swap                                 5.1874+-0.0527     ?      5.2217+-0.1419        ?
   direct-arguments-getbyval                          1.2988+-0.1698            1.2687+-0.0700          might be 1.0237x faster
   div-boolean-double                                 5.3942+-0.0243     ?      5.5302+-0.2961        ? might be 1.0252x slower
   div-boolean                                        8.0604+-0.1247            7.9575+-0.0145          might be 1.0129x faster
   double-get-by-val-out-of-bounds                    4.9522+-0.8728            4.6808+-0.0178          might be 1.0580x faster
   double-pollution-getbyval                          9.2515+-0.2313     ?      9.4180+-0.7314        ? might be 1.0180x slower
   double-pollution-putbyoffset                       4.4229+-0.0975     ?      4.5701+-0.2961        ? might be 1.0333x slower
   double-to-int32-typed-array-no-inline              2.4133+-0.1526            2.3821+-0.1396          might be 1.0131x faster
   double-to-int32-typed-array                        2.0322+-0.0507     ?      2.0406+-0.0283        ?
   double-to-uint32-typed-array-no-inline             2.5227+-0.3676            2.5107+-0.3433        
   double-to-uint32-typed-array                       2.1241+-0.0428            2.1025+-0.0928          might be 1.0103x faster
   elidable-new-object-dag                           44.1537+-2.1793           43.4955+-2.4640          might be 1.0151x faster
   elidable-new-object-roflcopter                    48.8073+-1.5872           48.6384+-2.9913        
   elidable-new-object-then-call                     41.1016+-2.6137     ?     41.9865+-2.0017        ? might be 1.0215x slower
   elidable-new-object-tree                          46.9609+-1.3357           46.6912+-3.0315        
   empty-string-plus-int                              5.6396+-0.2302            5.5134+-0.0595          might be 1.0229x faster
   emscripten-cube2hash                              39.9625+-1.8981     ?     40.8588+-2.9801        ? might be 1.0224x slower
   exit-length-on-plain-object                       14.9265+-2.5562           14.2688+-0.2298          might be 1.0461x faster
   external-arguments-getbyval                        1.3138+-0.0911            1.3133+-0.1366        
   external-arguments-putbyval                        2.4555+-0.2485            2.4453+-0.1447        
   fixed-typed-array-storage-var-index                1.3755+-0.0712     ?      1.4097+-0.2845        ? might be 1.0249x slower
   fixed-typed-array-storage                          1.0171+-0.0485            0.9756+-0.0289          might be 1.0425x faster
   Float32Array-matrix-mult                           4.5505+-0.0764            4.5218+-0.0463        
   Float32Array-to-Float64Array-set                  60.8813+-3.3144     ^     54.0015+-1.5759        ^ definitely 1.1274x faster
   Float64Array-alloc-long-lived                     76.6037+-2.7884           74.8830+-1.3130          might be 1.0230x faster
   Float64Array-to-Int16Array-set                    71.0206+-3.0738     ?     77.7768+-6.6803        ? might be 1.0951x slower
   fold-double-to-int                                14.4783+-0.3233     ?     14.8643+-1.3144        ? might be 1.0267x slower
   fold-get-by-id-to-multi-get-by-offset-rare-int   
                                                     11.7030+-0.9111           11.3424+-1.4075          might be 1.0318x faster
   fold-get-by-id-to-multi-get-by-offset              9.9055+-0.1781            9.6994+-0.5771          might be 1.0213x faster
   fold-multi-get-by-offset-to-get-by-offset   
                                                      8.7646+-1.2005     ?      9.4385+-1.4057        ? might be 1.0769x slower
   fold-multi-get-by-offset-to-poly-get-by-offset   
                                                      8.5150+-1.2761     ?      8.6652+-2.0442        ? might be 1.0176x slower
   fold-multi-put-by-offset-to-poly-put-by-offset   
                                                      8.2055+-1.8524     ?      8.2840+-0.5914        ?
   fold-multi-put-by-offset-to-put-by-offset   
                                                      4.1033+-1.2602     ?      5.1868+-0.4844        ? might be 1.2641x slower
   fold-multi-put-by-offset-to-replace-or-transition-put-by-offset   
                                                     10.0004+-0.2394            9.5828+-0.5686          might be 1.0436x faster
   fold-put-by-id-to-multi-put-by-offset              9.5815+-2.0438            8.8173+-0.3280          might be 1.0867x faster
   fold-put-structure                                 6.0390+-0.2882     ?      6.0615+-1.3184        ?
   for-of-iterate-array-entries                       4.6528+-0.1000     ?      4.9360+-0.2011        ? might be 1.0609x slower
   for-of-iterate-array-keys                          4.0590+-0.0844            4.0055+-0.1038          might be 1.0133x faster
   for-of-iterate-array-values                        3.8528+-0.1344     ?      3.9755+-0.1058        ? might be 1.0319x slower
   fround                                            20.3715+-0.7173           20.0106+-1.0150          might be 1.0180x faster
   ftl-library-inlining-dataview                     84.4370+-3.3389           82.3295+-5.4317          might be 1.0256x faster
   ftl-library-inlining                              79.4368+-27.6062          79.4171+-28.8631       
   function-dot-apply                                 2.0460+-0.2811            1.9516+-0.0364          might be 1.0484x faster
   function-test                                      3.5811+-0.1076            3.5625+-0.1781        
   function-with-eval                                96.2352+-4.1256           93.9195+-1.4014          might be 1.0247x faster
   gcse-poly-get-less-obvious                        20.4130+-2.0139           19.6150+-1.5507          might be 1.0407x faster
   gcse-poly-get                                     23.1650+-2.6003     ?     23.5443+-1.5341        ? might be 1.0164x slower
   gcse                                               4.5631+-0.1888            4.4955+-0.1484          might be 1.0150x faster
   get-by-id-bimorphic-check-structure-elimination-simple   
                                                      2.9807+-0.1281            2.8977+-0.0444          might be 1.0286x faster
   get-by-id-bimorphic-check-structure-elimination   
                                                      6.2600+-0.0621     ?      6.5240+-0.3008        ? might be 1.0422x slower
   get-by-id-chain-from-try-block                     7.8746+-2.2746     ?      8.0807+-2.0285        ? might be 1.0262x slower
   get-by-id-check-structure-elimination              5.2618+-0.0177     !      5.3340+-0.0535        ! definitely 1.0137x slower
   get-by-id-proto-or-self                           17.3008+-0.7284     ?     18.0066+-1.3219        ? might be 1.0408x slower
   get-by-id-quadmorphic-check-structure-elimination-simple   
                                                      3.0541+-0.0611     ?      3.0753+-0.0684        ?
   get-by-id-self-or-proto                           18.2318+-1.3056           17.4990+-0.3800          might be 1.0419x faster
   get-by-val-out-of-bounds                           4.6962+-0.2530            4.6355+-0.4960          might be 1.0131x faster
   get_callee_monomorphic                             3.8200+-0.1427     ?      3.9890+-0.2677        ? might be 1.0442x slower
   get_callee_polymorphic                             4.1227+-0.7453            3.8948+-0.4371          might be 1.0585x faster
   getter-no-activation                               4.8213+-0.7314            4.6517+-0.5772          might be 1.0364x faster
   getter-richards                                  132.5937+-13.0667         123.6292+-11.8178         might be 1.0725x faster
   getter                                             5.9795+-0.4298     ?      6.0554+-0.7356        ? might be 1.0127x slower
   global-var-const-infer-fire-from-opt               0.9186+-0.1409     ?      1.1142+-0.4245        ? might be 1.2130x slower
   global-var-const-infer                             0.9664+-0.0570            0.9365+-0.0457          might be 1.0320x faster
   HashMap-put-get-iterate-keys                      28.0896+-0.8943           27.9587+-0.6370        
   HashMap-put-get-iterate                           27.6287+-0.4826     ?     28.1765+-1.7184        ? might be 1.0198x slower
   HashMap-string-put-get-iterate                    28.7181+-1.6490           28.3534+-1.0206          might be 1.0129x faster
   hoist-make-rope                                   12.3358+-1.8327     ?     12.5195+-0.8813        ? might be 1.0149x slower
   hoist-poly-check-structure-effectful-loop   
                                                      5.2323+-0.0748            5.1757+-0.2041          might be 1.0109x faster
   hoist-poly-check-structure                         3.8425+-0.0653            3.8362+-0.1203        
   imul-double-only                                   8.4985+-1.2454            7.8279+-0.0744          might be 1.0857x faster
   imul-int-only                                     10.1088+-0.3852           10.0084+-0.8274          might be 1.0100x faster
   imul-mixed                                         8.2195+-1.3630     ?      8.3494+-0.2618        ? might be 1.0158x slower
   in-four-cases                                     19.9299+-0.4547           19.5334+-0.2036          might be 1.0203x faster
   in-one-case-false                                 10.5730+-0.6908           10.5100+-0.7879        
   in-one-case-true                                  10.3608+-0.2022     ?     10.7911+-1.0305        ? might be 1.0415x slower
   in-two-cases                                      10.4617+-0.0860     ?     10.8655+-0.6294        ? might be 1.0386x slower
   indexed-properties-in-objects                      3.0970+-0.2809            3.0087+-0.0443          might be 1.0294x faster
   infer-closure-const-then-mov-no-inline             3.7805+-0.3239     ?      3.8601+-0.2664        ? might be 1.0211x slower
   infer-closure-const-then-mov                      17.0070+-0.5642     ?     17.3196+-0.6389        ? might be 1.0184x slower
   infer-closure-const-then-put-to-scope-no-inline   
                                                     12.1075+-0.2015     ?     13.4257+-2.6467        ? might be 1.1089x slower
   infer-closure-const-then-put-to-scope             23.2585+-1.7637     ?     23.3239+-1.9686        ?
   infer-closure-const-then-reenter-no-inline   
                                                     50.0488+-1.3070     ?     51.7751+-3.4030        ? might be 1.0345x slower
   infer-closure-const-then-reenter                 130.0842+-2.5610     ?    133.4355+-4.4796        ? might be 1.0258x slower
   infer-constant-global-property                    31.9245+-2.7792     ?     33.5731+-4.0660        ? might be 1.0516x slower
   infer-constant-property                            2.8525+-0.0680     ?      2.8671+-0.1618        ?
   infer-one-time-closure-ten-vars                   12.8653+-1.2087           12.5645+-0.4504          might be 1.0239x faster
   infer-one-time-closure-two-vars                   12.1858+-0.4480           11.8857+-0.1905          might be 1.0252x faster
   infer-one-time-closure                            11.9984+-0.2051           11.9908+-0.4980        
   infer-one-time-deep-closure                       22.0626+-2.9252           21.2612+-0.4942          might be 1.0377x faster
   inline-arguments-access                            4.5212+-0.2137     ?      4.5767+-0.4987        ? might be 1.0123x slower
   inline-arguments-aliased-access                    4.4979+-0.4806     ?      4.7552+-0.6129        ? might be 1.0572x slower
   inline-arguments-local-escape                      4.5390+-0.3838     ?      5.0810+-0.3323        ? might be 1.1194x slower
   inline-get-scoped-var                              4.6477+-0.4593            4.5239+-0.3821          might be 1.0274x faster
   inlined-put-by-id-transition                      11.4587+-1.4563     ?     11.7420+-1.4983        ? might be 1.0247x slower
   int-or-other-abs-then-get-by-val                   5.1860+-0.1997            5.1139+-0.0447          might be 1.0141x faster
   int-or-other-abs-zero-then-get-by-val             17.2260+-0.4267     ?     17.8947+-1.7213        ? might be 1.0388x slower
   int-or-other-add-then-get-by-val                   4.4290+-0.0545     ?      4.4310+-0.0421        ?
   int-or-other-add                                   5.5532+-0.1270            5.4623+-0.0484          might be 1.0166x faster
   int-or-other-div-then-get-by-val                   4.4125+-0.0646     ?      4.4226+-0.0826        ?
   int-or-other-max-then-get-by-val                   4.5190+-0.0552            4.5026+-0.0434        
   int-or-other-min-then-get-by-val                   4.6031+-0.0389     ?      4.6180+-0.0888        ?
   int-or-other-mod-then-get-by-val                   4.0503+-0.1316     ?      4.1781+-0.2944        ? might be 1.0316x slower
   int-or-other-mul-then-get-by-val                   4.2066+-0.1859            4.1407+-0.0341          might be 1.0159x faster
   int-or-other-neg-then-get-by-val                   4.7930+-0.0185     ?      4.8256+-0.2025        ?
   int-or-other-neg-zero-then-get-by-val             17.4423+-0.3243     ?     18.9487+-2.3019        ? might be 1.0864x slower
   int-or-other-sub-then-get-by-val                   4.5312+-0.2115            4.4775+-0.0696          might be 1.0120x faster
   int-or-other-sub                                   3.7001+-0.1037            3.6730+-0.0062        
   int-overflow-local                                 4.5162+-0.1706            4.5076+-0.0133        
   Int16Array-alloc-long-lived                       53.6224+-3.1208           52.7483+-2.9620          might be 1.0166x faster
   Int16Array-bubble-sort-with-byteLength            21.3760+-0.7251     ?     21.3896+-1.2231        ?
   Int16Array-bubble-sort                            21.9354+-3.1794           21.6563+-2.4458          might be 1.0129x faster
   Int16Array-load-int-mul                            1.5958+-0.0293     ?      1.6040+-0.0203        ?
   Int16Array-to-Int32Array-set                      61.0342+-3.2310           59.3398+-3.0788          might be 1.0286x faster
   Int32Array-alloc-large                            27.3370+-1.3215           26.6630+-1.9398          might be 1.0253x faster
   Int32Array-alloc-long-lived                       59.3235+-1.1146     ?     59.6234+-0.6497        ?
   Int32Array-alloc                                   3.5887+-0.2141            3.4852+-0.0789          might be 1.0297x faster
   Int32Array-Int8Array-view-alloc                    8.5151+-1.4795            8.2250+-1.5452          might be 1.0353x faster
   int52-spill                                        6.5405+-0.1225     ?      6.8791+-0.5155        ? might be 1.0518x slower
   Int8Array-alloc-long-lived                        48.6860+-1.6846     ?     49.7970+-1.3155        ? might be 1.0228x slower
   Int8Array-load-with-byteLength                     3.5793+-0.2118            3.5008+-0.0688          might be 1.0224x faster
   Int8Array-load                                     3.5576+-0.1021            3.5294+-0.0846        
   integer-divide                                    12.0565+-0.1549     ?     12.5912+-1.5581        ? might be 1.0444x slower
   integer-modulo                                     2.2595+-0.1345            2.2085+-0.1185          might be 1.0231x faster
   large-int-captured                                 5.8019+-0.0723     ?      5.9114+-0.4529        ? might be 1.0189x slower
   large-int-neg                                     17.2123+-0.2631     ?     17.5643+-1.6377        ? might be 1.0204x slower
   large-int                                         15.7283+-0.3632     ?     16.6520+-2.7693        ? might be 1.0587x slower
   logical-not                                        4.6768+-0.0260            4.6689+-0.0490        
   lots-of-fields                                    13.8820+-1.0509     ?     14.4700+-1.9736        ? might be 1.0424x slower
   make-indexed-storage                               3.2833+-0.0692     ?      3.3857+-0.3178        ? might be 1.0312x slower
   make-rope-cse                                      4.9207+-0.7355            4.6788+-0.2703          might be 1.0517x faster
   marsaglia-larger-ints                             40.8651+-1.5773           40.1308+-1.6373          might be 1.0183x faster
   marsaglia-osr-entry                               24.5448+-2.1703           23.3406+-0.6890          might be 1.0516x faster
   max-boolean                                        2.9070+-0.6143            2.6953+-0.1621          might be 1.0786x faster
   method-on-number                                  17.9919+-0.3237     !     20.2424+-1.1514        ! definitely 1.1251x slower
   min-boolean                                        2.5980+-0.0392     ?      2.8089+-0.5239        ? might be 1.0812x slower
   minus-boolean-double                               3.3120+-0.0885            3.2692+-0.0544          might be 1.0131x faster
   minus-boolean                                      2.4321+-0.0682     ?      2.6010+-0.5260        ? might be 1.0695x slower
   misc-strict-eq                                    40.6736+-3.8856     ?     41.1609+-4.9408        ? might be 1.0120x slower
   mod-boolean-double                                11.7618+-0.6281           11.1960+-0.3173          might be 1.0505x faster
   mod-boolean                                        8.0599+-0.0875     ?      8.1713+-0.4818        ? might be 1.0138x slower
   mul-boolean-double                                 3.8729+-0.1598            3.8173+-0.1474          might be 1.0146x faster
   mul-boolean                                        2.9892+-0.0273            2.9784+-0.0951        
   neg-boolean                                        3.3752+-0.1443            3.3088+-0.2579          might be 1.0201x faster
   negative-zero-divide                               0.4194+-0.1505            0.3668+-0.0075          might be 1.1433x faster
   negative-zero-modulo                               0.3868+-0.0385            0.3842+-0.0682        
   negative-zero-negate                               0.3728+-0.0945            0.3410+-0.0127          might be 1.0933x faster
   nested-function-parsing                           39.6183+-3.5077           39.6093+-2.7608        
   new-array-buffer-dead                              2.8963+-0.0621     ?      2.9306+-0.0921        ? might be 1.0118x slower
   new-array-buffer-push                              6.8108+-0.1706     ?      7.2497+-1.2098        ? might be 1.0644x slower
   new-array-dead                                    12.4606+-0.4844     ?     12.6086+-0.3677        ? might be 1.0119x slower
   new-array-push                                     4.0424+-0.1111     ?      4.1028+-0.1648        ? might be 1.0149x slower
   number-test                                        3.1306+-0.0428            3.1083+-0.0851        
   object-closure-call                                5.9149+-0.0382     ^      5.7348+-0.0792        ^ definitely 1.0314x faster
   object-test                                        3.2444+-0.0284            3.2316+-0.1183        
   obvious-sink-pathology-taken                     151.7202+-2.0247          149.1495+-2.7097          might be 1.0172x faster
   obvious-sink-pathology                           145.8488+-3.9213          142.6227+-3.7078          might be 1.0226x faster
   obviously-elidable-new-object                     37.4105+-3.8953     ?     37.5935+-4.3754        ?
   plus-boolean-arith                                 2.6666+-0.0766     ?      2.7058+-0.2510        ? might be 1.0147x slower
   plus-boolean-double                                3.3098+-0.0726            3.2881+-0.1203        
   plus-boolean                                       2.5545+-0.0429            2.5253+-0.0781          might be 1.0116x faster
   poly-chain-access-different-prototypes-simple   
                                                      3.4142+-0.0442            3.4090+-0.0711        
   poly-chain-access-different-prototypes             2.7258+-0.0423     ?      2.8146+-0.3816        ? might be 1.0326x slower
   poly-chain-access-simpler                          3.4363+-0.0898     ?      3.4808+-0.1713        ? might be 1.0129x slower
   poly-chain-access                                  2.7209+-0.0471     ?      2.7233+-0.0635        ?
   poly-stricteq                                     61.9720+-1.7917           59.2036+-2.8166          might be 1.0468x faster
   polymorphic-array-call                             1.6503+-0.1817     ^      1.2704+-0.0384        ^ definitely 1.2990x faster
   polymorphic-get-by-id                              3.2861+-0.0850            3.2661+-0.1297        
   polymorphic-put-by-id                             30.3610+-1.5506     ?     31.3870+-2.5151        ? might be 1.0338x slower
   polymorphic-structure                             16.0514+-3.2583           15.3928+-0.4615          might be 1.0428x faster
   polyvariant-monomorphic-get-by-id                  8.8271+-0.1101     ?      8.8398+-0.1621        ?
   proto-getter-access                                9.9374+-0.3309     ?     10.0385+-0.2735        ? might be 1.0102x slower
   put-by-id-replace-and-transition                   9.8205+-1.7893            9.5883+-1.1908          might be 1.0242x faster
   put-by-id-slightly-polymorphic                     2.9927+-0.0419     ?      3.0087+-0.0425        ?
   put-by-id                                         14.2062+-0.9227           14.1702+-1.4972        
   put-by-val-direct                                  0.6605+-0.0520     ^      0.5859+-0.0174        ^ definitely 1.1273x faster
   put-by-val-large-index-blank-indexing-type   
                                                      6.2250+-0.6399     ?      6.3312+-0.4985        ? might be 1.0171x slower
   put-by-val-machine-int                             2.7677+-0.1192            2.7460+-0.0719        
   rare-osr-exit-on-local                            15.6710+-0.4058     ?     15.8860+-1.8664        ? might be 1.0137x slower
   register-pressure-from-osr                        22.7346+-1.8093           22.2213+-0.2917          might be 1.0231x faster
   setter                                             5.7191+-0.7343     ?      5.7878+-0.8677        ? might be 1.0120x slower
   simple-activation-demo                            28.0626+-2.4595           26.1052+-0.9779          might be 1.0750x faster
   simple-getter-access                              13.1030+-0.4993     ?     13.3005+-1.5880        ? might be 1.0151x slower
   simple-poly-call-nested                            8.2285+-0.2209     ?      8.4359+-1.0258        ? might be 1.0252x slower
   simple-poly-call                                   1.4301+-0.1054            1.4286+-0.1584        
   sin-boolean                                       24.2855+-1.8325     ?     24.8975+-1.2066        ? might be 1.0252x slower
   sinkable-new-object-dag                           73.8885+-5.4357     ?     75.1243+-3.6712        ? might be 1.0167x slower
   sinkable-new-object-taken                         52.6788+-2.7322           51.8333+-1.8672          might be 1.0163x faster
   sinkable-new-object                               40.5078+-1.9891           39.5819+-2.1702          might be 1.0234x faster
   slow-array-profile-convergence                     2.8437+-0.2601     ?      2.9272+-0.1077        ? might be 1.0294x slower
   slow-convergence                                   3.3817+-0.3030     ?      3.6255+-0.5350        ? might be 1.0721x slower
   sorting-benchmark                                 22.8145+-1.5779     ?     24.2878+-2.4690        ? might be 1.0646x slower
   sparse-conditional                                 1.2437+-0.0146            1.2225+-0.0384          might be 1.0173x faster
   splice-to-remove                                  17.6395+-0.6224     ?     18.0823+-2.1924        ? might be 1.0251x slower
   string-char-code-at                               16.5711+-0.7166     ?     16.6688+-0.5397        ?
   string-concat-object                               2.8398+-0.6927            2.6166+-0.1321          might be 1.0853x faster
   string-concat-pair-object                          2.7083+-0.4407            2.5596+-0.0824          might be 1.0581x faster
   string-concat-pair-simple                         11.5196+-1.2587     ?     13.7687+-1.9338        ? might be 1.1952x slower
   string-concat-simple                              12.9269+-1.5729           12.7280+-2.3895          might be 1.0156x faster
   string-cons-repeat                                 9.3944+-0.6038     ?      9.7007+-2.1792        ? might be 1.0326x slower
   string-cons-tower                                  8.8104+-0.9834            8.5385+-1.1839          might be 1.0319x faster
   string-equality                                   18.6157+-2.3703     ?     18.8691+-2.0778        ? might be 1.0136x slower
   string-get-by-val-big-char                         7.3536+-0.0701     ?      7.6168+-0.2297        ? might be 1.0358x slower
   string-get-by-val-out-of-bounds-insane             3.9525+-0.2452     ?      4.4874+-1.0909        ? might be 1.1353x slower
   string-get-by-val-out-of-bounds                    5.4192+-0.1069     ?      5.5419+-0.0650        ? might be 1.0226x slower
   string-get-by-val                                  3.5580+-0.0598     ^      3.4096+-0.0622        ^ definitely 1.0435x faster
   string-hash                                        2.1770+-0.0070            2.1479+-0.0760          might be 1.0135x faster
   string-long-ident-equality                        15.9767+-2.1789           15.5358+-2.1266          might be 1.0284x faster
   string-out-of-bounds                              15.7789+-1.6181           15.1697+-0.3320          might be 1.0402x faster
   string-repeat-arith                               34.1717+-3.3084     ?     34.9545+-3.3442        ? might be 1.0229x slower
   string-sub                                        71.7735+-3.6738           71.7545+-5.5474        
   string-test                                        3.1256+-0.0424            3.0577+-0.0348          might be 1.0222x faster
   string-var-equality                               31.7166+-3.5139           30.8367+-0.4539          might be 1.0285x faster
   structure-hoist-over-transitions                   2.7120+-0.0860            2.6825+-0.2358          might be 1.0110x faster
   substring-concat-weird                            40.1957+-2.7115           40.1521+-3.4643        
   substring-concat                                  42.0344+-2.0612           41.5757+-1.7027          might be 1.0110x faster
   substring                                         48.8387+-3.3396           48.2365+-1.8110          might be 1.0125x faster
   switch-char-constant                               2.8821+-0.0145     ?      2.8869+-0.0958        ?
   switch-char                                        7.5957+-0.4992            7.2709+-1.6305          might be 1.0447x faster
   switch-constant                                    8.6159+-0.7821            8.3000+-0.4317          might be 1.0381x faster
   switch-string-basic-big-var                       16.0525+-1.2128     ?     17.0074+-2.7001        ? might be 1.0595x slower
   switch-string-basic-big                           14.3300+-0.1560           14.1895+-0.1202        
   switch-string-basic-var                           15.2181+-0.5239     ?     16.0228+-2.5126        ? might be 1.0529x slower
   switch-string-basic                               13.5820+-0.4264     ?     14.6091+-2.0714        ? might be 1.0756x slower
   switch-string-big-length-tower-var                21.3647+-2.3355     ?     22.3046+-3.4698        ? might be 1.0440x slower
   switch-string-length-tower-var                    16.3331+-2.3117           15.2426+-0.2953          might be 1.0715x faster
   switch-string-length-tower                        13.1304+-0.1401     ?     15.1423+-2.5895        ? might be 1.1532x slower
   switch-string-short                               14.0088+-2.6475           13.0826+-0.1402          might be 1.0708x faster
   switch                                            12.8443+-0.5251     ?     13.1055+-0.8217        ? might be 1.0203x slower
   tear-off-arguments-simple                          3.3702+-0.0839     ?      3.5972+-0.2397        ? might be 1.0674x slower
   tear-off-arguments                                 4.6345+-0.0988     ?      4.6605+-0.0321        ?
   temporal-structure                                12.6454+-0.2703     ?     12.9739+-1.7665        ? might be 1.0260x slower
   to-int32-boolean                                  14.2952+-0.4462           14.1019+-0.1224          might be 1.0137x faster
   try-catch-get-by-val-cloned-arguments             15.8500+-2.7738           15.1260+-2.6972          might be 1.0479x faster
   try-catch-get-by-val-direct-arguments              6.2993+-0.4304            6.1835+-0.6581          might be 1.0187x faster
   try-catch-get-by-val-scoped-arguments              7.9197+-0.5566     ^      7.0079+-0.0670        ^ definitely 1.1301x faster
   undefined-property-access                        393.5723+-6.8992     ?    396.8580+-5.8033        ?
   undefined-test                                     3.2735+-0.1837            3.1530+-0.0499          might be 1.0382x faster
   unprofiled-licm                                   24.7155+-2.6027           23.2974+-1.5176          might be 1.0609x faster
   varargs-call                                      15.4370+-0.2554           15.2589+-0.0466          might be 1.0117x faster
   varargs-construct-inline                          24.3502+-2.5780           22.9890+-1.5495          might be 1.0592x faster
   varargs-construct                                 33.1280+-0.9383     ?     34.9989+-4.5097        ? might be 1.0565x slower
   varargs-inline                                     9.4832+-0.5239            9.2231+-0.2092          might be 1.0282x faster
   varargs-strict-mode                                9.8345+-0.1240     ?     10.3357+-1.2485        ? might be 1.0510x slower
   varargs                                            9.9796+-0.8077            9.9591+-0.4163        
   weird-inlining-const-prop                          2.6328+-0.5683            2.4565+-0.4356          might be 1.0718x faster

   <geometric>                                        8.9038+-0.0300     ?      8.9122+-0.0346        ? might be 1.0009x slower

                                                         Vanilla                  Chocolate                                     
AsmBench:
   bigfib.cpp                                       506.1097+-4.1926     ?    506.1874+-3.6188        ?
   cray.c                                           444.6219+-1.9594          443.7471+-1.1116        
   dry.c                                            509.1544+-1.3349          499.6282+-18.2110         might be 1.0191x faster
   FloatMM.c                                        801.7592+-12.9608         799.3370+-3.1181        
   gcc-loops.cpp                                   4284.0927+-11.6206    ?   4299.0363+-14.9316       ?
   n-body.c                                        1019.6232+-7.4517         1015.4982+-2.2716        
   Quicksort.c                                      459.5056+-6.7374     ?    460.2643+-4.0573        ?
   stepanov_container.cpp                          3776.5687+-14.3043    ?   3780.9139+-15.6689       ?
   Towers.c                                         281.2679+-2.0933     ^    272.3129+-4.1433        ^ definitely 1.0329x faster

   <geometric>                                      834.3013+-4.3130          829.3074+-2.6056          might be 1.0060x faster

                                                         Vanilla                  Chocolate                                     
CompressionBench:
   huffman                                          388.9741+-1.0976     ^    375.0577+-2.4090        ^ definitely 1.0371x faster
   arithmetic-simple                                413.6960+-5.7744          408.3135+-3.6967          might be 1.0132x faster
   arithmetic-precise                               307.6225+-2.5547     ?    308.2158+-12.4833       ?
   arithmetic-complex-precise                       305.7736+-1.4695     ?    308.5398+-5.2116        ?
   arithmetic-precise-order-0                       445.4406+-18.1473         432.0716+-4.7045          might be 1.0309x faster
   arithmetic-precise-order-1                       339.1055+-3.2461          334.8203+-3.5012          might be 1.0128x faster
   arithmetic-precise-order-2                       379.4807+-8.3791          377.9154+-3.4060        
   arithmetic-simple-order-1                        430.4996+-9.2633     ?    431.3104+-2.4022        ?
   arithmetic-simple-order-2                        478.9820+-3.3279     ?    484.5358+-4.0746        ? might be 1.0116x slower
   lz-string                                        349.8705+-10.9710    ?    350.9981+-3.4344        ?

   <geometric>                                      379.8642+-1.3744          377.2494+-1.4579          might be 1.0069x faster

                                                         Vanilla                  Chocolate                                     
Geomean of preferred means:
   <scaled-result>                                   66.5330+-0.1977           66.2387+-0.1136          might be 1.0044x faster
Comment 3 Andreas Kling 2015-04-12 20:38:34 PDT
Created attachment 250620 [details]
Proposed patch
Comment 4 Darin Adler 2015-04-13 09:22:33 PDT
Comment on attachment 250620 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=250620&action=review

ChangeLog doesn’t make clear why StructureFlags all have to be public now despite the fact that this is one of the most frequent changes in the patch. Also doesn’t mention moving Base::StructureFlags to the front of all the StructureFlags expressions, which is a small thing, but done so many times I think it makes sense to mention in change log.

Note that in most cases where I say StructureFlags isn’t needed, we also don’t use or need the Base typedef either.

> Source/JavaScriptCore/API/JSCallbackObject.h:128
> +    static const unsigned StructureFlags = Parent::StructureFlags | ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | OverridesHasInstance | OverridesGetPropertyNames;

Why use Parent here instead of Base?

> Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h:270
> +    static const unsigned StructureFlags = StructureIsImmortal | Base::StructureFlags;

In other cases we put the base structure flags first, but here we put them last.

> Source/JavaScriptCore/heap/MarkedAllocator.h:77
> +    , m_needsDestruction(false)

Would be nicer to initialize this in the class definition rather than here.

    bool m_needsDestruction { false };

> Source/JavaScriptCore/inspector/JSInjectedScriptHost.h:38
> +    static const unsigned StructureFlags = Base::StructureFlags;

I don’t think this line of code is needed, but maybe it’s useful for clarity that no flags are being added?

> Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h:37
> +    static const unsigned StructureFlags = Base::StructureFlags;

Ditto.

> Source/JavaScriptCore/runtime/ArrayBufferNeuteringWatchpoint.h:40
>  private:
>      ArrayBufferNeuteringWatchpoint(VM&);

Wonder why this one lonely constructor is up here by itself instead of down with the other private members.

> Source/JavaScriptCore/runtime/ExceptionHelpers.h:61
>      TerminatedExecutionError(VM& vm)

This should probably be marked explicit. Also seems like it would be nicer if this class used the more normal "public members first" style.

> Source/JavaScriptCore/runtime/Executable.h:87
> +    static const unsigned StructureFlags = Base::StructureFlags;

Why no StructureIsImmortal here? Also, if there are no flags being added, then why define this at all?

> Source/JavaScriptCore/runtime/Executable.h:-120
> -    static const unsigned StructureFlags = StructureIsImmortal;

Since it was here.

> Source/JavaScriptCore/runtime/JSEnvironmentRecord.h:48
> +    static const unsigned StructureFlags = Base::StructureFlags;

Not sure this is needed (as mentioned above).

> Source/JavaScriptCore/runtime/JSFunction.h:60
> +    const static unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesGetPropertyNames | JSObject::StructureFlags;

Strange that this starts with JSObject::StructureFlags instead of starting with Base::StructureFlags. Could omit ImplementsHasInstance if we started with Base instead of JSObject. Also better to put the inherited flags first as we did elsewhere.

> Source/JavaScriptCore/runtime/JSNameScope.h:38
> +    static const unsigned StructureFlags = Base::StructureFlags| OverridesGetOwnPropertySlot;

Missing space before "|".

> Source/JavaScriptCore/runtime/JSObject.h:1034
> +    static const unsigned StructureFlags = Base::StructureFlags;

Not sure this is needed (see other comments like this above).

> Source/JavaScriptCore/runtime/JSScope.h:152
> +    static const unsigned StructureFlags = Base::StructureFlags;

We didn’t need to add this, I don’t think.

> Source/JavaScriptCore/runtime/NumberConstructor.h:33
> +    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | Base::StructureFlags;

Did not put Base at the start here.

> Source/JavaScriptCore/runtime/StringPrototype.h:36
> +    static const unsigned StructureFlags = Base::StructureFlags;

Not sure we need this.

> Source/JavaScriptCore/runtime/Structure.cpp:205
> +    TypeInfo typeInfo = TypeInfo(CellType, StructureFlags);

TypeInfo x = TypeInfo(...) is OK but a little wordy. Maybe one of these:

    TypeInfo x(...);
    TypeInfo x { ... };

> Source/JavaScriptCore/runtime/WeakMapData.h:40
> +    static const unsigned StructureFlags = StructureIsImmortal | Base::StructureFlags;

Did not put Base::StructureFlags first here.

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1113
> +        push(@headerContent, "Base::StructureFlags;\n");

Did not put Base first here in generated code.

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4308
>      if (%structureFlags) {
> -        push(@$outputArray, "protected:\n");
> +        push(@$outputArray, "public:\n");
>          push(@$outputArray, "    static const unsigned StructureFlags = ");

Seems like we should factor this into a function so we can share code between this and the nearly identical code above.

> Source/WebCore/bridge/runtime_object.h:38
> +    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | Base::StructureFlags;

Did not put Base::StructureFlags first here.
Comment 5 Andreas Kling 2015-04-13 10:50:50 PDT
Created attachment 250658 [details]
Patch for landing

Fixed most of the above comments. Will tweak code generator separately.
Comment 6 Andreas Kling 2015-04-13 12:13:48 PDT
Committed r182747: <http://trac.webkit.org/changeset/182747>