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] - Create Date standard constructor #2079

Closed
wants to merge 1 commit into from

Conversation

jedel1043
Copy link
Member

@jedel1043 jedel1043 commented May 19, 2022

Apparently we didn't have a Date intrinsic constructor, we were setting the prototype of all Date objects to the Object prototype.

@github-actions
Copy link

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 90,192 90,192 0
Passed 54,651 54,661 +10
Ignored 23,279 23,279 0
Failed 12,262 12,252 -10
Panics 0 0 0
Conformance 60.59% 60.61% +0.01%
Fixed tests (10):
test/built-ins/Function/prototype/bind/get-fn-realm.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/bind/get-fn-realm.js (previously Failed)
test/built-ins/Date/subclassing.js [strict mode] (previously Failed)
test/built-ins/Date/subclassing.js (previously Failed)
test/built-ins/Date/proto-from-ctor-realm-zero.js [strict mode] (previously Failed)
test/built-ins/Date/proto-from-ctor-realm-zero.js (previously Failed)
test/built-ins/Date/proto-from-ctor-realm-one.js [strict mode] (previously Failed)
test/built-ins/Date/proto-from-ctor-realm-one.js (previously Failed)
test/built-ins/Date/proto-from-ctor-realm-two.js [strict mode] (previously Failed)
test/built-ins/Date/proto-from-ctor-realm-two.js (previously Failed)

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #2079 (c3dd937) into main (456da49) will increase coverage by 0.00%.
The diff coverage is 50.00%.

❗ Current head c3dd937 differs from pull request most recent head c8931d5. Consider uploading reports for the commit c8931d5 to get more accurate results

@@           Coverage Diff           @@
##             main    #2079   +/-   ##
=======================================
  Coverage   44.17%   44.18%           
=======================================
  Files         215      215           
  Lines       19371    19374    +3     
=======================================
+ Hits         8558     8560    +2     
- Misses      10813    10814    +1     
Impacted Files Coverage Δ
boa_engine/src/builtins/typed_array/mod.rs 3.73% <0.00%> (ø)
boa_engine/src/lib.rs 87.09% <ø> (ø)
boa_engine/src/object/mod.rs 20.10% <ø> (ø)
boa_engine/src/syntax/ast/keyword.rs 95.91% <ø> (ø)
boa_engine/src/syntax/ast/node/declaration/mod.rs 50.00% <0.00%> (ø)
boa_engine/src/value/integer.rs 62.50% <ø> (ø)
boa_engine/src/vm/opcode.rs 50.00% <ø> (ø)
boa_tester/src/main.rs 0.00% <ø> (ø)
boa_engine/src/context/intrinsics.rs 57.89% <66.66%> (+0.20%) ⬆️
boa_engine/src/value/mod.rs 52.53% <92.85%> (ø)
... and 5 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 456da49...c8931d5. Read the comment docs.

@github-actions
Copy link

Benchmark for 66f58d4

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 539.1±1.12ns 538.7±1.77ns -0.07%
Arithmetic operations (Execution) 704.8±0.52ns 687.6±0.50ns -2.44%
Arithmetic operations (Parser) 6.2±0.01µs 6.3±0.01µs +1.61%
Array access (Compiler) 1486.9±7.80ns 1461.3±2.29ns -1.72%
Array access (Execution) 8.4±0.07µs 8.5±0.05µs +1.19%
Array access (Parser) 13.5±0.05µs 13.7±0.04µs +1.48%
Array creation (Compiler) 2.3±0.01µs 2.3±0.01µs 0.00%
Array creation (Execution) 2.6±0.00ms 2.7±0.00ms +3.85%
Array creation (Parser) 15.4±0.01µs 15.5±0.03µs +0.65%
Array pop (Compiler) 4.2±0.01µs 4.0±0.00µs -4.76%
Array pop (Execution) 1167.9±4.33µs 1211.8±13.65µs +3.76%
Array pop (Parser) 156.5±0.13µs 165.8±6.47µs +5.94%
Boolean Object Access (Compiler) 1153.9±3.99ns 1139.5±5.53ns -1.25%
Boolean Object Access (Execution) 4.4±0.01µs 4.7±0.02µs +6.82%
Boolean Object Access (Parser) 15.8±0.02µs 16.2±0.02µs +2.53%
Clean js (Compiler) 4.8±0.01µs 4.8±0.02µs 0.00%
Clean js (Execution) 731.9±5.41µs 740.2±4.14µs +1.13%
Clean js (Parser) 33.4±0.03µs 33.7±0.03µs +0.90%
Create Realm 282.0±0.20ns 283.6±0.65ns +0.57%
Dynamic Object Property Access (Compiler) 1857.5±7.26ns 1842.3±8.25ns -0.82%
Dynamic Object Property Access (Execution) 5.6±0.03µs 5.8±0.02µs +3.57%
Dynamic Object Property Access (Parser) 11.9±0.02µs 12.0±0.02µs +0.84%
Fibonacci (Compiler) 2.8±0.00µs 2.7±0.00µs -3.57%
Fibonacci (Execution) 1409.3±2.78µs 1417.0±4.70µs +0.55%
Fibonacci (Parser) 18.1±0.02µs 18.3±0.04µs +1.10%
For loop (Compiler) 2.6±0.01µs 2.7±0.01µs +3.85%
For loop (Execution) 16.9±0.23µs 16.6±0.05µs -1.78%
For loop (Parser) 15.8±0.02µs 15.9±0.06µs +0.63%
Mini js (Compiler) 4.2±0.02µs 4.3±0.01µs +2.38%
Mini js (Execution) 686.3±3.45µs 698.1±4.32µs +1.72%
Mini js (Parser) 29.3±0.04µs 29.6±0.04µs +1.02%
Number Object Access (Compiler) 1086.5±1.82ns 1080.8±10.78ns -0.52%
Number Object Access (Execution) 3.4±0.01µs 3.6±0.02µs +5.88%
Number Object Access (Parser) 12.3±0.01µs 12.5±0.02µs +1.63%
Object Creation (Compiler) 1604.6±8.18ns 1623.2±4.91ns +1.16%
Object Creation (Execution) 5.3±0.02µs 5.3±0.02µs 0.00%
Object Creation (Parser) 10.2±0.02µs 10.4±0.03µs +1.96%
RegExp (Compiler) 1870.5±15.01ns 1818.3±8.73ns -2.79%
RegExp (Execution) 12.4±0.08µs 12.7±0.09µs +2.42%
RegExp (Parser) 11.3±0.02µs 11.4±0.01µs +0.88%
RegExp Creation (Compiler) 1605.3±5.51ns 1608.0±3.96ns +0.17%
RegExp Creation (Execution) 9.3±0.05µs 9.7±0.03µs +4.30%
RegExp Creation (Parser) 9.4±0.12µs 9.4±0.01µs 0.00%
RegExp Literal (Compiler) 1865.3±16.48ns 1815.6±9.13ns -2.66%
RegExp Literal (Execution) 12.3±0.07µs 12.7±0.08µs +3.25%
RegExp Literal (Parser) 9.2±0.03µs 9.2±0.05µs 0.00%
RegExp Literal Creation (Compiler) 1613.0±4.40ns 1605.0±4.23ns -0.50%
RegExp Literal Creation (Execution) 9.3±0.05µs 9.7±0.03µs +4.30%
RegExp Literal Creation (Parser) 7.2±0.02µs 7.2±0.02µs 0.00%
Static Object Property Access (Compiler) 1670.9±5.42ns 1612.4±5.50ns -3.50%
Static Object Property Access (Execution) 5.5±0.01µs 5.5±0.02µs 0.00%
Static Object Property Access (Parser) 11.0±0.02µs 11.1±0.03µs +0.91%
String Object Access (Compiler) 1512.2±2.91ns 1501.3±0.94ns -0.72%
String Object Access (Execution) 6.4±0.03µs 6.8±0.04µs +6.25%
String Object Access (Parser) 16.3±2.30µs 15.9±0.03µs -2.45%
String comparison (Compiler) 2.3±0.01µs 2.3±0.01µs 0.00%
String comparison (Execution) 4.8±0.03µs 4.8±0.03µs 0.00%
String comparison (Parser) 12.3±0.05µs 12.3±0.06µs 0.00%
String concatenation (Compiler) 1823.2±7.93ns 1801.6±8.57ns -1.18%
String concatenation (Execution) 4.6±0.01µs 4.6±0.02µs 0.00%
String concatenation (Parser) 8.6±0.03µs 8.5±0.04µs -1.16%
String copy (Compiler) 1518.3±4.40ns 1520.8±4.03ns +0.16%
String copy (Execution) 4.3±0.02µs 4.3±0.01µs 0.00%
String copy (Parser) 6.4±0.01µs 6.4±0.02µs 0.00%
Symbols (Compiler) 1129.8±5.02ns 1138.5±3.30ns +0.77%
Symbols (Execution) 4.4±0.01µs 4.4±0.01µs 0.00%
Symbols (Parser) 4.9±0.01µs 5.0±0.01µs +2.04%

@jedel1043 jedel1043 added enhancement New feature or request builtins PRs and Issues related to builtins/intrinsics labels May 19, 2022
@jedel1043 jedel1043 added this to the v0.15.0 milestone May 19, 2022
@github-actions
Copy link

Benchmark for ff6113f

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 504.4±2.25ns 507.5±1.96ns +0.61%
Arithmetic operations (Execution) 527.8±0.67ns 526.4±0.66ns -0.27%
Arithmetic operations (Parser) 6.5±0.02µs 6.6±0.03µs +1.54%
Array access (Compiler) 1534.7±4.36ns 1543.8±7.99ns +0.59%
Array access (Execution) 9.3±0.29µs 9.3±0.07µs 0.00%
Array access (Parser) 14.4±0.06µs 14.4±0.06µs 0.00%
Array creation (Compiler) 2.5±0.01µs 2.5±0.01µs 0.00%
Array creation (Execution) 2.5±0.01ms 2.6±0.00ms +4.00%
Array creation (Parser) 16.5±0.02µs 16.6±0.06µs +0.61%
Array pop (Compiler) 4.2±0.01µs 4.0±0.04µs -4.76%
Array pop (Execution) 1165.6±6.91µs 1184.4±9.46µs +1.61%
Array pop (Parser) 163.7±0.33µs 166.5±0.19µs +1.71%
Boolean Object Access (Compiler) 1176.0±5.15ns 1158.0±5.04ns -1.53%
Boolean Object Access (Execution) 4.7±0.02µs 4.8±0.02µs +2.13%
Boolean Object Access (Parser) 17.0±0.05µs 17.0±0.10µs 0.00%
Clean js (Compiler) 5.1±0.02µs 5.1±0.02µs 0.00%
Clean js (Execution) 768.4±3.57µs 777.1±3.70µs +1.13%
Clean js (Parser) 36.1±0.18µs 36.1±0.06µs 0.00%
Create Realm 290.7±0.40ns 283.4±1.71ns -2.51%
Dynamic Object Property Access (Compiler) 2.0±0.00µs 2.0±0.01µs 0.00%
Dynamic Object Property Access (Execution) 5.9±0.03µs 5.9±0.04µs 0.00%
Dynamic Object Property Access (Parser) 12.9±0.05µs 12.8±0.05µs -0.78%
Fibonacci (Compiler) 3.0±0.02µs 2.9±0.01µs -3.33%
Fibonacci (Execution) 1487.8±4.44µs 1496.6±6.03µs +0.59%
Fibonacci (Parser) 19.4±0.09µs 19.6±0.08µs +1.03%
For loop (Compiler) 2.9±0.01µs 2.9±0.01µs 0.00%
For loop (Execution) 17.0±0.07µs 17.6±0.05µs +3.53%
For loop (Parser) 17.0±0.05µs 17.0±0.09µs 0.00%
Mini js (Compiler) 4.5±0.01µs 4.5±0.01µs 0.00%
Mini js (Execution) 718.9±7.09µs 728.5±5.92µs +1.34%
Mini js (Parser) 31.4±0.10µs 31.8±0.05µs +1.27%
Number Object Access (Compiler) 1114.0±3.16ns 1089.6±5.17ns -2.19%
Number Object Access (Execution) 3.6±0.02µs 3.7±0.03µs +2.78%
Number Object Access (Parser) 13.1±0.06µs 13.2±0.03µs +0.76%
Object Creation (Compiler) 1713.5±3.73ns 1660.8±4.29ns -3.08%
Object Creation (Execution) 5.4±0.03µs 5.5±0.02µs +1.85%
Object Creation (Parser) 11.2±0.26µs 11.1±0.08µs -0.89%
RegExp (Compiler) 1933.4±5.13ns 1926.5±6.92ns -0.36%
RegExp (Execution) 12.9±0.08µs 13.2±0.10µs +2.33%
RegExp (Parser) 12.2±0.03µs 12.1±0.06µs -0.82%
RegExp Creation (Compiler) 1723.4±3.50ns 1731.3±6.71ns +0.46%
RegExp Creation (Execution) 9.9±0.03µs 9.9±0.02µs 0.00%
RegExp Creation (Parser) 10.1±0.02µs 10.0±0.05µs -0.99%
RegExp Literal (Compiler) 1937.4±20.34ns 1930.6±5.97ns -0.35%
RegExp Literal (Execution) 13.0±0.09µs 13.1±0.08µs +0.77%
RegExp Literal (Parser) 9.9±0.06µs 9.8±0.07µs -1.01%
RegExp Literal Creation (Compiler) 1717.9±3.67ns 1711.3±3.57ns -0.38%
RegExp Literal Creation (Execution) 9.9±0.02µs 9.9±0.03µs 0.00%
RegExp Literal Creation (Parser) 7.7±0.07µs 7.7±0.11µs 0.00%
Static Object Property Access (Compiler) 1764.4±5.08ns 1697.0±2.86ns -3.82%
Static Object Property Access (Execution) 5.7±0.04µs 5.7±0.01µs 0.00%
Static Object Property Access (Parser) 11.9±0.04µs 11.9±0.05µs 0.00%
String Object Access (Compiler) 1560.0±4.20ns 1556.1±3.69ns -0.25%
String Object Access (Execution) 7.2±0.07µs 7.0±0.04µs -2.78%
String Object Access (Parser) 16.7±0.09µs 16.8±0.04µs +0.60%
String comparison (Compiler) 2.4±0.01µs 2.4±0.01µs 0.00%
String comparison (Execution) 5.1±0.03µs 5.0±0.03µs -1.96%
String comparison (Parser) 13.5±0.12µs 13.3±0.17µs -1.48%
String concatenation (Compiler) 1918.2±6.52ns 1920.6±5.71ns +0.13%
String concatenation (Execution) 4.8±0.04µs 4.8±0.03µs 0.00%
String concatenation (Parser) 9.5±0.11µs 9.2±0.13µs -3.16%
String copy (Compiler) 1574.0±5.30ns 1579.4±6.50ns +0.34%
String copy (Execution) 4.5±0.02µs 4.5±0.01µs 0.00%
String copy (Parser) 7.1±0.05µs 7.0±0.07µs -1.41%
Symbols (Compiler) 1187.4±3.06ns 1166.5±2.32ns -1.76%
Symbols (Execution) 4.7±0.02µs 4.6±0.02µs -2.13%
Symbols (Parser) 5.4±0.05µs 5.2±0.02µs -3.70%

@jedel1043 jedel1043 requested a review from RageKnify May 20, 2022 20:14
@jedel1043 jedel1043 changed the title Create Date standard constructor Create Date standard constructor and fix 1.61.0 lints May 20, 2022
@jedel1043 jedel1043 changed the title Create Date standard constructor and fix 1.61.0 lints Create Date standard constructor May 20, 2022
@github-actions
Copy link

Benchmark for ea80709

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 518.2±1.37ns 513.5±2.58ns -0.91%
Arithmetic operations (Execution) 528.7±0.63ns 532.0±0.89ns +0.62%
Arithmetic operations (Parser) 6.5±0.04µs 6.6±0.04µs +1.54%
Array access (Compiler) 1531.4±7.31ns 1533.6±4.33ns +0.14%
Array access (Execution) 9.2±0.05µs 9.4±0.09µs +2.17%
Array access (Parser) 14.4±0.04µs 14.5±0.06µs +0.69%
Array creation (Compiler) 2.5±0.01µs 2.5±0.01µs 0.00%
Array creation (Execution) 2.6±0.01ms 2.6±0.01ms 0.00%
Array creation (Parser) 16.8±0.05µs 16.7±0.04µs -0.60%
Array pop (Compiler) 4.2±0.01µs 4.0±0.03µs -4.76%
Array pop (Execution) 1191.4±5.40µs 1191.6±4.28µs +0.02%
Array pop (Parser) 167.6±0.40µs 166.5±0.24µs -0.66%
Boolean Object Access (Compiler) 1210.8±5.72ns 1180.7±5.65ns -2.49%
Boolean Object Access (Execution) 4.7±0.02µs 4.7±0.03µs 0.00%
Boolean Object Access (Parser) 17.1±0.09µs 17.1±0.07µs 0.00%
Clean js (Compiler) 5.2±0.02µs 5.1±0.03µs -1.92%
Clean js (Execution) 777.7±15.89µs 783.0±6.44µs +0.68%
Clean js (Parser) 36.2±0.07µs 36.0±0.20µs -0.55%
Create Realm 289.5±2.64ns 282.0±0.78ns -2.59%
Dynamic Object Property Access (Compiler) 2.1±0.01µs 1984.5±5.40ns -5.50%
Dynamic Object Property Access (Execution) 5.9±0.04µs 5.9±0.02µs 0.00%
Dynamic Object Property Access (Parser) 12.7±0.04µs 12.8±0.04µs +0.79%
Fibonacci (Compiler) 3.0±0.01µs 2.9±0.01µs -3.33%
Fibonacci (Execution) 1516.7±3.05µs 1506.2±6.30µs -0.69%
Fibonacci (Parser) 19.6±0.04µs 19.6±0.12µs 0.00%
For loop (Compiler) 2.9±0.01µs 2.9±0.01µs 0.00%
For loop (Execution) 17.4±0.06µs 17.1±0.11µs -1.72%
For loop (Parser) 17.1±0.06µs 17.0±0.06µs -0.58%
Mini js (Compiler) 4.6±0.01µs 4.6±0.01µs 0.00%
Mini js (Execution) 728.2±12.97µs 732.9±4.65µs +0.65%
Mini js (Parser) 31.9±0.07µs 31.6±0.05µs -0.94%
Number Object Access (Compiler) 1134.6±5.33ns 1109.9±9.07ns -2.18%
Number Object Access (Execution) 3.6±0.02µs 3.6±0.02µs 0.00%
Number Object Access (Parser) 13.3±0.02µs 13.3±0.02µs 0.00%
Object Creation (Compiler) 1710.9±5.82ns 1717.2±3.41ns +0.37%
Object Creation (Execution) 5.5±0.03µs 5.5±0.01µs 0.00%
Object Creation (Parser) 10.9±0.06µs 10.9±0.05µs 0.00%
RegExp (Compiler) 1902.5±7.15ns 1916.6±6.45ns +0.74%
RegExp (Execution) 13.1±0.10µs 13.2±0.08µs +0.76%
RegExp (Parser) 12.1±0.05µs 12.1±0.05µs 0.00%
RegExp Creation (Compiler) 1711.8±4.71ns 1691.0±4.49ns -1.22%
RegExp Creation (Execution) 10.0±0.03µs 10.0±0.03µs 0.00%
RegExp Creation (Parser) 10.0±0.08µs 10.1±0.05µs +1.00%
RegExp Literal (Compiler) 1934.7±7.46ns 1917.9±7.21ns -0.87%
RegExp Literal (Execution) 13.0±0.08µs 13.1±0.09µs +0.77%
RegExp Literal (Parser) 9.8±0.07µs 9.7±0.06µs -1.02%
RegExp Literal Creation (Compiler) 1682.9±4.51ns 1709.7±11.04ns +1.59%
RegExp Literal Creation (Execution) 10.0±0.03µs 10.0±0.02µs 0.00%
RegExp Literal Creation (Parser) 7.6±0.04µs 7.6±0.04µs 0.00%
Static Object Property Access (Compiler) 1755.8±3.73ns 1693.3±4.64ns -3.56%
Static Object Property Access (Execution) 5.8±0.03µs 5.7±0.01µs -1.72%
Static Object Property Access (Parser) 11.8±0.05µs 11.9±0.08µs +0.85%
String Object Access (Compiler) 1582.0±4.23ns 1573.7±5.16ns -0.52%
String Object Access (Execution) 6.9±0.05µs 6.9±0.04µs 0.00%
String Object Access (Parser) 16.6±0.02µs 17.1±0.12µs +3.01%
String comparison (Compiler) 2.4±0.00µs 2.4±0.01µs 0.00%
String comparison (Execution) 5.1±0.02µs 5.1±0.02µs 0.00%
String comparison (Parser) 13.3±0.14µs 13.4±0.12µs +0.75%
String concatenation (Compiler) 1879.0±7.04ns 1945.9±4.30ns +3.56%
String concatenation (Execution) 4.8±0.02µs 4.9±0.03µs +2.08%
String concatenation (Parser) 9.2±0.12µs 9.3±0.07µs +1.09%
String copy (Compiler) 1589.6±5.77ns 1573.4±6.67ns -1.02%
String copy (Execution) 4.5±0.01µs 4.5±0.01µs 0.00%
String copy (Parser) 6.9±0.11µs 6.9±0.07µs 0.00%
Symbols (Compiler) 1178.6±1.49ns 1169.4±2.17ns -0.78%
Symbols (Execution) 4.6±0.05µs 4.6±0.02µs 0.00%
Symbols (Parser) 5.3±0.02µs 5.3±0.10µs 0.00%

@raskad
Copy link
Member

raskad commented May 21, 2022

bors r+

bors bot pushed a commit that referenced this pull request May 21, 2022
Apparently we didn't have a `Date` intrinsic constructor, we were setting the prototype of all `Date` objects to the `Object` prototype.
@bors
Copy link

bors bot commented May 21, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Create Date standard constructor [Merged by Bors] - Create Date standard constructor May 21, 2022
@bors bors bot closed this May 21, 2022
@bors bors bot deleted the date-intrinsic branch May 21, 2022 01:04
Razican pushed a commit that referenced this pull request Jun 8, 2022
Apparently we didn't have a `Date` intrinsic constructor, we were setting the prototype of all `Date` objects to the `Object` prototype.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants