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

[Merged by Bors] - Fix Symbol and BigInt constructors #2032

Closed
wants to merge 2 commits into from

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented Apr 16, 2022

It changes the following:

  • Symbol object has [[Construct]] internal method
  • Fix and comment step 1 in Symbol constructor.
  • Implement step 1 in BigInt constructor.

@HalidOdat HalidOdat added bug Something isn't working builtins PRs and Issues related to builtins/intrinsics labels Apr 16, 2022
@HalidOdat HalidOdat added this to the v0.15.0 milestone Apr 16, 2022
@github-actions
Copy link

github-actions bot commented Apr 16, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 88,720 88,720 0
Passed 53,170 53,174 +4
Ignored 21,853 21,853 0
Failed 13,697 13,693 -4
Panics 0 0 0
Conformance 59.93% 59.93% +0.00%
Fixed tests (4):
test/built-ins/Symbol/is-constructor.js [strict mode] (previously Failed)
test/built-ins/Symbol/is-constructor.js (previously Failed)
test/language/statements/class/subclass/builtin-objects/Symbol/symbol-valid-as-extends-value.js [strict mode] (previously Failed)
test/language/statements/class/subclass/builtin-objects/Symbol/symbol-valid-as-extends-value.js (previously Failed)

@HalidOdat HalidOdat force-pushed the fix/symbol-and-bigint-constructor branch from 8882eba to 4277453 Compare April 16, 2022 23:35
@codecov
Copy link

codecov bot commented Apr 16, 2022

Codecov Report

Merging #2032 (4277453) into main (a357a18) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2032   +/-   ##
=======================================
  Coverage   43.92%   43.92%           
=======================================
  Files         211      211           
  Lines       18693    18694    +1     
=======================================
+ Hits         8211     8212    +1     
  Misses      10482    10482           
Impacted Files Coverage Δ
boa_engine/src/builtins/bigint/mod.rs 79.59% <100.00%> (+0.42%) ⬆️
boa_engine/src/builtins/symbol/mod.rs 57.74% <100.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 a357a18...4277453. Read the comment docs.

@github-actions
Copy link

Benchmark for 4bc346b

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 474.2±19.96ns 468.5±22.62ns -1.20%
Arithmetic operations (Execution) 672.8±36.84ns 594.8±29.32ns -11.59%
Arithmetic operations (Parser) 4.9±0.18µs 5.0±0.30µs +2.04%
Array access (Compiler) 1307.1±59.38ns 1164.4±68.38ns -10.92%
Array access (Execution) 7.0±0.36µs 7.0±0.32µs 0.00%
Array access (Parser) 10.6±0.40µs 10.4±0.52µs -1.89%
Array creation (Compiler) 1736.5±135.23ns 1594.9±64.67ns -8.15%
Array creation (Execution) 2.3±0.07ms 2.5±0.11ms +8.70%
Array creation (Parser) 12.4±0.69µs 12.0±0.47µs -3.23%
Array pop (Compiler) 3.5±0.20µs 3.3±0.16µs -5.71%
Array pop (Execution) 1024.2±63.10µs 1009.0±43.04µs -1.48%
Array pop (Parser) 134.6±7.80µs 137.3±8.58µs +2.01%
Boolean Object Access (Compiler) 892.6±56.87ns 946.6±47.71ns +6.05%
Boolean Object Access (Execution) 3.9±0.26µs 3.7±0.15µs -5.13%
Boolean Object Access (Parser) 12.9±0.59µs 12.8±0.64µs -0.78%
Clean js (Compiler) 3.1±0.18µs 3.0±0.12µs -3.23%
Clean js (Execution) 685.7±37.18µs 622.9±24.68µs -9.16%
Clean js (Parser) 26.4±1.51µs 26.1±1.19µs -1.14%
Create Realm 254.4±13.54ns 259.4±13.45ns +1.97%
Dynamic Object Property Access (Compiler) 1578.3±96.34ns 1488.3±85.92ns -5.70%
Dynamic Object Property Access (Execution) 4.8±0.23µs 4.9±0.25µs +2.08%
Dynamic Object Property Access (Parser) 9.3±0.33µs 9.2±0.32µs -1.08%
Fibonacci (Compiler) 2.1±0.14µs 2.0±0.11µs -4.76%
Fibonacci (Execution) 1224.6±57.52µs 1305.8±67.30µs +6.63%
Fibonacci (Parser) 14.9±0.84µs 14.4±0.59µs -3.36%
For loop (Compiler) 1811.6±114.70ns 1744.6±76.32ns -3.70%
For loop (Execution) 13.9±0.59µs 13.5±0.57µs -2.88%
For loop (Parser) 12.4±0.56µs 12.6±0.63µs +1.61%
Mini js (Compiler) 2.9±0.16µs 2.9±0.12µs 0.00%
Mini js (Execution) 586.8±20.00µs 589.2±24.28µs +0.41%
Mini js (Parser) 25.0±1.08µs 24.4±1.59µs -2.40%
Number Object Access (Compiler) 907.4±51.88ns 889.0±39.85ns -2.03%
Number Object Access (Execution) 2.9±0.11µs 2.8±0.11µs -3.45%
Number Object Access (Parser) 10.1±0.65µs 9.8±0.38µs -2.97%
Object Creation (Compiler) 1294.3±68.43ns 1292.4±101.53ns -0.15%
Object Creation (Execution) 4.6±0.24µs 4.6±0.22µs 0.00%
Object Creation (Parser) 8.2±0.44µs 8.2±0.45µs 0.00%
RegExp (Compiler) 1459.1±63.05ns 1460.7±60.07ns +0.11%
RegExp (Execution) 9.9±0.45µs 10.0±0.61µs +1.01%
RegExp (Parser) 9.0±0.36µs 8.8±0.40µs -2.22%
RegExp Creation (Compiler) 1341.2±64.71ns 1268.3±69.95ns -5.44%
RegExp Creation (Execution) 7.5±0.29µs 7.4±0.28µs -1.33%
RegExp Creation (Parser) 7.4±0.35µs 7.3±0.35µs -1.35%
RegExp Literal (Compiler) 1501.2±75.19ns 1525.8±98.82ns +1.64%
RegExp Literal (Execution) 9.9±0.50µs 10.0±0.51µs +1.01%
RegExp Literal (Parser) 7.2±0.27µs 7.4±0.65µs +2.78%
RegExp Literal Creation (Compiler) 1387.3±93.63ns 1271.7±56.24ns -8.33%
RegExp Literal Creation (Execution) 7.5±0.27µs 7.6±0.44µs +1.33%
RegExp Literal Creation (Parser) 5.7±0.34µs 5.6±0.26µs -1.75%
Static Object Property Access (Compiler) 1451.5±78.63ns 1286.8±63.43ns -11.35%
Static Object Property Access (Execution) 4.7±0.21µs 4.9±0.28µs +4.26%
Static Object Property Access (Parser) 8.6±0.28µs 9.3±0.82µs +8.14%
String Object Access (Compiler) 1180.1±42.65ns 1164.5±41.87ns -1.32%
String Object Access (Execution) 5.9±0.32µs 5.3±0.20µs -10.17%
String Object Access (Parser) 12.8±0.64µs 12.5±0.57µs -2.34%
String comparison (Compiler) 2.1±0.11µs 1851.7±68.61ns -11.82%
String comparison (Execution) 4.1±0.18µs 4.1±0.17µs 0.00%
String comparison (Parser) 9.8±0.35µs 9.9±0.50µs +1.02%
String concatenation (Compiler) 1556.5±97.04ns 1463.4±68.00ns -5.98%
String concatenation (Execution) 3.9±0.17µs 4.0±0.22µs +2.56%
String concatenation (Parser) 7.2±0.50µs 6.9±0.40µs -4.17%
String copy (Compiler) 1305.0±62.65ns 1193.8±50.22ns -8.52%
String copy (Execution) 3.6±0.11µs 3.7±0.18µs +2.78%
String copy (Parser) 4.9±0.21µs 4.9±0.19µs 0.00%
Symbols (Compiler) 856.6±42.77ns 859.7±61.04ns +0.36%
Symbols (Execution) 3.9±0.26µs 3.8±0.19µs -2.56%
Symbols (Parser) 3.8±0.20µs 3.7±0.15µs -2.63%

@github-actions
Copy link

Benchmark for 49123d6

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 516.7±1.29ns 512.6±0.93ns -0.79%
Arithmetic operations (Execution) 463.9±1.45ns 465.1±0.76ns +0.26%
Arithmetic operations (Parser) 6.1±0.01µs 6.2±0.01µs +1.64%
Array access (Compiler) 1341.0±5.17ns 1338.6±4.65ns -0.18%
Array access (Execution) 8.3±0.05µs 8.3±0.04µs 0.00%
Array access (Parser) 14.2±0.06µs 14.1±0.04µs -0.70%
Array creation (Compiler) 2.1±0.04µs 1970.6±31.71ns -6.16%
Array creation (Execution) 2.5±0.01ms 2.4±0.01ms -4.00%
Array creation (Parser) 16.0±0.11µs 15.9±0.07µs -0.62%
Array pop (Compiler) 3.8±0.01µs 3.7±0.01µs -2.63%
Array pop (Execution) 1093.5±8.43µs 1095.5±5.93µs +0.18%
Array pop (Parser) 158.5±0.26µs 158.9±0.28µs +0.25%
Boolean Object Access (Compiler) 1099.0±12.52ns 1099.5±5.84ns +0.05%
Boolean Object Access (Execution) 4.4±0.01µs 4.4±0.01µs 0.00%
Boolean Object Access (Parser) 16.6±0.04µs 16.0±0.04µs -3.61%
Clean js (Compiler) 3.6±0.01µs 3.7±0.01µs +2.78%
Clean js (Execution) 728.6±6.66µs 702.2±3.23µs -3.62%
Clean js (Parser) 34.0±0.11µs 33.9±0.06µs -0.29%
Create Realm 274.9±0.49ns 275.7±0.72ns +0.29%
Dynamic Object Property Access (Compiler) 1774.9±10.76ns 1756.1±5.95ns -1.06%
Dynamic Object Property Access (Execution) 5.4±0.04µs 5.5±0.01µs +1.85%
Dynamic Object Property Access (Parser) 12.5±0.05µs 12.7±0.04µs +1.60%
Fibonacci (Compiler) 2.5±0.00µs 2.5±0.00µs 0.00%
Fibonacci (Execution) 1477.5±9.07µs 1457.5±16.63µs -1.35%
Fibonacci (Parser) 19.0±0.06µs 19.0±0.08µs 0.00%
For loop (Compiler) 2.2±0.01µs 2.1±0.00µs -4.55%
For loop (Execution) 15.6±0.08µs 15.5±0.09µs -0.64%
For loop (Parser) 16.0±0.04µs 16.1±0.03µs +0.63%
Mini js (Compiler) 3.5±0.01µs 3.6±0.01µs +2.86%
Mini js (Execution) 662.0±7.10µs 661.2±9.45µs -0.12%
Mini js (Parser) 30.4±0.11µs 30.4±0.10µs 0.00%
Number Object Access (Compiler) 1029.0±1.76ns 1039.0±3.33ns +0.97%
Number Object Access (Execution) 3.4±0.01µs 3.4±0.01µs 0.00%
Number Object Access (Parser) 13.0±0.06µs 13.0±0.08µs 0.00%
Object Creation (Compiler) 1484.4±13.86ns 1440.9±4.29ns -2.93%
Object Creation (Execution) 5.1±0.03µs 5.2±0.02µs +1.96%
Object Creation (Parser) 10.8±0.05µs 11.0±0.03µs +1.85%
RegExp (Compiler) 1808.5±35.38ns 1761.8±4.61ns -2.58%
RegExp (Execution) 11.6±0.06µs 11.6±0.07µs 0.00%
RegExp (Parser) 12.0±0.05µs 11.7±0.05µs -2.50%
RegExp Creation (Compiler) 1594.4±42.92ns 1512.6±12.78ns -5.13%
RegExp Creation (Execution) 8.5±0.03µs 8.7±0.03µs +2.35%
RegExp Creation (Parser) 10.0±0.05µs 9.8±0.04µs -2.00%
RegExp Literal (Compiler) 1789.8±29.65ns 1760.1±30.26ns -1.66%
RegExp Literal (Execution) 11.7±0.19µs 11.5±0.05µs -1.71%
RegExp Literal (Parser) 9.7±0.06µs 9.6±0.05µs -1.03%
RegExp Literal Creation (Compiler) 1568.4±42.12ns 1488.8±4.61ns -5.08%
RegExp Literal Creation (Execution) 8.5±0.03µs 8.6±0.03µs +1.18%
RegExp Literal Creation (Parser) 7.7±0.06µs 7.6±0.05µs -1.30%
Static Object Property Access (Compiler) 1509.7±7.98ns 1491.9±5.02ns -1.18%
Static Object Property Access (Execution) 5.3±0.03µs 5.4±0.02µs +1.89%
Static Object Property Access (Parser) 11.6±0.04µs 11.8±0.03µs +1.72%
String Object Access (Compiler) 1543.1±8.80ns 1518.0±7.93ns -1.63%
String Object Access (Execution) 6.4±0.06µs 6.2±0.03µs -3.13%
String Object Access (Parser) 16.3±0.05µs 15.8±0.15µs -3.07%
String comparison (Compiler) 2.3±0.02µs 2.2±0.01µs -4.35%
String comparison (Execution) 4.7±0.03µs 4.8±0.03µs +2.13%
String comparison (Parser) 12.7±0.04µs 12.6±0.06µs -0.79%
String concatenation (Compiler) 1836.1±16.21ns 1737.2±3.56ns -5.39%
String concatenation (Execution) 4.4±0.01µs 4.5±0.01µs +2.27%
String concatenation (Parser) 8.8±0.02µs 8.7±0.06µs -1.14%
String copy (Compiler) 1380.3±13.58ns 1363.8±3.31ns -1.20%
String copy (Execution) 4.2±0.02µs 4.2±0.01µs 0.00%
String copy (Parser) 6.6±0.04µs 6.5±0.03µs -1.52%
Symbols (Compiler) 956.0±1.96ns 951.1±1.32ns -0.51%
Symbols (Execution) 4.3±0.02µs 4.3±0.01µs 0.00%
Symbols (Parser) 5.1±0.01µs 5.0±0.01µs -1.96%

Copy link
Member

@RageKnify RageKnify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

Thanks! Looks good :)

@Razican
Copy link
Member

Razican commented Apr 17, 2022

bors r+

bors bot pushed a commit that referenced this pull request Apr 17, 2022
It changes the following:
- `Symbol` object has `[[Construct]]` internal method
- Fix and comment step 1 in `Symbol` constructor.
- Implement step 1 in `BigInt` constructor.
@bors
Copy link

bors bot commented Apr 17, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Fix Symbol and BigInt constructors [Merged by Bors] - Fix Symbol and BigInt constructors Apr 17, 2022
@bors bors bot closed this Apr 17, 2022
@bors bors bot deleted the fix/symbol-and-bigint-constructor branch April 17, 2022 08:13
Razican pushed a commit that referenced this pull request Jun 8, 2022
It changes the following:
- `Symbol` object has `[[Construct]]` internal method
- Fix and comment step 1 in `Symbol` constructor.
- Implement step 1 in `BigInt` constructor.
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.

3 participants