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

Specification compliant ToBigInt (to_bigint) #450

Merged
merged 1 commit into from
Jun 6, 2020
Merged

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented Jun 2, 2020

It changes the following:

  • Moved ValueDatas to_bigint => Interpreters to_bigint
  • Merged Ast BigInt to Builtin BigInt.
  • Split BigInt logic to separate files:
    • builtins/bigint/operations.rs for BigInt operations.
    • builtins/bigint/conversions.rs for BigInt conversions.
    • builtins/bigint/equality.rs for BigInt equality checking.

@HalidOdat HalidOdat added bug Something isn't working builtins PRs and Issues related to builtins/intrinsics labels Jun 2, 2020
@HalidOdat HalidOdat added this to the v0.9.0 milestone Jun 2, 2020
@codecov
Copy link

codecov bot commented Jun 2, 2020

Codecov Report

Merging #450 into master will increase coverage by 0.15%.
The diff coverage is 69.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #450      +/-   ##
==========================================
+ Coverage   66.09%   66.24%   +0.15%     
==========================================
  Files         128      131       +3     
  Lines        8992     9039      +47     
==========================================
+ Hits         5943     5988      +45     
- Misses       3049     3051       +2     
Impacted Files Coverage Δ
boa/src/builtins/mod.rs 100.00% <ø> (ø)
boa/src/builtins/value/conversions.rs 42.85% <ø> (-0.57%) ⬇️
boa/src/builtins/value/mod.rs 55.84% <0.00%> (-1.26%) ⬇️
boa/src/builtins/value/operations.rs 58.46% <ø> (-5.57%) ⬇️
boa/src/syntax/ast/constant.rs 48.00% <ø> (ø)
boa/src/syntax/ast/token.rs 44.32% <ø> (ø)
boa/src/exec/mod.rs 53.98% <36.36%> (-0.53%) ⬇️
boa/src/builtins/bigint/operations.rs 44.82% <44.82%> (ø)
boa/src/builtins/value/equality.rs 63.95% <63.95%> (ø)
boa/src/builtins/bigint/equality.rs 66.66% <66.66%> (ø)
... and 12 more

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 32b0741...c13581c. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Jun 2, 2020

Benchmark for 2be3d4d

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 450.2±18.63µs 457.7±17.92µs 98%
Expression (Lexer) 2.2±0.08µs 2.2±0.07µs 99%
Expression (Parser) 5.0±0.29µs 5.0±0.21µs 101%
Fibonacci (Execution) 2.9±0.33ms 2.9±0.10ms 101%
For loop (Execution) 482.3±28.01µs 467.8±18.82µs 103%
For loop (Lexer) 5.6±0.27µs 5.4±0.20µs 102%
For loop (Parser) 14.5±0.65µs 14.7±0.92µs 98%
Hello World (Lexer) 1085.3±59.65ns 1024.2±48.52ns 106%
Hello World (Parser) 2.4±0.12µs 2.3±0.09µs 104%
Symbols (Execution) 502.1±22.05µs 504.1±24.42µs 100%
undefined undefined 100%

@github-actions
Copy link

github-actions bot commented Jun 4, 2020

Benchmark for 35b878a

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 472.0±49.56µs 465.9±20.01µs 101%
Expression (Lexer) 2.2±0.09µs 2.3±0.28µs 98%
Expression (Parser) 5.3±0.22µs 5.4±0.22µs 99%
Fibonacci (Execution) 2.9±0.16ms 2.8±0.13ms 102%
For loop (Execution) 508.9±42.31µs 484.6±37.12µs 105%
For loop (Lexer) 6.0±0.45µs 5.9±0.31µs 102%
For loop (Parser) 14.8±0.85µs 14.5±0.53µs 102%
Hello World (Lexer) 1070.3±45.04ns 1057.1±41.58ns 101%
Hello World (Parser) 2.5±0.12µs 2.4±0.06µs 105%
Symbols (Execution) 509.9±28.66µs 503.1±18.69µs 101%
undefined undefined 100%

@HalidOdat
Copy link
Member Author

I think this is ready for review :)

 - Merged Ast `BigInt` to Builtin `BigInt`.
 - Split `BigInt` logic to separate files.
 - Added `builtins/bigint/operations.rs` for `BigInt` operations.
 - Added `builtins/bigint/conversions.rs` for `BigInt` conversions.
 - Added` builtins/bigint/equality.rs` for `BigInt` equality checking.
 - Added tests.
@github-actions
Copy link

github-actions bot commented Jun 5, 2020

Benchmark for 3956d50

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 469.0±25.22µs 466.4±14.33µs 101%
Expression (Lexer) 2.1±0.13µs 2.2±0.09µs 97%
Expression (Parser) 5.2±0.18µs 5.2±0.20µs 98%
Fibonacci (Execution) 2.7±0.06ms 2.7±0.06ms 100%
For loop (Execution) 486.6±24.11µs 479.7±11.60µs 101%
For loop (Lexer) 5.4±0.19µs 5.6±0.51µs 95%
For loop (Parser) 13.9±0.85µs 14.1±2.12µs 99%
Hello World (Lexer) 991.7±44.73ns 977.0±40.18ns 102%
Hello World (Parser) 2.3±0.09µs 2.3±0.07µs 99%
Symbols (Execution) 489.0±10.37µs 497.6±17.01µs 98%
undefined undefined 100%

@HalidOdat HalidOdat mentioned this pull request Jun 6, 2020
2 tasks
@HalidOdat HalidOdat merged commit d847ff8 into master Jun 6, 2020
@HalidOdat HalidOdat deleted the fix/to-bigint branch June 6, 2020 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants