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

Feature EvalError #804

Merged
merged 3 commits into from
Oct 6, 2020
Merged

Feature EvalError #804

merged 3 commits into from
Oct 6, 2020

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented Oct 5, 2020

It changes the following:

  • Add EvalError
  • Add tests

@HalidOdat HalidOdat added enhancement New feature or request builtins PRs and Issues related to builtins/intrinsics labels Oct 5, 2020
@HalidOdat HalidOdat added this to the v0.11.0 milestone Oct 5, 2020
@codecov
Copy link

codecov bot commented Oct 5, 2020

Codecov Report

Merging #804 into master will decrease coverage by 0.01%.
The diff coverage is 53.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #804      +/-   ##
==========================================
- Coverage   59.69%   59.68%   -0.02%     
==========================================
  Files         155      156       +1     
  Lines        9992    10020      +28     
==========================================
+ Hits         5965     5980      +15     
- Misses       4027     4040      +13     
Impacted Files Coverage Δ
boa/src/builtins/error/mod.rs 66.66% <ø> (ø)
boa/src/builtins/mod.rs 24.24% <0.00%> (-0.76%) ⬇️
boa/src/context.rs 69.30% <28.57%> (-1.38%) ⬇️
boa/src/builtins/error/eval.rs 65.00% <65.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 39b4ead...e58f8d6. Read the comment docs.

@RageKnify
Copy link
Member

You can extend the test in boa/src/builtins/error/tests.rs to include EvalError.

@github-actions
Copy link

github-actions bot commented Oct 5, 2020

Benchmark for 1b2f8f9

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 399.9±26.59ns 392.2±28.82ns +1.96%
Arithmetic operations (Full) 311.3±27.87µs 297.4±23.98µs +4.67%
Array access (Execution) 10.0±0.84µs 9.1±0.90µs +9.89%
Array access (Full) 353.9±38.39µs 322.5±27.10µs +9.74%
Array creation (Execution) 3.7±0.23ms 3.5±0.24ms +5.71%
Array creation (Full) 4.3±0.28ms 4.0±0.31ms +7.50%
Array pop (Execution) 1300.4±70.27µs 1345.1±135.62µs -3.32%
Array pop (Full) 1912.6±150.40µs 1884.7±148.17µs +1.48%
Boolean Object Access (Execution) 6.0±0.80µs 5.8±0.42µs +3.45%
Boolean Object Access (Full) 328.3±30.36µs 315.8±25.27µs +3.96%
Clean js (Execution) 866.9±46.69µs 824.4±88.47µs +5.16%
Clean js (Full) 1260.7±97.72µs 1231.5±92.44µs +2.37%
Clean js (Parser) 41.4±2.90µs 42.4±3.06µs -2.36%
Create Realm 510.5±29.97ns 507.3±39.14ns +0.63%
Dynamic Object Property Access (Execution) 6.7±0.56µs 6.5±0.55µs +3.08%
Dynamic Object Property Access (Full) 329.4±56.23µs 304.6±17.16µs +8.14%
Expression (Parser) 7.7±0.64µs 7.4±0.69µs +4.05%
Fibonacci (Execution) 1062.9±115.92µs 996.9±73.24µs +6.62%
Fibonacci (Full) 1376.2±119.04µs 1348.3±108.10µs +2.07%
For loop (Execution) 28.7±2.11µs 25.5±1.85µs +12.55%
For loop (Full) 358.3±35.05µs 343.5±26.92µs +4.31%
For loop (Parser) 21.0±1.70µs 20.1±1.39µs +4.48%
Goal Symbols (Parser) 13.6±1.00µs 13.9±1.35µs -2.16%
Hello World (Parser) 3.5±0.21µs 3.6±0.43µs -2.78%
Long file (Parser) 894.8±69.89ns 866.9±97.68ns +3.22%
Mini js (Execution) 772.7±65.26µs 733.1±42.10µs +5.40%
Mini js (Full) 1151.3±88.57µs 1066.5±87.30µs +7.95%
Mini js (Parser) 36.3±2.74µs 36.5±3.44µs -0.55%
Number Object Access (Execution) 4.6±0.37µs 4.6±0.38µs 0.00%
Number Object Access (Full) 334.3±68.82µs 324.3±30.37µs +3.08%
Object Creation (Execution) 5.9±0.47µs 5.6±0.75µs +5.36%
Object Creation (Full) 353.5±37.97µs 304.2±33.84µs +16.21%
RegExp (Execution) 86.4±9.76µs 73.6±5.18µs +17.39%
RegExp (Full) 431.8±33.98µs 428.9±44.39µs +0.68%
RegExp Literal (Execution) 91.2±11.05µs 80.9±6.51µs +12.73%
RegExp Literal (Full) 432.5±49.67µs 397.6±29.72µs +8.78%
RegExp Literal Creation (Execution) 82.5±9.24µs 76.3±8.16µs +8.13%
RegExp Literal Creation (Full) 425.7±50.59µs 392.4±27.46µs +8.49%
Static Object Property Access (Execution) 6.0±0.48µs 5.8±0.50µs +3.45%
Static Object Property Access (Full) 332.1±31.29µs 308.0±27.71µs +7.82%
String Object Access (Execution) 8.7±0.65µs 8.6±1.08µs +1.16%
String Object Access (Full) 330.1±37.94µs 308.0±25.34µs +7.18%
String comparison (Execution) 7.7±0.59µs 7.4±0.59µs +4.05%
String comparison (Full) 341.4±47.24µs 305.9±21.81µs +11.61%
String concatenation (Execution) 6.6±0.47µs 6.2±0.68µs +6.45%
String concatenation (Full) 342.3±34.73µs 308.2±19.77µs +11.06%
String copy (Execution) 5.1±0.54µs 5.0±0.42µs +2.00%
String copy (Full) 313.1±23.42µs 317.1±28.66µs -1.26%
Symbols (Execution) 4.1±0.30µs 3.8±0.20µs +7.89%
Symbols (Full) 318.0±28.32µs 300.9±21.27µs +5.68%

@github-actions
Copy link

github-actions bot commented Oct 5, 2020

Benchmark for 0c0b2bb

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 323.5±10.13ns 328.9±13.21ns -1.64%
Arithmetic operations (Full) 247.1±12.98µs 252.8±6.92µs -2.25%
Array access (Execution) 7.4±0.16µs 7.6±0.47µs -2.63%
Array access (Full) 269.1±5.70µs 265.9±7.82µs +1.20%
Array creation (Execution) 2.8±0.06ms 2.8±0.07ms 0.00%
Array creation (Full) 3.2±0.10ms 3.2±0.19ms 0.00%
Array pop (Execution) 975.2±17.20µs 976.8±16.37µs -0.16%
Array pop (Full) 1474.3±43.42µs 1477.4±50.28µs -0.21%
Boolean Object Access (Execution) 4.5±0.10µs 4.7±0.17µs -4.26%
Boolean Object Access (Full) 258.6±8.70µs 253.9±8.80µs +1.85%
Clean js (Execution) 660.8±23.02µs 672.7±19.82µs -1.77%
Clean js (Full) 974.8±25.22µs 963.7±25.11µs +1.15%
Clean js (Parser) 33.3±0.90µs 33.5±1.32µs -0.60%
Create Realm 420.8±11.82ns 414.3±7.88ns +1.57%
Dynamic Object Property Access (Execution) 5.2±0.12µs 5.2±0.11µs 0.00%
Dynamic Object Property Access (Full) 264.3±11.52µs 258.9±9.32µs +2.09%
Expression (Parser) 6.0±0.21µs 6.2±0.11µs -3.23%
Fibonacci (Execution) 814.8±16.04µs 822.3±21.26µs -0.91%
Fibonacci (Full) 1106.5±34.50µs 1091.7±23.22µs +1.36%
For loop (Execution) 21.3±0.64µs 22.3±0.54µs -4.48%
For loop (Full) 284.2±19.09µs 279.4±15.29µs +1.72%
For loop (Parser) 16.1±0.34µs 16.1±0.44µs 0.00%
Goal Symbols (Parser) 11.0±0.42µs 11.1±0.76µs -0.90%
Hello World (Parser) 2.9±0.10µs 2.9±0.09µs 0.00%
Long file (Parser) 729.3±23.17ns 729.3±35.96ns 0.00%
Mini js (Execution) 592.7±23.08µs 596.2±16.05µs -0.59%
Mini js (Full) 879.6±21.98µs 884.5±37.02µs -0.55%
Mini js (Parser) 29.2±1.31µs 29.2±0.70µs 0.00%
Number Object Access (Execution) 3.6±0.23µs 3.7±0.14µs -2.70%
Number Object Access (Full) 256.2±8.93µs 248.6±6.62µs +3.06%
Object Creation (Execution) 4.4±0.11µs 4.6±0.18µs -4.35%
Object Creation (Full) 265.7±13.26µs 254.9±6.13µs +4.24%
RegExp (Execution) 62.6±2.12µs 62.9±3.74µs -0.48%
RegExp (Full) 336.2±10.45µs 337.8±9.02µs -0.47%
RegExp Literal (Execution) 67.5±2.61µs 67.6±2.27µs -0.15%
RegExp Literal (Full) 334.6±10.95µs 333.3±15.17µs +0.39%
RegExp Literal Creation (Execution) 64.7±2.33µs 62.9±2.13µs +2.86%
RegExp Literal Creation (Full) 323.0±5.53µs 321.7±8.87µs +0.40%
Static Object Property Access (Execution) 4.7±0.17µs 4.8±0.20µs -2.08%
Static Object Property Access (Full) 258.5±5.89µs 262.5±5.24µs -1.52%
String Object Access (Execution) 6.4±0.15µs 6.9±0.30µs -7.25%
String Object Access (Full) 263.8±11.51µs 267.4±6.81µs -1.35%
String comparison (Execution) 6.0±0.18µs 6.0±0.18µs 0.00%
String comparison (Full) 260.8±8.24µs 257.2±9.08µs +1.40%
String concatenation (Execution) 5.0±0.17µs 5.0±0.11µs 0.00%
String concatenation (Full) 262.8±7.29µs 249.3±6.28µs +5.42%
String copy (Execution) 3.8±0.21µs 3.9±0.14µs -2.56%
String copy (Full) 248.3±5.45µs 247.7±8.73µs +0.24%
Symbols (Execution) 3.1±0.13µs 3.3±0.13µs -6.06%
Symbols (Full) 243.7±6.05µs 240.6±6.75µs +1.29%

@github-actions
Copy link

github-actions bot commented Oct 6, 2020

Benchmark for 812f4a7

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 370.4±0.43ns 373.5±0.43ns -0.83%
Arithmetic operations (Full) 234.9±0.71µs 236.0±1.28µs -0.47%
Array access (Execution) 8.0±0.02µs 8.0±0.11µs 0.00%
Array access (Full) 263.1±0.85µs 257.6±1.13µs +2.14%
Array creation (Execution) 3.4±0.00ms 3.4±0.01ms 0.00%
Array creation (Full) 3.7±0.04ms 3.7±0.02ms 0.00%
Array pop (Execution) 1201.2±14.68µs 1196.9±10.34µs +0.36%
Array pop (Full) 1680.9±2.58µs 1706.6±5.63µs -1.51%
Boolean Object Access (Execution) 4.9±0.03µs 5.0±0.01µs -2.00%
Boolean Object Access (Full) 249.4±0.66µs 247.3±0.39µs +0.85%
Clean js (Execution) 736.7±4.08µs 741.1±4.94µs -0.59%
Clean js (Full) 1061.9±31.25µs 1053.5±9.48µs +0.80%
Clean js (Parser) 36.3±0.05µs 36.4±0.21µs -0.27%
Create Realm 467.9±0.32ns 459.2±4.58ns +1.89%
Dynamic Object Property Access (Execution) 5.5±0.02µs 5.6±0.03µs -1.79%
Dynamic Object Property Access (Full) 251.3±0.99µs 249.3±1.43µs +0.80%
Expression (Parser) 6.9±0.02µs 6.9±0.01µs 0.00%
Fibonacci (Execution) 810.3±3.26µs 822.6±0.80µs -1.50%
Fibonacci (Full) 1083.1±4.48µs 1087.8±1.94µs -0.43%
For loop (Execution) 22.9±0.10µs 23.1±0.06µs -0.87%
For loop (Full) 264.7±0.51µs 261.4±0.37µs +1.26%
For loop (Parser) 17.9±0.02µs 17.8±0.03µs +0.56%
Goal Symbols (Parser) 12.2±0.01µs 12.2±0.03µs 0.00%
Hello World (Parser) 3.2±0.01µs 3.2±0.02µs 0.00%
Long file (Parser) 779.1±1.00ns 777.9±2.42ns +0.15%
Mini js (Execution) 667.4±5.69µs 671.9±4.36µs -0.67%
Mini js (Full) 952.6±4.46µs 951.3±3.55µs +0.14%
Mini js (Parser) 32.0±0.02µs 31.8±0.21µs +0.63%
Number Object Access (Execution) 3.9±0.01µs 3.9±0.01µs 0.00%
Number Object Access (Full) 247.5±0.54µs 243.7±0.67µs +1.56%
Object Creation (Execution) 4.7±0.01µs 4.7±0.01µs 0.00%
Object Creation (Full) 248.6±0.70µs 246.1±0.52µs +1.02%
RegExp (Execution) 65.3±0.76µs 65.5±0.93µs -0.31%
RegExp (Full) 329.4±2.31µs 331.5±0.58µs -0.63%
RegExp Literal (Execution) 68.5±0.92µs 68.8±1.00µs -0.44%
RegExp Literal (Full) 329.9±1.27µs 330.9±2.52µs -0.30%
RegExp Literal Creation (Execution) 65.5±0.88µs 65.4±0.91µs +0.15%
RegExp Literal Creation (Full) 321.0±0.71µs 318.8±0.53µs +0.69%
Static Object Property Access (Execution) 4.9±0.02µs 4.9±0.01µs 0.00%
Static Object Property Access (Full) 249.8±0.65µs 247.1±0.59µs +1.09%
String Object Access (Execution) 7.1±0.02µs 7.1±0.01µs 0.00%
String Object Access (Full) 252.1±1.01µs 251.0±0.62µs +0.44%
String comparison (Execution) 6.4±0.05µs 6.5±0.03µs -1.54%
String comparison (Full) 252.1±1.00µs 250.8±0.81µs +0.52%
String concatenation (Execution) 5.2±0.04µs 5.3±0.01µs -1.89%
String concatenation (Full) 248.2±0.71µs 247.7±0.39µs +0.20%
String copy (Execution) 3.9±0.01µs 4.0±0.01µs -2.50%
String copy (Full) 243.1±1.69µs 239.9±1.38µs +1.33%
Symbols (Execution) 3.3±0.01µs 3.3±0.01µs 0.00%
Symbols (Full) 227.6±0.47µs 225.1±0.45µs +1.11%

@Razican Razican merged commit 03f9632 into master Oct 6, 2020
@Razican Razican deleted the feature/evalerror branch October 6, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants