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

Implement std::error::Error for GcObject borrow errors #662

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

HalidOdat
Copy link
Member

It changes the following:

  • Implement std::error::Error for BorrowError and BorrowMutErrror

@HalidOdat HalidOdat added the enhancement New feature or request label Aug 25, 2020
@HalidOdat HalidOdat added this to the v0.10.0 milestone Aug 25, 2020
@codecov
Copy link

codecov bot commented Aug 25, 2020

Codecov Report

Merging #662 into master will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #662   +/-   ##
=======================================
  Coverage   72.69%   72.69%           
=======================================
  Files         179      179           
  Lines       13409    13409           
=======================================
  Hits         9748     9748           
  Misses       3661     3661           
Impacted Files Coverage Δ
boa/src/builtins/object/gcobject.rs 73.87% <0.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 c7531af...9af75ba. Read the comment docs.

@github-actions
Copy link

Benchmark for 2fe1de6

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 282.1±25.60ns 274.9±13.46ns +2.62%
Arithmetic operations (Full) 195.6±15.76µs 188.6±17.59µs +3.71%
Array access (Execution) 6.2±0.55µs 6.1±0.35µs +1.64%
Array access (Full) 202.2±8.51µs 200.3±9.46µs +0.95%
Array creation (Execution) 2.6±0.17ms 2.6±0.14ms 0.00%
Array creation (Full) 2.8±0.11ms 2.9±0.17ms -3.45%
Array pop (Execution) 916.2±42.54µs 915.5±40.96µs +0.08%
Array pop (Full) 1239.0±78.92µs 1210.6±66.47µs +2.35%
Boolean Object Access (Execution) 3.6±0.23µs 3.6±0.24µs 0.00%
Boolean Object Access (Full) 196.8±10.64µs 201.5±13.46µs -2.33%
Clean js (Execution) 572.6±37.27µs 567.0±37.82µs +0.99%
Clean js (Full) 791.0±59.84µs 767.1±42.13µs +3.12%
Clean js (Parser) 18.3±0.96µs 18.4±1.03µs -0.54%
Create Realm 351.2±22.33ns 369.1±29.94ns -4.85%
Dynamic Object Property Access (Execution) 4.0±0.25µs 4.0±0.28µs 0.00%
Dynamic Object Property Access (Full) 198.6±10.40µs 199.0±12.59µs -0.20%
Expression (Lexer) 1805.2±132.44ns 1777.5±89.42ns +1.56%
Expression (Parser) 4.1±0.29µs 4.1±0.27µs 0.00%
Fibonacci (Execution) 613.8±39.37µs 600.9±31.54µs +2.15%
Fibonacci (Full) 836.5±105.23µs 815.3±37.98µs +2.60%
For loop (Execution) 16.8±1.09µs 16.5±0.63µs +1.82%
For loop (Full) 212.6±13.54µs 210.9±11.64µs +0.81%
For loop (Lexer) 3.2±0.19µs 3.3±0.24µs -3.03%
For loop (Parser) 9.4±0.58µs 9.5±0.55µs -1.05%
Goal Symbols (Parser) 6.4±0.39µs 6.4±0.36µs 0.00%
Hello World (Lexer) 641.1±38.17ns 652.9±39.17ns -1.81%
Hello World (Parser) 1660.5±93.12ns 1681.9±98.42ns -1.27%
Long file (Parser) 4.8±0.19ms 4.8±0.16ms 0.00%
Mini js (Execution) 521.0±35.26µs 507.3±27.20µs +2.70%
Mini js (Full) 713.7±34.22µs 717.0±51.54µs -0.46%
Mini js (Parser) 16.8±1.06µs 16.9±1.21µs -0.59%
Number Object Access (Execution) 2.8±0.16µs 2.9±0.21µs -3.45%
Number Object Access (Full) 201.8±20.44µs 193.1±9.53µs +4.51%
Object Creation (Execution) 3.4±0.22µs 3.5±0.28µs -2.86%
Object Creation (Full) 237.8±15.87µs 235.3±12.17µs +1.06%
RegExp (Execution) 49.8±2.83µs 49.9±3.14µs -0.20%
RegExp (Full) 319.3±22.81µs 319.4±29.17µs -0.03%
RegExp Literal (Execution) 52.8±3.95µs 52.8±3.20µs 0.00%
RegExp Literal (Full) 249.2±10.71µs 254.4±15.18µs -2.04%
RegExp Literal Creation (Execution) 49.4±2.13µs 50.7±3.62µs -2.56%
RegExp Literal Creation (Full) 313.7±22.44µs 307.2±17.84µs +2.12%
Static Object Property Access (Execution) 3.6±0.24µs 3.6±0.22µs 0.00%
Static Object Property Access (Full) 198.4±11.57µs 199.8±11.67µs -0.70%
String Object Access (Execution) 5.2±0.41µs 5.2±0.36µs 0.00%
String Object Access (Full) 201.3±13.51µs 199.7±13.13µs +0.80%
String comparison (Execution) 4.9±0.41µs 4.8±0.34µs +2.08%
String comparison (Full) 202.7±13.94µs 208.4±18.14µs -2.74%
String concatenation (Execution) 3.8±0.20µs 3.9±0.37µs -2.56%
String concatenation (Full) 195.7±11.36µs 200.6±13.71µs -2.44%
String copy (Execution) 2.8±0.15µs 2.8±0.17µs 0.00%
String copy (Full) 200.3±16.17µs 195.6±17.17µs +2.40%
Symbols (Execution) 2.4±0.26µs 2.4±0.21µs 0.00%
Symbols (Full) 185.9±20.98µs 178.8±8.51µs +3.97%

@HalidOdat HalidOdat changed the title Implement std:error::Error for GcObject borrow errors Implement std::error::Error for GcObject borrow errors Aug 26, 2020
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!

@HalidOdat HalidOdat merged commit 0fc8052 into master Aug 27, 2020
@HalidOdat HalidOdat deleted the feature/borrow-error-trait branch August 27, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants