Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Refactorings for Rust 1.59 #1867

Closed
wants to merge 6 commits into from
Closed

Conversation

RageKnify
Copy link
Contributor

This Pull Request fixes new lint errors and warnings introduced in rust 1.59

Each commit describes its changse.

@RageKnify RageKnify added the Internal Category for changelog label Feb 24, 2022
@RageKnify RageKnify changed the title Rust 1.59 Refactorings for Rust 1.59 Feb 24, 2022
@github-actions
Copy link

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 88,342 88,342 0
Passed 41,386 41,386 0
Ignored 21,413 21,413 0
Failed 25,543 25,543 0
Panics 12 12 0
Conformance 46.85% 46.85% 0.00%

@codecov
Copy link

codecov bot commented Feb 24, 2022

Codecov Report

Merging #1867 (4a2dc52) into main (9dda8d3) will decrease coverage by 8.77%.
The diff coverage is 9.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1867      +/-   ##
==========================================
- Coverage   56.26%   47.48%   -8.78%     
==========================================
  Files         201      201              
  Lines       17940    16407    -1533     
==========================================
- Hits        10094     7791    -2303     
- Misses       7846     8616     +770     
Impacted Files Coverage Δ
boa_engine/src/builtins/array_buffer/mod.rs 8.00% <0.00%> (+0.59%) ⬆️
boa_engine/src/builtins/dataview/mod.rs 9.18% <ø> (+2.36%) ⬆️
...src/builtins/typed_array/integer_indexed_object.rs 0.00% <0.00%> (ø)
boa_engine/src/builtins/typed_array/mod.rs 3.65% <0.00%> (-0.16%) ⬇️
boa_engine/src/object/mod.rs 21.07% <ø> (-8.53%) ⬇️
boa_engine/src/property/mod.rs 48.53% <ø> (-14.86%) ⬇️
boa_engine/src/value/display.rs 80.43% <ø> (-0.88%) ⬇️
boa_engine/src/bytecompiler.rs 40.31% <20.00%> (-17.73%) ⬇️
boa_engine/src/value/equality.rs 90.00% <50.00%> (+6.07%) ⬆️
boa_engine/src/object/jsobject.rs 50.31% <100.00%> (-14.39%) ⬇️
... and 190 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9dda8d3...4a2dc52. Read the comment docs.

@github-actions
Copy link

Benchmark for b664aa5

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 529.1±23.82ns 638.3±67.72ns +20.64%
Arithmetic operations (Execution) 1755.4±162.19ns 1740.0±45.72ns -0.88%
Arithmetic operations (Parser) 4.7±0.12µs 6.3±0.08µs +34.04%
Array access (Compiler) 1238.0±38.13ns 1653.0±60.96ns +33.52%
Array access (Execution) 10.5±0.38µs 11.3±0.74µs +7.62%
Array access (Parser) 10.4±0.28µs 14.3±0.60µs +37.50%
Array creation (Compiler) 1750.9±51.99ns 2.3±0.07µs +31.36%
Array creation (Execution) 2.9±0.09ms 3.3±0.30ms +13.79%
Array creation (Parser) 11.6±0.27µs 15.9±0.62µs +37.07%
Array pop (Compiler) 3.5±0.11µs 4.6±0.19µs +31.43%
Array pop (Execution) 1278.7±41.80µs 1408.8±103.81µs +10.17%
Array pop (Parser) 121.8±3.14µs 129.9±6.73µs +6.65%
Boolean Object Access (Compiler) 1086.0±35.16ns 1397.7±34.29ns +28.70%
Boolean Object Access (Execution) 5.5±0.26µs 5.6±0.25µs +1.82%
Boolean Object Access (Parser) 12.4±0.20µs 16.9±0.27µs +36.29%
Clean js (Compiler) 3.4±0.12µs 3.9±0.42µs +14.71%
Clean js (Execution) 985.5±32.08µs 1010.5±30.93µs +2.54%
Clean js (Parser) 25.7±1.07µs 34.8±0.67µs +35.41%
Create Realm 238.6±4.42ns 325.5±7.64ns +36.42%
Dynamic Object Property Access (Compiler) 1568.7±40.44ns 2.1±0.10µs +33.87%
Dynamic Object Property Access (Execution) 7.0±0.16µs 7.7±0.92µs +10.00%
Dynamic Object Property Access (Parser) 9.3±0.23µs 13.0±0.69µs +39.78%
Fibonacci (Compiler) 2.3±0.06µs 2.7±0.24µs +17.39%
Fibonacci (Execution) 1775.2±52.29µs 2.1±0.11ms +18.30%
Fibonacci (Parser) 14.4±0.71µs 19.2±0.82µs +33.33%
For loop (Compiler) 1872.8±62.13ns 2.4±0.07µs +28.15%
For loop (Execution) 40.3±1.39µs 41.1±1.61µs +1.99%
For loop (Parser) 12.1±0.43µs 16.5±0.43µs +36.36%
Mini js (Compiler) 3.2±0.13µs 3.4±0.31µs +6.25%
Mini js (Execution) 892.9±19.67µs 921.9±26.84µs +3.25%
Mini js (Parser) 22.8±2.31µs 30.0±0.94µs +31.58%
Number Object Access (Compiler) 1018.1±30.74ns 1337.7±42.02ns +31.39%
Number Object Access (Execution) 4.3±0.28µs 4.4±0.16µs +2.33%
Number Object Access (Parser) 9.7±0.34µs 12.9±0.55µs +32.99%
Object Creation (Compiler) 1368.8±38.98ns 1751.6±40.81ns +27.97%
Object Creation (Execution) 6.4±0.33µs 8.1±0.38µs +26.56%
Object Creation (Parser) 8.1±0.36µs 11.0±0.17µs +35.80%
RegExp (Compiler) 1633.3±79.10ns 2.1±0.06µs +28.57%
RegExp (Execution) 13.3±0.59µs 12.4±0.75µs -6.77%
RegExp (Parser) 8.8±0.21µs 12.0±0.47µs +36.36%
RegExp Creation (Compiler) 1381.5±75.32ns 1790.2±35.72ns +29.58%
RegExp Creation (Execution) 9.5±0.25µs 9.5±0.54µs 0.00%
RegExp Creation (Parser) 7.4±0.30µs 9.6±0.50µs +29.73%
RegExp Literal (Compiler) 1571.8±33.50ns 2.1±0.05µs +33.60%
RegExp Literal (Execution) 12.8±0.18µs 13.1±1.29µs +2.34%
RegExp Literal (Parser) 7.1±0.23µs 9.6±0.27µs +35.21%
RegExp Literal Creation (Compiler) 1375.6±69.63ns 1631.0±125.31ns +18.57%
RegExp Literal Creation (Execution) 9.4±0.23µs 9.3±0.45µs -1.06%
RegExp Literal Creation (Parser) 5.6±0.20µs 7.8±0.29µs +39.29%
Static Object Property Access (Compiler) 1385.3±67.98ns 1752.1±42.36ns +26.48%
Static Object Property Access (Execution) 6.8±1.30µs 8.1±0.41µs +19.12%
Static Object Property Access (Parser) 8.7±0.37µs 11.8±0.18µs +35.63%
String Object Access (Compiler) 1470.9±45.40ns 1915.7±74.52ns +30.24%
String Object Access (Execution) 7.2±0.29µs 7.7±0.71µs +6.94%
String Object Access (Parser) 12.3±0.41µs 16.6±0.38µs +34.96%
String comparison (Compiler) 2.1±0.07µs 2.7±0.20µs +28.57%
String comparison (Execution) 6.0±0.14µs 5.8±0.25µs -3.33%
String comparison (Parser) 9.7±0.33µs 12.5±0.92µs +28.87%
String concatenation (Compiler) 1597.7±42.50ns 2.1±0.20µs +31.44%
String concatenation (Execution) 5.4±0.25µs 5.6±0.22µs +3.70%
String concatenation (Parser) 6.7±0.23µs 9.2±0.20µs +37.31%
String copy (Compiler) 1259.6±37.98ns 1599.7±53.86ns +27.00%
String copy (Execution) 4.8±0.22µs 4.9±0.43µs +2.08%
String copy (Parser) 5.3±0.43µs 5.4±0.43µs +1.89%
Symbols (Compiler) 883.7±26.57ns 1144.9±47.75ns +29.56%
Symbols (Execution) 4.8±0.13µs 4.8±0.33µs 0.00%
Symbols (Parser) 3.8±0.09µs 5.2±0.12µs +36.84%

@github-actions
Copy link

Benchmark for 1a7a4d7

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 465.5±1.05ns 475.5±3.27ns +2.15%
Arithmetic operations (Execution) 1914.3±2.18ns 1972.1±2.23ns +3.02%
Arithmetic operations (Parser) 5.1±0.03µs 5.1±0.01µs 0.00%
Array access (Compiler) 1181.0±9.24ns 1194.3±2.92ns +1.13%
Array access (Execution) 10.4±0.02µs 10.3±0.03µs -0.96%
Array access (Parser) 11.6±0.03µs 11.6±0.03µs 0.00%
Array creation (Compiler) 1786.3±4.25ns 1770.4±6.10ns -0.89%
Array creation (Execution) 3.1±0.00ms 3.1±0.01ms 0.00%
Array creation (Parser) 13.0±0.05µs 13.1±0.03µs +0.77%
Array pop (Compiler) 3.8±0.01µs 3.8±0.02µs 0.00%
Array pop (Execution) 1385.3±3.44µs 1375.8±2.54µs -0.69%
Array pop (Parser) 129.6±1.21µs 129.2±0.09µs -0.31%
Boolean Object Access (Compiler) 1060.7±2.26ns 1048.0±2.90ns -1.20%
Boolean Object Access (Execution) 5.6±0.01µs 5.7±0.01µs +1.79%
Boolean Object Access (Parser) 14.2±0.01µs 14.2±0.01µs 0.00%
Clean js (Compiler) 3.3±0.02µs 3.3±0.02µs 0.00%
Clean js (Execution) 1082.9±11.65µs 1079.5±7.90µs -0.31%
Clean js (Parser) 28.0±0.03µs 28.2±0.03µs +0.71%
Create Realm 280.1±2.22ns 261.2±1.88ns -6.75%
Dynamic Object Property Access (Compiler) 1539.8±7.95ns 1549.2±6.95ns +0.61%
Dynamic Object Property Access (Execution) 6.6±0.02µs 6.6±0.03µs 0.00%
Dynamic Object Property Access (Parser) 10.3±0.03µs 10.4±0.02µs +0.97%
Fibonacci (Compiler) 2.2±0.01µs 2.2±0.01µs 0.00%
Fibonacci (Execution) 1737.1±3.69µs 1736.9±35.06µs -0.01%
Fibonacci (Parser) 15.7±0.09µs 15.7±0.03µs 0.00%
For loop (Compiler) 1874.4±6.77ns 1899.4±4.55ns +1.33%
For loop (Execution) 42.4±0.14µs 43.0±0.18µs +1.42%
For loop (Parser) 13.4±0.02µs 13.4±0.02µs 0.00%
Mini js (Compiler) 3.2±0.01µs 3.2±0.01µs 0.00%
Mini js (Execution) 994.6±7.11µs 989.8±6.43µs -0.48%
Mini js (Parser) 24.5±0.03µs 24.5±0.03µs 0.00%
Number Object Access (Compiler) 984.0±0.85ns 987.3±0.73ns +0.34%
Number Object Access (Execution) 4.4±0.01µs 4.6±0.02µs +4.55%
Number Object Access (Parser) 11.0±0.02µs 10.9±0.01µs -0.91%
Object Creation (Compiler) 1304.5±2.26ns 1317.4±8.01ns +0.99%
Object Creation (Execution) 5.9±0.02µs 6.0±0.02µs +1.69%
Object Creation (Parser) 9.0±0.03µs 9.1±0.02µs +1.11%
RegExp (Compiler) 1548.5±2.98ns 1550.0±2.71ns +0.10%
RegExp (Execution) 12.3±0.06µs 12.3±0.09µs 0.00%
RegExp (Parser) 9.9±0.02µs 10.0±0.02µs +1.01%
RegExp Creation (Compiler) 1320.8±2.83ns 1333.4±2.74ns +0.95%
RegExp Creation (Execution) 9.3±0.03µs 9.3±0.03µs 0.00%
RegExp Creation (Parser) 8.3±0.03µs 8.3±0.02µs 0.00%
RegExp Literal (Compiler) 1534.2±3.28ns 1533.2±2.67ns -0.07%
RegExp Literal (Execution) 12.3±0.06µs 12.4±0.18µs +0.81%
RegExp Literal (Parser) 8.0±0.02µs 8.0±0.08µs 0.00%
RegExp Literal Creation (Compiler) 1316.5±2.22ns 1329.5±1.81ns +0.99%
RegExp Literal Creation (Execution) 9.3±0.04µs 9.3±0.05µs 0.00%
RegExp Literal Creation (Parser) 6.3±0.02µs 6.4±0.06µs +1.59%
Static Object Property Access (Compiler) 1306.8±2.89ns 1347.9±8.46ns +3.15%
Static Object Property Access (Execution) 6.2±0.03µs 6.3±0.02µs +1.61%
Static Object Property Access (Parser) 9.7±0.03µs 9.7±0.02µs 0.00%
String Object Access (Compiler) 1414.0±4.93ns 1414.2±7.16ns +0.01%
String Object Access (Execution) 7.3±0.02µs 7.5±0.02µs +2.74%
String Object Access (Parser) 13.9±0.01µs 13.8±0.02µs -0.72%
String comparison (Compiler) 1997.2±3.06ns 2.0±0.02µs +0.14%
String comparison (Execution) 5.7±0.02µs 5.8±0.02µs +1.75%
String comparison (Parser) 10.9±0.08µs 10.9±0.05µs 0.00%
String concatenation (Compiler) 1568.1±4.13ns 1538.0±2.37ns -1.92%
String concatenation (Execution) 5.2±0.02µs 5.2±0.02µs 0.00%
String concatenation (Parser) 7.4±0.03µs 7.4±0.03µs 0.00%
String copy (Compiler) 1232.0±2.89ns 1219.4±2.46ns -1.02%
String copy (Execution) 4.7±0.01µs 4.7±0.01µs 0.00%
String copy (Parser) 5.5±0.01µs 5.5±0.01µs 0.00%
Symbols (Compiler) 854.0±3.13ns 843.3±2.25ns -1.25%
Symbols (Execution) 4.4±0.01µs 4.5±0.01µs +2.27%
Symbols (Parser) 4.3±0.01µs 4.3±0.01µs 0.00%

@raskad
Copy link
Member

raskad commented Feb 24, 2022

@RageKnify I'm guessing the codecov job fails because the coverage reduction is so big? But the coverage difference doesn't make much sense to me. There should not really be a difference right?

Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the idea of renaming the typed arrays. We use the spec names in order to easier see the direct relationship. The rest looks good.

boa_engine/src/builtins/array_buffer/mod.rs Outdated Show resolved Hide resolved
boa_engine/src/builtins/mod.rs Outdated Show resolved Hide resolved
@RageKnify RageKnify requested a review from Razican February 26, 2022 14:01
@github-actions
Copy link

Benchmark for 9901f3c

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 463.0±1.09ns 472.3±1.36ns +2.01%
Arithmetic operations (Execution) 1920.3±2.29ns 1950.8±12.57ns +1.59%
Arithmetic operations (Parser) 5.2±0.01µs 5.2±0.00µs 0.00%
Array access (Compiler) 1211.8±3.19ns 1197.5±2.95ns -1.18%
Array access (Execution) 10.3±0.06µs 10.2±0.05µs -0.97%
Array access (Parser) 11.5±0.04µs 11.6±0.03µs +0.87%
Array creation (Compiler) 1753.3±4.61ns 1805.6±36.66ns +2.98%
Array creation (Execution) 3.0±0.00ms 3.0±0.00ms 0.00%
Array creation (Parser) 13.0±0.06µs 13.0±0.04µs 0.00%
Array pop (Compiler) 3.8±0.01µs 3.8±0.01µs 0.00%
Array pop (Execution) 1380.0±3.32µs 1375.5±3.26µs -0.33%
Array pop (Parser) 129.2±0.51µs 129.3±0.20µs +0.08%
Boolean Object Access (Compiler) 1051.8±2.10ns 1050.5±1.86ns -0.12%
Boolean Object Access (Execution) 5.7±0.01µs 5.6±0.01µs -1.75%
Boolean Object Access (Parser) 14.2±0.01µs 14.3±0.01µs +0.70%
Clean js (Compiler) 3.3±0.02µs 3.4±0.01µs +3.03%
Clean js (Execution) 1079.7±6.59µs 1078.0±21.61µs -0.16%
Clean js (Parser) 28.1±0.03µs 28.2±0.19µs +0.36%
Create Realm 261.2±1.21ns 262.8±0.23ns +0.61%
Dynamic Object Property Access (Compiler) 1531.8±3.43ns 1545.8±2.96ns +0.91%
Dynamic Object Property Access (Execution) 6.6±0.03µs 6.6±0.02µs 0.00%
Dynamic Object Property Access (Parser) 10.4±0.03µs 10.3±0.02µs -0.96%
Fibonacci (Compiler) 2.2±0.01µs 2.2±0.01µs 0.00%
Fibonacci (Execution) 1745.5±5.01µs 1743.7±11.02µs -0.10%
Fibonacci (Parser) 15.7±0.01µs 15.7±0.01µs 0.00%
For loop (Compiler) 1858.8±4.23ns 1878.3±4.48ns +1.05%
For loop (Execution) 42.4±0.17µs 42.1±0.17µs -0.71%
For loop (Parser) 13.4±0.04µs 13.3±0.02µs -0.75%
Mini js (Compiler) 3.2±0.01µs 3.2±0.01µs 0.00%
Mini js (Execution) 991.8±6.05µs 989.7±6.91µs -0.21%
Mini js (Parser) 24.6±0.02µs 24.6±0.03µs 0.00%
Number Object Access (Compiler) 982.9±1.29ns 988.3±1.21ns +0.55%
Number Object Access (Execution) 4.5±0.01µs 4.4±0.01µs -2.22%
Number Object Access (Parser) 11.0±0.01µs 11.0±0.01µs 0.00%
Object Creation (Compiler) 1330.0±1.86ns 1299.1±4.14ns -2.32%
Object Creation (Execution) 5.9±0.02µs 5.9±0.02µs 0.00%
Object Creation (Parser) 9.1±0.04µs 9.0±0.06µs -1.10%
RegExp (Compiler) 1557.9±2.59ns 1527.7±12.54ns -1.94%
RegExp (Execution) 12.3±0.06µs 12.3±0.06µs 0.00%
RegExp (Parser) 9.9±0.02µs 9.9±0.02µs 0.00%
RegExp Creation (Compiler) 1349.8±2.72ns 1328.4±2.15ns -1.59%
RegExp Creation (Execution) 9.3±0.03µs 9.3±0.03µs 0.00%
RegExp Creation (Parser) 8.3±0.03µs 8.3±0.02µs 0.00%
RegExp Literal (Compiler) 1550.8±4.01ns 1546.9±2.94ns -0.25%
RegExp Literal (Execution) 12.2±0.06µs 12.3±0.06µs +0.82%
RegExp Literal (Parser) 8.0±0.02µs 8.0±0.02µs 0.00%
RegExp Literal Creation (Compiler) 1317.5±1.49ns 1326.6±2.02ns +0.69%
RegExp Literal Creation (Execution) 9.3±0.04µs 9.4±0.06µs +1.08%
RegExp Literal Creation (Parser) 6.3±0.02µs 6.4±0.01µs +1.59%
Static Object Property Access (Compiler) 1328.2±3.37ns 1346.5±3.80ns +1.38%
Static Object Property Access (Execution) 6.2±0.02µs 6.2±0.02µs 0.00%
Static Object Property Access (Parser) 9.7±0.02µs 9.7±0.02µs 0.00%
String Object Access (Compiler) 1426.1±5.67ns 1409.2±4.63ns -1.19%
String Object Access (Execution) 7.3±0.02µs 7.3±0.01µs 0.00%
String Object Access (Parser) 14.0±0.02µs 13.9±0.01µs -0.71%
String comparison (Compiler) 1988.2±2.82ns 1990.3±3.19ns +0.11%
String comparison (Execution) 5.7±0.04µs 5.7±0.02µs 0.00%
String comparison (Parser) 10.7±0.08µs 10.8±0.05µs +0.93%
String concatenation (Compiler) 1568.4±3.11ns 1553.2±2.43ns -0.97%
String concatenation (Execution) 5.2±0.02µs 5.1±0.02µs -1.92%
String concatenation (Parser) 7.4±0.08µs 7.4±0.03µs 0.00%
String copy (Compiler) 1246.1±3.07ns 1212.9±3.94ns -2.66%
String copy (Execution) 4.6±0.01µs 4.6±0.01µs 0.00%
String copy (Parser) 5.5±0.02µs 5.5±0.01µs 0.00%
Symbols (Compiler) 841.3±2.45ns 839.4±2.04ns -0.23%
Symbols (Execution) 4.3±0.01µs 4.4±0.01µs +2.33%
Symbols (Parser) 4.3±0.02µs 4.3±0.01µs 0.00%

@RageKnify
Copy link
Contributor Author

bors r+

bors bot pushed a commit that referenced this pull request Feb 26, 2022
This Pull Request fixes new lint errors and warnings introduced in rust 1.59

Each commit describes its changse.

Co-authored-by: raskad <32105367+raskad@users.noreply.github.com>
@bors
Copy link

bors bot commented Feb 26, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Refactorings for Rust 1.59 [Merged by Bors] - Refactorings for Rust 1.59 Feb 26, 2022
@bors bors bot closed this Feb 26, 2022
@bors bors bot deleted the rust-1.59 branch February 26, 2022 18:38
@RageKnify RageKnify added this to the v0.14.0 milestone Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal Category for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants