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

Fixed function call with unspecified arguments #506

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

HalidOdat
Copy link
Member

This pull request fixes #505

It changes the following:

  • Fixed calling a function with less amount of arguments than the function declaration parameters.

This is blocked until #501 lands

@HalidOdat HalidOdat added bug Something isn't working blocked Waiting for another code change execution Issues or PRs related to code execution labels Jun 18, 2020
@HalidOdat HalidOdat added this to the v0.9.0 milestone Jun 18, 2020
@codecov
Copy link

codecov bot commented Jun 18, 2020

Codecov Report

Merging #506 into master will decrease coverage by 0.00%.
The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #506      +/-   ##
==========================================
- Coverage   67.69%   67.69%   -0.01%     
==========================================
  Files         165      165              
  Lines        9915     9918       +3     
==========================================
+ Hits         6712     6714       +2     
- Misses       3203     3204       +1     
Impacted Files Coverage Δ
boa/src/builtins/object/mod.rs 35.10% <66.66%> (-0.54%) ⬇️
boa/src/builtins/function/mod.rs 68.66% <71.42%> (-0.21%) ⬇️
boa/src/exec/tests.rs 100.00% <100.00%> (ø)

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 8b431a4...66069d3. Read the comment docs.

@github-actions
Copy link

Benchmark for fab322f

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 22.7±1.27µs 22.8±1.54µs -0.44%
Array creation (Execution) 6.0±0.28ms 6.1±0.29ms -1.64%
Array pop (Execution) 2.2±0.14ms 2.2±0.15ms 0.00%
Boolean Object Access (Execution) 8.0±0.58µs 8.2±0.61µs -2.44%
Create Realm 166.6±12.56µs 159.9±10.95µs +4.19%
Dynamic Object Property Access (Execution) 10.6±0.73µs 10.6±0.80µs 0.00%
Expression (Lexer) 1792.7±143.66ns 1822.2±119.38ns -1.62%
Expression (Parser) 4.4±0.35µs 4.3±0.29µs +2.33%
Fibonacci (Execution) 1785.9±100.04µs 1775.6±121.78µs +0.58%
For loop (Execution) 51.6±3.79µs 51.0±3.85µs +1.18%
For loop (Lexer) 4.5±0.25µs 4.7±0.33µs -4.26%
For loop (Parser) 11.6±0.79µs 11.9±0.98µs -2.52%
Hello World (Lexer) 802.8±50.75ns 827.9±54.09ns -3.03%
Hello World (Parser) 1949.1±124.82ns 1922.3±102.79ns +1.39%
Long file (Parser) 5.3±0.27ms 5.5±0.24ms -3.64%
Number Object Access (Execution) 6.5±0.64µs 6.5±0.48µs 0.00%
Object Creation (Execution) 9.5±1.04µs 9.6±0.75µs -1.04%
RegExp (Execution) 67.1±4.92µs 68.8±4.81µs -2.47%
RegExp Literal (Execution) 72.9±4.84µs 71.5±4.81µs +1.96%
RegExp Literal Creation (Execution) 68.8±4.72µs 69.3±6.68µs -0.72%
Static Object Property Access (Execution) 9.7±0.69µs 9.6±0.66µs +1.04%
String Object Access (Execution) 13.9±0.91µs 13.7±0.93µs +1.46%
String comparison (Execution) 10.0±0.67µs 9.8±0.64µs +2.04%
String concatenation (Execution) 8.1±0.61µs 8.1±0.66µs 0.00%
String copy (Execution) 6.9±0.50µs 6.8±0.50µs +1.47%
Symbols (Execution) 7.6±0.54µs 7.7±0.56µs -1.30%

@github-actions
Copy link

Benchmark for 6d5574e

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 22.0±1.66µs 21.5±1.58µs +2.33%
Array creation (Execution) 5.5±0.21ms 5.7±0.28ms -3.51%
Array pop (Execution) 2.0±0.12ms 2.1±0.12ms -4.76%
Boolean Object Access (Execution) 8.0±0.60µs 8.7±0.38µs -8.05%
Create Realm 149.9±9.39µs 154.8±10.35µs -3.17%
Dynamic Object Property Access (Execution) 10.2±0.73µs 10.2±0.66µs 0.00%
Expression (Lexer) 1656.6±114.89ns 1962.1±57.77ns -15.57%
Expression (Parser) 4.1±0.27µs 4.3±0.28µs -4.65%
Fibonacci (Execution) 1761.2±110.32µs 1685.2±75.93µs +4.51%
For loop (Execution) 50.3±4.25µs 49.0±3.72µs +2.65%
For loop (Lexer) 4.3±0.33µs 4.7±0.24µs -8.51%
For loop (Parser) 11.5±0.70µs 11.9±0.71µs -3.36%
Hello World (Lexer) 757.4±37.71ns 886.0±49.66ns -14.51%
Hello World (Parser) 1867.9±101.93ns 1943.0±105.40ns -3.87%
Long file (Parser) 5.3±0.28ms 5.4±0.23ms -1.85%
Number Object Access (Execution) 5.9±0.27µs 6.0±0.38µs -1.67%
Object Creation (Execution) 8.6±0.51µs 9.2±0.74µs -6.52%
RegExp (Execution) 62.4±3.94µs 64.8±4.06µs -3.70%
RegExp Literal (Execution) 65.2±3.15µs 66.7±4.69µs -2.25%
RegExp Literal Creation (Execution) 64.1±4.22µs 66.2±4.94µs -3.17%
Static Object Property Access (Execution) 9.3±0.59µs 9.4±0.66µs -1.06%
String Object Access (Execution) 14.5±0.88µs 14.1±1.05µs +2.84%
String comparison (Execution) 9.1±0.67µs 9.0±0.54µs +1.11%
String concatenation (Execution) 8.1±0.49µs 8.0±0.44µs +1.25%
String copy (Execution) 6.1±0.34µs 6.2±0.39µs -1.61%
Symbols (Execution) 7.1±0.42µs 7.2±0.55µs -1.39%

@HalidOdat HalidOdat force-pushed the fix/function-undefined-argument branch from e3b3c0d to 2f76edf Compare June 18, 2020 23:49
@github-actions
Copy link

Benchmark for 457ec33

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 24.1±1.36µs 25.5±1.31µs -5.49%
Array creation (Execution) 6.5±0.29ms 6.8±0.23ms -4.41%
Array pop (Execution) 2.3±0.09ms 2.4±0.09ms -4.17%
Boolean Object Access (Execution) 10.3±0.99µs 9.1±0.31µs +13.19%
Create Realm 176.6±14.54µs 177.6±9.17µs -0.56%
Dynamic Object Property Access (Execution) 11.6±0.43µs 11.5±0.46µs +0.87%
Expression (Lexer) 2.1±0.13µs 2.0±0.10µs +5.00%
Expression (Parser) 4.8±0.33µs 4.9±0.23µs -2.04%
Fibonacci (Execution) 1885.1±110.71µs 1965.1±88.40µs -4.07%
For loop (Execution) 56.0±5.74µs 56.3±3.08µs -0.53%
For loop (Lexer) 5.5±0.33µs 5.3±0.30µs +3.77%
For loop (Parser) 12.8±0.45µs 13.5±0.73µs -5.19%
Hello World (Lexer) 955.2±75.95ns 920.1±30.20ns +3.81%
Hello World (Parser) 2.2±0.10µs 2.2±0.26µs 0.00%
Long file (Parser) 5.8±0.16ms 6.1±0.28ms -4.92%
Number Object Access (Execution) 7.8±0.69µs 7.3±0.34µs +6.85%
Object Creation (Execution) 10.2±0.35µs 10.1±0.47µs +0.99%
RegExp (Execution) 78.7±3.45µs 80.6±39.04µs -2.36%
RegExp Literal (Execution) 91.2±11.70µs 78.1±3.53µs +16.77%
RegExp Literal Creation (Execution) 73.9±3.49µs 74.8±4.17µs -1.20%
Static Object Property Access (Execution) 10.5±0.39µs 10.6±0.41µs -0.94%
String Object Access (Execution) 18.2±1.78µs 15.9±0.72µs +14.47%
String comparison (Execution) 11.9±1.25µs 10.8±0.54µs +10.19%
String concatenation (Execution) 10.3±1.14µs 9.0±0.89µs +14.44%
String copy (Execution) 8.5±0.85µs 7.5±0.39µs +13.33%
Symbols (Execution) 8.1±0.37µs 8.2±0.40µs -1.22%

Calling a function with less amount of arguments than
the function declaration parameters would `panic`.
@HalidOdat HalidOdat force-pushed the fix/function-undefined-argument branch from 2f76edf to 66069d3 Compare June 19, 2020 00:55
@HalidOdat HalidOdat merged commit a7cffe3 into master Jun 19, 2020
@HalidOdat HalidOdat deleted the fix/function-undefined-argument branch June 19, 2020 01:15
@github-actions
Copy link

Benchmark for 58cc0f4

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 28.0±2.88µs 24.8±1.77µs +12.90%
Array creation (Execution) 6.8±0.29ms 6.2±0.33ms +9.68%
Array pop (Execution) 2.3±0.10ms 2.1±0.17ms +9.52%
Boolean Object Access (Execution) 8.7±0.79µs 8.7±0.62µs 0.00%
Create Realm 232.8±21.25µs 190.6±13.35µs +22.14%
Dynamic Object Property Access (Execution) 11.7±0.76µs 11.4±0.72µs +2.63%
Expression (Lexer) 1852.3±149.24ns 1878.5±115.01ns -1.39%
Expression (Parser) 4.8±0.28µs 4.8±0.40µs 0.00%
Fibonacci (Execution) 2.4±0.15ms 1984.4±186.60µs +20.94%
For loop (Execution) 70.4±4.94µs 59.4±3.33µs +18.52%
For loop (Lexer) 4.7±0.33µs 4.9±0.31µs -4.08%
For loop (Parser) 12.5±0.81µs 13.0±0.74µs -3.85%
Hello World (Lexer) 828.6±53.80ns 838.4±49.58ns -1.17%
Hello World (Parser) 2.2±0.24µs 2.1±0.15µs +4.76%
Long file (Parser) 5.8±0.33ms 5.9±0.18ms -1.69%
Number Object Access (Execution) 7.1±0.63µs 6.8±0.49µs +4.41%
Object Creation (Execution) 10.1±0.64µs 10.0±0.65µs +1.00%
RegExp (Execution) 73.0±2.56µs 71.4±6.56µs +2.24%
RegExp Literal (Execution) 78.5±5.09µs 76.6±6.13µs +2.48%
RegExp Literal Creation (Execution) 72.9±4.18µs 72.4±5.46µs +0.69%
Static Object Property Access (Execution) 10.3±0.64µs 10.0±0.75µs +3.00%
String Object Access (Execution) 14.3±1.47µs 15.3±0.67µs -6.54%
String comparison (Execution) 9.9±0.71µs 10.8±1.62µs -8.33%
String concatenation (Execution) 8.7±0.60µs 8.4±0.64µs +3.57%
String copy (Execution) 7.6±0.71µs 7.1±0.54µs +7.04%
Symbols (Execution) 9.8±0.97µs 8.3±0.61µs +18.07%

@HalidOdat HalidOdat removed the blocked Waiting for another code change label Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unreachable statement
3 participants