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 #[track_caller] to GcObject methods that can panic #673

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

HalidOdat
Copy link
Member

It changes the following:

  • Added #[track_caller] to GcObject methods that panic. This should make finding borrow error much easier.

@HalidOdat HalidOdat added enhancement New feature or request execution Issues or PRs related to code execution labels Sep 1, 2020
@codecov
Copy link

codecov bot commented Sep 1, 2020

Codecov Report

Merging #673 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #673   +/-   ##
=======================================
  Coverage   73.14%   73.14%           
=======================================
  Files         192      192           
  Lines       14005    14005           
=======================================
  Hits        10244    10244           
  Misses       3761     3761           
Impacted Files Coverage Δ
boa/src/builtins/object/gcobject.rs 73.87% <ø> (ø)

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 be20b65...c6329ee. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Sep 2, 2020

Benchmark for 24bf086

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 388.7±19.57ns 382.6±20.64ns +1.59%
Arithmetic operations (Full) 257.4±12.31µs 251.5±15.22µs +2.35%
Array access (Execution) 8.4±0.47µs 8.3±0.60µs +1.20%
Array access (Full) 286.4±13.83µs 277.7±17.50µs +3.13%
Array creation (Execution) 3.1±0.15ms 3.2±0.13ms -3.13%
Array creation (Full) 3.5±0.17ms 3.4±0.22ms +2.94%
Array pop (Execution) 1087.1±61.37µs 1112.4±54.91µs -2.27%
Array pop (Full) 1579.3±94.55µs 1527.5±99.72µs +3.39%
Boolean Object Access (Execution) 4.8±0.27µs 4.7±0.31µs +2.13%
Boolean Object Access (Full) 280.3±16.78µs 268.4±16.10µs +4.43%
Clean js (Execution) 787.3±43.99µs 719.5±35.90µs +9.42%
Clean js (Full) 1028.5±59.13µs 1000.8±47.06µs +2.77%
Clean js (Parser) 38.7±2.19µs 36.7±2.39µs +5.45%
Create Realm 456.4±24.85ns 448.5±33.49ns +1.76%
Dynamic Object Property Access (Execution) 5.5±0.40µs 5.6±0.35µs -1.79%
Dynamic Object Property Access (Full) 275.6±20.60µs 266.9±12.83µs +3.26%
Expression (Parser) 6.7±0.33µs 7.0±0.42µs -4.29%
Fibonacci (Execution) 899.6±35.41µs 887.2±46.27µs +1.40%
Fibonacci (Full) 1187.6±72.43µs 1170.8±59.60µs +1.43%
For loop (Execution) 22.4±1.23µs 22.4±1.46µs 0.00%
For loop (Full) 295.7±14.47µs 297.0±17.50µs -0.44%
For loop (Parser) 17.4±0.92µs 17.7±0.92µs -1.69%
Goal Symbols (Parser) 11.6±0.62µs 11.5±0.55µs +0.87%
Hello World (Parser) 2.9±0.14µs 3.0±0.19µs -3.33%
Long file (Parser) 748.8±33.95ns 775.2±43.83ns -3.41%
Mini js (Execution) 647.4±30.34µs 655.8±37.81µs -1.28%
Mini js (Full) 943.6±53.30µs 918.1±37.41µs +2.78%
Mini js (Parser) 33.0±2.20µs 31.6±1.59µs +4.43%
Number Object Access (Execution) 3.9±0.42µs 3.8±0.18µs +2.63%
Number Object Access (Full) 271.0±16.31µs 267.2±15.26µs +1.42%
Object Creation (Execution) 4.9±0.37µs 4.7±0.27µs +4.26%
Object Creation (Full) 324.2±13.88µs 319.8±13.76µs +1.38%
RegExp (Execution) 73.6±4.41µs 70.8±3.70µs +3.95%
RegExp (Full) 360.2±14.52µs 346.9±18.21µs +3.83%
RegExp Literal (Execution) 70.4±3.72µs 70.7±3.79µs -0.42%
RegExp Literal (Full) 360.9±22.32µs 345.2±20.40µs +4.55%
RegExp Literal Creation (Execution) 66.9±3.53µs 67.4±3.94µs -0.74%
RegExp Literal Creation (Full) 425.1±19.85µs 411.3±23.27µs +3.36%
Static Object Property Access (Execution) 5.1±0.26µs 5.0±0.27µs +2.00%
Static Object Property Access (Full) 281.5±21.77µs 264.3±14.64µs +6.51%
String Object Access (Execution) 6.9±0.40µs 7.3±0.31µs -5.48%
String Object Access (Full) 276.0±15.13µs 276.8±16.88µs -0.29%
String comparison (Execution) 6.5±0.31µs 6.5±0.27µs 0.00%
String comparison (Full) 279.4±15.11µs 271.9±14.89µs +2.76%
String concatenation (Execution) 5.3±0.32µs 5.3±0.26µs 0.00%
String concatenation (Full) 273.5±14.32µs 266.4±11.83µs +2.67%
String copy (Execution) 4.0±0.22µs 4.1±0.27µs -2.44%
String copy (Full) 266.8±16.27µs 265.3±18.10µs +0.57%
Symbols (Execution) 3.3±0.17µs 3.3±0.16µs 0.00%
Symbols (Full) 259.0±16.27µs 241.9±14.40µs +7.07%

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 added this to the v0.10.0 milestone Sep 2, 2020
@Razican Razican merged commit 460b4a2 into master Sep 2, 2020
@Razican Razican deleted the feature/track-caller-gcobject-methods branch September 2, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants