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

Add primitive promotion for method calls on GetField #1085

Merged
merged 2 commits into from
Jan 20, 2021

Conversation

RageKnify
Copy link
Contributor

@RageKnify RageKnify commented Jan 20, 2021

It changes the following:

  • Add primitive promotion to objects for method calls on primitives when non const GetField is used
  • Remove a forgotten TODO comment

@RageKnify RageKnify added the execution Issues or PRs related to code execution label Jan 20, 2021
@RageKnify RageKnify added this to the v0.12.0 milestone Jan 20, 2021
@github-actions
Copy link

Test262 conformance changes:

Test result master count PR count difference
Total 78,497 78,497 0
Passed 24,813 24,827 +14
Ignored 15,587 15,587 0
Failed 38,097 38,083 -14
Panics 20 20 0
Conformance 31.61 31.63 +0.02%

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #1085 (03cf4a4) into master (5a5061c) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1085      +/-   ##
==========================================
- Coverage   58.70%   58.68%   -0.02%     
==========================================
  Files         176      176              
  Lines       12391    12407      +16     
==========================================
+ Hits         7274     7281       +7     
- Misses       5117     5126       +9     
Impacted Files Coverage Δ
boa/src/value/mod.rs 73.68% <ø> (ø)
boa/src/syntax/ast/node/call/mod.rs 83.33% <66.66%> (-1.45%) ⬇️
boa/src/builtins/map/ordered_map.rs 57.57% <0.00%> (-6.07%) ⬇️
boa/src/builtins/map/mod.rs 71.08% <0.00%> (-1.29%) ⬇️

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 5a5061c...03cf4a4. Read the comment docs.

@github-actions
Copy link

Benchmark for 27a4220

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 327.5±9.50ns 367.0±36.80ns -10.76%
Arithmetic operations (Full) 227.3±15.06µs 248.2±13.94µs -8.42%
Array access (Execution) 6.1±0.38µs 6.0±0.20µs +1.67%
Array access (Full) 251.0±13.53µs 271.4±10.64µs -7.52%
Array creation (Execution) 2.6±0.16ms 2.5±0.12ms +4.00%
Array creation (Full) 3.0±0.12ms 3.2±0.18ms -6.25%
Array pop (Execution) 807.9±19.51µs 816.3±33.00µs -1.03%
Array pop (Full) 1279.0±51.00µs 1388.2±58.66µs -7.87%
Boolean Object Access (Execution) 4.9±0.25µs 5.6±0.74µs -12.50%
Boolean Object Access (Full) 247.1±10.41µs 269.4±22.95µs -8.28%
Clean js (Execution) 623.4±18.02µs 728.8±49.49µs -14.46%
Clean js (Full) 908.6±42.56µs 945.5±57.05µs -3.90%
Clean js (Parser) 40.0±1.87µs 38.1±1.12µs +4.99%
Create Realm 419.4±20.87ns 393.1±13.22ns +6.69%
Dynamic Object Property Access (Execution) 5.1±0.42µs 5.0±0.21µs +2.00%
Dynamic Object Property Access (Full) 246.0±8.14µs 272.7±18.39µs -9.79%
Expression (Parser) 6.9±0.58µs 6.2±0.17µs +11.29%
Fibonacci (Execution) 857.4±25.22µs 871.4±40.06µs -1.61%
Fibonacci (Full) 1098.4±30.70µs 1211.5±61.35µs -9.34%
For loop (Execution) 21.7±0.67µs 21.4±0.69µs +1.40%
For loop (Full) 269.3±11.81µs 292.0±12.01µs -7.77%
For loop (Parser) 18.9±0.69µs 18.5±0.92µs +2.16%
Goal Symbols (Parser) 13.0±0.57µs 12.8±0.42µs +1.56%
Hello World (Parser) 3.7±0.30µs 3.4±0.10µs +8.82%
Long file (Parser) 717.7±50.52ns 710.7±30.07ns +0.98%
Mini js (Execution) 552.9±21.61µs 624.4±30.35µs -11.45%
Mini js (Full) 835.7±51.31µs 828.6±38.44µs +0.86%
Mini js (Parser) 34.4±1.25µs 33.8±1.12µs +1.78%
Number Object Access (Execution) 3.8±0.12µs 3.9±0.33µs -2.56%
Number Object Access (Full) 241.1±7.44µs 258.1±10.83µs -6.59%
Object Creation (Execution) 4.2±0.21µs 4.3±0.37µs -2.33%
Object Creation (Full) 244.1±10.14µs 262.5±16.19µs -7.01%
RegExp (Execution) 8.9±0.36µs 9.0±0.35µs -1.11%
RegExp (Full) 258.7±9.49µs 287.6±15.66µs -10.05%
RegExp Literal (Execution) 10.4±0.69µs 10.3±0.53µs +0.97%
RegExp Literal (Full) 253.2±9.58µs 275.4±11.52µs -8.06%
RegExp Literal Creation (Execution) 8.9±0.43µs 9.1±0.45µs -2.20%
RegExp Literal Creation (Full) 248.0±17.28µs 267.9±12.00µs -7.43%
Static Object Property Access (Execution) 4.7±0.24µs 4.5±0.23µs +4.44%
Static Object Property Access (Full) 244.7±12.29µs 265.5±8.63µs -7.83%
String Object Access (Execution) 6.8±0.40µs 7.1±0.44µs -4.23%
String Object Access (Full) 249.6±7.81µs 275.2±14.52µs -9.30%
String comparison (Execution) 6.2±0.22µs 6.2±0.36µs 0.00%
String comparison (Full) 258.5±11.97µs 272.4±10.93µs -5.10%
String concatenation (Execution) 5.1±0.16µs 5.0±0.18µs +2.00%
String concatenation (Full) 237.6±7.95µs 260.9±10.32µs -8.93%
String copy (Execution) 3.8±0.09µs 3.8±0.14µs 0.00%
String copy (Full) 242.8±16.89µs 249.5±9.00µs -2.69%
Symbols (Execution) 3.5±0.16µs 3.5±0.21µs 0.00%
Symbols (Full) 233.5±9.35µs 259.6±13.35µs -10.05%

Copy link
Contributor

@tofpie tofpie left a comment

Choose a reason for hiding this comment

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

This looks good to me.

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.

Looks good, thanks!

@Razican Razican merged commit d14e102 into master Jan 20, 2021
@Razican Razican deleted the fix/primitive_promotion branch January 20, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants