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 throw Error object #1465

Merged
merged 2 commits into from
Aug 15, 2021
Merged

Feature throw Error object #1465

merged 2 commits into from
Aug 15, 2021

Conversation

HalidOdat
Copy link
Member

It changes the following:

  • Implement Context::construct_error()
  • Implement Context::throw_error()

@HalidOdat HalidOdat added enhancement New feature or request API labels Aug 12, 2021
@HalidOdat HalidOdat added this to the v0.13.0 milestone Aug 12, 2021
@github-actions
Copy link

Test262 conformance changes:

Test result master count PR count difference
Total 78,897 78,897 0
Passed 29,633 29,633 0
Ignored 15,612 15,612 0
Failed 33,652 33,652 0
Panics 2 2 0
Conformance 37.56% 37.56% 0.00%

@github-actions
Copy link

Benchmark for 87ef669

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 223.9±0.28ns 224.3±0.24ns -0.18%
Arithmetic operations (Full) 255.9±0.44µs 257.6±2.18µs -0.66%
Array access (Execution) 5.5±0.03µs 5.6±0.03µs -1.79%
Array access (Full) 277.2±0.34µs 277.8±0.53µs -0.22%
Array creation (Execution) 2.4±0.00ms 2.4±0.00ms 0.00%
Array creation (Full) 3.0±0.01ms 2.9±0.00ms +3.45%
Array pop (Execution) 787.3±3.14µs 787.7±3.51µs -0.05%
Array pop (Full) 1291.0±11.01µs 1265.4±1.88µs +2.02%
Boolean Object Access (Execution) 4.7±0.01µs 4.6±0.00µs +2.17%
Boolean Object Access (Full) 271.3±0.37µs 272.3±1.55µs -0.37%
Clean js (Execution) 619.6±2.70µs 618.7±3.78µs +0.15%
Clean js (Full) 930.9±3.26µs 929.3±3.10µs +0.17%
Clean js (Parser) 30.9±0.05µs 31.0±0.09µs -0.32%
Create Realm 355.6±0.17ns 356.5±0.28ns -0.25%
Dynamic Object Property Access (Execution) 4.3±0.02µs 4.3±0.01µs 0.00%
Dynamic Object Property Access (Full) 273.4±0.33µs 275.1±1.70µs -0.62%
Expression (Parser) 5.1±0.01µs 5.3±0.00µs -3.77%
Fibonacci (Execution) 675.8±3.53µs 675.2±1.23µs +0.09%
Fibonacci (Full) 970.3±0.80µs 975.2±2.04µs -0.50%
For loop (Execution) 16.7±0.03µs 16.7±0.04µs 0.00%
For loop (Full) 281.4±0.31µs 281.4±0.33µs 0.00%
For loop (Parser) 14.7±0.04µs 14.7±0.05µs 0.00%
Goal Symbols (Parser) 10.7±0.03µs 10.7±0.05µs 0.00%
Hello World (Parser) 3.0±0.01µs 3.0±0.03µs 0.00%
Long file (Parser) 735.3±16.79ns 752.8±17.94ns -2.32%
Mini js (Execution) 565.9±3.43µs 566.0±4.02µs -0.02%
Mini js (Full) 875.8±2.62µs 873.2±2.59µs +0.30%
Mini js (Parser) 27.1±0.02µs 27.3±0.05µs -0.73%
Number Object Access (Execution) 3.6±0.01µs 3.6±0.01µs 0.00%
Number Object Access (Full) 268.1±0.59µs 268.5±0.61µs -0.15%
Object Creation (Execution) 3.9±0.01µs 3.9±0.01µs 0.00%
Object Creation (Full) 270.3±0.95µs 271.2±0.34µs -0.33%
RegExp (Execution) 11.0±0.06µs 11.1±0.04µs -0.90%
RegExp (Full) 277.1±0.34µs 278.2±0.38µs -0.40%
RegExp Literal (Execution) 11.0±0.05µs 11.1±0.04µs -0.90%
RegExp Literal (Full) 283.1±0.83µs 284.6±0.42µs -0.53%
RegExp Literal Creation (Execution) 8.1±0.03µs 8.2±0.02µs -1.22%
RegExp Literal Creation (Full) 274.2±0.43µs 275.3±0.87µs -0.40%
Static Object Property Access (Execution) 4.0±0.02µs 4.0±0.02µs 0.00%
Static Object Property Access (Full) 271.4±0.22µs 272.5±0.68µs -0.40%
String Object Access (Execution) 6.1±0.02µs 6.2±0.01µs -1.61%
String Object Access (Full) 273.6±0.38µs 274.3±0.60µs -0.26%
String comparison (Execution) 5.5±0.03µs 5.5±0.04µs 0.00%
String comparison (Full) 275.7±0.28µs 273.1±0.57µs +0.95%
String concatenation (Execution) 4.2±0.01µs 4.2±0.01µs 0.00%
String concatenation (Full) 269.6±0.38µs 267.7±0.59µs +0.71%
String copy (Execution) 3.4±0.01µs 3.4±0.01µs 0.00%
String copy (Full) 263.2±0.41µs 263.7±0.53µs -0.19%
Symbols (Execution) 3.0±0.01µs 3.0±0.01µs 0.00%
Symbols (Full) 252.1±0.77µs 251.0±0.44µs +0.44%

@github-actions
Copy link

Benchmark for 75bde16

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 272.9±13.37ns 278.6±15.27ns -2.05%
Arithmetic operations (Full) 317.8±11.80µs 316.9±12.18µs +0.28%
Array access (Execution) 6.8±0.34µs 6.7±0.19µs +1.49%
Array access (Full) 341.2±11.87µs 339.0±22.87µs +0.65%
Array creation (Execution) 2.9±0.12ms 3.0±0.12ms -3.33%
Array creation (Full) 3.5±0.12ms 3.6±0.15ms -2.78%
Array pop (Execution) 976.4±47.76µs 963.7±30.99µs +1.32%
Array pop (Full) 1555.2±67.49µs 1556.2±51.20µs -0.06%
Boolean Object Access (Execution) 5.6±0.35µs 5.6±0.39µs 0.00%
Boolean Object Access (Full) 335.7±22.17µs 333.4±15.63µs +0.69%
Clean js (Execution) 759.5±36.82µs 758.8±28.20µs +0.09%
Clean js (Full) 1154.8±69.00µs 1136.7±46.33µs +1.59%
Clean js (Parser) 34.8±0.98µs 35.5±1.92µs -1.97%
Create Realm 432.0±18.79ns 441.9±25.75ns -2.24%
Dynamic Object Property Access (Execution) 5.6±1.26µs 5.4±0.17µs +3.70%
Dynamic Object Property Access (Full) 346.8±24.21µs 336.1±11.05µs +3.18%
Expression (Parser) 6.2±0.42µs 6.2±0.26µs 0.00%
Fibonacci (Execution) 840.4±69.63µs 851.5±71.86µs -1.30%
Fibonacci (Full) 1194.6±118.31µs 1194.6±51.62µs 0.00%
For loop (Execution) 20.8±1.07µs 21.2±1.18µs -1.89%
For loop (Full) 347.3±15.80µs 343.9±10.69µs +0.99%
For loop (Parser) 16.7±0.81µs 17.4±1.99µs -4.02%
Goal Symbols (Parser) 12.8±0.59µs 12.6±0.99µs +1.59%
Hello World (Parser) 3.5±0.10µs 3.5±0.15µs 0.00%
Long file (Parser) 807.4±36.13ns 786.7±26.53ns +2.63%
Mini js (Execution) 698.7±26.20µs 688.9±21.91µs +1.42%
Mini js (Full) 1073.2±56.25µs 1076.8±47.55µs -0.33%
Mini js (Parser) 31.8±1.50µs 30.7±0.93µs +3.58%
Number Object Access (Execution) 4.4±0.24µs 4.4±0.25µs 0.00%
Number Object Access (Full) 331.8±13.26µs 329.8±14.25µs +0.61%
Object Creation (Execution) 4.9±0.28µs 4.8±0.24µs +2.08%
Object Creation (Full) 335.6±14.52µs 333.8±23.37µs +0.54%
RegExp (Execution) 13.4±1.27µs 13.3±0.78µs +0.75%
RegExp (Full) 343.6±16.70µs 344.3±21.30µs -0.20%
RegExp Literal (Execution) 13.5±0.96µs 13.6±0.65µs -0.74%
RegExp Literal (Full) 352.9±18.73µs 342.5±22.94µs +3.04%
RegExp Literal Creation (Execution) 9.9±0.49µs 9.9±0.28µs 0.00%
RegExp Literal Creation (Full) 345.8±21.04µs 337.9±14.27µs +2.34%
Static Object Property Access (Execution) 5.2±1.41µs 4.9±0.32µs +6.12%
Static Object Property Access (Full) 344.4±24.10µs 330.9±9.58µs +4.08%
String Object Access (Execution) 7.4±0.68µs 7.5±0.74µs -1.33%
String Object Access (Full) 337.4±15.46µs 336.8±16.26µs +0.18%
String comparison (Execution) 6.7±0.40µs 6.6±0.47µs +1.52%
String comparison (Full) 343.2±27.24µs 339.4±22.55µs +1.12%
String concatenation (Execution) 5.2±0.23µs 5.2±0.20µs 0.00%
String concatenation (Full) 345.5±25.29µs 327.9±12.25µs +5.37%
String copy (Execution) 4.3±0.35µs 4.2±0.23µs +2.38%
String copy (Full) 330.4±21.53µs 327.5±13.50µs +0.89%
Symbols (Execution) 3.7±0.15µs 3.7±0.16µs 0.00%
Symbols (Full) 306.1±13.35µs 308.0±13.47µs -0.62%

@HalidOdat HalidOdat merged commit 44202ce into master Aug 15, 2021
@HalidOdat HalidOdat deleted the feature/throw-error branch August 15, 2021 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants