The test case: function foo(o) { var result = 0; for (var i = 0; i < 100; ++i) // ++i still has an overflow check in the emitted code result += o.f; return result; } noInline(foo); var p = {f:42}; var o = Object.create(p); for (var i = 0; i < 10000; ++i) { p.f = i; foo(o); }
The reason for the bug is that the merge rule assumes TOP when presented two claims about different constants. For example: @x == 0 @x < 100 will yield TOP, when it should just yield @x < 100.
Created attachment 258001 [details] Work in progress This is going to be interesting. I want to fix this test case but I don't want to introduce too much crazy. This work-in-progress might be a bit on the crazy side still, and it's not even finished.
Created attachment 258002 [details] maybe it'll work This is starting to look believable. I'll have to think about it more though.
Created attachment 259443 [details] more things I think that this is an even more comprehensive solution. I haven't even tried compiling it yet, though.
Created attachment 259487 [details] more refined Still testing this.
Speed-up on the two microbenchmarks: Benchmark report for JSRegress on shakezilla (MacBookPro11,3). VMs tested: "TipOfTree" at /Volumes/Data/secondary/OpenSource/WebKitBuild/Release/jsc (r188645) "BetterRangePhase" at /Volumes/Data/tertiary/OpenSource/WebKitBuild/Release/jsc (r188645) Collected 8 samples per benchmark/VM, with 8 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. TipOfTree BetterRangePhase hard-overflow-check-equal 37.5336+-0.6439 ^ 33.8116+-1.6043 ^ definitely 1.1101x faster hard-overflow-check 37.2674+-0.7066 ^ 32.5268+-0.4279 ^ definitely 1.1457x faster <geometric> 37.3964+-0.4636 ^ 33.1505+-0.7854 ^ definitely 1.1281x faster
Overall perf: Benchmark report for SunSpider, LongSpider, V8Spider, Octane, Kraken, JSRegress, AsmBench, and CompressionBench on shakezilla (MacBookPro11,3). VMs tested: "TipOfTree" at /Volumes/Data/secondary/OpenSource/WebKitBuild/Release/jsc (r188645) "BetterRangePhase" at /Volumes/Data/tertiary/OpenSource/WebKitBuild/Release/jsc (r188645) Collected 8 samples per benchmark/VM, with 8 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. TipOfTree BetterRangePhase SunSpider: 3d-cube 4.8236+-0.3991 4.6630+-0.1749 might be 1.0344x faster 3d-morph 5.1740+-0.1408 5.1275+-0.0648 3d-raytrace 4.9851+-0.0374 ? 5.6385+-1.4123 ? might be 1.1311x slower access-binary-trees 2.0193+-0.0504 2.0042+-0.0449 access-fannkuch 5.2270+-0.1482 5.2179+-0.0456 access-nbody 2.4409+-0.1936 2.3753+-0.0203 might be 1.0276x faster access-nsieve 2.9428+-0.0179 ? 2.9743+-0.0903 ? might be 1.0107x slower bitops-3bit-bits-in-byte 1.4083+-0.0140 1.3948+-0.0147 bitops-bits-in-byte 3.1951+-0.0596 ? 3.2238+-0.0612 ? bitops-bitwise-and 1.9133+-0.0148 ? 1.9196+-0.0132 ? bitops-nsieve-bits 2.9024+-0.0209 2.8940+-0.0334 controlflow-recursive 2.0125+-0.0710 1.9435+-0.0323 might be 1.0355x faster crypto-aes 3.6629+-0.0336 ? 3.6900+-0.0560 ? crypto-md5 2.2751+-0.0271 ? 2.3149+-0.0385 ? might be 1.0175x slower crypto-sha1 2.2162+-0.0829 2.1868+-0.1081 might be 1.0134x faster date-format-tofte 6.4810+-0.0901 6.4090+-0.1364 might be 1.0112x faster date-format-xparb 4.4182+-0.0787 ? 4.5702+-0.3950 ? might be 1.0344x slower math-cordic 2.6842+-0.0135 ? 2.7149+-0.0923 ? might be 1.0114x slower math-partial-sums 5.1099+-0.1114 ? 5.1285+-0.0832 ? math-spectral-norm 1.7438+-0.0275 1.7392+-0.0240 regexp-dna 6.0820+-0.0879 ? 6.1329+-0.1491 ? string-base64 4.2095+-0.0386 ? 4.2466+-0.1689 ? string-fasta 5.8048+-0.2442 5.6915+-0.0546 might be 1.0199x faster string-tagcloud 7.7117+-0.0545 ? 7.7816+-0.1479 ? string-unpack-code 17.9664+-0.2744 ? 19.5456+-3.5040 ? might be 1.0879x slower string-validate-input 4.4258+-0.0726 4.4239+-0.1078 <arithmetic> 4.3783+-0.0232 ? 4.4597+-0.1338 ? might be 1.0186x slower TipOfTree BetterRangePhase LongSpider: 3d-cube 813.9855+-15.3196 805.6424+-5.0391 might be 1.0104x faster 3d-morph 1490.8229+-2.3010 ? 1491.2573+-6.6030 ? 3d-raytrace 595.5582+-5.0321 595.2532+-2.5105 access-binary-trees 799.6125+-10.5418 796.7921+-7.4698 access-fannkuch 275.2368+-3.8275 ? 275.6840+-8.7053 ? access-nbody 510.6766+-3.1072 509.8951+-3.0315 access-nsieve 357.0611+-4.3922 356.0200+-5.9756 bitops-3bit-bits-in-byte 37.7559+-0.2297 37.5536+-0.2719 bitops-bits-in-byte 75.6636+-2.0708 74.9225+-0.6534 bitops-nsieve-bits 404.6605+-2.3672 404.6030+-4.9826 controlflow-recursive 442.5568+-0.9105 ? 444.2149+-2.1903 ? crypto-aes 571.8178+-5.9766 568.0103+-7.9767 crypto-md5 494.9454+-5.3342 493.1496+-3.5585 crypto-sha1 615.0614+-4.2564 ? 621.4955+-10.5881 ? might be 1.0105x slower date-format-tofte 504.0191+-14.9468 496.7238+-8.5321 might be 1.0147x faster date-format-xparb 616.5331+-2.4952 613.4982+-4.0866 hash-map 149.9597+-1.0944 ? 150.1344+-3.2742 ? math-cordic 515.2488+-75.2478 482.0070+-0.6855 might be 1.0690x faster math-partial-sums 490.2735+-2.2433 ? 490.7846+-2.3942 ? math-spectral-norm 548.3604+-2.9451 547.9254+-2.3772 string-base64 344.3253+-3.6228 ? 352.9198+-5.8084 ? might be 1.0250x slower string-fasta 367.9363+-2.3383 365.7122+-1.9275 string-tagcloud 176.3741+-3.0525 ? 176.8751+-2.2641 ? <geometric> 388.8782+-2.1849 387.5050+-0.8077 might be 1.0035x faster TipOfTree BetterRangePhase V8Spider: crypto 47.2592+-0.9358 46.8718+-1.0772 deltablue 85.9420+-2.6256 85.1528+-2.3473 earley-boyer 39.1992+-0.5919 ? 39.2281+-0.5339 ? raytrace 32.1054+-1.5635 30.1890+-1.0699 might be 1.0635x faster regexp 60.1945+-0.2831 ? 60.3994+-0.4396 ? richards 64.1570+-1.0411 63.2755+-0.6092 might be 1.0139x faster splay 34.0770+-1.9339 ? 36.4775+-1.3040 ? might be 1.0704x slower <geometric> 48.9117+-0.2632 48.7826+-0.4129 might be 1.0026x faster TipOfTree BetterRangePhase Octane: encrypt 0.17194+-0.00106 ? 0.17237+-0.00127 ? decrypt 3.25185+-0.01243 ? 3.25300+-0.00937 ? deltablue x2 0.15465+-0.00130 0.15197+-0.00169 might be 1.0176x faster earley 0.27631+-0.00277 0.27623+-0.00176 boyer 4.20066+-0.10273 ? 4.21329+-0.11973 ? navier-stokes x2 4.82617+-0.01988 ? 4.91723+-0.19362 ? might be 1.0189x slower raytrace x2 1.02384+-0.03019 ? 1.05524+-0.02750 ? might be 1.0307x slower richards x2 0.10900+-0.00147 0.10772+-0.00118 might be 1.0119x faster splay x2 0.33018+-0.00234 ? 0.33105+-0.00568 ? regexp x2 24.41735+-0.30610 ? 24.73577+-0.23839 ? might be 1.0130x slower pdfjs x2 36.71915+-0.35206 36.58916+-0.26680 mandreel x2 43.46671+-0.46114 ? 43.63361+-0.31383 ? gbemu x2 34.89000+-2.22305 33.59036+-0.23926 might be 1.0387x faster closure 0.55415+-0.00252 ? 0.55733+-0.00256 ? jquery 7.05812+-0.03970 ? 7.11249+-0.02557 ? box2d x2 9.89896+-0.10250 ? 9.96979+-0.10886 ? zlib x2 378.73634+-9.97887 ? 385.29796+-6.65037 ? might be 1.0173x slower typescript x2 638.33517+-8.63410 ? 641.46136+-11.30056 ? <geometric> 5.53977+-0.03455 ? 5.55368+-0.02200 ? might be 1.0025x slower TipOfTree BetterRangePhase Kraken: ai-astar 224.815+-6.703 ? 225.660+-6.294 ? audio-beat-detection 50.138+-0.257 ? 50.531+-0.496 ? audio-dft 95.676+-1.649 ? 96.139+-1.702 ? audio-fft 34.613+-0.117 ? 34.676+-0.092 ? audio-oscillator 58.645+-0.361 58.592+-0.352 imaging-darkroom 61.352+-1.531 60.631+-0.192 might be 1.0119x faster imaging-desaturate 49.043+-0.470 ? 50.764+-2.430 ? might be 1.0351x slower imaging-gaussian-blur 84.779+-3.480 84.305+-0.502 json-parse-financial 37.986+-0.294 37.474+-0.262 might be 1.0137x faster json-stringify-tinderbox 21.519+-0.050 ! 24.150+-0.207 ! definitely 1.1223x slower stanford-crypto-aes 40.341+-0.607 39.873+-0.138 might be 1.0118x faster stanford-crypto-ccm 34.792+-1.243 34.314+-0.962 might be 1.0139x faster stanford-crypto-pbkdf2 93.400+-0.192 ? 94.099+-1.362 ? stanford-crypto-sha256-iterative 35.667+-0.302 ? 35.836+-0.337 ? <arithmetic> 65.912+-0.538 ? 66.217+-0.520 ? might be 1.0046x slower TipOfTree BetterRangePhase JSRegress: abc-forward-loop-equal 28.9037+-0.1573 ? 29.1570+-0.9520 ? abc-postfix-backward-loop 28.8847+-0.1982 ? 28.9605+-0.1234 ? abc-simple-backward-loop 28.5707+-0.2482 ? 28.7503+-0.5265 ? abc-simple-forward-loop 28.6636+-0.1888 28.4852+-0.1495 abc-skippy-loop 20.4679+-0.1664 20.4223+-0.1127 abs-boolean 2.4226+-0.0578 2.3932+-0.0322 might be 1.0123x faster adapt-to-double-divide 15.9863+-0.0669 15.8651+-0.0732 aliased-arguments-getbyval 1.1070+-0.0442 1.0899+-0.0403 might be 1.0157x faster allocate-big-object 2.5492+-0.0689 2.5225+-0.0875 might be 1.0106x faster arguments-named-and-reflective 10.8271+-0.1582 10.6658+-0.1544 might be 1.0151x faster arguments-out-of-bounds 9.9830+-0.1649 ^ 9.0731+-0.1457 ^ definitely 1.1003x faster arguments-strict-mode 9.4778+-0.3494 ? 9.4856+-0.3083 ? arguments 8.4255+-0.0838 8.3662+-0.1668 arity-mismatch-inlining 0.7724+-0.0485 ? 0.7748+-0.0440 ? array-access-polymorphic-structure 5.7525+-0.1012 ? 5.8171+-0.1386 ? might be 1.0112x slower array-nonarray-polymorhpic-access 24.0519+-0.2978 23.9109+-0.2056 array-prototype-every 73.8506+-0.3924 73.1471+-0.6807 array-prototype-forEach 81.7823+-19.9516 72.8767+-1.1907 might be 1.1222x faster array-prototype-map 81.0087+-0.7294 80.0226+-0.5770 might be 1.0123x faster array-prototype-reduce 71.4399+-1.6476 70.1857+-1.3713 might be 1.0179x faster array-prototype-reduceRight 69.8370+-0.2417 ? 69.9685+-0.6222 ? array-prototype-some 73.7130+-0.3903 73.3310+-1.4976 array-splice-contiguous 20.5666+-0.2807 20.4993+-0.3252 array-with-double-add 3.3358+-0.0288 3.3247+-0.0881 array-with-double-increment 2.9946+-0.0702 2.9798+-0.0143 array-with-double-mul-add 4.0659+-0.0307 ? 4.1255+-0.0716 ? might be 1.0147x slower array-with-double-sum 3.1389+-0.0235 ? 3.1516+-0.0820 ? array-with-int32-add-sub 5.7395+-0.0380 ? 5.7650+-0.0467 ? array-with-int32-or-double-sum 3.1998+-0.0623 ? 3.2306+-0.0725 ? ArrayBuffer-DataView-alloc-large-long-lived 25.9695+-0.4886 25.8633+-0.6022 ArrayBuffer-DataView-alloc-long-lived 11.4117+-0.1158 ? 11.5979+-0.1124 ? might be 1.0163x slower ArrayBuffer-Int32Array-byteOffset 3.4760+-0.0421 ? 3.4836+-0.0212 ? ArrayBuffer-Int8Array-alloc-large-long-lived 25.9904+-0.2496 25.8897+-0.1255 ArrayBuffer-Int8Array-alloc-long-lived-buffer 19.0933+-0.1552 ? 19.6158+-0.9284 ? might be 1.0274x slower ArrayBuffer-Int8Array-alloc-long-lived 10.7897+-0.0690 ? 10.8992+-0.1071 ? might be 1.0101x slower ArrayBuffer-Int8Array-alloc 9.1588+-0.1900 ? 9.2501+-0.0453 ? arrowfunction-call 10.4887+-0.1178 10.4426+-0.0995 asmjs_bool_bug 6.9951+-0.0184 ? 7.0085+-0.0294 ? assign-custom-setter-polymorphic 2.2263+-0.0163 ? 2.2799+-0.0500 ? might be 1.0241x slower assign-custom-setter 3.1642+-0.0486 3.1531+-0.0387 basic-set 7.1067+-0.1476 ? 7.1109+-0.1829 ? big-int-mul 3.3803+-0.0365 3.3650+-0.0125 boolean-test 2.8326+-0.0555 ? 2.8615+-0.0222 ? might be 1.0102x slower branch-fold 3.5101+-0.0254 ? 3.5134+-0.0234 ? branch-on-string-as-boolean 16.0586+-0.2417 ? 16.4581+-0.2837 ? might be 1.0249x slower by-val-generic 5.7831+-0.0655 ? 5.7832+-0.0835 ? call-spread-apply 25.3715+-0.1098 ? 25.5016+-0.4921 ? call-spread-call 20.5047+-0.1398 ^ 20.2368+-0.0802 ^ definitely 1.0132x faster captured-assignments 0.3817+-0.0082 ? 0.3896+-0.0063 ? might be 1.0207x slower cast-int-to-double 4.9774+-0.0410 4.9602+-0.0284 cell-argument 6.6173+-0.2184 ^ 6.2421+-0.0985 ^ definitely 1.0601x faster cfg-simplify 2.7287+-0.0736 2.6918+-0.0367 might be 1.0137x faster chain-getter-access 8.2574+-0.1532 8.2330+-0.0826 cmpeq-obj-to-obj-other 11.3852+-0.8566 10.9670+-1.0490 might be 1.0381x faster constant-test 4.7656+-0.0336 4.7206+-0.0209 create-lots-of-functions 9.4659+-0.5533 ? 10.0303+-0.6269 ? might be 1.0596x slower cse-new-array-buffer 2.1083+-0.0580 ? 2.1815+-0.0968 ? might be 1.0347x slower cse-new-array 2.2529+-0.0478 2.2106+-0.0525 might be 1.0191x faster DataView-custom-properties 31.0264+-1.2792 30.6884+-0.3600 might be 1.0110x faster delay-tear-off-arguments-strictmode 11.9542+-0.1993 ? 12.0002+-0.3376 ? deltablue-varargs 152.1449+-1.5523 ? 153.6654+-2.0226 ? destructuring-arguments 159.0528+-0.8241 ? 160.2248+-1.5889 ? destructuring-parameters-overridden-by-function 0.4420+-0.0115 ? 0.4578+-0.0204 ? might be 1.0357x slower destructuring-swap 4.5984+-0.0557 ? 4.6274+-0.0453 ? direct-arguments-getbyval 1.1038+-0.0259 ? 1.1100+-0.0414 ? div-boolean-double 5.2251+-0.0707 5.1880+-0.0892 div-boolean 8.0516+-0.0208 ? 8.0667+-0.0349 ? double-get-by-val-out-of-bounds 4.2578+-0.0633 ? 4.3096+-0.0605 ? might be 1.0122x slower double-pollution-getbyval 8.5764+-0.0339 ? 8.5931+-0.0356 ? double-pollution-putbyoffset 3.6664+-0.0384 ? 3.6689+-0.0429 ? double-real-use 23.8280+-1.2030 ? 23.9349+-1.3436 ? double-to-int32-typed-array-no-inline 1.9467+-0.0794 1.9381+-0.0493 double-to-int32-typed-array 1.7139+-0.0430 ? 1.7188+-0.0277 ? double-to-uint32-typed-array-no-inline 2.0134+-0.0350 ? 2.0282+-0.0492 ? double-to-uint32-typed-array 1.8013+-0.0168 1.7815+-0.0344 might be 1.0111x faster elidable-new-object-dag 33.5004+-0.3806 33.3678+-0.3841 elidable-new-object-roflcopter 32.4650+-0.3444 ? 32.6691+-0.1026 ? elidable-new-object-then-call 31.8487+-0.5700 31.1458+-0.4476 might be 1.0226x faster elidable-new-object-tree 36.9577+-0.3630 ? 37.3893+-0.7683 ? might be 1.0117x slower empty-string-plus-int 4.5219+-0.1130 4.4958+-0.0399 emscripten-cube2hash 25.2717+-1.1535 ? 28.4517+-5.4926 ? might be 1.1258x slower exit-length-on-plain-object 11.7951+-0.0755 ? 12.0964+-0.2798 ? might be 1.0255x slower external-arguments-getbyval 1.1560+-0.0694 ? 1.1622+-0.0795 ? external-arguments-putbyval 2.0914+-0.0625 2.0900+-0.0715 fixed-typed-array-storage-var-index 1.0833+-0.0173 1.0784+-0.0122 fixed-typed-array-storage 0.8212+-0.0338 0.8078+-0.0146 might be 1.0165x faster Float32Array-matrix-mult 3.7165+-0.0371 3.7128+-0.0389 Float32Array-to-Float64Array-set 45.2482+-0.1478 ? 46.0603+-1.3485 ? might be 1.0179x slower Float64Array-alloc-long-lived 57.0244+-0.1395 ? 57.3615+-0.5755 ? Float64Array-to-Int16Array-set 56.2880+-0.2786 55.8081+-0.3373 fold-double-to-int 12.0505+-0.6176 11.7951+-0.0603 might be 1.0217x faster fold-get-by-id-to-multi-get-by-offset-rare-int 11.1171+-1.6176 ? 11.4040+-0.9605 ? might be 1.0258x slower fold-get-by-id-to-multi-get-by-offset 10.2190+-0.9682 ? 10.9825+-1.4132 ? might be 1.0747x slower fold-multi-get-by-offset-to-get-by-offset 8.1786+-1.4603 8.1560+-1.5435 fold-multi-get-by-offset-to-poly-get-by-offset 8.6183+-0.7419 8.0331+-1.4701 might be 1.0729x faster fold-multi-put-by-offset-to-poly-put-by-offset 8.8198+-0.7171 ? 9.0646+-1.6362 ? might be 1.0278x slower fold-multi-put-by-offset-to-put-by-offset 3.8672+-0.3299 ? 3.9266+-0.3970 ? might be 1.0153x slower fold-multi-put-by-offset-to-replace-or-transition-put-by-offset 8.2119+-0.4259 7.8499+-0.1089 might be 1.0461x faster fold-put-by-id-to-multi-put-by-offset 10.0599+-0.9381 ? 10.2707+-1.4878 ? might be 1.0209x slower fold-put-structure 5.5307+-0.8999 4.2529+-0.6295 might be 1.3005x faster for-of-iterate-array-entries 10.9317+-0.1193 ? 11.0255+-0.0991 ? for-of-iterate-array-keys 3.5943+-0.1215 ? 3.6625+-0.0582 ? might be 1.0190x slower for-of-iterate-array-values 3.5314+-0.1807 ? 3.5607+-0.1805 ? fround 18.4798+-0.1521 ? 18.7742+-0.1957 ? might be 1.0159x slower ftl-library-inlining-dataview 55.3061+-0.6132 55.2417+-0.2421 ftl-library-inlining 92.4497+-6.6021 86.8344+-2.7495 might be 1.0647x faster function-call 10.6109+-0.1819 10.5941+-0.2050 function-dot-apply 1.9331+-0.0286 ? 1.9815+-0.0431 ? might be 1.0251x slower function-test 2.6512+-0.0706 2.6436+-0.0229 function-with-eval 102.9968+-0.7137 ? 103.4445+-0.5444 ? gcse-poly-get-less-obvious 13.8987+-0.1339 ? 13.9673+-0.2282 ? gcse-poly-get 15.6772+-0.3106 15.5052+-0.1014 might be 1.0111x faster gcse 3.7655+-0.0439 3.7595+-0.0267 get-by-id-bimorphic-check-structure-elimination-simple 2.5999+-0.0742 2.5479+-0.0250 might be 1.0204x faster get-by-id-bimorphic-check-structure-elimination 5.5608+-0.0187 ? 5.5794+-0.0187 ? get-by-id-chain-from-try-block 5.3267+-0.0539 ? 5.3515+-0.0480 ? get-by-id-check-structure-elimination 4.2457+-0.0325 ? 4.2887+-0.0349 ? might be 1.0101x slower get-by-id-proto-or-self 14.6232+-0.2448 ? 14.8022+-0.5972 ? might be 1.0122x slower get-by-id-quadmorphic-check-structure-elimination-simple 2.8303+-0.0266 ? 2.8501+-0.0513 ? get-by-id-self-or-proto 14.8144+-0.5716 14.6454+-0.3828 might be 1.0115x faster get-by-val-out-of-bounds 3.7969+-0.0751 ? 3.8738+-0.2593 ? might be 1.0202x slower get-by-val-with-string-bimorphic-check-structure-elimination-simple 2.7456+-0.0269 2.7270+-0.0179 get-by-val-with-string-bimorphic-check-structure-elimination 5.8666+-0.0655 5.8596+-0.0309 get-by-val-with-string-chain-from-try-block 5.4335+-0.0682 ? 5.5839+-0.2115 ? might be 1.0277x slower get-by-val-with-string-check-structure-elimination 4.9597+-0.0163 ? 4.9831+-0.0217 ? get-by-val-with-string-proto-or-self 14.4390+-0.1878 ? 14.5265+-0.3920 ? get-by-val-with-string-quadmorphic-check-structure-elimination-simple 3.0858+-0.0099 ? 3.0944+-0.0286 ? get-by-val-with-string-self-or-proto 15.0469+-1.1603 14.7658+-0.3241 might be 1.0190x faster get-by-val-with-symbol-bimorphic-check-structure-elimination-simple 2.9669+-0.0222 ? 2.9828+-0.0532 ? get-by-val-with-symbol-bimorphic-check-structure-elimination 12.1415+-0.1109 12.1192+-0.0395 get-by-val-with-symbol-chain-from-try-block 5.4829+-0.0612 5.4197+-0.0651 might be 1.0117x faster get-by-val-with-symbol-check-structure-elimination 10.9056+-0.0905 10.8503+-0.0162 get-by-val-with-symbol-proto-or-self 14.6203+-0.6193 ? 14.8031+-0.5622 ? might be 1.0125x slower get-by-val-with-symbol-quadmorphic-check-structure-elimination-simple 3.7961+-0.0521 ? 3.8689+-0.0483 ? might be 1.0192x slower get-by-val-with-symbol-self-or-proto 14.6764+-0.2914 ? 14.8229+-0.6061 ? get_callee_monomorphic 2.2950+-0.0499 2.2794+-0.0371 get_callee_polymorphic 3.2156+-0.2233 3.1268+-0.0519 might be 1.0284x faster getter-no-activation 4.7671+-0.1723 4.6676+-0.1207 might be 1.0213x faster getter-prototype 9.7256+-0.1193 ^ 8.9443+-0.4066 ^ definitely 1.0873x faster getter-richards 119.7874+-5.5903 119.1671+-5.3613 getter 5.3912+-0.5562 ? 5.6847+-0.5771 ? might be 1.0544x slower global-object-access-with-mutating-structure 5.5844+-0.1102 ? 5.5851+-0.1327 ? global-var-const-infer-fire-from-opt 0.7790+-0.0145 ? 0.8057+-0.0397 ? might be 1.0343x slower global-var-const-infer 0.6142+-0.0306 ? 0.6479+-0.0474 ? might be 1.0548x slower HashMap-put-get-iterate-keys 25.0407+-1.3869 24.5154+-1.4802 might be 1.0214x faster HashMap-put-get-iterate 27.8880+-2.8092 27.2531+-0.6689 might be 1.0233x faster HashMap-string-put-get-iterate 22.5271+-0.3421 ? 23.2525+-0.9466 ? might be 1.0322x slower hoist-make-rope 8.1205+-0.7304 ? 8.3211+-0.7454 ? might be 1.0247x slower hoist-poly-check-structure-effectful-loop 4.0060+-0.0405 ? 4.0338+-0.0452 ? hoist-poly-check-structure 3.2035+-0.0284 3.2019+-0.0247 imul-double-only 7.7584+-0.1400 7.5764+-0.0490 might be 1.0240x faster imul-int-only 8.4671+-0.6795 8.2396+-0.6239 might be 1.0276x faster imul-mixed 7.0561+-0.3007 6.7286+-0.0580 might be 1.0487x faster in-four-cases 16.5803+-0.0867 ? 16.8786+-0.5897 ? might be 1.0180x slower in-one-case-false 9.5507+-0.5010 9.4691+-0.5319 in-one-case-true 9.4998+-0.4536 9.3073+-0.3029 might be 1.0207x faster in-two-cases 9.6568+-0.3757 ? 9.8642+-0.4013 ? might be 1.0215x slower indexed-properties-in-objects 2.6785+-0.0806 2.6655+-0.0211 infer-closure-const-then-mov-no-inline 2.9851+-0.0338 2.9821+-0.0214 infer-closure-const-then-mov 17.7178+-0.1801 ? 17.8023+-0.1982 ? infer-closure-const-then-put-to-scope-no-inline 10.6766+-0.0361 ? 10.8716+-0.3256 ? might be 1.0183x slower infer-closure-const-then-put-to-scope 20.6394+-0.4365 20.5717+-0.2388 infer-closure-const-then-reenter-no-inline 49.0954+-0.2759 48.8848+-0.0736 infer-closure-const-then-reenter 21.1635+-0.3558 20.8208+-0.3434 might be 1.0165x faster infer-constant-global-property 3.3355+-0.0346 ? 3.3432+-0.0373 ? infer-constant-property 2.5594+-0.0397 ? 2.5883+-0.0611 ? might be 1.0113x slower infer-one-time-closure-ten-vars 9.1095+-1.3297 ^ 7.6592+-0.0927 ^ definitely 1.1893x faster infer-one-time-closure-two-vars 8.1317+-0.1909 ^ 7.1965+-0.1528 ^ definitely 1.1299x faster infer-one-time-closure 8.1842+-0.2822 ^ 7.2675+-0.4643 ^ definitely 1.1261x faster infer-one-time-deep-closure 13.4090+-2.2046 ^ 10.3692+-0.1051 ^ definitely 1.2932x faster inline-arguments-access 3.6855+-0.2182 3.5744+-0.0401 might be 1.0311x faster inline-arguments-aliased-access 3.5566+-0.1100 ? 3.5972+-0.0738 ? might be 1.0114x slower inline-arguments-local-escape 3.8441+-0.1673 3.8383+-0.2291 inline-get-scoped-var 4.4918+-0.0866 ? 4.5332+-0.1608 ? inlined-put-by-id-transition 9.6150+-0.0714 ? 9.6804+-0.2821 ? int-or-other-abs-then-get-by-val 4.6833+-0.0272 ? 4.6927+-0.0663 ? int-or-other-abs-zero-then-get-by-val 15.4380+-0.2171 15.3268+-0.0387 int-or-other-add-then-get-by-val 3.9353+-0.0536 ? 4.4395+-1.2984 ? might be 1.1281x slower int-or-other-add 4.7142+-0.0275 ? 4.7747+-0.0441 ? might be 1.0128x slower int-or-other-div-then-get-by-val 3.5835+-0.0225 3.5733+-0.0194 int-or-other-max-then-get-by-val 3.8144+-0.0185 ? 3.8172+-0.0356 ? int-or-other-min-then-get-by-val 3.8270+-0.0458 ? 3.8441+-0.0535 ? int-or-other-mod-then-get-by-val 3.4200+-0.1456 3.3977+-0.0357 int-or-other-mul-then-get-by-val 3.4755+-0.0380 ? 3.5269+-0.0596 ? might be 1.0148x slower int-or-other-neg-then-get-by-val 4.2778+-0.0707 ? 4.3534+-0.0528 ? might be 1.0177x slower int-or-other-neg-zero-then-get-by-val 15.4020+-0.2105 15.2993+-0.0974 int-or-other-sub-then-get-by-val 3.9501+-0.1430 3.9162+-0.0419 int-or-other-sub 3.2995+-0.0344 ? 3.3750+-0.1129 ? might be 1.0229x slower int-overflow-local 4.1689+-0.0518 ? 4.1841+-0.0704 ? Int16Array-alloc-long-lived 41.8836+-0.2448 ? 42.4842+-0.6542 ? might be 1.0143x slower Int16Array-bubble-sort-with-byteLength 16.8834+-0.1165 ? 17.2839+-1.0060 ? might be 1.0237x slower Int16Array-bubble-sort 17.1178+-0.3292 17.0147+-0.0576 Int16Array-load-int-mul 1.3789+-0.0125 ? 1.4103+-0.0537 ? might be 1.0228x slower Int16Array-to-Int32Array-set 42.5354+-0.1417 42.1305+-0.2710 Int32Array-alloc-large 11.6209+-0.1844 ? 11.7088+-0.2335 ? Int32Array-alloc-long-lived 46.9802+-0.2126 ? 47.2723+-0.3565 ? Int32Array-alloc 2.8239+-0.0582 2.8005+-0.1386 Int32Array-Int8Array-view-alloc 5.9695+-0.1185 ? 6.1803+-0.3224 ? might be 1.0353x slower int52-spill 4.4226+-0.0899 4.4168+-0.0794 Int8Array-alloc-long-lived 37.8355+-0.8780 37.7861+-0.5679 Int8Array-load-with-byteLength 3.3862+-0.1160 3.3257+-0.0279 might be 1.0182x faster Int8Array-load 3.3496+-0.0486 3.3155+-0.0132 might be 1.0103x faster integer-divide 10.1565+-0.0438 ? 10.2185+-0.2505 ? integer-modulo 1.5407+-0.0671 1.4753+-0.0190 might be 1.0444x faster is-boolean-fold-tricky 3.7085+-0.0479 ? 3.7287+-0.0541 ? is-boolean-fold 2.6088+-0.0409 2.5840+-0.0370 is-function-fold-tricky-internal-function 9.6281+-0.0475 9.6138+-0.0564 is-function-fold-tricky 4.0869+-0.0883 4.0269+-0.0131 might be 1.0149x faster is-function-fold 2.6113+-0.0273 ? 2.6610+-0.0740 ? might be 1.0190x slower is-number-fold-tricky 3.9680+-0.0238 3.9494+-0.0218 is-number-fold 2.6102+-0.0902 2.5914+-0.0377 is-object-or-null-fold-functions 2.6352+-0.0367 2.6154+-0.0148 is-object-or-null-fold-less-tricky 4.0263+-0.0318 ? 4.0399+-0.0559 ? is-object-or-null-fold-tricky 5.0967+-0.0810 ? 5.1401+-0.0779 ? is-object-or-null-fold 2.6048+-0.0246 ? 2.6170+-0.0326 ? is-object-or-null-trickier-function 4.0530+-0.0259 ? 4.0808+-0.0423 ? is-object-or-null-trickier-internal-function 10.4087+-0.0245 ? 10.4341+-0.0301 ? is-object-or-null-tricky-function 4.2729+-0.5903 4.0709+-0.0429 might be 1.0496x faster is-object-or-null-tricky-internal-function 7.6279+-0.0770 ? 7.6668+-0.0391 ? is-string-fold-tricky 3.9740+-0.0375 3.9467+-0.0364 is-string-fold 2.7062+-0.2669 2.5946+-0.0108 might be 1.0430x faster is-undefined-fold-tricky 3.5298+-0.6523 3.2723+-0.0350 might be 1.0787x faster is-undefined-fold 2.5952+-0.0328 2.5769+-0.0171 JSONP-negative-0 0.2306+-0.0066 ? 0.2330+-0.0044 ? might be 1.0106x slower large-int-captured 3.8182+-0.0770 ? 3.9655+-0.4023 ? might be 1.0386x slower large-int-neg 13.5965+-0.0957 13.4574+-0.1114 might be 1.0103x faster large-int 12.8596+-0.2121 ^ 12.2834+-0.1043 ^ definitely 1.0469x faster load-varargs-elimination 20.4611+-0.1151 20.3619+-0.5167 logical-not-weird-types 2.7943+-0.0327 ? 2.8130+-0.0388 ? logical-not 4.1881+-0.0929 4.1317+-0.0920 might be 1.0137x faster lots-of-fields 9.2768+-0.0351 ? 9.3485+-0.1314 ? make-indexed-storage 2.7622+-0.1255 ? 2.7867+-0.0820 ? make-rope-cse 3.6142+-0.1947 3.5394+-0.0647 might be 1.0211x faster marsaglia-larger-ints 31.0072+-0.1509 30.9019+-0.1782 marsaglia-osr-entry 20.4827+-0.1966 ? 20.4976+-0.2141 ? math-with-out-of-bounds-array-values 21.2871+-0.8852 20.9996+-0.2425 might be 1.0137x faster max-boolean 2.6620+-0.0255 ? 2.6812+-0.0408 ? method-on-number 17.6446+-1.0188 17.0884+-0.2900 might be 1.0326x faster min-boolean 2.6280+-0.0459 2.6038+-0.0382 minus-boolean-double 3.0418+-0.0280 3.0226+-0.0210 minus-boolean 2.3189+-0.0242 2.2945+-0.0616 might be 1.0106x faster misc-strict-eq 30.5630+-0.3181 30.3447+-0.2634 mod-boolean-double 10.9570+-0.0672 10.9558+-0.0887 mod-boolean 8.1826+-0.0254 ? 8.2016+-0.0319 ? mul-boolean-double 3.5208+-0.0280 ? 3.5422+-0.0254 ? mul-boolean 2.7512+-0.0292 2.7446+-0.0255 neg-boolean 3.0407+-0.0375 ? 3.0489+-0.0306 ? negative-zero-divide 0.3189+-0.0101 0.3137+-0.0069 might be 1.0168x faster negative-zero-modulo 0.3207+-0.0174 0.3138+-0.0055 might be 1.0220x faster negative-zero-negate 0.2921+-0.0061 ? 0.2951+-0.0090 ? might be 1.0102x slower nested-function-parsing 43.0659+-0.5473 ? 44.3075+-0.7192 ? might be 1.0288x slower new-array-buffer-dead 87.2181+-0.4743 86.9983+-0.7810 new-array-buffer-push 5.9728+-0.0911 ? 5.9843+-0.3223 ? new-array-dead 15.2503+-1.1216 14.8850+-0.7108 might be 1.0245x faster new-array-push 3.3983+-0.1357 3.2422+-0.0998 might be 1.0481x faster no-inline-constructor 30.2000+-0.1538 ? 30.3925+-0.1261 ? number-test 2.8658+-0.0652 2.8444+-0.0397 object-closure-call 4.7395+-0.0530 4.7134+-0.0202 object-get-own-property-symbols-on-large-array 4.1789+-0.1802 4.0983+-0.1465 might be 1.0197x faster object-test 2.5692+-0.0389 ? 2.6155+-0.0464 ? might be 1.0180x slower obvious-sink-pathology-taken 98.0240+-0.5555 ? 98.1800+-0.5243 ? obvious-sink-pathology 93.0514+-0.8599 92.9325+-0.6204 obviously-elidable-new-object 28.0062+-0.2373 27.9471+-0.3017 plus-boolean-arith 2.3344+-0.0427 ? 2.3521+-0.0695 ? plus-boolean-double 3.0469+-0.0422 ? 3.0691+-0.0865 ? plus-boolean 2.5334+-0.0668 2.4851+-0.0422 might be 1.0194x faster poly-chain-access-different-prototypes-simple 3.1917+-0.0301 ? 3.2194+-0.0480 ? poly-chain-access-different-prototypes 2.8075+-0.0406 ? 2.8640+-0.0953 ? might be 1.0201x slower poly-chain-access-simpler 3.1803+-0.0360 ? 3.2227+-0.0642 ? might be 1.0133x slower poly-chain-access 3.1902+-0.0642 ? 3.2209+-0.0367 ? poly-stricteq 49.1909+-0.0836 ? 49.2596+-0.1537 ? polymorphic-array-call 1.1691+-0.0661 ? 1.1803+-0.0735 ? polymorphic-get-by-id 2.7487+-0.0346 2.7416+-0.0316 polymorphic-put-by-id 24.1470+-0.6430 ? 25.2451+-0.8415 ? might be 1.0455x slower polymorphic-structure 12.6327+-0.0388 ? 12.6855+-0.0607 ? polyvariant-monomorphic-get-by-id 6.7895+-0.8216 ? 6.9848+-1.0614 ? might be 1.0288x slower proto-getter-access 8.2133+-0.0831 8.1457+-0.0848 prototype-access-with-mutating-prototype 5.2690+-0.1647 ? 5.3030+-0.1380 ? put-by-id-replace-and-transition 7.8909+-0.3368 7.7716+-0.2225 might be 1.0153x faster put-by-id-slightly-polymorphic 2.5768+-0.0186 ? 2.5801+-0.0438 ? put-by-id 9.5393+-0.1485 9.3793+-0.1828 might be 1.0171x faster put-by-val-direct 0.3170+-0.0069 ? 0.3176+-0.0055 ? put-by-val-large-index-blank-indexing-type 5.2555+-0.1114 5.2181+-0.0968 put-by-val-machine-int 2.2789+-0.1215 ? 2.3076+-0.0578 ? might be 1.0126x slower rare-osr-exit-on-local 14.1663+-0.1829 14.0146+-0.2688 might be 1.0108x faster register-pressure-from-osr 15.9931+-0.0587 ? 16.0367+-0.2525 ? repeat-multi-get-by-offset 21.0583+-0.3340 20.8206+-0.0674 might be 1.0114x faster setter-prototype 7.6321+-0.3081 7.5180+-0.1405 might be 1.0152x faster setter 5.5865+-0.6564 ? 5.6295+-0.7255 ? simple-activation-demo 25.2338+-0.0715 ? 25.2539+-0.1613 ? simple-getter-access 10.4686+-0.2639 10.3486+-0.1008 might be 1.0116x faster simple-poly-call-nested 8.8576+-0.8880 8.5523+-0.7655 might be 1.0357x faster simple-poly-call 1.1551+-0.0312 ? 1.1599+-0.0151 ? sin-boolean 19.5845+-1.1465 19.4984+-1.2468 singleton-scope 59.3394+-0.2162 59.3335+-0.1824 sink-function 9.8853+-0.3878 ? 10.2691+-0.5871 ? might be 1.0388x slower sink-huge-activation 16.6965+-0.3679 ^ 15.9382+-0.3735 ^ definitely 1.0476x faster sinkable-new-object-dag 53.1363+-0.8301 ? 53.2522+-0.3817 ? sinkable-new-object-taken 40.2906+-0.3114 ! 42.2899+-1.5355 ! definitely 1.0496x slower sinkable-new-object 29.3956+-0.4510 29.3117+-0.3099 slow-array-profile-convergence 2.3485+-0.0232 ? 2.3960+-0.0769 ? might be 1.0202x slower slow-convergence 2.2192+-0.0258 ? 2.2236+-0.0362 ? slow-ternaries 16.8416+-0.1292 16.8058+-0.1501 sorting-benchmark 16.1346+-0.3067 16.1222+-0.1711 sparse-conditional 1.0703+-0.0250 ? 1.0750+-0.0478 ? splice-to-remove 11.8197+-0.1963 ? 11.8369+-0.0285 ? string-char-code-at 13.7419+-0.1170 13.7165+-0.0515 string-concat-object 2.1486+-0.0698 2.1321+-0.0623 string-concat-pair-object 2.1322+-0.0985 2.1102+-0.0412 might be 1.0105x faster string-concat-pair-simple 9.2304+-0.1709 9.1721+-0.2021 string-concat-simple 9.3719+-0.2161 9.3657+-0.2099 string-cons-repeat 6.1075+-0.0452 ? 6.1258+-0.0476 ? string-cons-tower 6.3469+-0.0645 ? 6.6184+-0.5822 ? might be 1.0428x slower string-equality 18.2658+-0.0413 ? 18.3156+-0.1398 ? string-get-by-val-big-char 6.4338+-0.0550 ? 6.4703+-0.0742 ? string-get-by-val-out-of-bounds-insane 3.0786+-0.0439 3.0509+-0.0565 string-get-by-val-out-of-bounds 3.9401+-0.0407 ? 3.9517+-0.0979 ? string-get-by-val 2.7562+-0.0264 ? 2.7853+-0.0579 ? might be 1.0106x slower string-hash 1.7682+-0.0438 ? 1.7694+-0.0181 ? string-long-ident-equality 12.1567+-0.0817 ? 12.2990+-0.2500 ? might be 1.0117x slower string-out-of-bounds 10.7607+-0.1621 ^ 10.0345+-0.2769 ^ definitely 1.0724x faster string-repeat-arith 26.8748+-1.3202 25.9759+-0.2009 might be 1.0346x faster string-sub 54.4029+-0.2548 ^ 50.4341+-0.1297 ^ definitely 1.0787x faster string-test 2.7346+-0.0385 ^ 2.6511+-0.0208 ^ definitely 1.0315x faster string-var-equality 25.0081+-0.0847 ? 25.1999+-0.6332 ? structure-hoist-over-transitions 2.3070+-0.0613 ? 2.3373+-0.0217 ? might be 1.0132x slower substring-concat-weird 37.5119+-1.7423 36.1075+-0.3865 might be 1.0389x faster substring-concat 39.8169+-0.3592 38.9979+-0.7159 might be 1.0210x faster substring 44.2028+-0.1596 44.0794+-0.2848 switch-char-constant 2.5908+-0.0355 2.5766+-0.0390 switch-char 5.5349+-0.8283 5.5056+-0.6077 switch-constant 8.8965+-0.7128 8.1693+-0.3282 might be 1.0890x faster switch-string-basic-big-var 13.4647+-0.0648 ? 13.6749+-0.4676 ? might be 1.0156x slower switch-string-basic-big 15.3930+-3.2755 14.2186+-0.4210 might be 1.0826x faster switch-string-basic-var 12.6572+-0.1176 ? 12.7267+-0.1926 ? switch-string-basic 12.3922+-0.0682 ? 12.3944+-0.1253 ? switch-string-big-length-tower-var 17.1714+-0.0378 ? 17.2591+-0.0962 ? switch-string-length-tower-var 12.7102+-0.1795 12.6801+-0.1005 switch-string-length-tower 11.4430+-0.1387 11.4159+-0.0704 switch-string-short 11.4859+-0.0800 ? 11.5287+-0.2144 ? switch 11.4172+-0.4047 11.0317+-0.3679 might be 1.0349x faster tear-off-arguments-simple 3.0115+-0.0938 ? 3.0135+-0.0891 ? tear-off-arguments 3.9042+-0.0837 ? 3.9290+-0.0393 ? temporal-structure 11.7858+-0.1488 ? 11.7885+-0.1248 ? to-int32-boolean 12.1361+-0.0474 ? 12.1410+-0.0487 ? try-catch-get-by-val-cloned-arguments 13.6319+-0.1312 ^ 13.3566+-0.1058 ^ definitely 1.0206x faster try-catch-get-by-val-direct-arguments 6.5285+-0.8618 6.2223+-0.0574 might be 1.0492x faster try-catch-get-by-val-scoped-arguments 7.3409+-0.0580 7.2933+-0.0840 typed-array-get-set-by-val-profiling 26.2068+-0.4291 ? 26.2997+-0.3264 ? undefined-property-access 224.1710+-1.4354 222.8484+-0.8984 undefined-test 2.8452+-0.0510 2.7933+-0.0408 might be 1.0186x faster unprofiled-licm 13.8447+-0.2679 13.4341+-0.1693 might be 1.0306x faster varargs-call 12.9657+-0.0781 ? 12.9774+-0.0930 ? varargs-construct-inline 21.5682+-0.2146 ? 21.7564+-0.4625 ? varargs-construct 19.2841+-0.1096 19.2502+-0.0962 varargs-inline 8.2344+-0.1278 ? 8.2966+-0.0736 ? varargs-strict-mode 8.9471+-0.1015 8.9078+-0.0874 varargs 8.8835+-0.0719 8.8541+-0.0509 weird-inlining-const-prop 2.0304+-0.1507 ? 2.0457+-0.1232 ? <geometric> 7.4659+-0.0084 ^ 7.4356+-0.0133 ^ definitely 1.0041x faster TipOfTree BetterRangePhase AsmBench: bigfib.cpp 457.5862+-5.9917 451.4442+-5.5006 might be 1.0136x faster cray.c 396.6399+-1.4649 ? 397.1593+-2.9399 ? dry.c 422.3215+-6.5909 ? 427.4141+-2.5018 ? might be 1.0121x slower FloatMM.c 684.9059+-2.9661 ? 685.5841+-2.7287 ? gcc-loops.cpp 3420.6547+-14.2443 ? 3451.4038+-78.5523 ? n-body.c 826.1157+-4.9183 824.4326+-3.0460 Quicksort.c 408.1837+-2.5891 ? 408.6560+-2.6194 ? stepanov_container.cpp 3575.2595+-23.9858 3563.6010+-17.5153 Towers.c 233.4927+-1.2216 ? 234.2791+-2.0311 ? <geometric> 717.7194+-2.5103 ? 718.4167+-2.2634 ? might be 1.0010x slower TipOfTree BetterRangePhase CompressionBench: huffman 59.3516+-0.7379 59.3001+-0.9497 arithmetic-simple 272.1458+-2.0620 ? 273.5842+-3.5567 ? arithmetic-precise 245.2025+-2.5290 ? 246.1637+-2.5285 ? arithmetic-complex-precise 244.1802+-2.8239 ? 249.1379+-4.9275 ? might be 1.0203x slower arithmetic-precise-order-0 281.3200+-1.3554 ? 281.8043+-1.6782 ? arithmetic-precise-order-1 302.0360+-0.7118 ? 328.6138+-61.7783 ? might be 1.0880x slower arithmetic-precise-order-2 352.2339+-3.6777 ? 354.8166+-3.4909 ? arithmetic-simple-order-1 325.4685+-2.6654 ? 326.3462+-2.8219 ? arithmetic-simple-order-2 386.3940+-7.8857 381.1298+-2.9513 might be 1.0138x faster lz-string 314.2741+-3.4966 310.5375+-4.3828 might be 1.0120x faster <geometric> 254.5743+-1.2129 ? 256.7024+-4.5282 ? might be 1.0084x slower TipOfTree BetterRangePhase Geomean of preferred means: <scaled-result> 50.3760+-0.1162 ? 50.5272+-0.2232 ? might be 1.0030x slower
Created attachment 259496 [details] the patch
Attachment 259496 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:801: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:819: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1641: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 3 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 259496 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=259496&action=review > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:527 > + // This is more vague than other. Other is more specific than this. This is less specific than > + // other. Other is less vague than this. > + ASSERT(vagueness() > other.vagueness()); Seems redundant with your precondition ASSERTs + the previous branch. > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:808 > + static_cast<int64_t>(1) + upper - static_cast<int64_t>(thisRight), If thisRight == upper + 3; the offset is -1. The resulting relation is: left < thisRight - 1 which is different from left < upper + 1 I have not yet read what follow but I assume you forbid this by API contract. It would be good to make such bounds explicit through a ASSERT_WITH_MESSAGE on entry. > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:844 > + if (m_offset >= -1 && m_offset <= 1) This is a useful check, it would be nice to have a small helper function to name it. > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:857 > + makeUpper(std::max(thisEffectiveRight, otherEffectiveRight)); > + makeLower(std::min(thisEffectiveRight, otherEffectiveRight)); I was wondering if we could have offsets with constants. It seems that merging: @a < 1 @a > 0 @a > 100 @a < 99 would give us that case. Do we have tests for that? > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:866 > + // Other is: @x < otherEffectiveRight > + // This is @x == thisEffectiveRight I would flip the comments to match the switch() order. > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:879 > + // Other is: @x > otherEffectiveRight > + // This is: @x == thisEffectiveRight Ditto. > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1484 > + // - @x > @c and @x != @d where @c == @d + k and k <= 0 > + // > + // @x > @c and @x > @d - k I don't get this one. Let say @c = 5, @d = 10; k = -5, @c = @d + k; -> @x > @d - (-5) -> @x > 15 Did you mean @x > @d + k here? > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1492 > + // that. Otherwise, find all NotEqual constant oeprations and refine them to be LessThan or typo: "oeprations"
(In reply to comment #10) > Comment on attachment 259496 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=259496&action=review > > > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:527 > > + // This is more vague than other. Other is more specific than this. This is less specific than > > + // other. Other is less vague than this. > > + ASSERT(vagueness() > other.vagueness()); > > Seems redundant with your precondition ASSERTs + the previous branch. Removed. > > > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:808 > > + static_cast<int64_t>(1) + upper - static_cast<int64_t>(thisRight), > > If > thisRight == upper + 3; > the offset is -1. The resulting relation is: > left < thisRight - 1 > which is different from > left < upper + 1 It is different, but it's also sound. During merging, we can create a looser relation - one that is more likely to be true. It's correct to say left < x + 1 if we know that left < x. Here, we want to say left < upper + 1, but we want to say it in terms of thisRight while creating a general relationship (offset is one of -1,0,1). Since thisRight - 1 is: thisRight - 1 = upper + 3 - 1 = upper + 2 We are saying that left < upper + 2 instead of saying left < upper +1, which is fine, according to the widening rule. > > I have not yet read what follow but I assume you forbid this by API > contract. It would be good to make such bounds explicit through a > ASSERT_WITH_MESSAGE on entry. > > > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:844 > > + if (m_offset >= -1 && m_offset <= 1) > > This is a useful check, it would be nice to have a small helper function to > name it. OK, I'll look at if there is a place to put it. > > > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:857 > > + makeUpper(std::max(thisEffectiveRight, otherEffectiveRight)); > > + makeLower(std::min(thisEffectiveRight, otherEffectiveRight)); > > I was wondering if we could have offsets with constants. > > It seems that merging: > @a < 1 > @a > 0 > @a > 100 > @a < 99 > would give us that case. > > Do we have tests for that? The two tests I added trigger this. > > > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:866 > > + // Other is: @x < otherEffectiveRight > > + // This is @x == thisEffectiveRight > > I would flip the comments to match the switch() order. OK! > > > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:879 > > + // Other is: @x > otherEffectiveRight > > + // This is: @x == thisEffectiveRight > > Ditto. Fixed. > > > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1484 > > + // - @x > @c and @x != @d where @c == @d + k and k <= 0 > > + // > > + // @x > @c and @x > @d - k > > I don't get this one. > > Let say @c = 5, @d = 10; > k = -5, @c = @d + k; > -> @x > @d - (-5) > -> @x > 15 > > Did you mean @x > @d + k here? It's a good thing I didn't implement this case! You're right, I fixed the comment. > > > Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:1492 > > + // that. Otherwise, find all NotEqual constant oeprations and refine them to be LessThan or > > typo: "oeprations" Fixed.
Landed in http://trac.webkit.org/changeset/188720