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 ArrayBuffer.isView() #2019

Closed
wants to merge 1 commit into from

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented Apr 8, 2022

ArrayBuffer.isView() should check whether the object contains a [[ViewedArrayBuffer]] internal slot, which DataView has.

It changes the following:

  • Fix ArrayBuffer.isView()

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

github-actions bot commented Apr 8, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 88,650 88,650 0
Passed 50,746 50,750 +4
Ignored 21,711 21,711 0
Failed 16,193 16,189 -4
Panics 0 0 0
Conformance 57.24% 57.25% +0.00%
Fixed tests (4):
test/built-ins/ArrayBuffer/isView/invoked-as-a-fn.js [strict mode] (previously Failed)
test/built-ins/ArrayBuffer/isView/invoked-as-a-fn.js (previously Failed)
test/built-ins/ArrayBuffer/isView/arg-is-dataview.js [strict mode] (previously Failed)
test/built-ins/ArrayBuffer/isView/arg-is-dataview.js (previously Failed)

@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #2019 (2890059) into main (aeb5460) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #2019      +/-   ##
==========================================
- Coverage   43.99%   43.97%   -0.02%     
==========================================
  Files         211      211              
  Lines       18665    18673       +8     
==========================================
  Hits         8211     8211              
- Misses      10454    10462       +8     
Impacted Files Coverage Δ
boa_engine/src/builtins/array_buffer/mod.rs 9.44% <0.00%> (ø)
boa_engine/src/object/mod.rs 20.77% <0.00%> (-0.23%) ⬇️

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 aeb5460...2890059. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Apr 8, 2022

Benchmark for 5eeac73

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 519.0±1.00ns 515.1±1.13ns -0.75%
Arithmetic operations (Execution) 474.7±4.81ns 461.7±1.17ns -2.74%
Arithmetic operations (Parser) 6.1±0.02µs 6.1±0.01µs 0.00%
Array access (Compiler) 1320.9±4.68ns 1357.0±8.01ns +2.73%
Array access (Execution) 8.3±0.03µs 8.3±0.16µs 0.00%
Array access (Parser) 13.6±0.04µs 13.6±0.06µs 0.00%
Array creation (Compiler) 1979.9±4.46ns 1967.0±4.08ns -0.65%
Array creation (Execution) 2.4±0.00ms 2.4±0.00ms 0.00%
Array creation (Parser) 15.5±0.05µs 15.6±0.05µs +0.65%
Array pop (Compiler) 3.8±0.01µs 3.7±0.01µs -2.63%
Array pop (Execution) 1076.5±5.23µs 1073.8±2.84µs -0.25%
Array pop (Parser) 156.0±5.96µs 153.9±0.39µs -1.35%
Boolean Object Access (Compiler) 1108.4±4.50ns 1105.3±3.99ns -0.28%
Boolean Object Access (Execution) 4.6±0.01µs 4.5±0.01µs -2.17%
Boolean Object Access (Parser) 15.8±0.02µs 16.1±0.02µs +1.90%
Clean js (Compiler) 3.6±0.01µs 3.7±0.01µs +2.78%
Clean js (Execution) 703.4±3.24µs 698.6±2.93µs -0.68%
Clean js (Parser) 33.1±0.10µs 33.4±0.22µs +0.91%
Create Realm 271.6±0.49ns 272.3±1.65ns +0.26%
Dynamic Object Property Access (Compiler) 1715.5±4.97ns 1758.9±8.73ns +2.53%
Dynamic Object Property Access (Execution) 5.5±0.16µs 5.4±0.05µs -1.82%
Dynamic Object Property Access (Parser) 12.0±0.02µs 12.1±0.06µs +0.83%
Fibonacci (Compiler) 2.4±0.01µs 2.5±0.01µs +4.17%
Fibonacci (Execution) 1413.4±3.94µs 1413.2±2.77µs -0.01%
Fibonacci (Parser) 18.4±0.05µs 18.5±0.07µs +0.54%
For loop (Compiler) 2.1±0.01µs 2.1±0.00µs 0.00%
For loop (Execution) 15.2±0.08µs 14.8±0.04µs -2.63%
For loop (Parser) 15.7±0.04µs 15.7±0.13µs 0.00%
Mini js (Compiler) 3.5±0.01µs 3.5±0.02µs 0.00%
Mini js (Execution) 669.7±4.65µs 668.7±2.45µs -0.15%
Mini js (Parser) 29.5±0.11µs 29.5±0.10µs 0.00%
Number Object Access (Compiler) 1040.2±1.35ns 1036.3±1.72ns -0.37%
Number Object Access (Execution) 3.6±0.06µs 3.5±0.06µs -2.78%
Number Object Access (Parser) 12.5±0.02µs 12.6±0.02µs +0.80%
Object Creation (Compiler) 1434.6±3.96ns 1474.0±4.61ns +2.75%
Object Creation (Execution) 5.1±0.02µs 5.1±0.02µs 0.00%
Object Creation (Parser) 10.5±0.04µs 10.5±0.07µs 0.00%
RegExp (Compiler) 1728.4±3.69ns 1751.5±4.50ns +1.34%
RegExp (Execution) 11.6±0.06µs 11.6±0.07µs 0.00%
RegExp (Parser) 11.6±0.04µs 11.6±0.07µs 0.00%
RegExp Creation (Compiler) 1464.3±3.91ns 1500.9±16.34ns +2.50%
RegExp Creation (Execution) 9.3±0.05µs 8.7±0.03µs -6.45%
RegExp Creation (Parser) 9.7±0.19µs 9.7±0.06µs 0.00%
RegExp Literal (Compiler) 1663.7±2.88ns 1743.9±4.48ns +4.82%
RegExp Literal (Execution) 12.4±0.07µs 11.5±0.06µs -7.26%
RegExp Literal (Parser) 9.4±0.03µs 9.4±0.02µs 0.00%
RegExp Literal Creation (Compiler) 1505.5±5.49ns 1471.6±5.30ns -2.25%
RegExp Literal Creation (Execution) 8.6±0.03µs 8.6±0.03µs 0.00%
RegExp Literal Creation (Parser) 7.4±0.03µs 7.5±0.03µs +1.35%
Static Object Property Access (Compiler) 1459.0±4.37ns 1467.2±4.12ns +0.56%
Static Object Property Access (Execution) 5.3±0.02µs 5.3±0.02µs 0.00%
Static Object Property Access (Parser) 11.2±0.03µs 11.3±0.07µs +0.89%
String Object Access (Compiler) 1499.6±8.99ns 1499.7±13.72ns +0.01%
String Object Access (Execution) 6.3±0.05µs 6.2±0.02µs -1.59%
String Object Access (Parser) 15.7±0.01µs 15.9±0.02µs +1.27%
String comparison (Compiler) 2.2±0.01µs 2.3±0.01µs +4.55%
String comparison (Execution) 4.7±0.03µs 4.9±0.03µs +4.26%
String comparison (Parser) 12.5±0.05µs 12.5±0.05µs 0.00%
String concatenation (Compiler) 1707.0±2.73ns 1730.6±3.50ns +1.38%
String concatenation (Execution) 4.5±0.06µs 4.5±0.05µs 0.00%
String concatenation (Parser) 8.8±0.20µs 8.6±0.06µs -2.27%
String copy (Compiler) 1362.2±5.35ns 1405.3±2.55ns +3.16%
String copy (Execution) 4.2±0.02µs 4.2±0.01µs 0.00%
String copy (Parser) 6.5±0.04µs 6.5±0.06µs 0.00%
Symbols (Compiler) 957.2±1.78ns 976.1±2.33ns +1.97%
Symbols (Execution) 4.4±0.01µs 4.4±0.01µs 0.00%
Symbols (Parser) 4.9±0.01µs 4.9±0.01µs 0.00%

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! You will need to re-base to remove those unrelated clippy errors.

@github-actions
Copy link

github-actions bot commented Apr 8, 2022

Benchmark for 6391afa

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 506.9±1.22ns 508.8±1.33ns +0.37%
Arithmetic operations (Execution) 457.5±1.34ns 457.6±1.23ns +0.02%
Arithmetic operations (Parser) 6.0±0.01µs 6.1±0.02µs +1.67%
Array access (Compiler) 1334.6±4.88ns 1337.8±4.65ns +0.24%
Array access (Execution) 8.5±0.03µs 8.5±0.05µs 0.00%
Array access (Parser) 13.8±0.03µs 13.6±0.03µs -1.45%
Array creation (Compiler) 1986.5±4.69ns 1994.8±4.69ns +0.42%
Array creation (Execution) 2.4±0.01ms 2.4±0.01ms 0.00%
Array creation (Parser) 15.7±0.04µs 15.4±0.04µs -1.91%
Array pop (Compiler) 3.7±0.01µs 3.7±0.01µs 0.00%
Array pop (Execution) 1076.6±3.35µs 1077.6±17.83µs +0.09%
Array pop (Parser) 155.3±0.46µs 154.5±0.24µs -0.52%
Boolean Object Access (Compiler) 1091.4±5.63ns 1096.5±5.02ns +0.47%
Boolean Object Access (Execution) 4.5±0.01µs 4.5±0.01µs 0.00%
Boolean Object Access (Parser) 16.0±0.02µs 15.8±0.03µs -1.25%
Clean js (Compiler) 3.6±0.01µs 3.6±0.01µs 0.00%
Clean js (Execution) 701.7±3.42µs 699.5±3.34µs -0.31%
Clean js (Parser) 33.3±0.11µs 33.3±0.13µs 0.00%
Create Realm 268.9±0.34ns 275.7±6.03ns +2.53%
Dynamic Object Property Access (Compiler) 1829.1±8.24ns 1777.6±5.29ns -2.82%
Dynamic Object Property Access (Execution) 5.7±0.02µs 5.6±0.02µs -1.75%
Dynamic Object Property Access (Parser) 12.2±0.04µs 12.1±0.04µs -0.82%
Fibonacci (Compiler) 2.4±0.01µs 2.5±0.01µs +4.17%
Fibonacci (Execution) 1421.2±5.08µs 1406.1±3.44µs -1.06%
Fibonacci (Parser) 18.4±0.04µs 18.3±0.04µs -0.54%
For loop (Compiler) 2.1±0.01µs 2.3±0.00µs +9.52%
For loop (Execution) 14.8±0.06µs 14.7±0.04µs -0.68%
For loop (Parser) 15.7±0.03µs 15.6±0.04µs -0.64%
Mini js (Compiler) 3.5±0.02µs 3.5±0.01µs 0.00%
Mini js (Execution) 662.8±4.05µs 665.9±2.88µs +0.47%
Mini js (Parser) 29.4±0.17µs 29.4±0.14µs 0.00%
Number Object Access (Compiler) 1028.0±2.68ns 1036.7±1.77ns +0.85%
Number Object Access (Execution) 3.5±0.09µs 3.5±0.06µs 0.00%
Number Object Access (Parser) 12.6±0.02µs 12.5±0.03µs -0.79%
Object Creation (Compiler) 1415.4±5.21ns 1589.0±7.49ns +12.27%
Object Creation (Execution) 5.3±0.07µs 5.3±0.05µs 0.00%
Object Creation (Parser) 10.6±0.08µs 10.5±0.03µs -0.94%
RegExp (Compiler) 1674.2±2.74ns 1751.1±26.75ns +4.59%
RegExp (Execution) 11.6±0.06µs 11.6±0.07µs 0.00%
RegExp (Parser) 11.6±0.02µs 11.5±0.04µs -0.86%
RegExp Creation (Compiler) 1451.9±4.97ns 1624.8±4.29ns +11.91%
RegExp Creation (Execution) 8.6±0.08µs 8.7±0.04µs +1.16%
RegExp Creation (Parser) 9.7±0.04µs 9.6±0.04µs -1.03%
RegExp Literal (Compiler) 1732.3±5.09ns 1715.1±5.40ns -0.99%
RegExp Literal (Execution) 11.6±0.06µs 11.6±0.06µs 0.00%
RegExp Literal (Parser) 9.5±0.06µs 9.4±0.11µs -1.05%
RegExp Literal Creation (Compiler) 1444.5±3.72ns 1657.1±4.71ns +14.72%
RegExp Literal Creation (Execution) 8.6±0.02µs 8.8±0.03µs +2.33%
RegExp Literal Creation (Parser) 7.6±0.03µs 7.5±0.03µs -1.32%
Static Object Property Access (Compiler) 1531.9±4.50ns 1593.1±4.16ns +4.00%
Static Object Property Access (Execution) 5.5±0.05µs 5.4±0.02µs -1.82%
Static Object Property Access (Parser) 11.5±0.04µs 11.3±0.04µs -1.74%
String Object Access (Compiler) 1493.5±7.79ns 1493.2±8.21ns -0.02%
String Object Access (Execution) 6.2±0.03µs 6.2±0.03µs 0.00%
String Object Access (Parser) 15.8±0.03µs 15.8±0.02µs 0.00%
String comparison (Compiler) 2.2±0.01µs 2.2±0.01µs 0.00%
String comparison (Execution) 4.9±0.03µs 4.8±0.02µs -2.04%
String comparison (Parser) 12.7±0.03µs 12.5±0.03µs -1.57%
String concatenation (Compiler) 1757.4±4.50ns 1711.2±3.61ns -2.63%
String concatenation (Execution) 4.6±0.07µs 4.5±0.01µs -2.17%
String concatenation (Parser) 8.8±0.04µs 8.8±0.12µs 0.00%
String copy (Compiler) 1333.9±4.73ns 1367.9±3.87ns +2.55%
String copy (Execution) 4.4±0.05µs 4.2±0.01µs -4.55%
String copy (Parser) 6.6±0.03µs 6.5±0.05µs -1.52%
Symbols (Compiler) 965.0±1.95ns 977.0±2.58ns +1.24%
Symbols (Execution) 4.3±0.02µs 4.4±0.04µs +2.33%
Symbols (Parser) 5.0±0.01µs 4.9±0.01µs -2.00%

Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot pushed a commit that referenced this pull request Apr 8, 2022
`ArrayBuffer.isView()` should check whether the object contains a `[[ViewedArrayBuffer]]` internal slot, which `DataView` has.

It changes the following:
- Fix `ArrayBuffer.isView()`
@bors
Copy link

bors bot commented Apr 8, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Fix ArrayBuffer.isView() [Merged by Bors] - Fix ArrayBuffer.isView() Apr 8, 2022
@bors bors bot closed this Apr 8, 2022
@bors bors bot deleted the fix/ArrayBuffer.isView branch April 8, 2022 20:41
Razican pushed a commit that referenced this pull request Jun 8, 2022
`ArrayBuffer.isView()` should check whether the object contains a `[[ViewedArrayBuffer]]` internal slot, which `DataView` has.

It changes the following:
- Fix `ArrayBuffer.isView()`
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